You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Exploitation is the phase where you actively leverage vulnerabilities to gain unauthorised access to a target system. In ethical hacking, exploitation proves that a vulnerability is real and demonstrates its potential impact to the organisation.
Exploitation in penetration testing serves to:
Tip: Exploitation should be controlled and measured. The goal is to prove impact, not to cause damage. Always operate within the agreed scope and rules of engagement.
A payload is the code that runs on the target after a vulnerability is exploited:
| Payload Type | Description | Example |
|---|---|---|
| Reverse shell | Target connects back to the attacker | windows/meterpreter/reverse_tcp |
| Bind shell | Target opens a port for the attacker to connect | linux/x86/shell_bind_tcp |
| Command execution | Runs a single command on the target | cmd/unix/reverse |
| Meterpreter | Advanced, in-memory payload with extensive features | windows/meterpreter/reverse_https |
| Web shell | Backdoor uploaded to a web server | PHP, ASP, JSP shells |
An exploit is code that takes advantage of a vulnerability to deliver a payload:
Vulnerability (the weakness)
│
▼
Exploit (the attack code)
│
▼
Payload (the code that runs after exploitation)
│
▼
Access (shell, session, data)
| Shell Type | Description |
|---|---|
| Reverse shell | Target initiates connection to attacker (bypasses firewalls) |
| Bind shell | Target listens on a port for attacker connection |
| Web shell | Command execution via a web interface |
| Meterpreter | Feature-rich Metasploit shell (file operations, pivoting, screenshots) |
Metasploit is the most widely used exploitation framework:
┌────────────────────────────────────┐
│ Metasploit Framework │
│ │
│ ┌──────────┐ ┌──────────────┐ │
│ │ Exploits │ │ Auxiliary │ │
│ │ (2000+) │ │ (scanners, │ │
│ │ │ │ fuzzers) │ │
│ └──────────┘ └──────────────┘ │
│ ┌──────────┐ ┌──────────────┐ │
│ │ Payloads │ │ Post-Exploit │ │
│ │ (500+) │ │ Modules │ │
│ └──────────┘ └──────────────┘ │
│ ┌──────────┐ ┌──────────────┐ │
│ │ Encoders │ │ Evasion │ │
│ │ │ │ Modules │ │
│ └──────────┘ └──────────────┘ │
└────────────────────────────────────┘
# Start Metasploit console
msfconsole
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.