🎯 Targets

🧠 What Are Targets?

  • Targets define specific OS/software combinations for which an exploit is designed.

  • Choosing the correct target ensures the payload and return addresses work as intended.


πŸ› οΈ show targets Command

msf6 > show targets
  • Used within an exploit module to list all available target configurations.

  • Run outside a module = error: "No exploit module selected."


πŸ“Œ Target Structure Example

msf6 exploit(windows/smb/ms17_010_psexec) > show targets
  • Many modules have:

    Id  Name
    --  ----
    0   Automatic
    1   IE 7 on Windows XP SP3
    2   IE 8 on Windows XP SP3
    ...

πŸ§ͺ Target Selection

  • You can manually set the exploit's target using:

  • If left as 0 (Automatic), Metasploit attempts to detect the version during exploitation.


πŸ” View Module Info Before Targeting

  • Learn what the exploit does and its known vulnerable targets.

  • Best practice: Read info before using unknown exploits.


βš™οΈ Return Address Relevance

  • Targets differ in:

    • OS version

    • Service pack

    • Language

    • DLL versions

  • These affect:

    • jmp esp

    • pop pop ret

    • Other return address logic.


πŸ› οΈ Tools for Target Research

  • 🧾 Comments in exploit code often provide insights into target requirements.

  • πŸ” Use msfpescan to find return addresses in binaries (for exploit dev work).


πŸ” Summary Commands


Last updated