04. Get the tools onto your Mac 🛠️¶
Target environment: macOS (both Apple Silicon and Intel). On this page we'll manually set up the nmap / Docker / Metasploit you need for the practice ahead.
📌 Not sure which setup to use? Start with 03. Choose a setup pattern. There's also an automated script that installs everything at once (
bash scripts/install-tools.sh).
Goal of this page¶
flowchart LR
A["Homebrew"] --> B["nmap<br>(recon)"]
A --> C["Docker<br>(stand up targets)"]
A --> D["Metasploit<br>(attack)"]
style A fill:#2d333b,stroke:#3fb950,stroke-width:2px,color:#e6edf3
style B fill:#2d333b,stroke:#3fb950,stroke-width:2px,color:#e6edf3
style C fill:#2d333b,stroke:#58a6ff,stroke-width:2px,color:#e6edf3
style D fill:#2d333b,stroke:#bc8cff,stroke-width:2px,color:#e6edf31. Homebrew (package management)¶
The foundation for installing tools on a Mac. If you don't have it, follow the official steps at brew.sh.
2. nmap (recon tool)¶
nmapis the go-to recon tool for finding out "which ports are open" and "what's running."- Some features, such as
-sS(SYN scan) and-O(OS detection), require root privileges (sudo).
3. Docker Desktop (stand up a practice target)¶
Install Docker Desktop from docker.com and launch it.
💡 An important property of Docker on macOS: On macOS, Docker runs a small Linux VM internally and runs containers inside it. This structure matters a great deal later in Appendix D. The reverse shell won't come back. Keep it in mind.
4. Metasploit (the attack framework)¶
Metasploit is a tool with thousands of built-in attack codes (exploits) that target known vulnerabilities. There are two ways to install it.
Method A: Install directly on the Mac¶
Method B: Use it as a Docker container (recommended in this guide)¶
In a later chapter, to "put the attacker on the same network as the target," we'll run Metasploit in a container. Pull the official image ahead of time.
Why the container version? → Because in Appendix D. The reverse shell won't come back, "putting the attacker and the target on the same Docker network" is the fix.
5. Check: what you've got so far¶
nmap --version # recon
docker info # the base for standing up targets
docker images | grep metasploit # attack container
If everything shows up, you're ready. Next, head to 05. Stand up a practice target.