312-50 ยท System hacking
Exploit, payload, auxiliary and shells
Exploit vs payload vs auxiliary, Metasploit module types and msfconsole workflow, buffer overflow basics, and bind vs reverse shells.
Key points
- Exploit: abuses a flaw to gain execution. Payload: code run afterward (e.g. a shell).
- Auxiliary: scanning, fuzzing, no payload.
- msfconsole: search, use <module>, show options, set RHOSTS, set payload, run (or exploit).
- Buffer overflow: corrupts adjacent memory such as a return address; DEP/NX, ASLR, stack canaries defend.
- Bind shell: attacker connects in. Reverse shell: target connects out, usually passing inbound firewall rules.
Source: https://docs.metasploit.com/docs/using-metasploit/basics/using-metasploit.html
Practice questions
In Metasploit terminology, what is a payload?
- The code that runs on the target after a successful exploit
- The module that scans a host for open ports
- The vulnerability itself in the target software
- The wordlist used for brute forcing
Show answer
Answer: A. The code that runs on the target after a successful exploit
The payload is what runs on the target once the exploit succeeds (shell, Meterpreter, command). The exploit is the vulnerability-abusing part; scanners are auxiliary modules.
Which are mitigations that make classic stack buffer overflows harder to exploit?
- Address space layout randomization (ASLR)
- Stack canaries
- Longer password policy
- TLS on all connections
- Weekly password rotation
Show answer
Answer: A. Address space layout randomization (ASLR), B. Stack canaries
ASLR randomizes addresses, stack canaries detect corruption, and DEP/NX blocks execution of data pages. A longer password policy and TLS do not affect memory corruption.
True or false: A Metasploit auxiliary module always delivers a payload to the target.
Show answer
Answer: False
False. Auxiliary modules (scanners, fuzzers, brute-forcers) do not use a payload; only exploit modules deliver one.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
