Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: [Full-disclosure] Automated Vulnerability Scanners |
|---|---|
| Date: | Fri, 24 Feb 2006 16:13:10 -0500 |
Can anyone reccommend a perl based nessus wrapper that has the ability to dump results into a mysql database?
Anyway ..
Here is how you run nessus, then involke this script :
cat outputfile.nbe | nice -n 20 ./nessusimport.pl
Cheers,
Michael Holstein CISSP GCIA Cleveland State University
--snip--
#!/usr/local/bin/perl use Net::SMTP; use Date::Manip; our $TZ = 'US/Eastern'; use DBI();
#####DATABASE PARAMETERS#####
$DATABASE="--dbname--"; $HOST="--hostname--"; $USERNAME="--username--"; $PASSWORD="--password--";
######MAIN PROGRAM LOOP######
while ( <STDIN> )
{
@results = split '\||\|\|';
@results[6] =~ tr/;/\n/;
@results[6] =~ tr/"/'/;
@results[5] = "7";
@results[5] = '1' if (@results[6] =~ "Risk factor : Critical");
@results[5] = '1' if (@results[6] =~ "Risk factor : Serious");
@results[5] = '1' if (@results[6] =~ "Risk factor : High");
@results[5] = '2' if (@results[6] =~ "Risk factor : Medium");
@results[5] = '2' if (@results[6] =~ "Risk factor : Medium/Low");
@results[5] = '3' if (@results[6] =~ "Risk factor : Low/Medium");
@results[5] = '3' if (@results[6] =~ "Risk factor : Low");
@results[6] =~ s`Risk factor : Critical``;
@results[6] =~ s`Risk factor : High``;
@results[6] =~ s`Risk factor : Serious``;
@results[6] =~ s`Risk factor : Medium``;
@results[6] =~ s`Risk factor : Medium/Low``;
@results[6] =~ s`Risk factor : Low/Medium``;
@results[6] =~ s`Risk factor : Low``;
for (@results[0]) { s/^\s+//;s/\s+$//; }
for (@results[1]) { s/^\s+//;s/\s+$//; }
for (@results[2]) { s/^\s+//;s/\s+$//; }
for (@results[3]) { s/^\s+//;s/\s+$//; }
for (@results[4]) { s/\<//g;s/^\s+//;s/\s+$//; }
for (@results[5]) { s/^\s+//;s/\s+$//; }
for (@results[6]) { s/^\s+//;s/\s+$//;s/\'/\\'/g;}
my $ip = &dot2dec(@results[2]);
next unless ($ip > 0);
$timestamp = UnixDate(@results[4], '%Y-%m-%d %H:%M:%S');
&findmainip($ip);&updatenessus(@results[1],$ip,@results[3],@results[4],@results[5],@nessustime[1],@results[6]);
&updatestats(@results[1],$ip,@results[3],@results[4],@results[5],@nessustime[1]);
# print "Condition 2 Matched\n";
}
else {
next;
}}
#####GLOBAL SUBROUTINES#####
#turn dotted quad into decimal
sub dot2dec {
my $address = @_[0];
($a, $b, $c, $d) = split '\.', $address;
$decimal = $d + ($c * 256) + ($b * 256**2) + ($a * 256**3);
return $decimal;
}#turn decimal into dotted
sub dec2dot {
my $address = @_[0];
$d = $address % 256; $address -= $d; $address /= 256;
$c = $address % 256; $address -= $c; $address /= 256;
$b = $address % 256; $address -= $b; $address /= 256;
$a = $address;
$dotted="$a.$b.$c.$d";
return $dotted;
}| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [Full-disclosure] Automated Vulnerability Scanners, Dude VanWinkle |
|---|---|
| Next by Date: | Re: [Full-disclosure] Automated Vulnerability Scanners, Michael Holstein |
| Previous by Thread: | Re: [Full-disclosure] Automated Vulnerability Scanners, Simon Smith |
| Next by Thread: | Re: [Full-disclosure] Automated Vulnerability Scanners, Michael Holstein |
| Indexes: | [Date] [Thread] [Top] [All Lists] |