Skip to content

The Hacking Pipeline

A breach is not a button. It is a loop you walk deliberately: learn the target, find its weakness, take a foothold, climb to the access you need, open a shell, then leave clean. Access is gated behind the exploit, and every action writes a log.

1. Recon → 2. Research → 3. Exploit → 4. Escalate → 5. Shell

You will not always walk it in a straight line. A patched exploit sends you back to research, a password cracked on one box opens the next, and a name pulled from OSINT can skip you past three stages. The order is the discipline, not a cage.

Recon is more than a port scan. It is everything you learn before you touch the box in anger.

  • nmap <ip> (or scan <ip>): open ports, running services and versions (SSH, Apache, MySQL). This feeds Research. On tier 5+ boxes use -sS or -sN to lower the risk (see Scanning & Stealth).
  • dig <domain> TXT: DNS recon. TXT records leak mail providers, vendor tokens and the odd encoded breadcrumb. Pure recon, touches nothing.
  • FaceLink (node://facelink.social in the browser): social OSINT. Names, roles, and the personal detail that makes a phish land or a password guess work.
  • Signal Decoupler: SIGINT. Intercept a target’s SMS, calls and MFA codes, correlate an identity to a device, and locate a person by city and sector.

Every lead here is a step you do not have to brute-force later.

searchsploit <service> <version> queries the exploit database for vulnerabilities matching what Recon found. Match the version: a CVE for 2.4.49 will not fire against 2.4.50.

metasploit launches an exploit against the target. Success grants an access level on that server (see the ladder below). Nothing downstream works until this lands.

Alternative footholds:

Command Use
hydra <ip> -u <user> Brute-force credentials (uses the GPU, always opens an investigation)
sqlmap -u <ip> --dbs SQL injection on WEB and DB servers, which metasploit refuses outright
ssh <user>@<ip> Log in with john-cracked or intercepted credentials; also your LAN pivot

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

  • Linux: linpeas <ip> to find a vector, then sudo. Or kexploit <ip> to jump straight to root on a kernel CVE.
  • Windows: winpeas <ip>, then runas. Or winkexploit <ip> (EternalBlue, PrintNightmare, Zerologon).

You do not need a shell to escalate. These run against the stored session and raise the access your shell will open at.

Access on paper becomes a live shell one of three ways, and the target decides which:

Path When
sessions -i 1 then shell Inside msfconsole, after a successful exploit. The main path.
ssh <user>@<ip> Once john or hydra has produced credentials. Also how you pivot to LAN nodes.
sqlmap -u <ip> --os-shell MySQL and PostgreSQL boxes, which metasploit refuses outright.

Once you have a shell you can browse files, steal data, plant miners and more. Then clean your logs and disconnect: the loop is not finished until you leave clean.

sqlmap targets WEB and DB servers. Recon is free; extracting data or a shell needs authentication, the one place the two differ:

  • Recon (no auth): --dbs → --tables -D <db> → --columns -T <t> -D <db>
  • Web app: brute the login first (hydra --url http://<ip>), then --dump / --file-read / --os-shell.
  • Database server: supply a DB login with --dbms-creds <user>:<pass>. Find one by breaching a web server on the LAN and reading /var/www/html/.env or config.php (DB_USERNAME / DB_PASSWORD), reading the DB’s /etc/mysql/my.cnf once you have a shell (MySQL), or cracking a captured /etc/shadow with john.

--os-shell / --os-cmd / --sql-query need stacked queries: add --technique S. Blocked by a WAF? Run --identify-waf, then --tamper <script>.

none < user_list < user < filesystem < database_root < root

Higher access unlocks more capabilities. On Linux, use linpeas + sudo or kexploit. On Windows, use winpeas + runas or winkexploit.

See the full Command Reference, the Metasploit console, or put it into practice with Your First Breach.