Bitzu

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

Single choice

In Metasploit terminology, what is a payload?

  1. The code that runs on the target after a successful exploit
  2. The module that scans a host for open ports
  3. The vulnerability itself in the target software
  4. 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.

Select all that apply

Which are mitigations that make classic stack buffer overflows harder to exploit?

  1. Address space layout randomization (ASLR)
  2. Stack canaries
  3. Longer password policy
  4. TLS on all connections
  5. 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

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.

Download on the App StoreGet it on Google Play

More 312-50 topics in this module