部署一个假SSH采集那些尝试破解的数据
原帖地址:
项目地址:https://github.com/fffaraz/fakessh
简介
A dockerized honeypot SSH server written in Go to log login attempts. Password authentications always fail so no terminal access is given to the attacker.
一个用GO开发的,可以docker运行的蜜罐SSH服务,用来记录所有的登录尝试。由于程序会永远把密码验证结果置为失败,所以攻击者不会获得控制终端的机会。
部署
首先把现有的ssh端口挪走
sudo vi /etc/ssh/sshd_config
#找到这行
Port 22 #这里改成你想要的其他端口,记得防火墙上要放通
安装Docker🐳
利用Docker-compose搭建,易于更新
先建立一个文件
vim docker-compose.yml
docker-compose填入以下内容:
version: '3'
services:
fakessh:
container_name: fakessh
image: fffaraz/fakessh
restart: always
ports:
- 22:22
command: /log
volumes:
- /docker/fakessh/log:/log
这样我们的假sshd就在22端口起来了
效果
这里可以看到,试了三次,用户名密码都被记录下来了。
基于此,我们可以把捕捉到的账号密码存入数据库,为进一步分析做准备。
其他有趣的方案
jaksi/sshesame - A fake SSH server that lets everyone in and logs their activity.
shazow/ssh-chat - Custom SSH server written in Go. Instead of a shell, you get a chat prompt.
gliderlabs/ssh - Easy SSH servers in Golang.
gliderlabs/sshfront - Programmable SSH frontend.
desaster/kippo - Kippo - SSH Honeypot.
micheloosterhof/cowrie - Cowrie SSH/Telnet Honeypot.
fzerorubigd/go0r - A simple ssh honeypot in golang.
droberson/ssh-honeypot - Fake sshd that logs ip addresses, usernames, and passwords.
x0rz/ssh-honeypot - Fake sshd that logs ip addresses, usernames, and passwords.
tnich/honssh - HonSSH is designed to log all SSH communications between a client and server.
cowrie - Cowrie SSH/Telnet Honeypot.
比如第一个,会让所有攻击者通过验证,并记录下它们的活动。
第二个,一个用Go写的自定义的SSH服务端,你可以直接和对方聊天。