ssh-honeypot-go
Dependencies:
- gliderlabs/ssh
- notify-send
- openssh (not obligatory, you need this only for ssh-keygen used for generate host private key)
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 <output_filepath>
ssh-keygen -t rsa -b 2048 -N "" -f hostkey_rsa
Changing Username and Password:
Edit the config.json file.
Default:
{
"creator": "Ex0dIa-dev",
"auth": {
"user": "root",
"password": "toor"
}
}
Usage:
./ssh-honeypot-go
./ssh-honeypot-go -port <port>
./ssh-honeypot-go -port <port> -notify
./ssh-honeypot-go -port <port> -notify -keyfile <host private key filepath>
./ssh-honeypot-go -port <port> -notify -log
./ssh-honeypot-go -port <port> -log-all
Example:
./ssh-honeypot-go -port 1234 -notify
./ssh-honeypot-go -port 1234 -keyfile hostkey_rsa -notify
./ssh-honeypot-go -port 1234 -keyfile hostkey_rsa -notify -log
Flags:
- '-port' ==> enter the honeypot server port(default: 2222)
- '-notify' ==> activate notifier service(default: false)
- '-keyfile' ==> enter the filepath of host private key
- '-log' ==> activate logging(logs path: "logs/")
- '-log-all' ==> logging all attempts(terminal, and notification), failed too
TODO LIST:
- adding a fake shell as sessionHandler
- log collected ip addresses in a file