Portcullis Labs - ASP http://labs.portcullis.co.uk Labs Portcullis updates. en Labs portcullis Tue, 22 Feb 2011 11:21:34 GMT http://backend.userland.com/rss 60 Labs Portcullis hhttp://labs.portcullis.co.uk/mg/logo.gif http://labs.portcullis.co.uk viewstate | Content Wed, 02 Apr 2008 10:50:25 GMT http://labs.portcullis.co.uk/application/viewstate/ <p>Viewstate is an ASP.Net viewstate decoder, checker, parser and encoder. It supports both old and new types of viewstate and the data can be extracted directly from the web.</p> <h2>Requirements</h2> <p>Viewstate is platform independent and can be downloaded in source code or Windows binary formats. If you are building viewstate from source you will need the GNU C compiler (under Windows you can use MinGW).</p> <h2><b>Downloads</b></h2> <p>Viewstate can be downloaded from the Source Forge project page <a href="http://sourceforge.net/projects/viewstate">sourceforge.net/projects/viewstate</a>.</p> <h2>Compiling</h2> <p>A Makefile is provided to provide the usual compilation process of:</p> <ul> <li>make</li> <li>make install (as root)</li> </ul> <p>However, you can compile it manually with the following:</p> <ul> <li>gcc -o viewstate viewstate.c</li> </ul> <h2><b>Running</b></h2> <p>If viewstate is run with no options, the online help is displayed. But a simple decode of the viewstate data held by the Acme company web site would be:</p> <p><code>viewstate --decode --url=http://www.acme.fake/main.asp</code></p> <h2>License</h2> <p>Viewstate is covered by the GPL v3 license.</p> XSS Shell | Content Mon, 10 Nov 2008 14:11:20 GMT http://labs.portcullis.co.uk/application/xssshell/ <p>XSS Shell is powerful a XSS backdoor and zombie manager. This concept first presented by &quot;XSS-Proxy - http://xss-proxy.sourceforge.net/&quot;. Normally in XSS attacks attacker has one shot, in XSS Shell you can interactively send requests and get responses from victim. you can backdoor the page.</p> <p>You can steal basic auth, you can bypass IP restrictions in administration panels, you can DDoS some systems with a permanent XSS vulnerability etc. Attack possibilities are limited with ideas. Basically this tool demonstrates that you can do more with XSS.</p> <h2>Download</h2> <p>This package includes the latest version of XSS Shell and <a href="/application/xss-tunnelling/xss-tunnel/">XSS Tunnel</a>. XSS Shell can be used without XSS Tunnel, however you'll get more out of it with <a href="/application/xss-tunnelling/xss-tunnel/">XSS Tunnel</a>.&nbsp; </p> <p><a href="/download/xssshell-xsstunnell.zip ">Download SS Shell and XSS Tunnel</a></p> <h2>Features</h2> <p>XSS Shell has several features to gain whole access over victim. Also you can simply add your own commands.</p> <p>Most of the features can enable or disabled from configuration or can be tweaked from source code.</p> <ul> <li>Regenerating Pages <ul> <li>This is one of the key and advanced features of XSS Shell. XSS Shell re-renders the infected page and keep user in virtual environment. Thus even user click any links in the infected page he or she will be still under control! (within cross-domain restrictions) In normal XSS attacks when user leaves the page you can't do anything</li> <li>Secondly this feature keeps the session open so even victim follow an outside link from infected page session is not going to timeout and you will be still in charge.</li> </ul> </li> <li>Keylogger</li> <li>Mouse Logger (click points + current DOM)</li> <li>Built-in Commands;<br /> <ul> <li>Get Keylogger Data</li> <li>Get Current Page (Current rendered DOM / like screenshot)</li> <li>Get Cookie</li> <li>Execute supplied javaScript (eval)</li> <li>Get Clipboard (IE only)</li> <li>Get internal IP address (Firefox + JVM only)</li> <li>Check victim's visited URL history</li> </ul> </li> </ul> <h2><br /> Installation</h2> <p>XSS Shell uses ASP + MS Access database as backend but you can simply port them into any other server-side solution. You just need to stick with simple communication protocol.</p> <h3>Install Admin Interface</h3> <ol> <li>Copy &quot;xssshell&quot; folder into your web server</li> <li>Copy &quot;db&quot; to a secure place (below root)</li> <li>Configure &quot;database path&quot; from &quot;xssshell/db.asp&quot;</li> <li>Modify hard coded password in db.asp [default password is : w00t]</li> <li>Now you can access admin interface from something like http://[YOURHOST]/xssshell/</li> </ol> <h3>Configure XSS Shell for communication;</h3> <ol> <li>Open xssshell.asp</li> <li>2. Set &quot;SERVER&quot; variable to where your XSSShell folder is located. i.e: &quot;http://[YOURHOST]/xssshell/&quot;;</li> <li>3. Be sure to check &quot;ME&quot;, &quot;CONNECTOR&quot;, &quot;COMMANDS_URL&quot; variables. If you changed filenames, folder names or some kind of different configuration you need modify them.</li> </ol> <p>Now open your admin interface from your browser,<br /> <br /> To test it, just modify &quot;sample_victim/default.asp&quot; source code and replace &quot;http://attacker:81/release/xssshell.js&quot; URL with your own XSS Shell URL. Open &quot;sample_victim&quot; folder in some other browser and may be upload in to some other server.</p> <p>Now you should see a zombie in admin interface. Just write something into &quot;parameters&quot; textarea and click &quot;alert()&quot;. You should see an alert message in victim's browser.</p> <p><br /> Security Notes</p> <ul> <li>As a hunter be careful about possible &quot;Backfire&quot; in getSelfHTML(). Someone can hack you back or track you by another XSS or XSS Shell attack.</li> <li>Checkout &quot;showdata.asp&quot; and implement your own &quot;filter()&quot; function to make it safer for you.</li> <li>Put &quot;On error resume next&quot; to db.asp, better modify your web server to not show any error.</li> </ul> <h2>How to Extend</h2> <p>First implement new feature to xssshell.asp</p> <ol> <li>Add new enum for your control <ul> <li>Set a name and unique number like &quot;CMD_GETCOOKIE&quot;</li> <li>var CMD_SAMPLE = 78;</li> <li>Set datatype for your response (generally TEXT),</li> <li>dataTypes[CMD_SAMPLE] = TEXT;</li> </ul> </li> <li>Write your function and add it to page <ul> <li>function cmdSample(){return &quot;yeah working !&quot;}</li> </ul> </li> <li>Call it <ul> <li>Go inside to &quot;function processGivenCommand(cmd)&quot;</li> <li>Add a new case like &quot;case CMD_SAMPLE:&quot;</li> </ul> </li> <li>Report it back <ul> <li>Inside the case call log;<br /> &quot;log(cmdSample(), dataTypes[cmd.cmd], cmd.attackID, &quot;waitAndRun()&quot;);&quot;</li> </ul> </li> </ol> <p>Secondly Implement it to admin interface;</p> <ul> <li>In db.asp just add a new element to &quot;Commands&quot; array (command name, command unique number, description).<br /> <br /> i.e. &quot;cmdSample()&quot;,78,&quot;Command sample ! Just returns a message&quot;</li> </ul> <p>There are parameters and lots of helper in the code. Check out other commands for reference. <br /> <br /> Enable debug feature to debug your new commands easily.</p> <h2>External Libraries</h2> <ul> <li>moo.ajax -moofx.mad4milk.net</li> <li>script.aculo.us - (http://script.aculo.us, http://mir.aculo.us)</li> </ul>