Portcullis Labs - XSS http://labs.portcullis.co.uk Labs Portcullis updates. en Labs portcullis Tue, 22 Feb 2011 11:21:24 GMT http://backend.userland.com/rss 60 Labs Portcullis hhttp://labs.portcullis.co.uk/mg/logo.gif http://labs.portcullis.co.uk How to Detect and Exploit 99% of XSS Vulnerabilities | Content Wed, 02 Apr 2008 16:23:40 GMT http://labs.portcullis.co.uk/application/how-to-detect-and-exploit-99-of-xss-vulnerabilities/ <p>This presentation has given in Intercon 2007 (Portcullis's internal conference), Talks about exploiting and identifying most common XSS vulnerabilities in real world. </p> <p>Examples include following types,</p> <ul> <li>Classic XSS Vulnerabilities</li> <li>In HTML Attributes</li> <li>In Comments</li> <li>In Javascript Blocks</li> <li>DOM Based XSS</li> <li>Flash Based XSS</li> <li>Direct Linking</li> </ul> <p>Presentation was heavily based on demonstration, so you need to fill in the blanks.</p> XSS Tunnel in Action - Video | Download Mon, 31 Mar 2008 11:08:39 GMT http://labs.portcullis.co.uk/download/xsstunnelling-video.zip /download/xsstunnelling-video.zip XSS Tunnel | Content Wed, 02 Apr 2008 15:12:53 GMT http://labs.portcullis.co.uk/application/xss-tunnelling/xss-tunnel/ <h2>What Is XSS Tunnelling?</h2> <p><a href="/application/xss-tunnelling/">XSS Tunnelling</a> is the tunnelling of HTTP traffic through an XSS Channel to use virtually any application that supports HTTP proxies.</p> <h2>What Is XSS Tunnel?</h2> <p>XSS Tunnel is a standard HTTP proxy which sits on an attacker&rsquo;s system. Any tool that is configured to use it will tunnel its traffic through the active XSS Channel on the <a href="/application/xssshell/">XSS Shell </a>server. The XSS Tunnel converts the request and responds transparently to validate the HTTP responses and XSS Shell requests.</p> <p>Refer to <a href="/application/xss-tunnelling/">XSS Tunnelling paper</a> to read details.</p> <h2>Demonstration Video</h2> <p><a href="/download/xsstunnelling-video.zip">Download XSS Tunnelling demonstration video</a>. Video shows how to use XSS Tunnel to bypass NTLM by exploiting an example permanent XSS.</p> <h2>Download</h2> <p><a href="/download/xssshell-xsstunnell.zip">Download package</a> includes following files :</p> <ul> <li>Binary Release of XSS Tunnel v1.0.8</li> <li>.NET Solution + Source Code for XSS Tunnel v1.0.8</li> <li>XSS Tunnelling White Paper</li> <li>XSS Shell v0.6.2 Release (ASP files, database and documentation)</li> </ul> <p>&nbsp;</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> XSS Tunnelling | Document Wed, 02 Apr 2008 10:25:00 GMT http://labs.portcullis.co.uk/content/xss-tunnelling/ <p>XSS Tunnelling is the tunnelling of HTTP traffic through an XSS Channel to use virtually any application that supports HTTP proxies. This paper explains the idea and the real world implementation.</p> <p><a href="/download/XSS-Tunnelling.pdf">Download Paper</a></p> <p>Tools mentioned in the paper:</p> <ul> <li><a href="/application/xss-tunnelling/xss-tunnel/">XSS Tunnel</a></li> <li><a href="/application/xssshell/">XSS Shell</a></li> </ul>