401-403-bypass-techniq…
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths.…
Insecure file upload playbook. Use when testing upload validation, storage paths, processing pipelines, preview behavior, overwrite risks, and upload-to-RCE chains.
Claude Code
$ npx -y skills add yaklang/hack-skills --skill upload-insecure-files --agent claude-code
Codex
$ npx skills add yaklang/hack-skills --skill upload-insecure-files -a codex -y
Cursor
$ npx skills add yaklang/hack-skills --skill upload-insecure-files -a cursor -y
Gemini CLI
$ npx skills add yaklang/hack-skills --skill upload-insecure-files -a gemini-cli -y
GitHub Copilot
$ npx skills add yaklang/hack-skills --skill upload-insecure-files -a github-copilot -y
OpenCode
$ npx skills add yaklang/hack-skills --skill upload-insecure-files -a opencode -y
Windsurf
$ npx skills add yaklang/hack-skills --skill upload-insecure-files -a windsurf -y
name: upload-insecure-files description: >- Insecure file upload playbook. Use when testing upload validation, storage paths, processing pipelines, preview behavior, overwrite risks, and upload-to-RCE chains.
> **AI LOAD INSTRUCTION**: Expert file upload attack playbook. Use when the target accepts files, imports, avatars, media, documents, or archives and you need the full workflow: validation bypass, storage path abuse, post-upload access, parser exploitation, multi-tenant overwrite, and chaining into XSS, XXE, CMDi, traversal, or business logic impact. For web server parsing vulnerabilities, PUT method exploitation, and specific CVEs (WebLogic, Flink, Tomcat), load the companion [SCENARIOS.md](./SCENARIOS.md).
Also load [SCENARIOS.md](./SCENARIOS.md) when you need:
Use this file as the deep upload workflow reference. Also load:
---
Every upload feature should be tested as four separate trust boundaries:
1. **Accept**: what validation happens before the file is stored? 2. **Store**: where is the file written and under what name and permissions? 3. **Process**: what background tools, converters, scanners, parsers, or extractors touch it? 4. **Serve**: how is it later downloaded, rendered, transformed, or shared?
Many targets validate only one stage. The bug usually appears in a different stage than the one where the file was uploaded.
---
Before payload selection, answer these:
---
| Validation Style | What to Test | |---|---| | extension blacklist | double extension, case toggles, trailing dot, alternate separators | | content-type only | mismatched multipart `Content-Type`, browser vs proxy rewrite | | magic-byte only | polyglot files or valid header plus dangerous tail content | | server-side rename | whether dangerous content survives rename and later rendering | | image-only policy | SVG, malformed image plus metadata, parser differential | | archive or import only | zip contents, nested path names, XML members, decompression behavior |
Representative bypass families:
shell.php.jpg avatar.jpg.php file.asp;.jpg file.php%00.jpg file.svg archive.zip
This small sample set already covers the main use cases of the former standalone upload payload helper, so no extra entry is needed for first-pass selection.
Do not stop at upload success. Successful upload without dangerous retrieval or processing is not enough.
---
Look for patterns like:
/uploads/USER_ID/avatar.png /files/org-slug/report.pdf /cdn/tmp/<uuid>/<filename>
Test for:
A safe file can still be dangerous if the **filename** is reflected into:
If filename is reflected, treat it like stored input, not like passive metadata.
---
The highest-value upload bugs often live in asynchronous processors.
| Processor | Risk | |---|---| | image resizing or thumbnailing | parser differential, ImageMagick or library bugs, metadata reflection | | video or audio transcoding | FFmpeg-style parsing and protocol abuse | | archive extraction | zip slip, overwrite, decompression bombs | | document import | CSV formula injection, office XML parsing, macro-adjacent workflows | | XML or SVG parsing | XXE, SSRF, local file disclosure | | HTML to PDF or preview rendering | SSR
Master Entry → Category Entries → Deep Topic Skills One master entry, six category entries, and 102 deep topic skills across 14 security domains.
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths.…
Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync…
AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template…
Kerberos attack playbook for Active Directory. Use when targeting AD authentication via AS-REP roasting, Kerberoasting,…
AI/ML security playbook. Use when assessing model supply chain attacks (pickle RCE, poisoned weights), adversarial examples,…
Android pentesting playbook. Use when testing Android applications for SSL pinning bypass, exported component abuse, WebView…
Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys)…
Clean and finalize authorized natural-language text intended for readers by auditing suspicious invisible Unicode and rewriting…