paseaf / ContainerSSH-honeypot

An high-interaction SSH honeypot built with ContainerSSH for GCP
MIT License
2 stars 1 forks source link
honeypot packer ssh terraform

ContainerSSH-honeypot

An SSH honeypot built with ContainerSSH for GCP.

Highlights

Infrastructure

infra diagram

Ports

Gateway VM:

Logger VM:

Sacrificial VM:

Getting started

Prerequisites

Deploying the Honeypot System

  1. Build VM images following /packer/README.md
  2. Provision infrastructure and deploy services following /terraform/README.md

Now, you should be able to asscess your SSH honeypot via

ssh -oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=+ssh-rsa \
 root@$(gcloud compute instances describe gateway-vm \
 --format='get(networkInterfaces[0].accessConfigs[0].natIP)' \
 --zone=europe-west3-c)

Your will be redirected to a newly created container in the sacrificial VM.

Accessing audit logs and metrics

After you deployed the honeypot, following monitoring tools should be available:

To get their URLs:

cd terraform
terraform output

You should see something like

grafana = "http://34.89.246.67:3000/"
minio_console = "http://34.89.246.67:9090/"
prometheus = "http://34.89.246.67:19091/"

Log in with credentials generated at ./terraform/credentials.txt.

Downloading and Analyzing Audit Logs

You can either

  1. download audit logs from MinIO manually
  2. or use our log analyzer script to download logs and load them into a SQLite database file.

Manual download

  1. Open MinIO Console URL in browser.
  2. Log in with credentials generated at ./terraform/credentials.txt
  3. You should see records in the containerssh bucket. Download records you want to analyze.
  4. Decode the records with containerssh-auditlog-decoder from https://github.com/ContainerSSH/ContainerSSH/releases/tag/v0.4.1, or implement your own decoder.\ Read more about the record format here.

Note: this SSH guide may help you understand the audit log.