Skip to content

Hard Reset functionality for AspGoat #102

@Soham7-dev

Description

@Soham7-dev

Discussed in #78

Originally posted by Soham7-dev September 25, 2025

🚨 Help Wanted: Implement a Hard Reset Feature for AspGoat

Context:
AspGoat’s Unrestricted File Upload / File Overwrite lab lets learners deface the actual homepage as part of the challenge.
While that’s intentional, it means the application can be left in a broken state.
Currently, we simply display a warning and ask users to manually redeploy the container or clone the repo to restore the app.

Goal:
Create a one-click “Hard Reset” capability that restores the application to its original state.

image

Requirements & Ideas

  • Reset Scope

    • Restore the entire wwwroot (or equivalent) directory to a clean snapshot.
    • Re-seed the SQLite database (users, comments, seeded labs, etc.).
    • Ensure uploaded/overwritten files are removed or replaced with pristine copies.
  • Implementation Thoughts

    • Container-level approach (e.g., Docker volume snapshot, ephemeral overlay).
    • Application-level endpoint (/admin/reset) that:
      • Drops and recreates the DB schema.
      • Copies a baseline of static assets from a protected location.
    • Cross-platform: should work both in local dev and containerized environments.
  • Security Considerations

    • Restricted to authorized roles (e.g., Admin or in dev mode only).
    • Prevent abuse—avoid becoming an unintended DoS vector.

Tech Stack

  • Backend: ASP.NET Core 8 (MVC + Razor)
  • Database: SQLite (seeded via EF Core)
  • Deployment: Docker (multi-stage build)

What We’re Looking For

  • .NET / DevOps / Security engineers who can:
    • Propose a clean architecture for snapshot/restore.
    • Implement and document the solution.
    • Provide automated tests to verify reset integrity.

💡 How to Contribute

This feature will make AspGoat more learner-friendly while showcasing a real-world secure recovery pattern.

Recognition: Major contributors will be highlighted in the README “Hall of Fame” and future release notes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededquestionFurther information is requestedtechnical debtNon-urgent code quality issues that should be addressed to keep the project healthy.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions