User guide

advertisement
Network Sweep
Auto discovery of network devices
User Manual
General information:
The Network Sweep device automatically discovers network devices using ICMP (performing
Ping), SNMP (Simple Network Management Protocol) and Telnet (Terminal-emulation
Protocol) protocols and stores device information in XML files. The program is able to scan
large networks (up to 50,000 hosts) in a reasonable time.
Running instruction:
Before execution makes sure that log4j.properties file is found in the same directory where
you execute the program, this file is used to determine the output log file structure. You may
change this file if you want to and know how, but this file existence is mandatory!
In order to run the program from the Command line you should go to the directory where
the project jar file is located and execute:
java -jar NetSweep.jar
Program output:
All the output files will be found in the “input_output/output” directory. If it the directory
doesn’t exist, it will be created where the executed jar file is located.
 For every discovered network device you can find an XML file containing SNMP and
Telnet credentials.
 A CSV file containing discovery status and connection details for Ping, SNMP and
Telnet protocols for each discovered IP.
 Log file containing the run flow details and timing.
 In case the last run crashed or stopped before it finished, there will be a recovery
file. This file will be used by the program to recover and continue from the point it
stopped (if that what the user will choose to do).
1. Preliminary actions:
In the project directory you can find "input_output/input" directory, in this directory you can
put input files that contain information for your next run:
 Properties – in properties.txt
 SNMP passwords – in snmpPassword.txt
 Telnet user details (username and password) – in telnetPassword.txt
 Seed scan range – in seed.txt
 IP scan range – in ipRange.txt
These files are not mandatory and if they won't be found, the GUI will show default values
(in case of properties file) or empty lists (in all other cases), so you can fill them up in the GUI
at the beginning of the run.
properties.txt:
This file contains the configuration properties of the run. The properties will be
uploaded to the GUI (and may change there).
The properties available:

SEED_SCANNING – determine if the scan will be an IP range scan or a Seed Scan
(values: "YES" or "NO")







MAX_HOP_FROM_SEED – This property is just for Seed scan, determines the
maximum distance of the scan from the seeds. Values: any positive integer.
SNMP_RETRIES – The number of connections retries in SNMP protocol. Values: any
positive integer.
SNMP_TIMEOUT – The maximum time (in millisecond) that the program waits for
SNMP response. Values: any positive integer.
PING_TIMEOUT - The maximum time (in millisecond) that the program waits for
Ping response. Values: any positive integer.
TELNET_TIMEOUT - The maximum time (in millisecond) that the program waits
for Telnet response. Values: any positive integer.
THREAD_TIMEOUT – The maximum time (in millisecond) that excess idle threads
will wait for new tasks before terminating. Values: any positive integer.
NUM_THREADS – the maximum number of threads that the thread pool will create
for the scan. Values: any positive integer.
In each line of the file you should write: “PropertyName” = “PropertyValue”
PropertyName is one of the properties listed above.
PropertyValue is a correct PropertyName's value.
Example:
SEED_SCAN = YES
PING_TIMEOUT = 3000
Warning – if you are not sure of a property value don't fill it, there can be a bad
influence on the program’s performance if a wrong value is entered. Leave this
property out and let the program fill its default value.
snmpPassword.txt:
This file contains the SNMP passwords that will be uploaded to the GUI (and may change
there); these passwords will be used to connect to the scanned network devices.
In each line of the file you should write: snmpPassword
snmpPassword is a String.
Example:
aaa
public
telnetPassword.txt:
This file contains Telnet usernames & passwords that will be uploaded to the GUI (and may
change there), those usernames & passwords will be used to connect to scanned network
devices.
In each line of the file you should write: username,password
username is a String.
password is a String.
Example:
AAA,aaa
public,pass
seed.txt:
This file contains the IP addresses of the initial seed routers that will be uploaded to the GUI
(and may change there). The network scan will begin with those IPs.
In each line of the file you should write: ipAddress
ipAddress is an IP address.
Example:
10.26.247.0
140.98.5.78
ipRange.txt:
This file contains the IP range definitions that will be uploaded to the GUI (and may change
there), those ranges will be used to build a queue of IPs to scan.
In each line of the file you should write: rangeType,par1,par2,rangeDefinition
rangeType : IP, MASK or CIDR.
par1 is an IP address.
Par2 : IP address, MASK or CIDR
rangeDefinition: INCLUDE or EXCLUDE. (Determine if the range is included or excluded for
the last combine range.
Example:
IP,155.67.9.34,16.48.96.32,INCLUDE
CIDR,155.67.9.0,27,EXCLUDE
2. Recovery GUI:
In case the last run has crashed or was stopped, the next time you run the program the
“Recovery GUI” will appear and you will be able to choose to continue the last scan or to
start a new one.
Choose your selection by clicking the YES or NO buttons.
3. Main GUI:
The GUI is divided into 4 different areas:
 Properties – The program’s run configuration. Contains the data read from
“properties.txt” file and default values for missing properties.
 Range definitions – contains IP range definitions or seed IPs read from the input
files (depend on the Scan type selected in the file or in the GUI).
 Passwords – contains SNMP passwords and Telnet username & password.
 Run time details – has no effect before the run starts, will contain run time
information during the run.
Properties
Run time
details
Passwords
Range
definitions
Properties:
This part of the GUI contains the configuration details of the run, and 2 Radio buttons (Seed
Scan and IP Scan), when you select one of them it will open the "Range definition" part of
the GUI according to your selection.
Radio
Buttons
Range definitions:
This part of the GUI contains the seed IPs or IP range definitions read from the input files
(according to the selection of the radio button in the "Properties" part of the GUI).
You can add to the displayed list more lines (according to the way they appear in the GUI, it’s
the same way you enter them in the files) with the add button, you can also remove existing
lines by using the Remove button after selecting the line you want to remove.
When adding an IP Range line you only need to enter IP in the upper text field and the
IP/MASK/CIDR in the next textbox, the range type (IP, MASK or CIDR) and the range
definition (INCLUDE or EXCLUDE) is selected with the radio buttons.
When all details in all the GUI parts are filled, you can start the program run by clicking on
the Run button.
Remove Button
Add Button
Radio
Buttons
Remove
Button
Run Button
Passwords:
This part of the GUI contains the SNMP passwords and the Telnet usernames & passwords
read from the input files.
You can add more passwords and/or usernames & passwords with the add button. You can
also remove one or more from the lists, by selecting the line you want to remove and
clicking the Remove button.
add Button
Remove
Button
Run time details:
This part of the GUI contains the runtime information, adding any data to the text fields
won't have any effect. These fields will be uploaded with real time data by the program and
will be updated every 5 seconds.
You can terminate the program before it begins to run by clicking the STOP button. If the
program already began to run, clicking this button will cause the program to exit after all
running tasks are finished their work (waiting tasks won't start).
STOP
Button
If the STOP button is pressed during the run, all running and waiting tasks will continue to be
executed and the RUN button will be enabled.
If the RUN button is pressed the recovery GUI will be displayed and the user can choose to
continue the last run (by pressing “YES” in the recovery GUI) or stop the net sweep (by
pressing “NO”). The application will wait until all running tasks finish and will not execute
any waiting task.
Download