πŸ” Sessions

🎯 Purpose:

  • Enable control of multiple modules simultaneously.

  • Allow switching, backgrounding, and managing active communication with targets.

  • Each session provides a dedicated control interface.


πŸ§ͺ Creating/Backgrounding a Session

Once an exploit is successful:

  • Background it:

    • Keyboard: CTRL + Z

    • Or run:

      background

πŸ“‹ List Active Sessions

sessions

Example:

Id  Name  Type                     Information                 Connection
--  ----  ----                     -----------                 ----------
1         meterpreter x86/windows  NT AUTHORITY\SYSTEM @ MS01  10.10.10.129:443 -> 10.10.10.205:50501

πŸ–₯️ Interact with a Session

Result:


πŸ“¦ Post-Exploitation Modules

  • You can run a post-exploitation module against an active session by selecting a SESSION option inside the module.

  • Example categories:

    • post/windows/gather/

    • post/multi/recon/

    • post/multi/manage/


βš™οΈ Jobs

πŸ’‘ What are Jobs?

  • Background tasks started with modules like exploit -j.

  • Useful for persistence, multi-tasking, or freeing up ports.


πŸ“Œ View Running Jobs

Example:


❌ Kill a Job

Or:


🧰 Jobs Help Menu

Useful options:

  • -l : List all jobs

  • -k : Kill by ID

  • -K : Kill all jobs

  • -i : Detailed job info


πŸš€ Running Exploits as Jobs

Example output:


πŸ“– Exploit Help Menu

Options:

  • -j: Run as job

  • -J: Force foreground run

  • -f: Force run

  • -e: Set encoder


Let me know when you're ready for the Meterpreter section or want flashcards/quiz from this! 🧠⚑

Last updated