Portcullis Labs - perl http://labs.portcullis.co.uk Labs Portcullis updates. en Labs portcullis Tue, 22 Feb 2011 11:21:10 GMT http://backend.userland.com/rss 60 Labs Portcullis hhttp://labs.portcullis.co.uk/mg/logo.gif http://labs.portcullis.co.uk 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> 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> acccheck | Content Wed, 09 Apr 2008 18:48:49 GMT http://labs.portcullis.co.uk/application/acccheck/ <p>The tool is designed as a password dictionary attack tool that targets windows authentication via the SMB protocol. It is really a wrapper script around the 'smbclient' binary, and as a result is dependent on it for its execution.</p> <p>The simplest way to run the tool is as follows:<br /> <br /> ./acccheck.pl -t 10.10.10.1<br /> <br /> This mode of execution attempts to connect to the target ADMIN$ share with the username 'Administrator' and a [BLANK] for the password.<br /> <br /> ./acccheck.pl -t 10.10.10.1 -u test -p test<br /> <br /> This mode of execution attempts to connect to the target IPC$ share with the username 'test' and a password 'test'.<br /> <br /> Each -t, -u and -p flags can be substituted by -T, -U and -P, where each represents an input file rather than a single input from standard in.<br /> <br /> E.g.<br /> ./acccheck.pl -T iplist -U userfile -P passwordfile<br /> <br /> Only use -v mode on very small dictionaries, otherwise, this has the affect of slowing the scan down to the rate the system writes to standard out.<br /> <br /> Any username/password combinations found are written to a file called 'cracked' in the working directory.</p> MIBparse | Content Mon, 07 Apr 2008 23:38:19 GMT http://labs.portcullis.co.uk/application/mibparse/ <p>MIBparse.pl has been designed as an offline parser to quickly parse output from SNMP tools such as 'snmpwalk' (NET-SNMP project 'net-snmp.sourceforge.net'). The output returned depends on the options that are selected by the user. Typically, information relating to the system, services, open ports, users, shares and installed components is some of the information that can be extracted by the tool.</p> <p><b>Requirements</b></p> <p>The only requirement is Perl.</p> <p><b>Running</b></p> <p>The simplest way to run the tool is as follows:<br /> <br /> ./MIBparse -f public.txt<br /> <br /> Where &quot;public.txt&quot; is the output from 'snmpwalk' piped to a file. In this mode all available information is displayed to the user as standard out.<br /> <br /> The information that is output can be tailored using the '-a' flag. The following values can be used in conjunction with this flag:</p> <p><br /> 1 = All<br /> 2 = System<br /> 3 = Routing information<br /> 4 = Services<br /> 5 = TCP ports<br /> 6 = UDP ports<br /> 7 = Users<br /> 8 = Shares<br /> 9 = Domain<br /> 10 = Installed components<br /> 11 = Community strings</p> <p>Each value corresponds to the type of information that is output. As an example, '-a 7' will output all of the users from a Windows system. The example execution in this case would include:<br /> <br /> ./MIBparse.pl -f public.txt -a 7<br /> <br /> If you wish to execute the tool from a working directory which is not in your $PATH then the '-b' option can be used to specify the location of the 'tags' file. This option can also be used to specify any file as a tags file as long as the format of the file conforms to the example that is provided. The example execution in such a case would be:<br /> <br /> ./MIBparse.pl -f public.txt -b ./tags<br /> OR<br /> ./MIBparse.pl -f public.txt -b ./mytagsfile<br /> <br /> Finally, the '-b' flag can be used in conjunction with the '-a' flag. The example execution in such a case would be:<br /> <br /> ./MIBparse.pl -f public.txt -b ./mytagsfile -a 7</p> BSQL brute forcer V2 | Content Wed, 18 Jun 2008 12:21:58 GMT http://labs.portcullis.co.uk/application/bsql-brute-forcer/ <p>This is a modified version of 'bsqlbfv1.2-th.pl'. This perl script allows extraction of data from Blind SQL Injections. It accepts custom SQL queries as a command line&nbsp; parameter and it works for both integer and string based injections. Databases supported:-<br /> <br /> <b>0. MS-SQL<br /> 1. MySQl<br /> 2. Postgres<br /> 3. Oracle</b><br /> <br /> The tool supports 2 attack modes(-type switch):-<br /> <br /> Type 0:- Blind SQL Injection based on true and false conditions returned by back-end server<br /> <br /> Type 1:- Blind SQL Injection based on true and error(e.g syntax error) returned by back-end server.<br /> <br /> Usage example:<br /> <b>$./bsqlbf-v2.pl -url http://192.168.1.1/injection_string_post/1.asp?p=1 -method post -match true -database 0 -sql &quot;select top 1 name from sysobjects where xtype='U'&quot;</b></p> ManySSL | Content Tue, 09 Dec 2008 15:40:49 GMT http://labs.portcullis.co.uk/application/ManySSL/ <p>This PERL script will enumerate the SSL ciphers in use on any SSL encrypted service. It is not restricted to HTTPS and can be used on SMTP servers that support STARTTLS.</p> <p><b>Features Include</b></p> <ul> <li>Warn the operator if a self-signed certificate is detected.</li> <li>Warn the operator if an expired certificate is detected.</li> <li>Full cipher, key-exchange and authentication key strength output.</li> <li>Use of a client specificed SSL certificate.</li> </ul> http-dir-enum | Content Fri, 28 Mar 2008 16:49:57 GMT http://labs.portcullis.co.uk/application/http-dir-enum/ <p>http-dir-enum is a tool for finding content that is not linked on a website. Its main use is for finding directories that exist on a server. Simply provide a dictionary file and a URL.</p> <p>This tool is written in PERL and uses the LWP library.</p> <p>Features include:</p> <ul> <li>Automatic detection of which HTTP response code to ignore (normally 404, but can vary on some sites)</li> <li>Support for bruteforcing Files and Directories</li> <li>Can search for directories recursively</li> <li>Proxy support</li> <li>Support for HTTP Basic Authentication</li> <li>Support for sending custom cookies</li> <li>Save scan output in XML format</li> <li>Command line (lack of GUI is a feature, not a bug)</li> <li>Mutli-threading for extra speed</li> <li>HTTP keep alive support for extra speed (can be turned off)</li> </ul> <p>Check out the <a href="/content/http-dir-enum/usage/">usage</a> page for a full list of options. There are also lots of <a href="/content/http-dir-enum/examples/">examples</a> to get you started.</p> enum4linux | Content Tue, 16 Sep 2008 11:29:28 GMT http://labs.portcullis.co.uk/application/enum4linux/ <p>Enum4linux is a tool for enumerating information from Windows and Samba systems. It attempts to offer similar functionality to enum.exe formerly available from www.bindview.com.<br /> <br /> It is written in PERL and is basically a wrapper around the Samba tools smbclient, rpclient, net and nmblookup. The samba package is therefore a dependency.<br /> <br /> Features include:</p> <ul> <li>RID Cycling (When RestrictAnonymous is set to 1 on Windows 2000)</li> <li>User Listing (When RestrictAnonymous is set to 0 on Windows 2000)</li> <li>Listing of Group Membership Information</li> <li>Share Enumeration</li> <li>Detecting if host is in a Workgroup or a Domain</li> <li>Identifying the remote Operating System</li> <li>Password Policy Retrieval (using <a href="/application/polenum/">polenum</a>)</li> </ul> <p>Check out the <a href="/content/enum4linux/usage/">usage</a> page for a full list of options. There are also lots of <a href="/content/enum4linux/examples/">examples</a> to get you started.</p>