Project Zero: Network Lab (Part 2)

case study

Network Attacks

last edited 2026-07-28

###MiTM - ARP Cache Poisoning

-Virtual Machine [project-zero-win-client] is turned on and configured.

-Virtual Machine [project-zero-attacker] is turned on.

To demonstrate a Layer 2 Man-in-the-Middle (MITM) attack, I performed ARP cache poisoning using Ettercap. By sending forged ARP replies, the attacker impersonates legitimate network devices, causing the victim to associate the attacker's MAC address with trusted IP addresses. Once the victim' ARP cache is poisoned, network traffic can be intercepted or manipulated before being forwarded to its intended destination. This attack highlights the importance of monitoring ARP activity and detecting abnormal MAC-to-IP address mappings within a local network.

1.Viewing the victims ARP cache

Before launching the attack, I examined the victim workstation's ARP table using the arp -a command. The output shows normal IP-to-MAC address mappings, providing a baseline that will later be compared against the poisoned ARP cache.

Viewing the victim workstation's ARP table before the attack.
Viewing the victim workstation's ARP table before the attack.

2.Launching Ettercap

Launching Ettercap on the attacker workstation.
Launching Ettercap on the attacker workstation.

3.Starting packet capture

I configured Ettercap to use the primary network interface and started packet capture. This prepares the application to discover hosts and initiate the ARP poisoning attack.

Starting packet capture using the attacker's primary network interface.
Starting packet capture using the attacker's primary network interface.

4.Confirming Ettercap is running

The Ettercap log output confirms that the capture engine has started successfully and the application is ready to enumerate hosts on the local network.

Ettercap successfully initialized and ready to discover network hosts.
Ettercap successfully initialized and ready to discover network hosts.

5.Discovering local hosts

Ettercap scanned the local subnet and identified reachable hosts. The victim workstation was then selected as the attack target.

Discovering hosts on the local network prior to the attack.
Discovering hosts on the local network prior to the attack.

6.Selecting the MITM attack

From the MITM menu, I selected ARP Poisoning, which instructs Ettercap to begin sending forged ARP responses to the selected hosts.

Selecting the ARP Poisoning attack within Ettercap.
Selecting the ARP Poisoning attack within Ettercap.

7.Starting the ARP poisoning attack

I enabled Sniff remote connections and started the attack. Ettercap immediately began sending forged ARP replies to manipulate the victim's ARP cache and position the attacker between communicating devices.

Launching the ARP cache poisoning attack.
Launching the ARP cache poisoning attack.
Screenshot from project documentation

8.Observing forged ARP traffic

Using Wireshark, I captured the resulting ARP traffic generated by the attack. The repeated ARP replies advertise the attacker's MAC address for multiple IP addresses, illustrating how ARP poisoning modifies the victim's address resolution process.

Captured forged ARP replies generated during the poisoning attack.
Captured forged ARP replies generated during the poisoning attack.

9.Verifying the poisoned ARP cache

Returning to the victim workstation, I ran arp -a again to inspect the updated ARP table. Multiple IP addresses now resolve to the attacker's MAC address, confirming that the ARP cache has been successfully poisoned and that traffic can now be intercepted by the attacker.

Victim ARP table showing forged MAC address mappings after the attack.
Victim ARP table showing forged MAC address mappings after the attack.

###MiTM - DNS Zone Posoning

-Virtual Machine [project-zero-corp-svr] is configured with Docker.

-Docker Container [project-zero-corp-svr-dns-svr] setup and configured.

-Docker Container [project-zero-corp-svr-web-svr] setup and configured.

-Virtual Machine [project-zero-attacker] is turned on.

In this lab, a DNS zone‑poisoning Man‑in‑the‑Middle attack is used to redirect traffic for www.projectzerocorp.com away from the legitimate web server and toward an attacker controlled web container. The attacker edits the DNS zone on the corporate DNS server, flushes and reloads BIND, then serves a cloned phishing page that silently harvests credentials when a victim browses to what they believe is the real site.

1.Preparing the attacker DNS and web containers

On corp-svr, Docker is used to start the dns-svr and web-svr containers, and then the BIND service inside the DNS container is checked to confirm that named is running correctly before any zone changes are made. This step ensures the attacker DNS and web infrastructure are online and ready for later poisoning.

Screenshot from project documentation
Starting the  dns-svr  and  web-svr  Docker containers on  corp-svr  and verifying that the BIND DNS service is running.
Starting the dns-svr and web-svr Docker containers on corp-svr and verifying that the BIND DNS service is running.

2.nmap scan from Kali against 10.0.5.3

From the Kali attacker machine, an nmap -Pn 10.0.5.3 scan is run to enumerate open TCP ports, revealing that HTTP (80/tcp) and a non‑standard SSH port (2222/tcp) are accessible on the target host.

nmap -Pn 10.0.5.3  from Kali showing port 80 open and SSH exposed on high port 2222.
nmap -Pn 10.0.5.3 from Kali showing port 80 open and SSH exposed on high port 2222.

3.SSH into the target over port 2222

Using the nmap results, attacker connects with ssh -p 2222 root@10.0.5.3, accepts the host key, and successfully logs into Ubuntu 22.04.5 system as root.

SSH session from Kali to  root@10.0.5.3  over port 2222, confirming remote shell access on the target host.
SSH session from Kali to root@10.0.5.3 over port 2222, confirming remote shell access on the target host.

4.Check listening services with netstat

On corp-svr, netstat -tuln is used to list active listening sockets, confirming that the server is listening for DNS on 10.0.5.3:53 as well as on 127.0.0.1:53, and that SSH is exposed on multiple ports including 22 and 2222.

netstat -tuln  output on  corp-svr  confirming DNS listening on 10.0.5.3:53 and SSH on ports 22/2222.
netstat -tuln output on corp-svr confirming DNS listening on 10.0.5.3:53 and SSH on ports 22/2222.

5.Verifying BIND installation in dpkg logs

The command grep " install " /var/log/dpkg.log shows package installation history, including entries for bind9 and dnsutils, proving that BIND and its DNS tools were installed recently on this Ubuntu system. This evidence ties the running DNS service back to a specific BIND deployment.

Screenshot from project documentation
dpkg.log  entries showing recent installation of  bind9  on the Ubuntu server.
dpkg.log entries showing recent installation of bind9 on the Ubuntu server.

6.Navigating to /etc/bind and listing zone files and viewing the projectzerocorp.com zone file

Inside the DNS container, the attacker changes into /etc/bind, lists the configuration and keys, and then moves into the zones/ directory where the forward zone file for projectzerocorp.com is stored. This step identifies exactly which file controls name resolution for the target domain.

The db.projectzerocorp.com zone file is displayed, showing the SOA record and multiple A/NS entries that map internal hostnames to IP addresses. Understanding this baseline zone content is critical before introducing any malicious changes for the poisoning attack.

Exploring  /etc/bind  and the  zones/  directory to locate the forward zone file for  projectzerocorp.com .
Exploring /etc/bind and the zones/ directory to locate the forward zone file for projectzerocorp.com.

7.Changing the A record to the the attacker IP

In the db.projectzerocorp.com zone file, the A record for www is edited from the original server IP to 10.0.0.50, which is controlled by the attacker. This single change ensures that any DNS lookup for www.projectzerocorp.com will now resolve to the malicious host.

Editing the  www  A record in  db.projectzerocorp.com  so it points to the attacker IP  10.0.0.50  instead of the legitimate web server.
Editing the www A record in db.projectzerocorp.com so it points to the attacker IP 10.0.0.50 instead of the legitimate web server.
service named restart  is run to stop and start the BIND service, forcing it to reload the updated zone configuration
service named restart is run to stop and start the BIND service, forcing it to reload the updated zone configuration

8.Victim on the “Verify Your Password” phishing page

From the victims browser, navigating to the normal corporate URL now displays the attacker’s cloned “Verify Your Password” form, even though the user believes they are on a trusted site. This step shows how DNS poisoning turns a familiar URL into a credential‑harvesting page.

Victim visiting the usual URL and being presented with the attacker‑controlled “Verify Your Password” phishing page.
Victim visiting the usual URL and being presented with the attacker‑controlled “Verify Your Password” phishing page.

9.Confirmation message in the browser

After the victim enters a username and password, the phishing page displays a friendly confirmation message instead of an error, reinforcing the illusion that the action was legitimate. Behind the scenes, those credentials have already been written to a log file on the attacker host.

Browser showing a success message after the victim submits credentials, hiding the fact that the data was sent to the attacker.
Browser showing a success message after the victim submits credentials, hiding the fact that the data was sent to the attacker.

10. Captured credentials in creds.log

On the attacker machine, cat creds.log reveals multiple entries with usernames and plaintext passwords collected from victims who interacted with the spoofed site.


###IP Spoofing

1.Cloning the NetImposter respiratory

On the Kali attacker machine, the git clone https://github.com/tastypepperoni/NetImpostor.git command is used to pull down the NetImpostor source code from GitHub. This provides the raw Go project that will be compiled into the IP spoofing tool used in the lab.

Cloning the NetImpostor GitHub repository onto Kali to obtain the IP‑spoofing tool’s source code.
Cloning the NetImpostor GitHub repository onto Kali to obtain the IP‑spoofing tool’s source code.

2.Installing Go modules and building NetImposter

Inside the NetImpostor directory, Go module commands and the go build -o NetImpostor step install required dependencies and compile the project into a local binary. This turns the downloaded source into an executable attacker tool that can craft spoofed IP packets and maintain stateful connections.

Running Go module commands and building the NetImpostor binary from source on Kali.
Running Go module commands and building the NetImpostor binary from source on Kali.

3.Editing proxychains configuration for SOCKS5

Opened /etc/proxychains.confand added socks5 127.0.0.1 1080 line, configuring ProxyChains to send traffic through a local SOCKS5 proxy. This prepares the environment so that later, traffic generated through NetImpostor can be tunneled and inspected via the spoofed connection.

Screenshot from project documentation
Updating the ProxyChains configuration to route traffic through a local SOCKS5 proxy on 127.0.0.1:1080.
Updating the ProxyChains configuration to route traffic through a local SOCKS5 proxy on 127.0.0.1:1080.

4. Preparing NetImpostor command with impersonate/targets flags

From within the NetImpostor folder, the command template sudo ./NetImpostor -i eth0 --impersonate 10.0.0.101 --targets 10.0.0.1 is prepared, specifying the network interface, the IP to impersonate, and the target host. These arguments tell NetImpostor which victim identity to spoof and which system’s network access the attacker wants to reach.

NetImpostor startup message showing a SOCKS5 proxy on 127.0.0.1:1080 with the attacker impersonating 10.0.0.101 to reach 10.0.0.1.
NetImpostor startup message showing a SOCKS5 proxy on 127.0.0.1:1080 with the attacker impersonating 10.0.0.101 to reach 10.0.0.1.

4.Using proxychains curl over the spoofed tunnel

Ran proxychains curl https://google.com/, which forces the HTTP request through the SOCKS5 proxy at 127.0.0.1:1080 configured earlier. The HTML response from Google confirms that outbound web traffic is successfully being routed through NetImpostor’s spoofed tunnel instead of going out directly from Kali our attacker machine.

proxychains curl  to  https://google.com  showing that web requests are now flowing through the local SOCKS5 proxy backed by NetImpostor.
proxychains curl to https://google.com showing that web requests are now flowing through the local SOCKS5 proxy backed by NetImpostor.

5.NetImposter logging new tunnel

In the NetImpostor console, a [SPOOF] log entry reports “starting new tunnel 127.0.0.1:xxxxx <=> 64.233.177.138:443”, indicating that the SOCKS request has been turned into a spoofed TCP connection to Google over HTTPS. This proves that NetImpostor is actively handling the proxied traffic and building stateful tunnels for the impersonated IP.

NetImpostor  [SPOOF]  log showing a new tunnel from the local SOCKS endpoint to Google’s HTTPS address.
NetImpostor [SPOOF] log showing a new tunnel from the local SOCKS endpoint to Google’s HTTPS address.

6.Wireshark capture showing packets from the spoofed IP

A Wireshark capture on the network records outbound TLS traffic where the source IP is 10.0.0.101, the impersonated host, while the destination is Google’s IP on port 443. Seeing 10.0.0.101 in the source field instead of Kali’s real address is the key evidence that NetImpostor successfully spoofed the IP at the packet level while maintaining a working TLS session.

Wireshark trace confirming that encrypted HTTPS traffic to Google is leaving the network with source IP 10.0.0.101, not Kali’s real address.
Wireshark trace confirming that encrypted HTTPS traffic to Google is leaving the network with source IP 10.0.0.101, not Kali’s real address.

###DoS Attack

-Virtual Machine [project-zero-corp-svr] is configured with Docker.

-Docker Container [project-zero-corp-svr-web-svr] setup and configured.

-Virtual Machine [project-zero-attacker] is turned on.

For Dos Attack I used hping3 from the attacker VM to launch a controlled SYN flood against a Dockerized web server, demonstrating how a high volume of TCP packets can overwhelm a service and cause severe packet loss. Even though the container keeps the environment stable, the traffic stats and hping3 output clearly show the impact of the DoS on network availability.

1. DoS web container running with low baseline usage

On project-zero-corp-svr, a Docker container named dos-web-svr is started using a pre‑built web image, and docker stats shows its baseline CPU and memory usage before any attack traffic. This establishes a “normal” operating state for the target web server so the effect of the DoS can be compared against it.

dockerrun-d --name=dos dos-web-svr --network=host --cpus="0.25" --memory="6m" projectzero-image-web

Docker  dos-web-svr  container running on the corp server with low CPU and memory usage prior to the DoS attack.
Docker dos-web-svr container running on the corp server with low CPU and memory usage prior to the DoS attack.

2.Launching a SYN flood with hping3

From the attacker machine, the command sudo hping3 -1 -i u10 -S -p 80 -c 250000 10.0.0.8 is executed to send a large volume of crafted packets to port 80 on the web server. This simulates a SYN flood style DoS by hammering the HTTP port with thousands of rapid connection attempts.

Once the run completes, the hping3 summary reports that out of 250,000 packets transmitted only 36,202 were received, corresponding to about 86% packet loss on replies. This high loss rate demonstrates how a sustained flood can degrade or even deny service to legitimate clients trying to reach the web server.

Attacker VM using  hping3  to flood the target web server on port 80 with a large number of TCP packets.
Attacker VM using hping3 to flood the target web server on port 80 with a large number of TCP packets.

Because the web server is running inside a Docker container, the underlying system is not at real risk of crashing; instead, this setup safely demonstrates how a DoS attack can overwhelm a web service and degrade its availability.



###Exploit Outdated Software (CVE-2011-2523)

-Virtual Machine [project-zero-corp-svr] is configured with Docker.

-Docker Container [project-zero-corp-svr-ftp-svr] setup and configured.

-Virtual Machine [project-zero-attacker] is turned on.

In this attack, an outdated and deliberately backdoored version of vsftpd 2.3.4 (CVE‑2011‑2523) is hosted inside a Docker container and exposed on port 21. An nmap scan identifies the vulnerable service, then a crafted FTP login with a username ending in :) triggers the backdoor, allowing the attacker to connect to port 6200 and obtain a root shell on the server.

1.Starting the vlnerable vsftpd container

On project-zero-corp-svr, the ftp-svr Docker container is started and accessed with docker exec -it ftp-svr /bin/bash, placing the lab’s vulnerable FTP service on the network. Inside the container, the workspace directory contains the vsftpd-2.3.4 source and binaries used for this exploit.

Launching the  ftp-svr  Docker container and opening a shell inside it to prepare the vulnerable vsftpd 2.3.4 service.
Launching the ftp-svr Docker container and opening a shell inside it to prepare the vulnerable vsftpd 2.3.4 service.

2.Navigating into vtftpd-2.3.4 and running the binary.

From the container shell, the lab changes into vsftpd-2.3.4/ and runs the vsftpd binary, which starts the backdoored FTP daemon in the foreground. This step activates the intentionally vulnerable service that listens on port 21 and hides the CVE‑2011‑2523 backdoor.

Entering the  vsftpd-2.3.4  directory and starting the vsftpd daemon so the vulnerable FTP service is live.
Entering the vsftpd-2.3.4 directory and starting the vsftpd daemon so the vulnerable FTP service is live.

3.nmap scan identifying vsftpd 2.3.4 on port 21

From the attacker side, nmap 10.0.0.8 -Pn -sV is used to enumerate services, and the output shows port 21/tcp open ftp vsftpd 2.3.4. Detecting this specific version is the key reconnaissance step that signals the host is running a known backdoored FTP server.

nmap -Pn -sV 10.0.0.8  results confirming that vsftpd 2.3.4 is running on FTP port 21 of the target.
nmap -Pn -sV 10.0.0.8 results confirming that vsftpd 2.3.4 is running on FTP port 21 of the target.

4.Triggering the vsftpd backdoor via FTP login

Using the standard ftp client, the attacker connects to ftp 10.0.0.8 and logs in with a username that ends in :) plus any password. This crafted username quietly triggers the hidden vsftpd backdoor, which causes the server to open a root shell listener on TCP port 6200.

FTP login to  10.0.0.8  with a username that ends in  :) , activating the vsftpd 2.3.4 backdoor.
FTP login to 10.0.0.8 with a username that ends in :), activating the vsftpd 2.3.4 backdoor.

5.Connecting to the backdoor shell on port 6200

In a separate terminal, on my attacker machine I ran nc 10.0.0.8 6200 and is dropped into a shell where whoami returns root, proving full system compromise. This confirms successful exploitation of CVE‑2011‑2523 and shows how a single outdated service can hand over root access.

Using  nc 10.0.0.8 6200  to connect to the vsftpd backdoor and obtaining a root shell on the target server.
Using nc 10.0.0.8 6200 to connect to the vsftpd backdoor and obtaining a root shell on the target server.