From 448ab6db3a9920eaee5c7ac6d082d697de687a36 Mon Sep 17 00:00:00 2001 From: Jakob Pennington Date: Thu, 20 Dec 2018 17:49:49 +1030 Subject: [PATCH] Added --disable-arp-ping to nmap scans Added --disable-arp-ping and -Pn to nmap scans for more reliable scanning on high latency connections. --- Reconnoitre/lib/service_scan.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Reconnoitre/lib/service_scan.py b/Reconnoitre/lib/service_scan.py index fd309ee..2b8a285 100644 --- a/Reconnoitre/lib/service_scan.py +++ b/Reconnoitre/lib/service_scan.py @@ -17,7 +17,7 @@ def nmap_scan( ip_address = ip_address.strip() print("[+] Starting quick nmap scan for %s" % (ip_address)) - QUICKSCAN = "nmap -sC -sV %s -oA '%s/%s.quick'" % ( + QUICKSCAN = "nmap -sC -sV -Pn --disable-arp-ping %s -oA '%s/%s.quick'" % ( ip_address, output_directory, ip_address) quickresults = subprocess.check_output( QUICKSCAN, shell=True).decode("utf-8") @@ -36,7 +36,7 @@ def nmap_scan( ip_address, dns_server)) print("[+] Using DNS server %s" % (dns_server)) - TCPSCAN = "nmap -vv -Pn -sS -A -sC -p- -T 3 -script-args=unsafe=1 \ + TCPSCAN = "nmap -vv -Pn --disable-arp-ping -sS -A -sC -p- -T 3 -script-args=unsafe=1 \ --dns-servers %s -oN '%s/%s.nmap' -oX \ '%s/%s_nmap_scan_import.xml' %s" % ( dns_server, @@ -45,7 +45,7 @@ def nmap_scan( output_directory, ip_address, ip_address) - UDPSCAN = "nmap -vv -Pn -A -sC -sU -T 4 --top-ports 200 \ + UDPSCAN = "nmap -vv -Pn --disable-arp-ping -A -sC -sU -T 4 --top-ports 200 \ --max-retries 0 --dns-servers %s -oN '%s/%sU.nmap' \ -oX '%s/%sU_nmap_scan_import.xml' %s" % ( dns_server, @@ -57,7 +57,7 @@ def nmap_scan( else: print("[+] Starting detailed TCP%s nmap scans for %s" % ( ("" if no_udp_service_scan is True else "/UDP"), ip_address)) - TCPSCAN = "nmap -vv -Pn -sS -A -sC -p- -T 3 \ + TCPSCAN = "nmap -vv -Pn --disable-arp-ping -sS -A -sC -p- -T 3 \ -script-args=unsafe=1 -n %s -oN '%s/%s.nmap' \ -oX '%s/%s_nmap_scan_import.xml' %s" % ( dns_server, @@ -66,7 +66,7 @@ def nmap_scan( output_directory, ip_address, ip_address) - UDPSCAN = "nmap -sC -sV -sU %s -oA '%s/%s-udp'" % ( + UDPSCAN = "nmap -sC -sV -sU -Pn --disable-arp-ping %s -oA '%s/%s-udp'" % ( ip_address, output_directory, ip_address) udpresult = "" if no_udp_service_scan is True else subprocess.check_output(