Portcullis Labs - Python http://labs.portcullis.co.uk Labs Portcullis updates. en Labs portcullis Fri, 15 Feb 2013 16:55:40 GMT http://backend.userland.com/rss 60 Labs Portcullis hhttp://labs.portcullis.co.uk/mg/logo.gif http://labs.portcullis.co.uk Local MySQL Password Auditor | Content Fri, 15 Feb 2013 15:29:23 GMT http://labs.portcullis.co.uk/application/local-mysql-password-bruteforcer/ <p style="text-align: left;"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><b>mysql-local-bruteforcer</b> is a tool to perform password security audit against local instances of MySQL installation. It attempts to enumerate local passwords against either the dictionary of passwords and single user or dictionary of users and passwords.</p> <p style="text-align: left;"><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--></p> <p class="MsoNormal">&nbsp;It is written in Python and can be easily ported as an executable for windows using tools such as py2exe.</p> <p class="MsoNormal"><b>Installation</b></p> <p class="MsoNormal">No installation needed, just download and run.</p> <p class="MsoNormal"><b>Usage</b><br /> To crack single password for a user:<br /> &nbsp;&nbsp;&nbsp; options: -d <dict> -u <user></user></dict></p> <p class="MsoNormal"><dict><user>To crack passwords for multiple users:<br /> &nbsp;&nbsp;&nbsp; options: -d <dict> -U <user dict=""><br /> <br /> <b>Options</b><br /> &nbsp; -h, --help&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; show this help message and exit<br /> &nbsp; -d FILE, --dictionary=FILE<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local password dictionary to use<br /> &nbsp; -U FILE, --usernames=FILE<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local username dictionary to use<br /> &nbsp; -v, --verbose&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; don't print any messages<br /> &nbsp; -u USERNAME, --username=USERNAME<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; username to crack password against<br /> &nbsp; -f FORCE, --force=FORCE<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force quit after first successful crack</user></dict></user></dict></p> <p class="MsoNormal">&nbsp;</p> <p>&nbsp;</p> HeaderCheck | Content Fri, 15 Feb 2013 09:08:18 GMT http://labs.portcullis.co.uk/application/headercheck/ <p>HeaderCheck is a Python script for checking the security settings of several HTTP headers returned by a server.</p> <p>The following headers are checked</p> <ul> <li>X-XSS-Protection</li> <li>X-Content-Type-Options</li> <li>X-Frame-Options</li> <li>Cache-Control</li> <li>Content-Security-Policy</li> <li>WebKit-X-CSP</li> <li>X-Content-Security-Policy</li> <li>Strict-Transport-Security</li> <li>Access-Control-Allow-Origin</li> <li>Origin</li> </ul> <p>Each header is assessed based on good practice settings as well as displayed for manual checking.</p> <h2>Installing</h2> <p>HeaderCheck is a stand alone python script, as such just decompress the download and move the script to the desired location.</p> <h2>Running</h2> <p>HeaderCheck can be run in the following form.</p> <p><code>python HeaderCheck.py [targeturl] [subdirectory]</code></p> <p>for example:</p> <p><code>python HeaderCheck.py www.google.com /</code></p> <p><code>python HeaderCheck.py www.bbc.co.uk /news</code></p> <p>Please note the space between the domain and the sub directory.</p> <p>&nbsp;</p> <p>&nbsp;</p> get-dhcp-opts | Content Wed, 12 Dec 2012 10:06:03 GMT http://labs.portcullis.co.uk/application/get-dhcp-opts/ <p style="text-align: left;">get-dhcp-opts is a tool to discover DHCP/BOOTP servers on your LAN, and dump the DHCP/BOOTP options.</p> <p style="text-align: left;">Sometimes network infraestructures use DHCP/BOOTP to provide <i>special</i> configurations. For example, the voip network can use these special options to configure the phones (VoIP server address, configuration file URLs, ...).</p> <p style="text-align: left;">get-dhcp-opts display these options and detect Rogue DHCP Servers on your network.</p> <p style="text-align: left;">&nbsp;</p> <h1>Features</h1> <ul> <li>Request DHCP Options</li> <li>DHCP Options autodetection &amp; conversion</li> <li>Multiple DHCP Servers detection (aka. Rogue DHCP Servers)</li> </ul> <p>&nbsp;</p> <h1>Notes</h1> <ul> <li>get-dhcp-opts only sends DHCP Discover packets, so if the DHCP server is OK, it don't reserve the IP for your MAC.</li> </ul> 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> 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> hoppy | Content Fri, 09 Oct 2009 13:33:35 GMT http://labs.portcullis.co.uk/application/hoppy/ <p>hoppy is a <u><strong>h</strong></u>ttp <u><strong>o</strong></u>ptions <u><strong>p</strong></u>rober written in <u><strong>py</strong></u>thon. It checks the availability of HTTP methods as well as probing them to see if they can be forced to disclose system information.</p> <h2>features</h2> <ul> <li>HTTP Method detection, TRACK, TRACE, PUT etc</li> <li>Internal IP address disclosure detection</li> <li>Internal Path Disclosure detection</li> <li>Transparent working so you can see exactly what it did</li> <li>Data extraction</li> <li>Spider to find directories for webDAV detection</li> <li>ms09-020 IIS auth bypass check on all discovered directories</li> </ul> <h2>download</h2> <p><a href="/download/hoppy-1.7.3.tar.bz2"> download hoppy</a></p> <p>&nbsp;</p>