Sessions & Jobs

In a situation where we compromised a machine and wee wanna get to become a root user. We can put that session to the background and use anther exploit and just associate it with that session to kind of 'inject' it within.

Sessions

msf6 exploit(...) > sessions
msf6 exploit(...) > sessions -i 1
    < Open up a session >

Jobs

Useful in the case where we want to use another exploit on a same port as another active exploit running.

msf6 exploit(...) > jobs -h
...
    -K        Terminate all running jobs.
    -P        Persist all running jobs on restart.
    -S <opt>  Row search filter.
    -h        Help banner.
    -i <opt>  Lists detailed information about a running job.
    -k <opt>  Terminate jobs by job ID and/or range.
    -l        List all running jobs.
    -p <opt>  Add persistence to job by job ID
    -v        Print more detailed info.  Use with -i and -l
    
msf6 exploit(...) > exploit -h
...
    -J        Force running in the foreground, even if passive.
    -e <opt>  The payload encoder to use.  If none is specified, ENCODER is used.
    -f        Force the exploit to run regardless of the value of MinimumRank.
    -h        Help banner.
    -j        Run in the context of a job.
    
msf6 exploit(multi/handler) > exploit -j
    < Run in the context of a job>

msf6 exploit(multi/handler) > jobs -l
    <List all running jobs>

Last updated