Deploy an SSH honeypot for fun, which can both enhance security and serve as an electronic cricket.
Deploy SSH honeypot? Change the port, install fakessh to freeload off password dictionaries, use sshesame as a digital cricket to log operations. Typora plugin updates are a hassle; real skill is in security testing.
目录6 个章节
Preface
Recently, an SSL certificate on an old server of mine expired. Applying for SSL certificates every time is too much hassle, so I directly deployed the Swag solution onto it.
Then I noticed this server had some security oversights, so I reinforced it. For the SSH part, I recalled a honeypot I had used before, which is perfect to deploy for some practice.
Modify SSH Server Port
The default SSH port is 22. First, modify the original SSH port to free up port 22 for honeypot use.
sudo nano /etc/ssh/sshd_config
Modify the following line:
#Port 22
Remove the comment and change it to your desired port number.
Then restart the SSH service.
sudo systemctl restart ssh
Note: Before modifying the port, ensure you have another method (such as physical access or console access) to connect to the server in case of issues with the new port configuration.
fakessh
FakeSSH is a Docker-based honeypot SSH server written in Go. Its main function is to record login attempts; all password authentication will fail, thus not providing attackers with terminal access.
Project address: https://github.com/fffaraz/fakessh
services:
fakessh:
container_name: fakessh
image: fffaraz/fakessh
restart: always
ports:
- 22:22
command: /log
volumes:
- ./volumes/fakessh:/log
After deployment, if someone attempts a brute-force attack, I can get a password dictionary for free~
sshesame
SSHSame is a very simple and user-friendly SSH honeypot that can be quickly set up and deployed. Its main function is to simulate a fake SSH server, allowing anyone to connect while recording their activities. SSHSame does not perform any actions on the host, such as running commands or initiating network requests, ensuring system security. By logging connections and activities (e.g., channels, requests), SSHSame provides security researchers with an excellent tool to analyze and understand SSH attack behaviors.
https://github.com/jaksi/sshesame
services:
sshesame:
image: ghcr.io/jaksi/sshesame
restart: always
ports:
- "2022:2022"
volumes:
- ./sshesame-data:/data
#- ./sshesame.yaml:/config.yaml
After deployment, I tried it out. You can log in with any username and password, but once inside the shell, any command returns "not found."
Meanwhile, the logs will output what the incoming users are doing. It's quite amusing, like an electronic cricket 😃
Additionally
I've been using Typora to write articles recently, and while browsing today, I discovered two plugins/themes that enhance the Typora editing experience. I'd like to recommend them here:
- typora_plugin - It has a lot of features and I'm still exploring, but it feels quite useful. The only issue is that I installed Typora using scoop, and it seems the plugin needs to be reinstalled after every update.
- VLOOK - This is purely a theme. The plugin part works after exporting HTML, similar to VuePress, and it offers many features.
References
_EOF_
Deploy an SSH honeypot for fun, which can both enhance security and serve as an electronic cricket.
- 本文作者:
- 程序设计实验室
- 版权声明:
- 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
相关文章
SSH 跳板机原理与配置:实现无缝跳板连接,一步直达目标主机
在日常运维或开发工作中,我们常常需要访问部署在内网的服务器。然而出于安全策略或网络拓扑的限制,内网服务器并不会直接向外部暴露端口,导致我们无法“直连”它们。此时,**跳板机**(Jump Host/Bastion Host)就成了必不可少的中转
2025-01-17 · Linux · 约 1 分钟
Linux编译安装Python3-6,理论上各个发行版通用
前言 最近笔者把一个django项目部署到一个新的服务器上,而这个服务器给的是CentOS6版本的系统,官方源很旧,还被运维把源搞坏了,没办法通过源安装Python3.6以及pip,所以只好用最原始的方法,编译安装! 注意 如果本机安装了python2,尽量不要管他,使用python3运行python脚本就好,因为可能有程序依赖目前的python2环境,不要动现有的python2环境! 官网下载的
2022-06-17 · Linux · 约 1 分钟
为团队配置Linux环境,简单高效的项目共享方案
配置Linux多用户共享环境?无非是组权限和SGID设置。SSH公钥认证,共享conda环境,复制进度用rsync。这些操作,简单高效,但何必如此折腾?
2024-08-11 · Linux · 约 1 分钟
经历分享,发现挖矿木马后,服务器快速备份与重装(腾讯云平台)
服务器又中木马?备份重装一套走起,coscli搞定。一键脚本压缩上传,硬盘镜像SSH传输,安全加固到位。AI时代更需小心,重装系统省心省力。
2026-03-04 · Linux · 约 1 分钟
讨论
共 0 条加载评论中…