CodeScan Advisory: Avatar MOD v1.3 for Snitz Forums v3.4 - Arbitrary File Upload
- From: "CodeScan Labs" <advisories@xxxxxxxxxxxx>
- Date: Thu, 18 May 2006 10:50:18 +1200
= CodeScan Advisory, codescan.com <advisories@xxxxxxxxxxxx>
= Avatar MOD v1.3 for Snitz Forums v3.4 - Arbitrary File Upload
= Vendor Website:
= Affected Version:
= Avatar MOD v1.3 for Snitz Forums v3.4
= Researched By
= Paul Craig <paul.craig@xxxxxxxxxxxxxxxxxxxxxxx>
= Public disclosure on May 18th, 2006
== Overview ==
CodeScan Labs (www.codescan.com), has recently released a new source
code scanning tool, CodeScan. CodeScan is an advanced auditing tool
designed to check web application source code for security vulnerabilities.
CodeScan utilises an intelligent source code parsing engine, traversing
execution paths and tracking the flow of user supplied input.
During the beta testing of CodeScan PHP, the Avatar MOD v1.3 for Snitz
Forums was selected as a test case application.
This advisory is the result of research into the security of the
Avatar MOD v1.3 for Snitz Forums, based on the report generated by the
== Affected Versions ==
Avatar MOD v1.3 for Snitz Forums v3.4
== Vulnerability Details ==
* Arbitrary File Upload *
The Avatar MOD gives portal administrators the ability to upload avatar
images to be used within the forum. CodeScan located a file upload
vulnerability in the avatar_upload.asp which can be exploited by a remote
user to upload any arbitrary file.
[ Start Pseudo Code ]
arrAllowedTypes = Array(".jpg",".jpeg",".gif",".png")
strExtension = LCase(Mid(FileName,InStrRev(FileName,".")))
Dim blnAllow : blnAllow = False
for intForCounter = 0 to Ubound(arrAllowedTypes)
if strComp(strExtension,arrAllowedTypes(intForCounter),1) = 0 then
blnAllow = True
if Not blnAllow then
UploadMessage = "[" & strExtension & "] is not allowed."
[ End Pseudo Code ]
This function is vulnerable to the ASP Null Byte problem as documented in
Exploitation occurs when a null byte is embedded in the filename sent with
the upload. If a user were to upload the file test.asp[NULLBYTE].jpg the
application will write the file test.asp file to a writeable directory
inside the web root.
== Solutions ==
"Hamiln" the developer of the Avatar MOD was contacted in early April,
and we did not receive any response. Security-Assessment.com recommends
the file avatar_upload.asp be removed from any production web servers until
a new version of the software is released.
== Credit ==
Discovered by Paul Craig of Security-Assessment.com
== About CodeScan Labs Ltd ==
CodeScan Labs is a specialist security research and development
organisation, that has developed the cornerstone application, CodeScan.
CodeScan Labs helps organisations secure their web services through the
automated scanning of the web application source code for security
vulnerabilities. The CodeScan product is currently available for ASP