File in The Hole! PDF
File in The Hole! PDF
File in The Hole! PDF
RFC 1867
Specific Issues:
Improper or no access control
Arbitrary (Unrestricted) File Upload
Overwriting critical files
Path disclosure
Directory Traversal
Insecure Temporary File
+ Other web application vulnerabilities
Group A:
Admin level access needed (Specific users which
have been authorised by admin)
Authentication bypass vulnerabilities…
Client Side Attacks… CSRF , XSS
Group B:
No authentication needed
Normal user can have access
“All the options are on the table!”
External module/library, it is safe: Wrong!
It is just an editor: Wrong!
Bunch of images are harmless: Wrong!
In-house applications are more vulnerable.
Published vulns. in public apps:
Year OSVDB.org Records
2012 194
2011 123
2010 123
2009 107
2008 145
Restricted File Upload:
Validation or other protections
▪ Can be bypassed?
Unrestricted/Unprotected file upload:
You can upload whatever you want!
▪ And NO access control?
▪Piece of cake!
Based on: http://exploit-db.com – total: 74 items
More info: http://goo.gl/NmxpM
Changing the functionality
Bypassing the protections
Make the website vulnerable
Denial of Service! Lame but possible
Famous sensitive files:
.htaccess, web.config, crossdomain.xml,
clientaccesspolicy.xml, global.asa, golbal.asax
Exploit-DB ID: 17644
FCKeditor (Old Version) Protection bypass by
uploading a .htaccess file
Even x_test.gif could run as a php file!
Better Exploitation:
Running a shell inside the .htaccess file
By “Eldar Marcussen” -
http://www.justanotherhacker.com
Included libraries are not always safe
File system and webserver are important
Different method for path disclosure:
File/Directory/Symlink already exists
Filename is too long
▪ NTFS: 255 characters
Forbidden characters or reserved words
▪ WinOS: “<>?|:*"” + Control Characters
▪ WinOS: CON, NUL, COM1, …
Sensitive file system patterns
▪ NTFS ADS: “:$I30:$INDEX_ALLOCATION” or “::$BITMAP”
Permission Denied
GleamTech FileVista v4.6:
Uploading “test” as a file when we have a
directory with the same name:
NTFS ADS:
FolderName::$Index_Allocation
Or
FolderName:$I30:$Index_Allocation
Gzip Compression: