ssh-honeypot-go

command module
v0.0.0-...-6c56c96 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

README

ssh-honeypot-go

Go Report Card


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!

paypal

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL