{"id":530,"date":"2018-09-09T12:20:57","date_gmt":"2018-09-09T12:20:57","guid":{"rendered":"https:\/\/d1m0.com\/?p=530"},"modified":"2018-09-09T12:20:57","modified_gmt":"2018-09-09T12:20:57","slug":"nmap-scaning-basics-pt2","status":"publish","type":"post","link":"https:\/\/d1m0.com\/?p=530","title":{"rendered":"Nmap scaning basics pt2"},"content":{"rendered":"<p>TARGET SPECIFICATION:<br \/>\nCan pass hostnames, IP addresses, networks, etc.<br \/>\nEx: scanme.nmap.org, microsoft.com\/24, 192.168.0.1; 10.0.0-255.1-254<br \/>\n-iL <inputfilename>: Input from list of hosts\/networks<br \/>\n-iR <num hosts>: Choose random targets<br \/>\n\u2013exclude <host1[,host2][,host3],\u2026>: Exclude hosts\/networks<br \/>\n\u2013excludefile <exclude_file>: Exclude list from file<\/p>\n<p>HOST DISCOVERY:<br \/>\n-sL: List Scan \u2013 simply list targets to scan<br \/>\n-sn: Ping Scan \u2013 disable port scan<br \/>\n-Pn: Treat all hosts as online \u2014 skip host discovery<br \/>\n-PS\/PA\/PU\/PY[portlist]: TCP SYN\/ACK, UDP or SCTP discovery to given ports<br \/>\n-PE\/PP\/PM: ICMP echo, timestamp, and netmask request discovery probes<br \/>\n-PO[protocol list]: IP Protocol Ping<br \/>\n-n\/-R: Never do DNS resolution\/Always resolve [default: sometimes]<br \/>\n\u2013dns-servers <serv1[,serv2],\u2026>: Specify custom DNS servers<br \/>\n\u2013system-dns: Use OS\u2019s DNS resolver<br \/>\n\u2013traceroute: Trace hop path to each host<\/p>\n<p>SCAN TECHNIQUES:<br \/>\n-sS\/sT\/sA\/sW\/sM: TCP SYN\/Connect()\/ACK\/Window\/Maimon scans<br \/>\n-sU: UDP Scan<br \/>\n-sN\/sF\/sX: TCP Null, FIN, and Xmas scans<br \/>\n\u2013scanflags <flags>: Customize TCP scan flags<br \/>\n-sI <zombie host[:probeport]>: Idle scan<br \/>\n-sY\/sZ: SCTP INIT\/COOKIE-ECHO scans<br \/>\n-sO: IP protocol scan<br \/>\n-b <FTP relay host>: FTP bounce scan<\/p>\n<p>PORT SPECIFICATION AND SCAN ORDER:<br \/>\n-p <port ranges>: Only scan specified ports<br \/>\nEx: -p22; -p1-65535; -p U:53,111,137,T:21-25,80,139,8080,S:9<br \/>\n\u2013exclude-ports <port ranges>: Exclude the specified ports from scanning<br \/>\n-F: Fast mode \u2013 Scan fewer ports than the default scan<br \/>\n-r: Scan ports consecutively \u2013 don\u2019t randomize<br \/>\n\u2013top-ports <number>: Scan <number> most common ports<br \/>\n\u2013port-ratio <ratio>: Scan ports more common than <ratio><\/p>\n<p>SERVICE\/VERSION DETECTION:<br \/>\n-sV: Probe open ports to determine service\/version info<br \/>\n\u2013version-intensity <level>: Set from 0 (light) to 9 (try all probes)<br \/>\n\u2013version-light: Limit to most likely probes (intensity 2)<br \/>\n\u2013version-all: Try every single probe (intensity 9)<br \/>\n\u2013version-trace: Show detailed version scan activity (for debugging)<\/p>\n<p>SCRIPT SCAN:<br \/>\n-sC: equivalent to \u2013script=default<br \/>\n\u2013script=<Lua scripts>: <Lua scripts> is a comma separated list of<br \/>\ndirectories, script-files or script-categories<br \/>\n\u2013script-args=<n1=v1,[n2=v2,\u2026]>: provide arguments to scripts<br \/>\n\u2013script-args-file=filename: provide NSE script args in a file<br \/>\n\u2013script-trace: Show all data sent and received<br \/>\n\u2013script-updatedb: Update the script database.<br \/>\n\u2013script-help=<Lua scripts>: Show help about scripts.<br \/>\n<Lua scripts> is a comma-separated list of script-files or<br \/>\nscript-categories.<\/p>\n<p>OS DETECTION:<br \/>\n-O: Enable OS detection<br \/>\n\u2013osscan-limit: Limit OS detection to promising targets<br \/>\n\u2013osscan-guess: Guess OS more aggressively<\/p>\n<p>TIMING AND PERFORMANCE:<br \/>\nOptions which take <time> are in seconds, or append \u2018ms\u2019 (milliseconds),<br \/>\n\u2018s\u2019 (seconds), \u2018m\u2019 (minutes), or \u2018h\u2019 (hours) to the value (e.g. 30m).<br \/>\n-T<0-5>: Set timing template (higher is faster)<br \/>\n\u2013min-hostgroup\/max-hostgroup <size>: Parallel host scan group sizes<br \/>\n\u2013min-parallelism\/max-parallelism <numprobes>: Probe parallelization<br \/>\n\u2013min-rtt-timeout\/max-rtt-timeout\/initial-rtt-timeout <time>: Specifies<br \/>\nprobe round trip time.<br \/>\n\u2013max-retries <tries>: Caps number of port scan probe retransmissions.<br \/>\n\u2013host-timeout <time>: Give up on target after this long<br \/>\n\u2013scan-delay\/\u2013max-scan-delay <time>: Adjust delay between probes<br \/>\n\u2013min-rate <number>: Send packets no slower than <number> per second<br \/>\n\u2013max-rate <number>: Send packets no faster than <number> per second<\/p>\n<p>FIREWALL\/IDS EVASION AND SPOOFING:<br \/>\n-f; \u2013mtu <val>: fragment packets (optionally w\/given MTU)<br \/>\n-D <decoy1,decoy2[,ME],\u2026>: Cloak a scan with decoys<br \/>\n-S <IP_Address>: Spoof source address<br \/>\n-e <iface>: Use specified interface<br \/>\n-g\/\u2013source-port <portnum>: Use given port number<br \/>\n\u2013proxies <url1,[url2],\u2026>: Relay connections through HTTP\/SOCKS4 proxies<br \/>\n\u2013data <hex string>: Append a custom payload to sent packets<br \/>\n\u2013data-string <string>: Append a custom ASCII string to sent packets<br \/>\n\u2013data-length <num>: Append random data to sent packets<br \/>\n\u2013ip-options<options>: Send packets with specified ip options<br \/>\n\u2013ttl <val>: Set IP time-to-live field<br \/>\n\u2013spoof-mac <mac address\/prefix\/vendor name>: Spoof your MAC address<br \/>\n\u2013badsum: Send packets with a bogus TCP\/UDP\/SCTP checksum<\/p>\n<p>OUTPUT:<br \/>\n-oN\/-oX\/-oS\/-oG <file>: Output scan in normal, XML, s|<rIpt kIddi3,\nand Grepable format, respectively, to the given filename.\n-oA <basename>: Output in the three major formats at once<br \/>\n-v: Increase verbosity level (use -vv or more for greater effect)<br \/>\n-d: Increase debugging level (use -dd or more for greater effect)<br \/>\n\u2013reason: Display the reason a port is in a particular state<br \/>\n\u2013open: Only show open (or possibly open) ports<br \/>\n\u2013packet-trace: Show all packets sent and received<br \/>\n\u2013iflist: Print host interfaces and routes (for debugging)<br \/>\n\u2013log-errors: Log errors\/warnings to the normal-format output file<br \/>\n\u2013append-output: Append to rather than clobber specified output files<br \/>\n\u2013resume <filename>: Resume an aborted scan<br \/>\n\u2013stylesheet <path\/URL>: XSL stylesheet to transform XML output to HTML<br \/>\n\u2013webxml: Reference stylesheet from Nmap.Org for more portable XML<br \/>\n\u2013no-stylesheet: Prevent associating of XSL stylesheet w\/XML output<\/p>\n<p>MISC:<br \/>\n-6: Enable IPv6 scanning<br \/>\n-A: Enable OS detection, version detection, script scanning, and traceroute<br \/>\n\u2013datadir <dirname>: Specify custom Nmap data file location<br \/>\n\u2013send-eth\/\u2013send-ip: Send using raw ethernet frames or IP packets<br \/>\n\u2013privileged: Assume that the user is fully privileged<br \/>\n\u2013unprivileged: Assume the user lacks raw socket privileges<br \/>\n-V: Print version number<br \/>\n-h: Print this help summary page<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TARGET SPECIFICATION: Can pass hostnames, IP addresses, networks, etc. Ex: scanme.nmap.org, microsoft.com\/24, 192.168.0.1; 10.0.0-255.1-254 -iL : Input from list of hosts\/networks -iR : Choose random targets \u2013exclude : Exclude hosts\/networks \u2013excludefile : Exclude list from file HOST DISCOVERY: -sL: List Scan \u2013 simply list targets to scan -sn: Ping Scan \u2013 disable port scan -Pn: &#8230;<\/p>\n<p><a href=\"https:\/\/d1m0.com\/?p=530\" class=\"more-link\">Continue reading &lsquo;Nmap scaning basics pt2&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,4],"tags":[],"class_list":["post-530","post","type-post","status-publish","format-standard","hentry","category-linux","category-networking"],"_links":{"self":[{"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/posts\/530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/d1m0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=530"}],"version-history":[{"count":1,"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/posts\/530\/revisions"}],"predecessor-version":[{"id":531,"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/posts\/530\/revisions\/531"}],"wp:attachment":[{"href":"https:\/\/d1m0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/d1m0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=530"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/d1m0.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}