Description
This module maintains persistence on a host by creating a docker image which runs our payload, and has access to the host's file system (/host in the container). Whenever the container restarts, the payload will run, or when the payload dies the executable will run again after a delay. This will allow for writing back into the host through cron entries, ssh keys, or other method.
Verified on Ubuntu 22.04.
Module options
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/linux/persistence/docker/imagemsf undefined(image) > show actions ...actions...msf undefined(image) > set ACTION < action-name >msf undefined(image) > show options ...show and set options...msf undefined(image) > runPrioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub