RE: IIS 6 shell



i write an asp script with aspnet extension and the server thinks that
is a aspnet script and give me the error. however if i write a more
complex script in aspnet, includind fileSystemObject and other it
gives me the same error descbribed previously.

The .aspx script will need to enable compatibility mode in a page directive.
<%@ Page aspcompat=true %>

Alternativley. just name the script .asa and upload and call it, the .asp
will run.

Brett

-----Original Message-----
From: listbounce@xxxxxxxxxxxxxxxxx [mailto:listbounce@xxxxxxxxxxxxxxxxx] On
Behalf Of Ricardo Mourato
Sent: Sunday, 25 May 2008 5:43 a.m.
To: pen-test@xxxxxxxxxxxxxxxxx
Subject: IIS 6 shell

hi folks, first off all sorry about my typing errors cause i am using
links at the moment :D (Gentoo installing here... :P)

i am doing a penetration test in a costumers application i have found
many bugs such as XSS and some SQL injections. All those bugs are now
corrected, but i have found another one, pay attention:

The server is Running Windows Server 2003 and IIS 6 fully patched,
only ports 80 and 443 are exposed to world wide.
in the application we have an upload form to upload pictures to the
server, this pictures will be the users avatars in the application
"forum"
the problem is that the verification of the uploaded files is made in
client side by a javascript, worse, they only check the file extension
and not the content type. As you read previously, i am using links, so
bypassing the poor javascript security was easy, since links
javascript support is also poor and the script did not run properly
and allow me to upload any file including .exe .txt .js .php .aspx
(except asp!)

yep, thats it i was not allowed to upload an .asp script cause that
verification is made at server side. dont know why... however i can
upload files such as aspx and php, but the server seems to have a
"strange" behavior.

if i upload a php script, all the files in that directory are deleted,
once again, dont know why...

if i upload an aspx script with the content <% response.write("hey
dude, asp works!") %> it runs the script
but if i create a more complex script for listing directories or copy
files or other things it gives me an "Server Error in "/" Application.
Runtime error bla bla bla.."

all the scripts are correctly written, being a Linux user at all, i
havent much asp knowlege so i just download them from one of the many
asp site tutorials found on google

another thing, it seems that the application is written in asp (not
aspnet) the page extensions are .asp and they do not allow asp uploads
remeber?

in my opinion i think that the problem is

i write an asp script with aspnet extension and the server thinks that
is a aspnet script and give me the error. however if i write a more
complex script in aspnet, includind fileSystemObject and other it
gives me the same error descbribed previously.

Any clue on get a shell?
Tnks in advice.

------------------------------------------------------------------------
This list is sponsored by: Cenzic

Top 5 Common Mistakes
in Securing Web Applications
Find out now! Get Webinar Recording and PPT Slides

www.cenzic.com/landing/securityfocus/hackinar
------------------------------------------------------------------------



------------------------------------------------------------------------
This list is sponsored by: Cenzic

Top 5 Common Mistakes
in Securing Web Applications
Find out now! Get Webinar Recording and PPT Slides

www.cenzic.com/landing/securityfocus/hackinar
------------------------------------------------------------------------



Relevant Pages

  • IIS 6 shell
    ... The server is Running Windows Server 2003 and IIS 6 fully patched, ... in the application we have an upload form to upload pictures to the ... javascript support is also poor and the script did not run properly ... (except asp!) ...
    (Pen-Test)
  • Re: Problem with ASP on Webserver
    ... There is no ActiveX object involved in this problem, we only request a ASP ... function in the script ... (Accept-Language:) ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Problem with ASP on Webserver
    ... There is no ActiveX object involved in this problem, we only request a ASP ... function in the script ... (Accept-Language:) ...
    (microsoft.public.windowsce.platbuilder)
  • Re: IIS Security Question
    ... input that changes the operation of the ASP code in some ... >that folder would only be accessible via the upload ... >script can't be misused, ... >another folder, or uploading an ASP script to a folder ...
    (microsoft.public.inetserver.iis.security)
  • HOWTO: Remotely debug classic ASP in Visual Studio 2005
    ... i am still no closer to being able to debug ... ASP not ASP.NET ... Connect to, or expand, the web-server running the web-site is you want ... Check the "Enable ASP server-side script debugging" checkbox. ...
    (microsoft.public.vsnet.debugging)