Advertisement
ciphersson

Zmap commands

Aug 31st, 2013
1,300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.26 KB | None | 0 0
  1. Zmap
  2.  
  3. $ zmap --bandwidth=10M --target-port=80 --max-target s=10000 --output-file=results.txt
  4.  
  5.  
  6.  
  7. $ zmap -B 10M -p 80 -n 10000 -o results.txt
  8.  
  9.  
  10. /etc/zmap/blacklist.conf
  11.  
  12. multicast, RFC1918
  13.  
  14. --dryrun
  15.  
  16. --verbosity=n
  17.  
  18. -p, --target-port=port -o, --output-file=name -b, --blacklist-file=path
  19.  
  20.  
  21. Scan Options
  22.  
  23.  
  24. -n, --max-targets=n
  25.  
  26. Cap the number of targets to probe. This can either be a number (e.g. -n 1000) or a percentage (e.g. -n 0.1%) of the scannable address space (after excluding blacklist)
  27.  
  28. -N, --max-results=n
  29.  
  30. Exit after receiving this many results
  31.  
  32. -t, --max-runtime=secs
  33.  
  34. Cap the length of time for sending packets
  35.  
  36. -r, --rate=pps
  37.  
  38. Set the send rate in packets/sec
  39.  
  40. -B, --bandwidth=bps
  41.  
  42. Set the send rate in bits/second (supports suffixes G, M, and K (e.g. -B10M for 10 mbps). This overrides the --rate flag.
  43.  
  44. -c, --cooldown-time=secs
  45.  
  46. How long to continue receiving after sending has completed (default=8)
  47.  
  48. -e, --seed=n
  49.  
  50. Seed used to select address permutation. Use this if you want to scan addresses in the same order for multiple ZMap runs.
  51.  
  52.  
  53. -T, --sender-threads=n
  54.  
  55. Threads used to send packets (default=1)
  56.  
  57. -P, --probes=n
  58.  
  59. Number of probes to send to each IP (default=1)
  60.  
  61. -d, --dryrun
  62.  
  63. Print out each packet to stdout instead of sending it (useful for debugging)
  64.  
  65.  
  66. Network Options
  67. -s, --source-port=port|range
  68.  
  69. Source port(s) to send packets from
  70.  
  71. -S, --source-ip=ip|range
  72.  
  73. Source address(es) to send packets from. Either single IP or range (e.g. 10.0.0.1- 10.0.0.9)
  74.  
  75. -G, --gateway-mac=addr
  76.  
  77. Gateway MAC address to send packets to (in case auto-detection does not work)
  78.  
  79. -i, --interface=name
  80.  
  81. Network interface to use
  82.  
  83.  
  84.  
  85. Module Options
  86.  
  87.  
  88. -M, --probe-module=name
  89.  
  90. Select probe module (default=tcp_synscan)
  91.  
  92. -O, --output-module=name
  93.  
  94. Select output module (default=simple_file)
  95.  
  96. --probe-args=args
  97.  
  98. Arguments to pass to probe module
  99.  
  100. --output-args=args
  101.  
  102. Arguments to pass to output module
  103.  
  104. --list-output-modules
  105.  
  106. List available output modules (e.g. tcp_synscan)
  107.  
  108. --list-probe-modules
  109.  
  110. List available probe modules (e.g. extended_file)
  111.  
  112.  
  113.  
  114. Additional Options
  115.  
  116. -C, --config=filename
  117.  
  118. Read a configuration file, which can specify any other options.
  119.  
  120. -q, --quiet
  121.  
  122. Do not print status updates once per second
  123.  
  124. -g, --summary
  125.  
  126. Print configuration and summary of results at the end of the scan
  127.  
  128. -v, --verbosity=n
  129.  
  130. Level of log detail (0-5, default=3)
  131.  
  132.  
  133. -h, --help
  134.  
  135. Print help and exit
  136.  
  137.  
  138. -V, --version
  139.  
  140. Print version and exit
  141.  
  142.  
  143. TCP SYN Scans
  144.  
  145. -p, --target-port=port
  146.  
  147. TCP port number to scan (e.g. 443)
  148.  
  149. -s, --source-port=port|range
  150.  
  151. Source port(s) for scan packets (e.g. 40000-
  152. 50000)
  153.  
  154.  
  155.  
  156.  
  157. Other Stuff
  158.  
  159. $ zmap --probe-module=icmp_echoscan
  160.  
  161.  
  162. $ zmap --probe-module=udp -p 53 -N 100 -o - flag
  163.  
  164. --summary flag
  165.  
  166.  
  167.  
  168. Rate Limiting and Sampling
  169.  
  170. -r, --rate=pps
  171.  
  172. Set maximum send rate in packets/sec
  173.  
  174. -B, --bandwidth=bps
  175.  
  176. Set send rate in bits/sec (supports suffixes G,
  177. M, and K). This overrides the --rate flag.
  178.  
  179.  
  180. -n, --max-targets=n
  181. Cap number of targets to probe
  182.  
  183. -N, --max-results=n
  184.  
  185.  
  186. Cap number of results (exit after receiving this many positive results)
  187.  
  188.  
  189. -t, --max-runtime=s
  190.  
  191. Cap length of time for sending packets (in seconds)
  192.  
  193. -s, --seed=n
  194.  
  195. Seed used to select address permutation. Specify the same seed in order to scan addresses in the same order for different ZMap runs.
  196.  
  197.  
  198. ========================================
  199. Banner Grab
  200. ========================================
  201.  
  202. TCP Banner Grab
  203. ======
  204.  
  205. This utility will connect (TCP) to ip addresses provide over stdin, optionally
  206. send them a small message, and wait for their response. The response is then
  207. printed along with their IP address on stdout. Status messages appear on stderr.
  208.  
  209.  
  210. USING:
  211. -----
  212. make
  213. #echo -e -n "GET / HTTP/1.1\r\nHost: %s\r\n\r\n" > http-req
  214. zmap -p 80 -N 1000 -o - | ./banner-grab-tcp -p 80 -c 100 -d http-req > http-banners.out
  215.  
  216.  
  217. OPTIONS:
  218. -----
  219. -c, --concurent Number of connections that can be going on at once.
  220. This, combined with timeouts, will decide the maximum
  221. rate at which banners are grabbed. If this value
  222. is set higher than 1000, you should use
  223. `ulimit -SSn 1000000` and `ulimit -SHn 1000000` to
  224. avoid running out of file descriptors (typically capped
  225. at 1024).
  226.  
  227. -p, --port The port which to connect to hosts on
  228.  
  229. -t, --conn-timeout Connection timeout (seconds). Give up on a host if connect
  230. has not completed by this time. Default: 4 seconds.
  231.  
  232. -r, --read-timeout Read timeout (seconds). Give up on a host if after
  233. connecting (and optionally sending data), it does
  234. not send any response by this time. Default: 4 seconds.
  235.  
  236. -v, --verbosity Set status verbosity. Status/error messages are outputed
  237. on stderr. This value can be 0-5, with 5 being the most
  238. verbose (LOG_TRACE). Default: 3 (LOG_INFO)
  239.  
  240. -f, --format Format to output banner responses. One of 'hex', 'ascii',
  241. or 'base64'.
  242. 'hex' outputs ascii hex characters, e.g. 48656c6c6f.
  243. 'ascii' outputs ascii, without separators, e.g. Hello
  244. 'base64' outputs base64 encoding, e.g. SGVsbG8=
  245. Default is base64.
  246.  
  247. -d, --data Optional data file. This data will be sent to each host
  248. upon successful connection. Currently, this file does
  249. not allow null characters, but supports up to 4
  250. occurances of the current host's IP address, by replacing
  251. %s with the string (inet_ntoa) of that host's IP address.
  252.  
  253.  
  254.  
  255. Writing Probe and Output Modules
  256.  
  257. --list-probe-modules
  258.  
  259. Lists installed probe modules
  260.  
  261. --list-output-modules
  262.  
  263. Lists installed output modules
  264.  
  265.  
  266.  
  267.  
  268. ==================
  269. tcp banner grab
  270. ==================
  271.  
  272.  
  273. banner-grab-tcp
  274.  
  275. =======================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement