Module 01
Last updated
Last updated
In this challenge, we will familiarize ourself with the network situation in the Windows Attack Lab. We are particularly interested in which hosts are available, what services they offer and additional information we can collect about potential targets (like OS types, versions, etc.).
All steps below should be performed from your Linux attack host.
Check IP address:
ip -c address list eth0
Host discovery
nmap -n -sn 10.0.1.0/24 -oA host_discovery --min-rate=20000
The above scan will store its output in three different formats (.nmap, .xml and .gnmap). The .gnmap format contains "grep-able" data, which we can use to easily extract a list of live hosts:
cat host_discovery.gnmap | awk '/Up/ {print $2}' | sort -Vu > hosts.txt
cat hosts.txt
Service discovery scan
nmap -n -sC -sV -iL hosts.txt -oA script_version_scan --min-rate=20000
How many systems did you identify?
What seems to be the purpose of the individual hosts (as far as you can tell from the services they offer)?
Did the scan already reveal vulnerabilities / weaknesses?
Explain the nmap options that make a difference between the first and the second scan
nmap -n -sn 10.0.1.0/24 -oA host_discovery –min-rate=20000
2. Based on the Service Discovery Scan we can identify the following most interesting systems/services (details file: script_version_scan.gnmap):
3. On several hosts we can see that smb signing is enabled but not required. This opens a potential door for an attacker to perform a SMB Relay Attack. [1]
4.1. First scan (host discovery):
This scan performs a ping scan without a DNS lookup and writes the output in the three different file formats (xml, nmap, gnmap).
-n no DNS resolution -sn Ping Scan – disable port scan -oA Output in all supported formats (xml, nmap, gnmap) –min-rate Send packets no slower than per second
4.2. Second scan (service discovery):
With this scan a service discovery scan is performed with the standard NSE scripts. Furthermore a version discovery for the open ports are executed. The scan is only performed on the hosts which are provided with the input file.
-n no DNS resolution -sC Performs a script scan using the default set of scripts. It is equivalent to –script=default. -sV Probe open ports to determine service/version info -iL Reads target specifications from input filename. -oA Output in all supported formats (xml, nmap, gnmap) –min-rate Send packets no slower than per second
[1] https://cqureacademy.com/blog/penetration-testing/smb-relay-attack