metasploit-framework icon indicating copy to clipboard operation
metasploit-framework copied to clipboard

Add a python/exec payload to execute OS commands

Open zeroSteiner opened this issue 1 year ago • 0 comments

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)

zeroSteiner avatar Oct 04 '24 14:10 zeroSteiner