zmap.1 6.9 KB

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