Metasploit BeEF Bind: Update installation instructions for Metasploit v6 (#2272)

Metasploit BeEF Bind: Update installation instructions for Metasploit v6
This commit is contained in:
bcoles
2022-01-22 16:37:13 +11:00
committed by GitHub
2 changed files with 55 additions and 37 deletions

View File

@@ -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
```

View File

@@ -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'