metasploit-framework

https://github.com/rapid7/metasploit-framework

Ruby

Metasploit Framework

Msf::Exploit::PhpEXE#get_write_exec_payload

Generate a first-stage php payload.

For ARCH_PHP targets, simply returns payload.encoded wrapped in <?php ?>
markers.

For target architectures other than ARCH_PHP, this will base64 encode an
appropriate executable and drop it on the target system.  After running
it, the generated code will attempt to unlink the dropped executable which
will certainly fail on Windows.

Source | Google | Stack overflow

Edit

git clone [email protected]:rapid7/metasploit-framework.git

cd metasploit-framework

open lib/msf/core/exploit/php_exe.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Msf--Exploit--PhpEXE-get_write_exec_payload-for-pr


# Commit to git

git add lib/msf/core/exploit/php_exe.rbgit commit -m "better docs for Msf::Exploit::PhpEXE#get_write_exec_payload"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Msf--Exploit--PhpEXE-get_write_exec_payload-for-pr

hub pull-request


# Celebrate!