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 许可协议。转载请注明出处!
相关文章
为团队配置Linux环境,简单高效的项目共享方案
配置Linux多用户共享环境?无非是组权限和SGID设置。SSH公钥认证,共享conda环境,复制进度用rsync。这些操作,简单高效,但何必如此折腾?
2024-08-11 · Linux · 约 1 分钟
CentOS6安装Nginx,Linux编译安装Nginx
前言 最近笔者把一个django项目部署到一个新的服务器上,而这个服务器给的是CentOS6版本的系统,官方源很旧,yum管理器被运维搞坏了,没办法加载epel源,所以想要用nginx就只能自己编译安装咯~ 下载nginx代码 首先到Nginx的官网下载安装文件。 链接:http://nginx.org/ 我用的版本是:nginx-1.12.1.tar.gz 安装编译所需环境 安装gcc 安装 n
2022-06-17 · Linux · 约 1 分钟
什么年代了怎么还在用bash啊?现代化shell开箱体验: fish, nu, elvish
Fish开箱即用,智能补全和颜色真不错?Nushell像SQL处理数据,万物皆对象,但学曲线陡?Elvish像编程语言,逻辑严密,社区小众?何必折腾,直接换Shell?
2026-03-17 · Linux · 约 1 分钟
Linux编译安装Python3-6,理论上各个发行版通用
前言 最近笔者把一个django项目部署到一个新的服务器上,而这个服务器给的是CentOS6版本的系统,官方源很旧,还被运维把源搞坏了,没办法通过源安装Python3.6以及pip,所以只好用最原始的方法,编译安装! 注意 如果本机安装了python2,尽量不要管他,使用python3运行python脚本就好,因为可能有程序依赖目前的python2环境,不要动现有的python2环境! 官网下载的
2022-06-17 · Linux · 约 1 分钟
讨论
共 0 条加载评论中…