diff --git a/modules/exploits/beefbind/shellcode_sources/msf/README.md b/modules/exploits/beefbind/shellcode_sources/msf/README.md new file mode 100644 index 000000000..ec2ef9c31 --- /dev/null +++ b/modules/exploits/beefbind/shellcode_sources/msf/README.md @@ -0,0 +1,55 @@ +# Metasploit BeEF Bind Payloads + +Note: the paths specified below relate to the Metasploit installation directory +on Kali Linux. The paths may differ on your system. + +## Install Handler + +Installing BeEF Bind payloads requires also installing a custom handler into framework: + +```sh +sudo cp beef_bind-handler.rb /usr/share/metasploit-framework/lib/msf/core/handler/beef_bind.rb +``` + +## Install Payloads + +Payloads can be installed into the Metasploit Framework installation directory +(for all users) or user's home directory `~/.msf4/modules/payloads/...`. + +```sh +cp beef_bind-stage-windows-x86.rb /usr/share/metasploit-framework/modules/payloads/stages/windows/beef_shell.rb +cp beef_bind-stager-windows-x86.rb /usr/share/metasploit-framework/modules/payloads/stagers/windows/beef_bind.rb + +cp beef_bind-stage-linux-x86.rb /usr/share/metasploit-framework/modules/payloads/stages/linux/x86/beef_shell.rb +cp beef_bind-stager-linux-x86.rb /usr/share/metasploit-framework/modules/payloads/stagers/linux/x86/beef_bind.rb + +cp beef_bind-stage-linux-x64.rb /usr/share/metasploit-framework/modules/payloads/stages/linux/x64/beef_shell.rb +cp beef_bind-stager-linux-x64.rb /usr/share/metasploit-framework/modules/payloads/stagers/linux/x64/beef_bind.rb +``` + +## Generating Payloads + +Check it works: + +```sh +msfvenom -l payloads | grep beef_bind +``` + +Dump stager and stage in C format: + +```sh +msfvenom -p windows/beef_shell/beef_bind --format C +``` + +Dump stager in raw format: + +```sh +msfvenom -p windows/beef_shell/beef_bind R > beef_bind-stager +``` + +Encode stager to remove nulls: + +```sh +msfvenom -p windows/beef_shell/beef_bind R --bad-chars '\x00' > beef_bind-stager-nonull +``` + diff --git a/modules/exploits/beefbind/shellcode_sources/msf/instructions.txt b/modules/exploits/beefbind/shellcode_sources/msf/instructions.txt deleted file mode 100644 index 5975666a7..000000000 --- a/modules/exploits/beefbind/shellcode_sources/msf/instructions.txt +++ /dev/null @@ -1,37 +0,0 @@ - -Install into Metasploit on Kali Linux: - -cp beef_bind-handler.rb /usr/share/metasploit-framework/lib/msf/core/handler/beef_bind.rb -cp beef_bind-stage-windows-x86.rb /usr/share/metasploit-framework/modules/payloads/stages/windows/beef_shell.rb -cp beef_bind-stager-windows-x86.rb /usr/share/metasploit-framework/modules/payloads/stagers/windows/beef_bind.rb -cp beef_bind-stage-linux-x86.rb /usr/share/metasploit-framework/modules/payloads/stages/linux/x86/beef_shell.rb -cp beef_bind-stager-linux-x86.rb /usr/share/metasploit-framework/modules/payloads/stagers/linux/x86/beef_bind.rb -cp beef_bind-stage-linux-x64.rb /usr/share/metasploit-framework/modules/payloads/stages/linux/x64/beef_shell.rb -cp beef_bind-stager-linux-x64.rb /usr/share/metasploit-framework/modules/payloads/stagers/linux/x64/beef_bind.rb - -Check it works: - -msfpayload -l | grep beef_bind - - -Get info on the payload: - -msfpayload windows/beef_shell/beef_bind S - - -Dump stager and stage in C format: - -msfpayload windows/beef_shell/beef_bind C - - -Dump stager in raw format: - -msfpayload windows/beef_shell/beef_bind R > beef_bind-stager - - -Encode stager to remove nulls: - -msfpayload windows/beef_shell/beef_bind R | msfencode -b '\x00' - - -