I’ve successfully prepared a solid dual-environment setup for working through Black Hat Python (2nd Edition) by Justin Seitz & Tim Arnold.

What Was Accomplished:

1. Main Debian Machine (Host)

  • Running Debian Trixie with Python 3.13.2 (managed via pyenv)
  • Created a clean virtual environment: ~/blackhat-python/venv
  • Installed and configured essential tools:
    • tcpdump, tshark, wireshark, netcat-traditional, libpcap-dev
    • Added user to the wireshark group for non-root packet capture
    • Installed key Python libraries inside the venv: Scapy, Paramiko, Requests, BeautifulSoup4, and lxml
  • Verified raw packet capture works without sudo and core modules import cleanly

2. Kali Linux VM

  • Fully updated Kali VM
  • Created the exact same project structure: ~/blackhat-python/venv
  • Installed the same core tools and Python libraries
  • Successfully tested basic socket connectivity

3. First Working Test

  • Built and ran a simple TCP client (tcp_client.py) on the Kali VM
  • It successfully connected to www.google.com:80 and received a real HTTP 301 redirect response

Current Status: Both environments are now clean, consistent, and ready for the hands-on chapters of Black Hat Python.

Next steps planned:

  • Build the full BHNet (netcat replacement) from Chapter 2
  • Test it between the Debian host and Kali VM
  • Move into TCP proxy, raw socket sniffers (Chapter 3), and Scapy-based tools (Chapter 4)

This setup gives me the best of both worlds: a stable daily driver on Debian and a purpose-built pentesting environment on Kali.