Skip to content

Commit b85fc7e

Browse files
authored
Update README.md
1 parent c037d1f commit b85fc7e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,29 @@ iptables -P FORWARD ACCEPT
328328
sysctl net.ipv4.ip_forward=1
329329
```
330330
331+
### SSH for HTTP
332+
333+
We have previously covered using SSH for DNS tunnels. SSH works as a solid, and robust means to break through NAT and obtain a way for the implant to connect to a redirector annd into your server environment. First you must set up GatewayPorts forwarding or it won't work, using the following syntax on the redirector:
334+
335+
```nano /etc/ssh/sshd_config``` add ```GatewayPorts yes```
336+
337+
To forward the redirector's local port 80 to your internal teamsrver, use the following syntax on the internal server:
338+
339+
```
340+
tmux new -S redir80
341+
ssh <redirector> -R *:80:localhost:80
342+
Ctrl+B, D
343+
```
344+
345+
You can also forward more than one port, for example if you want 443 and 80 to be open all at once:
346+
347+
```
348+
tmux new -S redir80443
349+
ssh <redirector> -R *:80:localhost:80 -R *:443:localhost:443
350+
Ctrl+B, D
351+
```
352+
353+
331354
### Payloads and Web Redirection
332355
333356
When serving payload and web resources, we want to minimize the ability for incident responders to review files and increase the chances of successfully executing the payload, whether to establish C2 or gather intelligence.

0 commit comments

Comments
 (0)