Advertisement
alice_killer

nmap

Dec 1st, 2023
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. The most effective host discovery method is to use ICMP echo requests.
  2. This scanning method works only if the firewalls of the hosts allow it.
  3. nmap 10.129.2.0/24 -sn -oA tnet | grep for | cut -d" " -f5
  4. Scanning Options Description
  5. 10.129.2.0/24 Target network range.
  6. -sn Disables port scanning.
  7. -oA tnet Stores the results in all formats starting with the name 'tnet'.
  8. -iL hosts.lst Performs defined scans against targets in provided 'hosts.lst' list.
  9.  
  10.  
  11. nmap 10.129.2.18 -sn -oA host -PE --packet-trace
  12. Scanning Options Description
  13. 10.129.2.18 Performs defined scans against the target.
  14. -sn Disables port scanning.
  15. -oA host Stores the results in all formats starting with the name 'host'.
  16. -PE Performs the ping scan by using 'ICMP Echo requests' against the target.
  17. --packet-trace Shows all packets sent and received
  18.  
  19. Nmap - Trace the Packets (clear view of the SYN scan)
  20. sudo nmap 10.129.2.28 -p 21 --packet-trace -Pn -n --disable-arp-ping #sudo or -sS
  21. Scanning Options Description
  22. 10.129.2.28 Scans the specified target.
  23. -p 21 Scans only the specified port.
  24. --packet-trace Shows all packets sent and received.
  25. -n Disables DNS resolution.
  26. --disable-arp-ping Disables ARP ping.
  27. -Pn Disables ICMP Echo requests.
  28. --reason Displays the reason a port is in a particular state.
  29.  
  30.  
  31. sudo nmap 10.129.2.28 -p 443 --packet-trace --disable-arp-ping -Pn -n --reason -sT
  32. (-sT) - is the most accurate way to determine the state of a port, and it is also the most stealthy. Unlike other types of scans, such as the SYN scan, the Connect scan does not leave any unfinished connections or unsent packets on the target host, which makes it less likely to be detected by intrusion detection systems (IDS) or intrusion prevention systems (IPS). It is useful when we want to map the network and don't want to disturb the services running behind it, thus causing a minimal impact and sometimes considered a more polite scan method. It is also useful when the target host has a personal firewall that drops incoming packets but allows outgoing packets. However, it is important to note that the Connect scan is slower than other types of scans because it requires the scanner to wait for a response from the target after each packet it sends, which could take some time if the target is busy or unresponsive.
  33. It is also useful when the target host has a personal firewall that drops incoming packets but allows outgoing packets. In this case, a Connect scan can bypass the firewall and accurately determine the state of the target ports.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement