"# NMAP-Advanced-Command"
Certainly! nmap
(Network Mapper) is a powerful tool for network discovery and security auditing. Below are some advanced commands and techniques that can be used with nmap
:
nmap -O <target>
- This command attempts to determine the operating system of the target host.
nmap -sV <target>
- This command probes open ports to determine the service/version information running on them.
nmap -A <target>
- This option enables OS detection, version detection, script scanning, and traceroute. It’s a more intrusive scan.
nmap -sS <target>
- This is a default scan type that performs a SYN scan, which is stealthier than a full TCP connect scan.
nmap -sU <target>
- This command scans for open UDP ports. UDP scans can be slower and less reliable than TCP scans.
nmap --script <script-name> <target>
- This command runs a specific NSE (Nmap Scripting Engine) script against the target. For example:
nmap --script vuln <target>
- This runs vulnerability detection scripts.
nmap -p- <target>
- This command scans all 65535 ports on the target.
nmap -F <target>
- This command scans only the most common 100 ports, making it faster.
nmap -T<0-5> <target>
- This command adjusts the timing template.
-T0
is the slowest (paranoid) and-T5
is the fastest (insane).
nmap -oN output.txt <target>
- This command saves the scan results to a text file.
nmap -oX output.xml <target>
- This command saves the scan results to an XML file.
nmap -sI <zombie host> <target>
- This command performs an idle scan using a zombie host to obscure the source of the scan.
nmap -f <target>
- This command fragments the packets, making it harder for firewalls to detect the scan.
nmap -D <decoy1,decoy2,decoy3> <target>
- This command uses decoy IP addresses to make it harder to identify the source of the scan.
nmap -S <spoofed IP> <target>
- This command spoofs the source IP address of the scan.
nmap 192.168.1.1-100
- This command scans a range of IP addresses.
nmap 192.168.1.0/24
- This command scans an entire subnet.
nmap --script firewall-bypass <target>
- This command uses NSE scripts to detect and attempt to bypass firewall rules.
nmap --script malware <target>
- This command uses NSE scripts to detect malware infections on the target.
nmap -p 443 --script ssl-heartbleed <target>
- This command checks if the target is vulnerable to the Heartbleed bug.
nmap --script smb-vuln* <target>
- This command scans for SMB-related vulnerabilities on the target.
nmap -sU -p 53 --script dns-zone-transfer <target>
- This command attempts a DNS zone transfer on the target.
nmap -p 80 --script http-sql-injection <target>
- This command scans for SQL injection vulnerabilities on web servers.
nmap -p 80 --script http-xssed <target>
- This command scans for Cross-Site Scripting (XSS) vulnerabilities.
nmap -p 443 --script ssl-enum-ciphers <target>
- This command enumerates SSL/TLS ciphers supported by the target.
nmap -p 21 --script ftp-anon,ftp-bounce <target>
- This command checks for anonymous FTP access and FTP bounce vulnerabilities.
nmap -sU -p 161 --script snmp-info <target>
- This command retrieves information from SNMP services.
nmap -p 3389 --script rdp-enum-encryption <target>
- This command checks the encryption level of RDP services.
nmap -p 5900 --script vnc-info <target>
- This command retrieves information from VNC services.
nmap -p 22 --script ssh2-enum-algos <target>
- This command enumerates SSH encryption algorithms.
nmap -p 80 --script http-methods <target>
- This command lists the HTTP methods supported by the target.
nmap -p 80 --script http-waf-detect <target>
- This command detects the presence of a Web Application Firewall (WAF).
nmap -p 80 --script http-enum <target>
- This command enumerates directories on a web server.
nmap -p 80 --script http-wordpress-enum <target>
- This command enumerates WordPress plugins and themes.
nmap -p 80 --script http-joomla-brute <target>
- This command brute-forces Joomla login pages.
nmap -p 80 --script http-drupal-enum <target>
- This command enumerates Drupal modules and themes.
nmap -p 8080 --script http-jenkins-enum <target>
- This command enumerates Jenkins jobs and builds.
nmap -p 6379 --script redis-info <target>
- This command retrieves information from Redis services.
nmap -p 27017 --script mongodb-info <target>
- This command retrieves information from MongoDB services.
nmap -p 9200 --script elasticsearch-info <target>
- This command retrieves information from Elasticsearch services.
nmap -p 2375 --script docker-version <target>
- This command retrieves Docker version information.
nmap -p 6443 --script kube-apiserver-info <target>
- This command retrieves information from Kubernetes API servers.
nmap -p 5672 --script rabbitmq-info <target>
- This command retrieves information from RabbitMQ services.
nmap -p 9042 --script cassandra-info <target>
- This command retrieves information from Cassandra services.
nmap -p 5984 --script couchdb-info <target>
- This command retrieves information from CouchDB services.
nmap -p 11211 --script memcached-info <target>
- This command retrieves information from Memcached services.
nmap -p 8087 --script riak-http-info <target>
- This command retrieves information from Riak HTTP interfaces.
nmap -p 2181 --script zookeeper-info <target>
- This command retrieves information from Zookeeper services.
nmap -p 50070 --script hadoop-datanode-info <target>
- This command retrieves information from Hadoop DataNodes.
nmap -p 8983 --script solr-info <target>
- This command retrieves information from Apache Solr services.
nmap -p 9092 --script kafka-info <target>
- This command retrieves information from Apache Kafka services.
nmap -p 2049 --script nfs-showmount <target>
- This command lists NFS exports on the target.
nmap -p 445 --script smb-enum-shares <target>
- This command enumerates Samba shares on the target.
nmap -p 389 --script ldap-rootdse <target>
- This command retrieves the root DSE from an LDAP server.
nmap -p 111 --script rpc-grind <target>
- This command enumerates RPC services on the target.
nmap -sU -p 123 --script ntp-info <target>
- This command retrieves information from NTP services.
nmap -sU -p 5060 --script sip-enum-users <target>
- This command enumerates SIP users on the target.
nmap -sU -p 5060 --script sip-methods <target>
- This command lists SIP methods supported by the target.
nmap -p 23 --script telnet-encryption <target>
- This command checks if Telnet encryption is enabled.
nmap -p 25 --script smtp-commands <target>
- This command lists SMTP commands supported by the target.
nmap -p 110 --script pop3-capabilities <target>
- This command lists POP3 capabilities supported by the target.
nmap -p 143 --script imap-capabilities <target>
- This command lists IMAP capabilities supported by the target.
nmap -sU -p 53 --script dns-recursion <target>
- This command checks if DNS recursion is enabled on the target.
nmap -sU -p 67 --script dhcp-discover <target>
- This command discovers DHCP servers on the network.
nmap -sU -p 161 --script snmp-brute <target>
- This command brute-forces SNMP community strings.
nmap -sU -p 69 --script tftp-enum <target>
- This command enumerates files on a TFTP server.
nmap -p 5900 --script vnc-brute <target>
- This command brute-forces VNC passwords.
nmap -p 3389 --script rdp-brute <target>
- This command brute-forces RDP passwords.
nmap -p 22 --script ssh-brute <target>
- This command brute-forces SSH passwords.
nmap -p 21 --script ftp-brute <target>
- This command brute-forces FTP passwords.
nmap -p 23 --script telnet-brute <target>
- This command brute-forces Telnet passwords.
nmap -p 25 --script smtp-brute <target>
- This command brute-forces SMTP passwords.