How edarmy/web-vulnerability-automation-script works
Project Type and Purpose
• The project is an automation tool focused on identifying and exploiting common web vulnerabilities from the PortSwigger Web Security Academy labs.
• Its primary purpose is to help security researchers and penetration testers streamline testing via automated vulnerability scanning, custom payload injections, session management, and multi-threaded execution.
• The README confirms the target labs cover both authentication vulnerabilities and access control issues.
Analyzing the File Structure
• The top-level folder “Automation” is divided into two vulnerability categories: “Authentication Vulnerabilities” and “access control vlurn”. Each category has its own subdirectories.
• Within these directories, each lab (for example, “Lab1 2FA simple bypass” under authentication, and “Unprotected admin functionality…” labs under access control) appears as a self-contained module with its own script, requirements, and readme.
• The structure suggests that each lab is managed as an independent module that likely shares common patterns (such as logging, payload injection, and session management) even though they target different types of vulnerabilities.
Key Components
a. User/Tester Interface:
• Entry point where a security researcher initiates the automation (likely via a CLI or script execution).
b. Automation Controller/Engine:
• A central orchestrator (even if implicit) that selects and triggers different vulnerability modules.
• This component may handle core functions such as configuration management, session handling, and multi-threaded execution.
c. Vulnerability Modules:
• Divide into two main groups:
• Authentication Vulnerabilities (e.g., “2FA simple bypass” module)
• Access Control Vulnerabilities (including “Unprotected admin functionality with unpredictable URL”, “Unprotected admin functionality”, and “User role controlled by request parameter”).
• Each module is depicted as a distinct component that encapsulates the logic for scanning/exploitation, custom payloads, and lab-specific operations.
d. Supporting Components:
• Logging & Reporting: A dedicated component for storing and tracking results, as indicated in the README.
• Dependency/Configuration Management: Show that each module might rely on common or individual dependencies (from each module’s requirements.txt).
e. Multi-threaded Execution Engine:
• A logical unit that indicates the tool’s ability to run scans concurrently, boosting performance.
f. External Targets:
• A component representing external web applications (the actual PortSwigger labs) that are tested by these automation modules.
• Starting from the tester’s input to the Automation Controller.
• The Controller then dispatches tasks to the respective vulnerability modules.
• Modules communicate results back to the Controller.
• From these modules, results flow toward the Logging & Reporting system.
• Interaction between the Controller and multi-threaded execution—in other words, show that tasks may be dispatched concurrently.
• That each module may share direct interactions with external lab targets via HTTP requests (or similar protocols).
Architectural Patterns and Design Principles
• The overall design mimics a modular pattern, where each lab-specific script acts as an independent component.
• Separation of concerns: testing logic is encapsulated in individual modules while common tasks (such as session management and logging) reside in other supporting components.
• The use of a centralized Automation Engine – either explicitly coded or conceptually understood as the orchestrator – encourages a “plug-and-play” design where additional vulnerability modules can be integrated easily.
Final Recommendations
• Every component is detailed with its responsibilities clearly labeled.
• Use connectors to indicate dependencies (for example, configuration files and multi-threaded execution support).
• Avoid oversimplification—capture as many distinct components as possible, even if some labs share similar structures, to emphasize the modularity of the design.