This lab demonstrates how a Python script can be transferred from a Kali Linux VM to a Linux Mint VM and executed to create multiple TCP listening ports.
The purpose was to understand how process execution can change a host's network exposure and increase its attack surface.
- VM1 – Kali Linux:
192.168.10.11 - VM2 – Linux Mint:
192.168.20.11 - File:
openPorts.py - Transfer Method: HTTP

openPorts.py was created using Python sockets and threading to establish multiple TCP listeners simultaneously.
The script was configured to listen on selected ports including:
3000, 3306, 4444, 5000, 5432, 8000, 8080, 8081, 8888, 9000, 9090, 9999, 10000

Kali was configured as a temporary HTTP server to make openPorts.py available to VM2.
The transferred script was executed on Linux Mint
python3 -m http.server 8000Linux Mint retrieved the script using:
curl -O http://192.168.10.11:8000/openPorts.py
The listening ports were verified locally using nmap...
