metasploit-framework
metasploit-framework copied to clipboard
Add a python/exec payload to execute OS commands
This adds a single ARCH_PYTHON payload that is capable of executing arbitrary OS commands. It uses subprocess.Popen to execute commands through a shell environment as defined in the docs. Tested with Python 2.7, 3.4 and 3.12.
Verification
- [ ] Start
msfconsole - [ ]
use payload/python/exec - [ ]
set CMD somecommand(try and trick it with quotes and what not, make sure it works as intended)