Improper file path handling and dynamic inclusion enable sensitive file disclosure, config/source leakage, SSRF pivots, and code execution. Treat all user-influenced paths, names, and schemes as untrusted; normalize and bind them to an allowlist or eliminate user control entirely.
Attack Surface
Path Traversal
Read files outside intended roots via ../, encoding, normalization gaps
Local File Inclusion (LFI)
Include server-side files into interpreters/templates
Remote File Inclusion (RFI)
Include remote resources (HTTP/FTP/wrappers) for code execution
Archive Extraction
Zip Slip: write outside target directory upon unzip/untar
Compare behaviors - Web server vs application behavior
Escalate - From disclosure (read) to influence (write/extract/include), then to execution (wrapper/engine chains)
Validation
Show a minimal traversal read proving out-of-root access (e.g., /etc/hosts) with a same-endpoint in-root control
For LFI, demonstrate inclusion of a benign local file or harmless wrapper output (php://filter base64 of index.php)
For RFI, prove remote fetch by OAST or controlled output; avoid destructive payloads
For Zip Slip, create an archive with ../ entries and show write outside target (e.g., marker file read back)
Provide before/after file paths, exact requests, and content hashes/lengths for reproducibility
False Positives
In-app virtual paths that do not map to filesystem; content comes from safe stores (DB/object storage)
Canonicalized paths constrained to an allowlist/root after normalization
Wrappers disabled and includes using constant templates only
Archive extractors that sanitize paths and enforce destination directories
Impact
Sensitive configuration/source disclosure → credential and key compromise
Code execution via inclusion of attacker-controlled content or overwritten templates
Persistence via dropped files in served directories; lateral movement via revealed secrets
Supply-chain impact when report/template engines execute attacker-influenced files
Pro Tips
Compare content-length/ETag when content is masked; read small canonical files (hosts) to avoid noise
Test proxy/CDN and app separately; decoding/normalization order differs, especially for %2f and %2e encodings
For LFI, prefer php://filter base64 probes over destructive payloads; enumerate readable logs and sessions
Validate extraction code with synthetic archives; include symlinks and deep ../ chains
Use minimal PoCs and hard evidence (hashes, paths). Avoid noisy DoS against filesystems
Summary
Eliminate user-controlled paths where possible. Otherwise, resolve to canonical paths and enforce allowlists, forbid remote schemes, and lock down interpreters and extractors. Normalize consistently at the boundary closest to IO.
How to use it
Copy the folder
Take asdfgh1445/strix•路径穿越与文件包含 from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
Check the name does not clash
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.