ssh-honeypot-go
Dependencies:
Build:
go build
or
go build -ldflags="-s -w"
for a lightweight binary.
Generate Host Private Key(not obligatory, default host key will be auto generated):
ssh-keygen -t <type> -b <bits> -N "" -f config/hostkey_rsa
ssh-keygen -t rsa -b 2048 -N "" -f config/hostkey_rsa
Hostkey file must be in config directory! And with no password!
Changing Username and Password:
Edit the config/config.json file.
Default:
{
"creator": "Ex0dIa-dev",
"auth": {
"user": "root",
"password": "toor"
}
}
Run on Docker:
Build image:
//First generate your hostkey and put it in config/ -->(not obligatory,will be auto-generated)
//Then you can build image
docker build -t <image-name> .
//Example
docker build -t ssh-honeypot-go .
Run a container:
docker run --rm -v $PWD/config:/app/config -v $PWD/logs:/app/logs -p <host_port>:<honeypot_port> <image_name>
//Example
docker run --rm -v $PWD/config:/app/config -v $PWD/logs:/app/logs -p 22:2222 ssh-honeypot-go
//You can use flags too
docker run --rm -v $PWD/config:/app/config -v $PWD/logs:/app/logs -p <host_port>:<honeypot_port> <image_name> -port <honeypot_port> -log
//Example
docker run --rm -v $PWD/config:/app/config -v $PWD/logs:/app/logs -p 22:1234 ssh-honeypot-go -port 1234 -log
Notification Service doesn't work! Using it will crash the app!
Usage:
./ssh-honeypot-go
./ssh-honeypot-go -port <port>
./ssh-honeypot-go -port <port> -notify
./ssh-honeypot-go -port <port> -notify -log
./ssh-honeypot-go -port <port> -log -log-all
Example:
./ssh-honeypot-go -port 1234 -notify
./ssh-honeypot-go -port 1234 -notify -log
Flags:
- '-port' ==> enter the honeypot server port(default: 2222)
- '-notify' ==> activate notification service(default: false)
- '-log' ==> activate logging(logs path: "logs/")
- '-log-all' ==> logging all attempts(terminal, and notification), failed too
TODO LIST:
- adding a fake shell as sessionHandler(temporary)
- adding a Dockerfile
- log collected data in a file
Support Project
Support the me and the project with a donation. Thanks You!