pentesting, updated
Test file extensions handling for sensitive information
Check whether the server returns source or config files instead of executing or blocking them.
Goal
Confirm the server doesn’t leak source, config or backup content through an unexpected extension.
How to test
Request the same path with sensitive extensions appended or swapped in:
for ext in asa inc config bak old swp orig; do
curl -s -o /dev/null -w "%{http_code} %{size_download} .$ext\n" https://example.com/index.$ext
done
Also fuzz for the pattern across the whole site with ffuf:
ffuf -c -w paths.txt -u https://example.com/FUZZ -e .bak,.old,.swp,.inc,.config
What to look for
A 200 with readable PHP/ASP/config source instead of rendered output, or a non-404 size that differs from the real 404 page.
References
- OWASP WSTG-CONF-03 — Test File Extensions Handling for Sensitive Information.
- Related: review old and backup files.