| |||||
| |||||
Search Irongeek.com: ![]() ![]()
Help Irongeek.com pay for bandwidth and research equipment: |
SCANPBNJ.MAN.1Section: User Contributed Perl Documentation (1p)Updated: 2011-08-19 Index of this MAN page Back To MAN Pages From BackTrack 5 R1 Master List NAMEScanPBNJ - a program for running Nmap scans and storing the results in a PBNJ 2.0 database. SYNOPSISscanpbnj [Options] {target specification} DESCRIPTIONScanPBNJ performs an Nmap scan and then stores the results in a database. The ScanPBNJ stores information about the machine that has been scanned. ScanPBNJ stores the IP Address, Operating System, Hostname and a localhost bit. The localhost bit, is simply a single bit which is 1 when the target machine is localhost, otherwise it is 0. It also stores two timestamps for the machine table. The first is a human readable version and the second is the unix time. Both of these timestamp correspond to the first time that the machine was scanned.
OPTIONSUsage: scanpbnj [Options] {target specification}
THINGS TO NOTE* ScanPBNJ requires root privileges to perform a scan. * If you do not pass a specific ports range, 1-1025 is used.
EXAMPLE SINGLE SCAN1) Scan a class B network on ports 1-9000
EXAMPLE AUTOMATED SCANSThe following examples can be added to /etc/crontab 1) Scan a Class C network every 2 hours
TARGET SPECIFICATIONThe target specified is a typical method of probing the network. Therefore, any of the following can be used: (e.g. 10.0.0.1, 10.0.0.1-254, 10.0.0.0/24 or 10.0.0.). The first example is simply an IP address. The second example is the scanning of a range. The third is a range in CIDR notation. The fourth example is the IP with the star which specifies to scan 255 hosts. This is the same format that Nmap uses with the only exception being the on the last octet. This is needed because it needs to not interpret the star when it is being executed.
-i <iplist> Scan using a list of IPs from a fileThe iplist option is useful when you have a specific list of IPs to scan. This will perform a full scan of the IPs that are specified. This option is similar to using -sL with Nmap. The results of the scan are inserted into the database. -x <xml-file> Parse scan/info from Nmap XML fileThis option is useful when you can't perform the scan yourself or you don't want ScanPBNJ to perform the scan. Another situation where this is useful, is if you have an XML file that was done in the past and you want to extract information from it, possibly to compare with what is currently being run on the target. ScanPBNJ parses the Nmap XML file and extracts the information about the host(s) and service(s) then inserts the results into the database. SCAN OPTIONS-a --args <args>** NOTE ** This option needs quotes around the passed arguments
-e --extraargs <args>** NOTE ** This option needs quotes around the passed arguments
--inter <intface>This option sets an alternative interface for performing the scan. This is useful when you have multiple interfaces on a machine with restrictions on which devices can access certain IP or IP ranges. -m --moreports <ports>This options adds additional ports to the range of ports to scan. Individual port numbers are OK, as are ranges separated by a hyphen (e.g. 1-1023,5800,5900,8080).
-n --nmap <alternative-nmap-path>Use an alternative Nmap rather than Nmap located in the your path. This is useful if you have multiple version of Nmap installed on a system or if you are testing a new version of Nmap. Remember that if you are using a newly compiled version of Nmap that you need to export NMAPDIR to the location that Nmap was compiled in. Thus, if you have compiled Nmap in your homedir, use the following notation:
-p Ping Target then scan the host(s) that are aliveThe ping scan is a useful method of only scanning the host that are responding to ICMP echo requests. This scan basically takes the host that respond to ICMP echo requests and then performs a scan only on those hosts. Therefore, no time is wasted in scanning hosts that do not respond. The results of the scan are then inserted into the database. --udp Add UDP to the scan argumentsPerform a UDP scan, in addition to the default scan. sudo scanpbnj --udp localhost If you want to only perform a UDP scan you need to set the specific arguments for the scan. sudo scanpbnj -a "-vv -O -P0 1-1025 -sVU" localhost --rpc Add RPC to the scan argumentsPerform a RPC scan in addition to the default scan. sudo scanpbnj --udp localhost
-r --range <ports>Ports for scan [default 1-1025]
--diffbannerParse changes of the banner
DATABASE OPTIONS-d --dbconfig <file>Config for results database [default config.yaml]
--configdir <dir>Directory for Config file [default . ] This option is used to specify an alternative directory for the config.yaml file. --data <file>SQLite Database override [default data.dbl ]
--dir <dir>Directory for SQLite or CSV files [default . ]
GENERAL OPTIONS--nocolorsThe default results from ScanPBNJ print the useful changes with colors This options will simply not print the colors. --test <level>Increases the Test level, causing ScanPBNJ to print testing information about the scan in progress. Using the Test level is mostly only using for testing. This will also print the debugging information so it can get rather lengthy. The greater the Test level the more output will be given.
--debug <level>Increases the Debug level, causing ScanPBNJ to print more information about the scan in progress. Nmap scanning arguments are shown as well as the ip address if you are scanning a domain name. This option is used to give the user more information about what the scanner is doing. The higher the debug level the more output the user will receive. -v --versionPrints the ScanPBNJ version number and exits. -h --helpPrints a short help screen with the command flags. Running ScanPBNJ without any arguments does the same thing. DEFAULT SCANHere are the default arguments that are used during a default scan: FILESPBNJ's data files are stored in ScanPBNJ and OutputPBNJ. When either of these programs is run the configuration files will be generated for the user if they don't already exists and placed in the $HOME/.pbnj-2.0 directory. Again, if there is a configuration file in the current directory it is used instead of the version in the configuration directory.
FEATURE REQUESTSAny feature requests should be reported to the online feature-request-tracking system available on the web at : http://sourceforge.net/tracker/?func=add&group_id=149390&atid=774489 Before requesting a feature, please check to see if the features has already been requested. BUG REPORTSAny bugs found should be reported to the online bug-tracking system available on the web at : http://sourceforge.net/tracker/?func=add&group_id=149390&atid=774488. Before reporting a bug, please check to see if the bug has already been reported.
SUPPORTED DATABASESThe following databases are supported:
DATABASE SCHEMAThe following is the SQLite version of the database schema: CREATE TABLE machines ( mid INTEGER PRIMARY KEY AUTOINCREMENT, ip TEXT, host TEXT, localh INTEGER, os TEXT, machine_created TEXT, created_on TEXT); CREATE TABLE services ( mid INTEGER, service TEXT, state TEXT, port INTEGER, protocol TEXT, version TEXT, banner TEXT, machine_updated TEXT, updated_on TEXT); SEE ALSOoutputpbnj(1), genlist(1), nmap(1) AUTHORSJoshua D. Abraham ( jabra@ccs.neu.edu ) LEGAL NOTICESThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details at http://www.gnu.org/copyleft/gpl.html, or in the COPYING file included with PBNJ.
Index
This document was created by man2html, using the manual pages. Time: 07:34:21 GMT, September 13, 2011
15 most recent posts on Irongeek.com:
|
If you would like to republish one of the articles from this site on your
webpage or print journal please contact IronGeek.
Copyright 2020, IronGeek
Louisville / Kentuckiana Information Security Enthusiast