Sto approfondendo la conoscenza del framework Metasploit su HTB academy, sono arrivato alla sezione sessions & jobs ma non ho ben chiaro la funzione dei jobs e che differenza ci sia con le sessions.
Per quello che ho capito e dalle prove che ho fatto le sessions sono utili in caso di post exploitation, ad esempio mettendo in background una shell meterpreter ed eseguire un modulo post per fare privilege escalation o altro mantenendo la connessione con l'host vittima.
Ho provato anche a lanciare un exploit con il comando
Non ho chiaro questo passaggio:
Per quello che ho capito e dalle prove che ho fatto le sessions sono utili in caso di post exploitation, ad esempio mettendo in background una shell meterpreter ed eseguire un modulo post per fare privilege escalation o altro mantenendo la connessione con l'host vittima.
Ho provato anche a lanciare un exploit con il comando
exploit -j
ma non viene creato il job infatti eseguendo jobs -l
non risultano jobs attivi, non ho potuto quindi vedere come possono essere applicati in pratica.Non ho chiaro questo passaggio:
If, for example, we are running an active exploit under a specific port and need this port for a different module, we cannot simply terminate the session using [CTRL] + [C]. If we did that, we would see that the port would still be in use, affecting our use of the new module. So instead, we would need to use the jobs command to look at the currently active tasks running in the background and terminate the old ones to free up the port. Other types of tasks inside sessions can also be converted into jobs to run in the background seamlessly, even if the session dies or disappears.
Perchè se termino la sessione la porta dovrebbe essere ancora in uso?