
간편하게 설정하고 사용할 수 있는 SSH 허니팟으로, 누구든 접속할 수 있게 해주고 그들의 활동을 기록하는 가짜 SSH 서버
설정과 사용이 간편한 SSH 허니팟으로, 누구든 접속할 수 있게 해주고 그들의 활동을 기록하는 가짜 SSH 서버입니다
sshesame은 호스트에서 아무것도 수행하지 않고(예: 명령 실행, 네트워크 요청) SSH 연결과 활동(채널, 요청)을 수락하고 기록합니다.
[!WARNING] 공식 Debian(및 파생 배포판) 저장소의
sshesame패키지는 오래되었을 수 있습니다(아마도 그럴 것입니다).
$ git clone https://github.com/jaksi/sshesame.git
$ cd sshesame
$ go build
여러 아키텍처용 Linux, macOS 및 Windows 바이너리가 자동으로 빌드 및 릴리스되며 Releases 페이지에서 이용할 수 있습니다.
$ sshesame -h
Usage of sshesame:
-config string
optional config file
-data_dir string
data directory to store automatically generated host keys in (default "...")
디버그 및 오류 로그는 표준 오류에 기록됩니다. 활동 로그는 기본적으로 표준 출력에 기록되며, logging.file 설정 옵션이 설정된 경우는 예외입니다.
amd64, arm64 및 armv7용 이미지가 자동으로 빌드 및 게시되며 Packages 페이지에서 사용할 수 있습니다.
[!IMPORTANT] 사용자 지정 구성 파일을 사용하는 경우 Docker 포트 포워딩이 작동하도록
server.listen_address를 모든 인터페이스에서 수신하도록(예:0.0.0.0:2022) 설정하세요.
$ docker run -it --rm\
-p 127.0.0.1:2022:2022\
-v sshesame-data:/data\
[-v $PWD/sshesame.yaml:/config.yaml]\
ghcr.io/jaksi/sshesame
FROM ghcr.io/jaksi/sshesame
#COPY sshesame.yaml /config.yaml
services:
sshesame:
image: ghcr.io/jaksi/sshesame
ports:
- "127.0.0.1:2022:2022"
volumes:
- sshesame-data:/data
#- ./sshesame.yaml:/config.yaml
volumes:
sshesame-data: {}
[Unit]
Description=SSH honeypot
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/path/to/sshesame #-config /path/to/sshesame.yaml
Restart=always
[Install]
WantedBy=multi-user.target
-config 플래그를 사용하여 선택적으로 구성 파일을 전달할 수 있습니다.
구성 파일을 지정하지 않으면 합리적인 기본값이 사용되며, RSA, ECDSA 및 Ed25519 호스트 키가 생성되어 -data_dir 플래그에 지정된 디렉터리에 저장됩니다.
기본 설정과 모든 구성 옵션에 대한 설명이 포함된 샘플 구성 파일이 포함되어 있습니다.
OpenSSH 서버를 모방하려고 시도하는 최소 구성 파일도 포함되어 있습니다.
2021/07/04 00:37:05 [127.0.0.1:64515] authentication for user "jaksi" without credentials rejected
2021/07/04 00:37:05 [127.0.0.1:64515] authentication for user "jaksi" with public key "SHA256:uUdTmvEHN6kCAoE4RJWsxr8+fGTGhCpAhBaWgmMVqNk" rejected
2021/07/04 00:37:07 [127.0.0.1:64515] authentication for user "jaksi" with password "hunter2" accepted
2021/07/04 00:37:07 [127.0.0.1:64515] connection with client version "SSH-2.0-OpenSSH_8.1" established
2021/07/04 00:37:07 [127.0.0.1:64515] [channel 1] session requested
2021/07/04 00:37:07 [127.0.0.1:64515] [channel 1] PTY using terminal "xterm-256color" (size 158x48) requested
2021/07/04 00:37:07 [127.0.0.1:64515] [channel 1] environment variable "LANG" with value "en_IE.UTF-8" requested
2021/07/04 00:37:07 [127.0.0.1:64515] [channel 1] shell requested
2021/07/04 00:37:16 [127.0.0.1:64515] [channel 1] input: "cat /etc/passwd"
2021/07/04 00:37:17 [127.0.0.1:64515] [channel 1] closed
2021/07/04 00:37:17 [127.0.0.1:64515] connection closed