Code Monkey home page Code Monkey logo

spot's Introduction

spot

一个低交互的 SSH 蜜罐,基于 golang 的 crypto/ssh 库开发。

特性

  • 支持未验证连接、密码登录、秘钥登录三种方式。
  • 可记录远程 ip,用户密码、私钥指纹。
  • 可生成一个简易终端接受远程命令并记录。
  • 具有默认配置,开箱即用;也可使用 yml 进一步配置。
  • 日志可以 json 格式输出到文件,支持日志文件滚动、gzip 压缩。

配置

使用spot -hspot conf -h可输出完整帮助信息
可使用spot conf -i生成默认配置文件,spot conf -c <config>来打印运行时配置

程序默认在当前路径寻找 config.yml 配置文件,不存在会自动退出。可使用spot conf -i生成默认配置文件。

#  最简使用
./spot conf -i
./spot

完整的配置文件及说明(默认配置):
中文 | English

使用

二进制

从 Github release 下载使用即可

从源码编译

本程序在 Golang1.21.4 下开发,不保证其他版本一定可行

git clone https://github.com/nuclear06/spot.git
make

systemd (service)

[Unit]
Description=SSH honeypot
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/path/to/spot #-d /path/to/config.yml
Restart=always

[Install]
WantedBy=multi-user.target

docker

使用 distroless/debian11 作为基础镜像,保证镜像足够小(8.56MB)且安全。

# 开箱即用
docker run --rm -p 22:2023 \
    --name spot \
    nuclear06/spot:latest

# 映射配置文件和日志文件
docker run -d -p 22:2023 \
    -v ./config.yml:/spot/config.yml \
    -v ./logs:/spot/logs \
    --restart=always \
    --name spot \
    nuclear06/spot:latest

可视化(optional)

项目提供简单的可视化 Python 脚本,详情请查看toos.py
使用示例见Jupyter Notebook
效果示例example1 | example2

/ ! \ 注意,IP Map使用了IP2Location LITE(Free)数据库,请自行前往官网下载

鸣谢

感谢以下项目,为本项目提供了参考:
sshesame
go-sshoney
go-ssh-examples

声明

This site or product includes IP2Location LITE data available from https://lite.ip2location.com.

spot's People

Contributors

nuclear06 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.