zmap.1.ronn 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. zmap(1) - The Fast Internet Scanner
  2. ===================================
  3. ## SYNOPSIS
  4. zmap [ -p <port> ] [ -o <outfile> ] [ OPTIONS... ] [ ip/hostname/range ]
  5. ## DESCRIPTION
  6. *ZMap* is a network tool for scanning the entire Internet (or large samples).
  7. ZMap is capable of scanning the entire Internet in around 45 minutes on a
  8. gigabit network connection, reaching ~98% theoretical line speed.
  9. ## OPTIONS
  10. ### BASIC OPTIONS ###
  11. * `ip`/`hostname`/`range`:
  12. IP addresses or DNS hostnames to scan. Accepts IP ranges in CIDR block
  13. notation. Defaults to 0.0.0/8
  14. * `-p`, `--target-port=port`:
  15. TCP or UDP port number to scan (for SYN scans and basic UDP scans)
  16. * `-o`, `--output-file=name`:
  17. When using an output module that uses a file, write results to this file.
  18. Use - for stdout.
  19. * `-b`, `--blacklist-file=path`:
  20. File of subnets to exclude, in CIDR notation, one-per line. It is
  21. recommended you use this to exclude RFC 1918 addresses, multicast, IANA
  22. reserved space, and other IANA special-purpose addresses. An example
  23. blacklist file **blacklist.conf** for this purpose.
  24. ### SCAN OPTIONS ###
  25. * `-n`, `--max-targets=n`:
  26. Cap the number of targets to probe. This can either be a number (e.g. -n
  27. 1000) or a percentage (e.g. -n 0.1%) of the scannable address space
  28. (after excluding blacklist)
  29. * `-N`, `--max-results=n`:
  30. Exit after receiving this many results
  31. * `-t`, `--max-runtime=secs`:
  32. Cap the length of time for sending packets
  33. * `-r`, `--rate=pps`:
  34. Set the send rate in packets/sec
  35. * `-B`, `--bandwidth=bps`:
  36. Set the send rate in bits/second (supports suffixes G, M, and K (e.g. -B
  37. 10M for 10 mbps). Thi s overrides the --rate flag.
  38. * `-c`, `--cooldown-time=secs`:
  39. How long to continue receiving after sending has completed (default=8)
  40. * `-e`, `--seed=n`:
  41. Seed used to select address permutation. Use this if you want to scan
  42. addresses in the same order for multiple ZMap runs.
  43. * `--shards=N`:
  44. Split the scan up into N shards/partitions among different instances of
  45. zmap (default=1). When sharding, **--seed** is required.
  46. * `--shard=n`:
  47. Set which shard to scan (default=0). Shards are 0-indexed in the range
  48. [0, N), where N is the total number of shards. When sharding
  49. **--seed** is required.
  50. * `-T`, `--sender-threads=n`:
  51. Threads used to send packets. ZMap will attempt to detect the optimal
  52. number of send threads based on the number of processor cores.
  53. * `-P`, `--probes=n`:
  54. Number of probes to send to each IP (default=1)
  55. * `-d`, `--dryrun`:
  56. Print out each packet to stdout instead of sending it (useful for
  57. debugging)
  58. ### NETWORK OPTIONS ###
  59. * `-s`, `--source-port=port|range`:
  60. Source port(s) to send packets from
  61. * `-S`, `--source-ip=ip|range`:
  62. Source address(es) to send packets from. Either single IP or range (e.g.
  63. 10.0.0.1-10.0.0.9)
  64. * `-G`, `--gateway-mac=addr`:
  65. Gateway MAC address to send packets to (in case auto-detection does not
  66. work)
  67. * `-i`, `--interface=name`:
  68. Network interface to use
  69. ### PROBE OPTIONS ###
  70. ZMap allows users to specify and write their own probe modules. Probe modules
  71. are responsible for generating probe packets to send, and processing responses
  72. from hosts.
  73. * `--list-probe-modules`:
  74. List available probe modules (e.g. tcp_synscan)
  75. * `-M`, `--probe-module=name`:
  76. Select probe module (default=tcp_synscan)
  77. * `--probe-args=args`:
  78. Arguments to pass to probe module
  79. * `--list-output-fields`:
  80. List the fields the selected probe module can send to the output module
  81. ### OUTPUT OPTIONS ###
  82. ZMap allows users to specify and write their own output modules for use with
  83. ZMap. Output modules are responsible for processing the fieldsets returned by
  84. the probe module, and outputing them to the user. Users can specify output
  85. fields, and write filters over the output fields.
  86. * `--list-output-modules`:
  87. List available output modules (e.g. tcp_synscan)
  88. * `-O`, `--output-module=name`:
  89. Select output module (default=csv)
  90. * `--output-args=args`:
  91. Arguments to pass to output module
  92. * `-f`, `--output-fields=fields`:
  93. Comma-separated list of fields to output
  94. * `--output-filter`:
  95. Specify an output filter over the fields defined by the probe module. See
  96. the output filter section for more details.
  97. ### ADDITIONAL OPTIONS ###
  98. * `-C`, `--config=filename`:
  99. Read a configuration file, which can specify any other options.
  100. * `-q`, `--quiet`:
  101. Do not print status updates once per second
  102. * `-g`, `--summary`:
  103. Print configuration and summary of results at the end of the scan
  104. * `-v`, `--verbosity=n`:
  105. Level of log detail (0-5, default=3)
  106. * `-h`, `--help`:
  107. Print help and exit
  108. * `-V`, `--version`:
  109. Print version and exit
  110. ### UDP PROBE MODULE OPTIONS ###
  111. These arguments are all passed using the `--probe-args=args` option. Only one
  112. argument may be passed at a time.
  113. * `file:/path/to/file`:
  114. Path to payload file to send to each host over UDP.
  115. * `template:/path/to/template`:
  116. Path to template file. For each destination host, the template file is
  117. populated, set as the UDP payload, and sent.
  118. * `text:<text>`:
  119. ASCII text to send to each destination host
  120. * `hex:<hex>`:
  121. Hex-encoded binary to send to each destination host
  122. * `template-fields`:
  123. Print information about the allowed template fields and exit.
  124. ### OUPUT FILTERS ###
  125. Results generated by a probe module can be filtered before being passed to the
  126. output module. Filters are defined over the output fields of a probe module.
  127. Filters are written in a simple filtering language, similar to SQL, and are
  128. passed to ZMap using the `--output-filter` option. Output filters are commonly
  129. used to filter out duplicate results, or to only pass only sucessful responses
  130. to the output module.
  131. Filter expressions are of the form `<fieldname> <operation> <value>`. The type of
  132. `<value>` must be either a string or unsigned integer literal, and match the type
  133. of `<fieldname>`. The valid operations for integer comparisons are = !=, <, >,
  134. <=, >=. The operations for string comparisons are =, !=. The
  135. `--list-output-fields` flag will print what fields and types are available for
  136. the selected probe module, and then exit.
  137. Compound filter expressions may be constructed by combining filter expressions
  138. using parenthesis to specify order of operations, the && (logical AND) and ||
  139. (logical OR) operators.
  140. For example, a filter for only successful, non-duplicate responses would be
  141. written as: `--output-filter="success = 1 && repeat = 0"`