Full Disclosure mailing list archives

Re: Automated Vulnerability Scanners


From: Michael Holstein <michael.holstein () csuohio edu>
Date: Fri, 24 Feb 2006 16:20:28 -0500

Can anyone reccommend a perl based nessus wrapper that has the ability
to dump results into a mysql database?

Heck with it .. I'm sure somebody will find my script and this useful.
Any SQL wizzards feel free to let me know how to optimize this ...

The 'nessusstats' part isn't needed for just storing the results -- that's so I can generate reports efficiently). There are other bits in there for other parts of this system I cobbled together -- like tables that store nmap results and such -- thus you see entries in some tables for stuff like that. Remove what you don't need.

Cheers,

Michael Holstein CISSP GCIA
Cleveland State University

CREATE TABLE ipmain (
  idmain int(10) unsigned NOT NULL auto_increment,
  mainip int(10) unsigned NOT NULL default '0',
  lastnmap datetime NOT NULL default '0000-00-00 00:00:00',
  lastnessus datetime NOT NULL default '0000-00-00 00:00:00',
  ipowner varchar(40) default NULL,
  PRIMARY KEY  (idmain),
  KEY xip (mainip)
) TYPE=MyISAM;

CREATE TABLE nessusresults (
  idnessus int(10) unsigned NOT NULL auto_increment,
  domain varchar(15) NOT NULL default '',
  nessushost int(10) unsigned NOT NULL default '0',
  service varchar(40) NOT NULL default '',
  scriptid int(10) unsigned NOT NULL default '0',
  risk tinyint(3) unsigned NOT NULL default '0',
  timestamp datetime NOT NULL default '0000-00-00 00:00:00',
  msg text,
  PRIMARY KEY  (idnessus),
  KEY xidnessus (idnessus),
  KEY knessushost (nessushost),
  KEY knessushost2 (nessushost,service)
) TYPE=MyISAM;

CREATE TABLE nessusstats (
  idstat int(10) unsigned NOT NULL auto_increment,
  domain varchar(15) NOT NULL default '',
  nessushost int(10) unsigned NOT NULL default '0',
  service varchar(40) NOT NULL default '',
  scriptid int(10) unsigned NOT NULL default '0',
  risk tinyint(3) unsigned NOT NULL default '0',
  timestamp datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (idstat),
  KEY xidstat (idstat),
  KEY kstat (nessushost),
  KEY kstst2 (nessushost,service)
) TYPE=MyISAM;
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/


Current thread: