Skip to content

Commit 8b7387f

Browse files
authored
Add additional SSH config requirements
1 parent d4874d2 commit 8b7387f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,15 @@ sysctl net.ipv4.ip_forward=1
333333
334334
### SSH for HTTP
335335
336-
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 and into your server environment. First you must set up GatewayPorts forwarding or it won't work, using the following syntax on the redirector:
336+
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 and into your server environment. Before setting up an SSH redirector, you must add the following lines to `/etc/ssh/sshd_config`:
337337
338-
```nano /etc/ssh/sshd_config``` add ```GatewayPorts yes```
338+
```text
339+
# Allow the SSH client to specify which hosts may connect
340+
GatewayPorts yes
341+
342+
# Allow both local and remote port forwards
343+
AllowTcpForwarding yes
344+
```
339345
340346
To forward the redirector's local port 80 to your internal teamsrver, use the following syntax on the internal server:
341347
@@ -353,7 +359,6 @@ ssh <redirector> -R *:80:localhost:80 -R *:443:localhost:443
353359
Ctrl+B, D
354360
```
355361
356-
357362
### Payloads and Web Redirection
358363
359364
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)