.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "NBE 3pm" .TH NBE 3pm "2004-04-27" "perl v5.20.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Parse::Nessus::NBE \- use to extract specific data from Nessus NBE files .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Parse::Nessus::NBE; \& \& function(@nessusdata); \& \& function(@nessusdata,$query); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is designed to extract information from Nessus \s-1NBE\s0 files. Functions have been designed to return certain sets of data, such as service banners and \s-1OS\s0 versions. Other functions have been provided that will return more specific information, such as all IPs listening on a given port or all IPs associated with a specified plugin id. .SH "EXAMPLES" .IX Header "EXAMPLES" To obtain a list of banners .PP .Vb 2 \& my @banners = nbanners(@nessusdata); \& print @banners; \& \& # returns \& IP|service banner \& \& # example \& 192.168.0.5|CompaqHTTPServer/2.1 \& 192.168.0.11|Apache/1.3.26 (Unix) mod_perl/1.24 \& 192.168.0.30|Microsoft\-IIS/5.0 \& 192.168.0.31|220 cpan01 FTP server (SunOS 5.8) ready. \& 192.168.0.51|NetWare HTTP Stack \& 192.168.0.99|220 Service ready for new user. \& ... .Ve .PP To query by port .PP .Vb 3 \& my $port = 80; \& my @ports = nports(@nessusdata,$port); \& print @ports; \& \& # returns \& IP|specified port \& \& # example \& 192.168.0.5|ssh (22/tcp) \& 192.168.0.6|ssh (22/tcp) \& 192.168.0.8|ssh (22/tcp) \& 192.168.0.23|ssh (22/tcp) \& 192.168.0.89|ssh (22/tcp) \& ... .Ve .PP To obtain a list of web directories .PP .Vb 2 \& my @webdirs = nwebdirs(@nessusdata); \& print @webdirs; \& \& # returns \& IP|web port|web dir(s)|web dir(s) requiring authentication \& \& # example \& 192.168.0.21|http (80/tcp)|/css /design /downloads /images /js \& 192.168.0.43|http (80/tcp)|/images /public|/console \& 192.168.0.47|https (443/tcp)|/files /html /images /js /jsp \& 192.168.0.101|https (443/tcp)|/application /common /images /report|/printers \& 192.168.0.110|http (80/tcp)|/admin \& ... .Ve .PP To obtain a list of nfs shares .PP .Vb 2 \& my @nfs = nnfs(@nessusdata); \& print @nfs; \& \& # returns \& IP|nfs port|nfs share(s) \& \& # example \& 192.168.0.11|nfs (2049/tcp)|/apps (mountable by everyone) \& 192.168.0.31|nfs (2049/tcp)|/cdrom (mountable by everyone) \& 192.168.0.28|nfs (2049/tcp)|/data (mountable by everyone) \& 192.168.0.45|nfs (2049/tcp)|You are running a superfluous NFS daemon... \& 192.168.0.108|nfs (2049/tcp)|You are running a superfluous NFS daemon... \& ... .Ve .PP To obtain a \s-1OS\s0 listing .PP .Vb 2 \& my @os = nos(@nessusdata); \& print @os; \& \& # returns \& IP|OS version \& \& # example \& 192.168.0.1|IOS 12.1.5\-12.2(6a), Cisco IOS 12.1(5)\-12.2(7a) \& 192.168.0.154|Linux 2.1.19 \- 2.2.20 \& 192.168.0.111|HP Advancestack Etherswitch 224T or 210 \& 192.168.0.92|AIX 4.2\-4.3.3 \& 192.168.0.10|NT Server 4.0 SP4\-SP5 running Checkpoint Firewall\-1 \& ... .Ve .PP To obtain a listing of \s-1SNMP\s0 community strings .PP .Vb 2 \& my @snmp = nsnmp(@nessusdata); \& print @snmp; \& \& # returns \& IP|SNMP community string(s) \& \& # example \& 192.168.0.1|private public \& 192.168.0.111|public \& 192.168.0.121|private public \& 192.168.0.128|private public \& 192.168.0.145|public \& ... .Ve .PP To query by plugin id .PP .Vb 3 \& my $plugin = 10667; \& my @plugin = nplugin(@nessusdata,$plugin); \& print @plugin; \& \& # returns \& IP|port|plugin data \& \& # example \& 192.168.0.202|https (443/tcp)|...OpenSSL which is;older than 0.9.6e... \& 192.168.0.222|https (443/tcp)|...OpenSSL which is;older than 0.9.6e... \& 192.168.0.235|https (443/tcp)|...OpenSSL which is;older than 0.9.6e... \& 192.168.0.236|https (443/tcp)|...OpenSSL which is;older than 0.9.6e... \& 192.168.0.237|https (443/tcp)|...OpenSSL which is;older than 0.9.6e... \& ... .Ve .PP To obtain a \s-1OS\s0 count, useful for graphing .PP .Vb 2 \& my @countos = nstatos(nessusdata); \& print @countos; \& \& # returns \& OS version|count \& \& # example \& Windows NT4 or 95/98/98SE|17 \& Windows 2000 Advanced Server SP3|14 \& TOPS\-20 Monitor 7(21733),KL\-10 (DEC 2065)|11 \& Cisco router running IOS 12.1.5\-12.2.13a|11 \& PS2 Linux 1.0|9 \& Linux 2.4.17 on HP 9000 s700|7 \& Cisco 2620 running IOS 12.1(6)|6 \& Windows 2000 Server SP3|5 \& Windows NT4 Workstation SP6a|4 \& Nortel/Alteon ACE Director 3 Version 6.0.42\-B|4 .Ve .PP To obtain a service count, useful for graphing .PP .Vb 2 \& my @countservices = nstatservices(nessusdata); \& print @countservices; \& \& # returns \& service port|count \& \& #example \& http (80/tcp)|69 \& telnet (23/tcp)|48 \& netbios\-ssn (139/tcp)|48 \& https (443/tcp)|46 \& loc\-srv (135/tcp)|42 \& ftp (21/tcp)|39 \& smtp (25/tcp)|34 \& pcanywheredata (5631/tcp)|30 \& ssh (22/tcp)|25 \& sun\-answerbook (8888/tcp)|22 .Ve .PP To obtain a vulnerability count, useful for graphing .PP .Vb 4 \& # note: options are as follows: \& # 1 returns high severity vulnerabilties \& # 2 returns medium severity vulnerabilities \& # 3 returns low level security notes \& \& my @countvulns = nstatvulns(@nessusdata,1); \& print @countvulns; \& \& #returns \& plugin id|count \& \& #example \& 11875|40 \& 11412|17 \& 10116|12 \& 11856|11 \& 10932|10 \& 10937|7 \& 11793|6 .Ve .SH "AUTHOR" .IX Header "AUTHOR" David J Kyger .SH "Thanks" .IX Header "Thanks" Gwendolynn ferch Elydyr .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2003 David J Kyger. All rights reserved. .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.