Nmap is anetwork scannercreated byGordon Lyon. Nmap is used todiscover hostsandserviceson acomputer networkby sending packets and analyzing the responses. Nmap provides a number of features for probing computer networks, including host discovery and service and operating system detection.
-Pn# disables the ping command and only scans ports-f # used to fragment the packets (i.e. split them into smaller pieces) making it less likely that the packets will be detected by a firewall or IDS.
# ALTERNATIVES TO -f, but providing more control over the size of the packets: --mtu<number># accepts a maximum transmission unit size to use for the packets sent. This must be a multiple of 8.--scan-delay <time> # in ms, used to add a delay between packets sent. This is very useful if the network is unstable, but also for evading any time-based firewall/IDS triggers which may be in place.
--badsum # this is used to generate in invalid checksum for packets. Any real TCP/IP stack would drop this packet, however, firewalls may potentially respond automatically, without bothering to check the checksum of the packet. As such, this switch can be used to determine the presence of a firewall/IDS.
# Scan from spoofed IPnmap192.168.1.1-D192.168.1.2# Scan Facebook from Microsoftnmap-Swww.microsoft.comwww.facebook.com# Use a specific source portnmap192.168.1.1-g53
Examples
# http site map generatornmap-Pn--script=http-sitemap-generatorscanme.nmap.org# Fast search for random web serversnmap-n-Pn-p80--open-sV-vvv--scriptbanner,http-title-iR1000# Brute forces DNS hostnames guessing subdomainsnmap-Pn--script=dns-brutedomain.com# Safe SMB scripts to runnmap-n-Pn-vv-O-sV--scriptsmb-enum*,smb-ls,smb-mbenum,smb-os-discovery,smb-s*,smb-vuln*,smbv2*-vv192.168.1.1# Whois querynmap--scriptwhois*domain.com# Detect cross site scripting vulnerabilities.nmap-p80--scripthttp-unsafe-output-escapingscanme.nmap.org# Check for SQL injectionsnmap-p80--scripthttp-sql-injectionscanme.nmap.org
rustscan
Fasterthan nmap
π±οΈ Basic commands
# Use in most cases : Noisy AFrustscan-a0.0.0.0---A-sC-sV-oNinitial.log# SYN "Stealth" scansudorustscan-a0.0.0.0---vv-oNInitial-SYN-Scan# Service Scansudorustscan-a0.0.0.0-p22,53,80,443---sV-Pn-vv# Multiple IP Scanningrustscan-a0.0.0.0,1.1.1.1# CIDR supportrustscan-a192.168.0.0/30# Selected port scanningrustscan-a0.0.0.0-p53,80,121,65535# Ranges of portsrustscan-a0.0.0.0--range1-1000# UDP scanrustscan-a0.0.0.0-sU-pports