Portcullis Labs - All Content http://labs.portcullis.co.uk Labs Portcullis updates. en Labs portcullis Fri, 13 Apr 2012 12:12:21 GMT http://backend.userland.com/rss 60 Labs Portcullis hhttp://labs.portcullis.co.uk/mg/logo.gif http://labs.portcullis.co.uk VulnApp | Content Tue, 27 Mar 2012 18:36:52 GMT http://labs.portcullis.co.uk/application/vulnapp/ <p> <p style="font-family: sans-serif; text-align: justify; ">Recently myself and a colleague were asked to give some training to some training to some ASP.net developers. My colleague was asked to give the main training session whilst I was asked to run a post training game to test the developers retention of the concepts. After looking at some of the existing ASP.net applications I decided I'd like to write my own. The result of this is&nbsp;<a href="http://projects.nth-dimension.org.uk/dir?d=VulnApp" style="color: rgb(146, 157, 181); text-decoration: none; ">VulnApp</a>, a BSD licensed ASP.net application implementing some of the most common applications we come across on our penetration testing engagements. The source is also available from my&nbsp;<a href="http://projects.nth-dimension.org.uk/" style="color: rgb(146, 157, 181); text-decoration: none; ">CVS server</a>&nbsp;so that others can, if they like, contribute.</p> <p style="font-family: sans-serif; text-align: justify; ">To make it easier for developers to learn, I've logged&nbsp;<a href="http://projects.nth-dimension.org.uk/rptview?rn=6" style="color: rgb(146, 157, 181); text-decoration: none; ">tickets</a>&nbsp;for all of the intentional vulnerabilities I've introduced along the way. Be aware that there might be others I've missed, particularly gaps in the enforcement of ACLs and logic bugs. I'd encourage you to log any other vulnerabilies you find along the way.</p> </p> Breaking the links: Exploiting the linker | Content Tue, 27 Mar 2012 01:26:35 GMT http://labs.portcullis.co.uk/application/breaking-the-links-exploiting-the-linker/ <p><span style="color: rgb(51, 51, 51); font-family: Verdana,Arial,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: rgb(255, 255, 255); display: inline ! important; float: none;">Presentation </span>on exploiting linkers based on <a href="http://www.nth-dimension.org.uk/downloads.php?id=77">my paper</a> (as given at Uncon 0x12 and CRESTCon 2010).</p> <p>I am currently working on an update to the paper which will focus on other UNIX like OS with the aim of sharing some of my findings at a future conference.</p> HTML 5 Good Practice Guide | Content Tue, 27 Mar 2012 00:18:18 GMT http://labs.portcullis.co.uk/application/html-5-good-practice-guide/ <p>This document is not intended to be a definitive guide, but more of a review of the speci?c security issues resulting from the use of HTML 5.</p> <p>Portcullis was asked to provide consultancy in the form of analysis and good practice recommendations with respect to migrations from Flash to HTML 5.</p> <p>Whilst this document is not intended to be a definitive guide, Portcullis believes that it should provide a high level summary of the pros and cons of the proposed migration.</p> Web Application Password Reset Good Practice Guide | Content Sat, 24 Mar 2012 19:01:21 GMT http://labs.portcullis.co.uk/application/web-application-password-reset-good-practice-guide/ <p>This guide aims to detail the key features of secure password reset procedures which can be used within web applications. As well as detailing these feature is gives examples of how the reset can be done.</p> secdump | Content Sat, 24 Mar 2012 17:52:38 GMT http://labs.portcullis.co.uk/application/secdump/ <p>secdump is a simple meterpreter module uploads and runs&nbsp;<a href="http://www.truesec.se/sakerhet/verktyg/saakerhet/gsecdump_v2.0b5">gsecdump</a> from truesec.</p> <pre> meterpreter &gt; run secdump UploadExec gsecdump OPTIONS: -a Dump all creds -h Help menu. -l Dump LSA Secrets -p Path on target to upload executable, default is %TEMP%. -s Dump hashes from SAM/AD -u Dump Active logon session hashes -w Dump Wireless Creds {NOT IMPLEMENTED} <br type="_moz" /></pre> nopc | Content Sat, 24 Mar 2012 17:15:33 GMT http://labs.portcullis.co.uk/application/nopc/ <p>Ever been trying to perform a patch analysis of a Unix based machine without network access to it? I have and it used to be a wrestling match to make reasonable sense of the output from tools like &quot;rpm -qa --qf patchlist.txt&quot;. &nbsp;</p> <p>Out of this came nopc. Nopc utalises the ability of Nessus to perform an accurate patch analysis once it has extracted the information from the system, but instructs you on how to manually recover this same information. Below is an example usage for a Redhat patch review.</p> <pre> d@p:~/src$ ./nopc.sh [+] What type of system have you got the patch output for? 1 - Redhat 2 - OSX 3 - Debian 4 - Ubuntu 5 - Slackware * 6 - Solaris * 7 - AIX 8 - HP-UX * 9 - FreeBSD * * UNTESTED!! Enter 1-9? 1 [+] Redhat Selected [+] Run '/bin/rpm -qa --qf patchlist.txt' [+] Enter Location of file: patchlist.txt [+] Enter the Contents of /etc/redhat-release [+] Enter Text Requested: Red Hat Enterprise Linux Server release 5 [+] To run this in a script the command would be: ./nopc.sh -s '1' 'patchlist.txt' 'Red Hat Enterprise Linux Server release 5' [+] Locating Nasls .... </pre> Attacking Windows Domains | Content Fri, 23 Mar 2012 13:23:10 GMT http://labs.portcullis.co.uk/application/attacking-windows-domains/ <p>Windows Domains use a single sign on system, authenticate to one machine, you can then use that machine to access all of your available resources accross that domain. This is great for users but also for attackers. This presentation covers a number fo techniques and tools that be used to take control of a windows domain without ever needing to run time consuming password cracking.&nbsp;</p> Apple iOS In the Workplace | Content Wed, 16 Feb 2011 12:45:23 GMT http://labs.portcullis.co.uk/application/apple-ios-in-the-workplace/ <p>This whitepaper discusses the security of Apple iOS with particular focus on its usage in the workplace.</p> <p>The intended audience for this is technical/managerial, that is to say, in parts it will be moderately technical, but the key focus will be the provision of information to those planning or evaluating roll outs of iOS based devices in order that they are able to accurately understand the risks associated with this.</p> SSHatter | Content Wed, 16 Feb 2011 12:19:48 GMT http://labs.portcullis.co.uk/application/sshatter/ <p> <meta charset="utf-8"><span class="Apple-style-span" style="font-family: Verdana, Arial, sans-serif; font-size: 14px; line-height: 19px; ">Password brute forcer for SSH.</span> </meta> </p> <p> <meta charset="utf-8"><span class="Apple-style-span" style="font-family: Verdana, Arial, sans-serif; font-size: 14px; line-height: 19px; "> </span> </meta> </p> <p>Features:</p> <ul> <li>Multi threaded</li> <li>Supports both SSH v1 and v2 protocols</li> <li>Supports key based brute forcing</li> <li>Support for post brute force exploration</li> <li>Mass mode to run one command across all targets</li> <li>Support for sudo based privilege escalation</li> <li>Integrated file transfer support</li> </ul> Firefox Lockdown | Content Tue, 23 Jun 2009 15:02:12 GMT http://labs.portcullis.co.uk/application/firefox-lockdown/ <p>With Firefox's popularity rising on a day-by-day basis, many corporate environments are starting to employ the power of Firefox as their default browser.&nbsp; But without sufficient restrictions or lock-downs Firefox becomes a powerful client controlled web browser that a sophisticated user can manipulate for their own benefits. &nbsp;<br /> <br /> Firefox can be locked down similar to Internet Explorer, and this guide will give you the relevant information that is needed to create a secure, locked-down configuration, to restrict knowledgeable users actions into manipulating Firefox for their own needs.</p> Introducing Heyoka: DNS Tunneling 2.0 | Content Tue, 24 Mar 2009 14:45:47 GMT http://labs.portcullis.co.uk/application/heyoka-1/ <p>Slides from <a href="http://sourceconference.com">SOURCE Boston 2009</a>, presenting <a href="http://heyoka.sf.net">heyoka</a>, a new DNS tunneling tool that uses spoofed traffic to avoid detection and multiple encodings to improve speed. By Alberto Revelli and Nico Leidecker.</p> Heyoka | Download Tue, 24 Mar 2009 14:37:27 GMT http://labs.portcullis.co.uk/download/Heyoka-SOURCEBoston2009.pdf /download/Heyoka-SOURCEBoston2009.pdf OWASP AU 2009 Slides | Content Thu, 19 Mar 2009 13:14:32 GMT http://labs.portcullis.co.uk/application/owasp-au-2009-slides/ <p>Slides from OWASP Australia 2009.</p><div style="width:425px;text-align:left" id="__ss_1140849"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/sumsid1234/owasp-au-rev4?type=presentation" title="Owasp Au Rev4">Owasp Au Rev4</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=owaspaurev4-090313060629-phpapp02&stripped_title=owasp-au-rev4" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=owaspaurev4-090313060629-phpapp02&stripped_title=owasp-au-rev4" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object><div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/sumsid1234">sumsid1234</a>.</div></div> Insecure Trends in Web 2.0 Applications | Content Fri, 31 Oct 2008 16:08:40 GMT http://labs.portcullis.co.uk/application/insecure-trends-in-web-2-0/ <p>Non technical talk about insecure trends in Web 2.0 applications. Explains what's wrong with today's Web 2.0 applications and why new comers keep repeating these.</p> <p>&nbsp;</p> Flash Security | Content Fri, 31 Oct 2008 16:00:50 GMT http://labs.portcullis.co.uk/application/flash-security/ <p><a href="/download/Flash-Security.pps">This presentation</a> given at <a href="http://www.riatalks.com/istanbul/agust/index.cfm">RIATalks</a>, it's about fundamental flash security issues, attack surface of Flash and secure development.</p> <p>During the presentation there was stealing data through vulnerable Crossdomain.xml files, <a href="/download/FlashSecurityCrossdomain.zip">you can download source code of this file - FlashSecurityCrossdomain.zip</a>.</p> MS08-067 check | Content Tue, 18 Nov 2008 12:22:54 GMT http://labs.portcullis.co.uk/application/ms08-067-check/ <p>This tool can be used to anonymously check if a target machine or a list of target machines are affected by <a href="http://www.microsoft.com/technet/security/Bulletin/ms08-067.mspx">MS08-067</a> issue (Vulnerability in Server Service Could Allow Remote Code Execution).</p> <h2>Usage</h2> <pre> $ python ms08-067_check.py -h Usage: ms08-067_check.py [option] {-t <target>|-l <iplist.txt>}<br /><br />Options:<br /> --version show program's version number and exit<br /> -h, --help show this help message and exit<br /> -d show description and exit<br /> -t TARGET target IP or hostname<br /> -l LIST text file with list of targets<br /> -s be silent<target><iplist.txt><br /></iplist.txt></target></iplist.txt></target></pre> <h2>Example</h2> <pre> $ python ms08-067_check.py -t 192.168.123.30 192.168.123.30: VULNERABLE </pre> <h2>Note</h2> <p>On Windows XP Service Pack 2 and Windows XP Service Pack 3 this check might lead to a race condition and heap corruption in the <i>svchost.exe</i> process, but it may not crash the service immediately: it can trigger later on inside any of the shared services in the process.</p> <h2>References</h2> <ul> <li>BID: <a href="http://www.securityfocus.com/bid/31874">31874</a></li> <li>CVE: <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4250">2008-4250</a></li> <li><a href="http://blogs.technet.com/swi/archive/2008/10/25/most-common-questions-that-we-ve-been-asked-regarding-ms08-067.aspx">http://blogs.technet.com/swi/archive/2008/10/25/most-common-questions-that-we-ve-been-asked-regarding-ms08-067.aspx</a></li> <li><a href="http://www.microsoft.com/technet/security/advisory/958963.mspx">http://www.microsoft.com/technet/security/advisory/958963.mspx</a></li> <li><a href="http://www.phreedom.org/blog/2008/decompiling-ms08-067/">http://www.phreedom.org/blog/2008/decompiling-ms08-067/</a></li> <li><a href="http://metasploit.com/dev/trac/browser/framework3/trunk/modules/exploits/windows/smb/ms08_067_netapi.rb">http://metasploit.com/dev/trac/browser/framework3/trunk/modules/exploits/windows/smb/ms08_067_netapi.rb</a></li> <li><a href="http://blog.threatexpert.com/2008/10/gimmiva-exploits-zero-day-vulnerability.html">http://blog.threatexpert.com/2008/10/gimmiva-exploits-zero-day-vulnerability.html</a></li> <li><a href="http://blogs.securiteam.com/index.php/archives/1150">http://blogs.securiteam.com/index.php/archives/1150</a></li> </ul> udp-proto-scanner | Content Wed, 26 Nov 2008 16:23:36 GMT http://labs.portcullis.co.uk/application/udp-proto-scanner/ <p>udp-proto-scanner.pl discovers UDP services by sending triggers to a list of hosts:</p> <pre> $ udp-proto-scanner.pl -f ips.txt $ udp-proto-scanner.pl 10.0.0.0/16 172.16.16.1 192.168.0.1 $ udp-proto-scanner.pl -p ntp -f ips.txt </pre> <p>The probe names (for -p) are defined in udp-proto-scanner.conf. List probe names using the -l option:</p> <pre> $ udp-proto-scanner.pl -l </pre> <h2>What's it Used For?</h2> <p>It's used in the host-discovery and service-discovery phases of a pentest.<br /> <br /> It can be helpful if you need to discover hosts that only offer UDP services<br /> and are otherwise well firewalled - e.g. if you want to find all the DNS<br /> servers in a range of IP addresses. Alternatively on a LAN, you might want<br /> a quick way to find all the TFTP servers.<br /> <br /> Not all UDP services can be discovered in this way (e.g. SNMPv1 won't respond<br /> unless you know a valid community string). However, many UDP services can be<br /> discovered, e.g.:</p> <ul> <li>DNS</li> <li>TFTP</li> <li>NTP</li> <li>NBT</li> <li>SunRPC</li> <li>MS SQL</li> <li>DB2</li> <li>SNMPv3</li> </ul> <h2>It's Not a Portscanner</h2> <p>It won't give you a list of open and closed ports for each host. It's simply<br /> looking for specific UDP services.</p> <h2>Efficiency</h2> <p>It's most efficient to run udp-proto-scanner.pl against whole networks (e.g.<br /> 256 IPs or more). If you run it against small numbers of hosts it will seem<br /> quite slow because it waits for 1 second between each different type of probe.</p> <p>One cool feature of udp-proto-scanner is that it doesn't load the whole host list <br /> into memory. Therefore if you want to scan 17 million IPs, you can. It'll <br /> take a while, but you won't run out of memory.</p> <h2>Credits</h2> <p>The UDP probes are mainly taken from amap, nmap and ike-scan.<br /> Inspiration for the scanning code was drawn from ike-scan.<br /> Net::Netmask by David Muir Sharnoff is included in this tool.</p> Apache Users | Content Thu, 11 Sep 2008 11:22:18 GMT http://labs.portcullis.co.uk/application/apache-users/ <p>This Perl script will enumerate the usernames on any system that uses Apache with the UserDir module.</p> <p>&nbsp;</p> polenum | Content Thu, 30 Oct 2008 11:54:12 GMT http://labs.portcullis.co.uk/application/polenum/ <p>polenum is a python script which uses the&nbsp;<a href="http://oss.coresecurity.com/projects/impacket.html">Impacket</a> Library from CORE Security Technologies to extract the password policy information from a windows machine. This allows a non-windows (Linux, Mac OSX, BSD etc..) user to query the password policy of a remote windows box without the need to have access to a windows machine.</p> <h2>features</h2> <ul> <li>can extract password and associated information from a windows machine</li> <li>will connect over a NULL or authenticated share</li> <li>supports encrypted/signed sessions</li> </ul> <h2>limitations</h2> <ul> <li>no NTLMv2 support</li> <li>has a problem with domain connected workstations</li> </ul> <h2>download</h2> <p><a href="/download/polenum-0.2.tar.bz2"> download polenum</a></p> <p>&nbsp;</p> vessl | Content Thu, 30 Oct 2008 11:51:42 GMT http://labs.portcullis.co.uk/application/vessl/ <p>vessl is a simple wrapper script that connects, extracts and then verifies the ssl certificate of an encrypted service. It was originally written in order to script up the ability to verify ssl certificates across a large network. </p> <h2>features</h2> <ul> <li>vessl will connect to any service that openssl can</li> <li>it will extract and verify against a given CA Pem file</li> <li>it will check that certificate matches the host it is on</li> <li>it produce a map going from ip's to hostname</li> <li>checks to see if certificate is based on a blacklisted debian key</li> </ul> <h2>dependencies</h2> <ul> <li>openssl</li> <li>ping</li> <li><a href="https://launchpad.net/ubuntu/+source/openssl-blacklist/">openssl-vulnkey</a></li> <li>mktemp</li> <li><a href="/content/vessl/generating-a-ca-pem-file/">CA Pem File</a></li> </ul> <h2>download</h2> <p><a href="/download/vessl-0.3.1.tar.bz2"> download vessl</a></p> <p>&nbsp;</p> BSQL Hacker | Content Wed, 29 Oct 2008 15:28:02 GMT http://labs.portcullis.co.uk/application/bsql-hacker/ <p>BSQL (Blind SQL) Hacker is an automated SQL Injection Framework / Tool designed to exploit SQL injection vulnerabilities virtually in any database.</p> <p>BSQL Hacker aims for experienced users as well as beginners who want to automate SQL Injections (especially Blind SQL Injections).</p> <p>It allows metasploit alike exploit repository to share and update exploits.</p> <ul> <li><a rel="nofollow" href="http://www.vimeo.com/1536040?pg=embed&amp;sec=1536040">See a sample exploitation video.</a></li> <li><a href="http://code.google.com/p/bsqlhacker/issues/list">Bug Report</a></li> <li><a href="http://bsql.uservoice.com/">Feature Request</a><a href="http://code.google.com/p/bsqlhacker/issues/list"><br /> </a></li> </ul> <h2>Source Code Repository</h2> <ul> <li><a href="http://code.google.com/p/bsqlhacker/ ">Public SVN Server</a> <i>(including nightly builds development environment)</i></li> </ul> <h2>Download Installer</h2> <ul> <li><a href="/download/BSQLHackerSetup-0909.exe">BSQLHackerSetup-0909.exe<br /> </a></li> </ul> <h2>Key Features</h2> <ul> <li>Easy Mode <ul> <li>SQL Injection Wizard</li> <li>Automated Attack Support (database dump) <ul> <li>ORACLE</li> <li>MSSQL</li> <li>MySQL (experimental)</li> </ul> </li> </ul> </li> <li>General <ul> <li>Fast and Multithreaded</li> <li>4 Different SQL Injection Support <ul> <li>Blind SQL Injection</li> <li>Time Based Blind SQL Injection</li> <li>Deep Blind (based on advanced time delays) SQL Injection</li> <li>Error Based SQL Injection</li> </ul> </li> <li>Can automate most of the new SQL Injection methods those relies on Blind SQL Injection</li> <li>RegEx Signature support</li> <li>Console and GUI Support</li> <li>Load / Save Support</li> <li>Token / Nonce / ViewState etc. Support</li> <li>Session Sharing Support</li> <li>Advanced Configuration Support</li> <li>Automated Attack mode, Automatically extract all database schema and data mode</li> </ul> </li> </ul> <ul> <li>Update / Exploit Repository Features <ul> <li>Metasploit alike but exploit repository support</li> <li>Allows to save and share SQL Injection exploits</li> <li>Supports auto-update</li> <li>Custom GUI support for exploits (cookie input, URL input etc.)</li> </ul> </li> </ul> <ul> <li>GUI Features <ul> <li>Load and Save</li> <li>Template and Attack File Support (Users can save sessions and share them. Some sections like username, password or cookie in the templates can be show to the user in a GUI)</li> <li>Visually view true and false responses as well as full HTML response, including time and stats</li> </ul> </li> </ul> <ul> <li>Connection Related <ul> <li>Proxy Support (Authenticated Proxy Support)</li> <li>NTLM, Basic Auth Support, use default credentials of current user/application</li> <li>SSL (also invalid certificates) Support</li> <li>Custom Header Support</li> </ul> </li> </ul> <ul> <li>Injection Points (only one of them or combination) <ul> <li>Query String</li> <li>Post</li> <li>HTTP Headers</li> <li>Cookies</li> </ul> </li> </ul> <ul> <li>Other <ul> <li>Post Injection data can be stored in a separated file</li> <li>XML Output (not stable)</li> <li>CSRF protection support</li> </ul> </li> </ul> <p>one time session tokens or asp.net viewstate ort similar can be used for separated login sessions, bypassing proxy pages etc.</p> <hr /> <p><strong>It's still beta and there are known issues :</strong></p> <ul> <li>Automated Attack for MySQL is experimental, might not work properly</li> </ul>