Nikto::Parser 0.01

October 16, 2009

Recently, I released several new security modules on CPAN. One of the modules is Nikto::Parser. It provides a module for extracting information from nikto so that users can build powerful web application testing tools. Nikto::Parser can be found here.

Here is an example of performing a nikto scan and then parsing the results with Nikto::Parser:

my $npx = new Nikto::Parser;
my @ips;
my $parser = $npx->parse_scan("/pentest/svn/nikto/", "", @ips);
foreach my $h ( $parser->get_all_hosts() ) {
    print "ip: " . $h->ip . "\n";
    foreach my $p ( $h->get_all_ports() ) {
        print "port: " . $p->port . "\n";
        print "banner: " . $p->banner . "\n";
        foreach my $i ( $p->get_all_items ) {
             print "Description:\n" . $i->description . "\n";
    print "---\n";

Burpsuite::Parser 0.01

October 15, 2009

Just to get everyone excited for my talk, “Synergy! A world where the tools communicate” at OWASP NYC today, I decided to release Burpsuite::Parser 0.01 a little early.

Here is an example of using the module:

my $bpx = new Burpsuite::Parser;
my $parser = $bpx->parse_file('burpsuite.xml');
#a Burpsuite::Parser Object
my @results = $parser->get_all_issues();
#an Array of Burpsuite::Parser::Issue Objects
foreach my $h ( @results ) {
     print "Severity: " . $h->severity . "\n";
     print "Host: " . $h->host . "\n";
     print "Name: " . $h->name . "\n";
     print "Path: " . $h->path . "\n";
     print "Proof of Concept:\n " . $h->issue_detail . "\n";

Version 0.01 of the module can be found at

One good thing to note, all of the request/responses are automatically included in the XML. To reduce the size of the XML, it may be helpful to generate an XML file without them. This will make parsing faster.


Burpsuite::Parser Example Script

October 12, 2009

For those know don’t already know… Portswigger released XML support for Burpsuite last week! Once I heard about this, I started working on a Perl XML parsing module. After the long weekend I have a version that is ready to be considered alpha quality. I plan to release the beta version on October 15th at during my presentation at OWASP NYC. Here is an example script demonstrating how easy it is to use Burpsuite::Parser:
#!/usr/bin/perl -w
use strict;
use Burpsuite::Parser;
my $bparser = new Burpsuite::Parser;
my $file;
if ( $ARGV[0] ) {
    $file = $ARGV[0];
else {
    print "usage: $0 [file.xml]\n";
my $parser = $bparser->parse_file("$file");
foreach my $h ( $parser->get_all_issues() ) {
    print "Type: " . $h->type . "\n";
    print "Serial: " . $h->serial_number . "\n";
    print "Severity: " . $h->severity . "\n";
    print "Host: " . $h->host . "\n";
    print "Name: " . $h->name . "\n";
    print "Location: " . $h->location . "\n";
    print "Path: " . $h->path . "\n";
    print "Issue Background: " . $h->issue_background . "\n";
    print "Remediation Background: " . $h->remediation_background . "\n";
    print "Issue Detail: " . $h->issue_detail . "\n";

DM me on twitter(jabra), if you would like to help test the module.


Pentesting with Perl

June 29, 2009

I’m currently working on a new training course I’m planning to give in the near future. By the title of the blog posting, I’m sure you have guessed the title… That’s right, Pentesting with Perl

The object of the course is to cover many of the tasks that need to be performed during a penetration assessment.

  • IP/Hostnames reverse, resolve and extract information
  • Convert CIDRs to Ranges and Ranges to CIDRs
  • Extracting information from: Nmap, Nikto, Sslscan, Dirbuster, and Fierce
  • Extracting links and email addresses from a website
  • Building a Port-scanner in 10 minutes or less
  • Union and intersection of two files
  • Building a sniffer to parse PDML (synergy decrypter)
  • Performing Phishing attacks with Metasploit (updated)
  • Modifying the shellcode of your favorite browser exploit (updated)

This course will help to streamline much of the tedious aspects of pentesting. We will use Perl to get the job done quickly and effectively. The goal of the course is to help everyone to automate many of the tasks they are performing manually, so that they can focus on more complex issues. The ability to automate tasks is critical to being a successful penetration tester. We need to be spending time on the most complex issues that can not be tested through the use of automated tools!

Please let me know what you think. I look forward to your comments and suggestions.

Recommended Reading:

  • Programming Perl (ISBN-10: 0596000278, ISBN-13: 978-0596000271)

The requirements for the course are:

  • A basic understanding of Perl including scalars, arrays and hashes
  • A basic understanding of XML and Object Oriented programming
  • A good understanding of TCP/IP and other networking concepts
  • Familiarity with Nmap and other penetration testing tools

I’m structuring the course to be roughly 3 hours and to be available at Infosec World 2010.