<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>ClearNet Security: Tag scripts</title>
    <link>http://blog.clearnetsec.com/articles/tag/scripts</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Which vulnerability tests did Nessus run?   How long did it take?  Which tests take the most time?</title>
      <description>&lt;p&gt;Which vulnerability tests did Nessus run?   How long did it take?  Which tests take the most time?&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.clearnetsec.com/roller/resources/cns/parseNessusdMessages.pl"&gt;Here is a quick perl piece&lt;/a&gt; I wrote awhile back to answer these questions. My main goal at the time was to find which vulnerability tests were consuming the most time. The script parsers the nessusd.messages file and generates an output which looks like the following (I added color to this sample to emphasize the different components): &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[suse] &amp;gt; ./parseNessusdMessages.pl 10&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;===========================================================&lt;br /&gt;
  xx.xxx.78.65: &lt;span class="style1"&gt;completed checks = 2262&lt;/span&gt;: &lt;span class="style2"&gt;Time to complete host scan = 369.65 (0:6:9)&lt;/span&gt;&lt;br /&gt;
  68.785 (%18.608) invision_gallery_st_sql_injection.nasl&lt;br /&gt;
  55.707 (%15.070) lighttpd_cgi.nasl&lt;br /&gt;
  49.862 (%13.489) DDI_IIS_Compromised.nasl&lt;br /&gt;
  47.847 (%12.944) horde_detect.nasl&lt;br /&gt;
  31.121 (%8.419) rpc_portmap.nasl&lt;br /&gt;
  30.254 (%8.184) amanda_detect.nasl&lt;br /&gt;
  18.491 (%5.002) h323_detection.nasl&lt;br /&gt;
  17.578 (%4.755) dont_print_on_printers.nasl&lt;br /&gt;
  17.525 (%4.741) basilix_inc_files.nasl&lt;br /&gt;
  16.554 (%4.478) ventrilo_detect.nasl&lt;br /&gt;
  16.474 (%4.457) krb_pingpong.nasl&lt;br /&gt;
  &lt;em&gt;not showing remaining list... (only showing 10)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;===========================================================&lt;br /&gt;
  ===========================================================&lt;br /&gt;
  xx.xxx.217.250: &lt;span class="style1"&gt;completed checks = 2262&lt;/span&gt;: &lt;span class="style2"&gt;Time to complete host scan = 677.22 (0:11:17)&lt;/span&gt;&lt;br /&gt;
  224.901 (%33.209) office_files.nasl&lt;br /&gt;
  62.777 (%9.270) sql_injection.nasl&lt;br /&gt;
  61.661 (%9.105) mozilla_default_perms.nasl&lt;br /&gt;
  60.220 (%8.892) NetSphere.nasl&lt;br /&gt;
  55.007 (%8.122) shells.nasl&lt;br /&gt;
  47.335 (%6.990) mozilla_176.nasl&lt;br /&gt;
  46.044 (%6.799) bnc_auth_bypass.nasl&lt;br /&gt;
  45.214 (%6.676) qpopper2.nasl&lt;br /&gt;
  45.110 (%6.661) squid_dos.nasl&lt;br /&gt;
  44.425 (%6.560) dont_print_on_printers.nasl&lt;br /&gt;
  44.394 (%6.555) CA_License_Service_Stack_Overflow.nasl&lt;br /&gt;
  &lt;em&gt;not showing remaining list... (only showing 10)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;===========================================================&lt;br /&gt;
  ===========================================================&lt;br /&gt;
  xx.xxx.78.6: &lt;span class="style1"&gt;completed checks = 2350&lt;/span&gt;: &lt;span class="style2"&gt;Time to complete host scan = 647.36 (0:10:47)&lt;/span&gt;&lt;br /&gt;
  163.406 (%25.242) sendmail_ident.nasl&lt;br /&gt;
  163.162 (%25.204) traceroute.nasl&lt;br /&gt;
  120.236 (%18.573) nessus_detect.nasl&lt;br /&gt;
  106.080 (%16.387) ftp_backdoor.nasl&lt;br /&gt;
  101.724 (%15.714) mozilla_nntp_heap_overflow.nasl&lt;br /&gt;
  96.309 (%14.877) quote.nasl&lt;br /&gt;
  74.986 (%11.583) eserv_dir_traversal.nasl&lt;br /&gt;
  60.184 (%9.297) cfengine_authdiag.nasl&lt;br /&gt;
  53.321 (%8.237) crlinux_file_reading.nasl&lt;br /&gt;
  45.546 (%7.036) bnc_auth_bypass.nasl&lt;br /&gt;
  45.315 (%7.000) ircd_ignition_ircop_vuln2.nasl&lt;br /&gt;
&lt;em&gt;not showing remaining list... (only showing 10)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The script parses all the tests found in the nessusd.messages file which were executed (not skipped) and displays the results organized by target IP address. It also sorts and displays in descending order the vulnerability tests which consumed the most time. The parseNessusdMessages.pl takes a single argument which specifies how many vulnerability checks to display per IP address (i.e. in the above example, 10). Few notes: &lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;This works best if you start with a empty nessusd.messages file. Run a nessus scan and after it is complete then you can run the script to generate the output like above.&lt;/li&gt;
  &lt;li&gt;The nessusd.messages file is not always located in the same spot. You may have to modify the path in the script (likely locations include /opt/nessus/var/nessus/logs/nessusd.messages or /usr/local/var/nessus/logs/nessusd.messages). By default, you need root permission to view the nessusd.messages file. I often just copy the nessusd.messages (using sudo) file to my homedir and change the path in the script to check &amp;quot;~/nessusd.messages&amp;quot;.&lt;/li&gt;
  &lt;li&gt;The 1st column is the number of seconds the vulnerability test took followed by the percentage of overall time  (i.e. how long it took to scan the target IP).
&lt;/ul&gt;
&lt;p&gt;So, if you are in the business of tuning your Nessus scanner, then this script may provide you some value.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

</description>
      <pubDate>Tue, 31 Jan 2006 23:41:00 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:609e993c-1ec7-4643-aca0-3e6b231c5f3a</guid>
      <author>tate@ClearNetSec.com (Tate Hansen)</author>
      <link>http://blog.clearnetsec.com/articles/2006/01/31/which-vulnerability-tests-did-nessus-run-how-long-did-it-take-which-tests-take-the-most-time</link>
      <category>nessus</category>
      <category>tuning</category>
      <category>ClearNet Security</category>
      <category>Tate Hansen</category>
      <category>nasl</category>
      <category>scripts</category>
    </item>
  </channel>
</rss>
