Skip to content

Your First Breach

This walkthrough takes you through one full breach using the hacking pipeline: recon, research, exploit, escalate, shell. Commands are explained as you go; the full list lives in the Command Reference.

Open the Terminal and the Mission Board, and accept your first contract. It will give you a target domain or IP. If you only have a domain, resolve it:

Terminal window
host target-corp.net # returns the IP, e.g. 10.0.1.5
whois target-corp.net # registration records

Find out what the server runs:

Terminal window
nmap 10.0.1.5

This lists open ports and services (SSH, Apache, MySQL, …) with versions. Note the service and version you want to attack.

You can also look up the people behind the target: dig target-corp.net TXT for DNS breadcrumbs, FaceLink for OSINT, and the Signal Decoupler for SMS, calls and MFA codes.

Look up a vulnerability that matches the service and version you found:

Terminal window
searchsploit apache 2.4.49

Match the version: a CVE for 2.4.49 will not fire against 2.4.50.

Open Metasploit and launch a matching module:

metasploit
msf6 > search apache
msf6 > use CVE-2021-41773
msf6 exploit(CVE-2021-41773) > set RHOSTS 10.0.1.5
msf6 exploit(CVE-2021-41773) > check # safe: verifies without alerting the IDS
msf6 exploit(CVE-2021-41773) > exploit

The foothold you land is rarely root. Raise your access from your own terminal, against the IP, before you open the shell:

Terminal window
linpeas 10.0.1.5 # find a privesc vector (Linux)
# then sudo, or jump straight to root on a kernel CVE:
kexploit 10.0.1.5

On Windows targets use winpeas 10.0.1.5, then runas or winkexploit. The access chain is:

none < user_list < user < filesystem < database_root < root

Open the session and drop into a shell:

msf6 exploit(CVE-2021-41773) > sessions -i 1
msf6 exploit(CVE-2021-41773) > shell

Your prompt now shows the target’s IP. Do what the contract asks:

Terminal window
ls
cat /home/admin/contract_target.txt
download secrets.db
# or, per the mission:
inject records.db # tamper
kill 1337 # crash-server objective

Intrusions leave traces, and traces start investigations. The loop is not finished until you leave clean:

Terminal window
# clean the logs you touched, then:
disconnect