krain-seckrain-sec
Open source · Go · Docker · sidecar honeypot

Engage commodity scanners with believable decoys

Bait for the bots. Keep the real site boring.

Your real website should look uninteresting to scanners. krain-sec parks a louder, juicier fake beside it — fake SSH, fake MySQL, fake Grafana, and a fake SOC console — giving commodity scanners and curious intruders believable dead ends to investigate.

Real · :80/:443

Stays boring

Bait · decoys

Looks like the prize

live bait surfaces
simulated
ssh admin@CORP-PROD-SRV05.internal — bait :22

Ubuntu 22.04.4 LTS CORP-PROD-SRV05.internal

events-2026-07-26.jsonllive
  • 14:02:11Zauthhttp_login_fail

    user=admin ip=185.220.101.42 path=/login

  • 14:02:18Zsshssh_auth_ok

    user=admin ip=45.33.32.156 banner=CORP-PROD-SRV05.internal

  • 14:02:19Zsshssh_cmd

    cmd="cat Documents/break-glass.txt"

  • 14:02:41Zdecoymysql_handshake

    ip=91.92.242.18 result=access_denied

  • 14:03:02Zhttptrap_hit

    path=/backup/ index=infinite

Alpine image

~23MB

static Go binary

Resource cap

256MB / 0.5

RAM / CPU

Decoy surfaces

4

SSH · MySQL · Grafana · Console

License

AGPL-3.0

open source

The job

Make the real site look boring. Give scanners something shinier.

Scanners probe whatever looks open, juicy, or misconfigured. When familiar ports present convincing decoys, opportunistic probes can spend their time and noise there instead of immediately reaching real admin services.

Boxes keep getting hit by everything from script kiddies to sharper scanners. Full enterprise deception stacks are expensive and heavy to run. krain-sec is something small teams and solo ops can actually deploy: one container, low RAM, make prod, done.

Built for diversion.

krain-sec is designed to consume scanner time with rabbit holes, decoy ports, planted secrets, and dead ends while your real site on 80/443 stays boring. Customers reach the real site. Commodity scanners and curious intruders encounter the bait.

Only on servers you own. Not “hack back” — controlled deception for engaging opportunistic probes without touching the source.

Engage commodity scanners and curious intruders with believable decoy services while your real website stays on ports 80 and 443.

Real site

:80 / :443

Stays boring on purpose

  • ·Customers land here
  • ·Looks like a normal website
  • ·Nothing juicy for a scanner to chase
pulled here

krain-sec bait

decoy

:22 · :3306 · :3000 · :8080

Looks like the prize

  • ·Fake SOC console (Aetheris)
  • ·Fake SSH / MySQL / Grafana
  • ·Secrets, PDFs, tarpits — all fake

Who this is for

Small teams & solo operators

primary

Primary audience. You run a real site on a VPS and want scanners chasing convincing decoys instead of your app. One small container beside it. No SOC required.

See every audience and limitation →

Who it attracts

Give probes convincing false doors.

Optimized for noisy, high-volume, and curious adversaries — not a full APT jail.

Internet scanners

Probing familiar ports such as SSH, MySQL, Grafana, and HTTP across public IP ranges.

Crawlers & bots

Extracting bait URLs from robots.txt, sitemaps, HTML comments, and frontend metadata, then following them into decoy paths.

See every probe profile →

How it works

Same VPS. Two stories.

Pick a traffic path. Normal visitors stay on the real site. Scanners and curious intruders get pulled into decoys instead.

Scenario · normal visitor

bait real
scanners → honeypotcustomers → real website

Traffic path

They only need the real website. Nothing juicy, nothing to chase.

01

Visitor opens your site

Browser hits the public URL on :80 / :443 like any normal website.

02

Traffic stays on the real app

HTTP/HTTPS goes to your real service. No decoy ports involved.

03

They never see the bait

Fake SSH, MySQL, Grafana, and the SOC console stay off this path. Customers just use the product.

Deployment

Choose where the bait lives.

Run krain-sec beside production for immediate scanner diversion, or isolate it on a dedicated VPS. Both keep the real website serving customers normally.

Shared host

Same VPS

Run krain-sec beside your real website or service. The honeypot takes the standard bait ports, while real administrative services move to alternate ports. Your public website stays on 80/443.

Best when you want scanners hitting the production IP to discover the decoys immediately.

Dedicated decoy

Separate VPS

Run krain-sec on another server with its own public IP and, preferably, a believable subdomain. Your production ports and services do not need to move.

Best for stronger isolation, simpler production networking, and a larger decoy surface.

Open the detailed deployment guide

Safety

Only on servers you own.

01Real SSH not on port 22 before you publish bait SSH.
02No shared secrets or DB volumes between honeypot and real site.
03Leave Compose isolation on (internal network, caps, read-only).
04Still harden the real website.
05Treat all captured attacker input as hostile data.

Full safety notes →

Deploy

Clone. make prod.

terminal
git clone https://github.com/h3ma209/krain-sec.git
cd krain-sec
cp .env.example .env          # edit HONEYTOKEN_BASE_URL when you go public
make prod                     # build + start the decoys

Live fingerprint

What nmap actually sees.

Real -sV run against a deployed instance. Classic bait ports answer with believable banners — OpenSSH, MySQL, Grafana HTML, Aetheris login — while the real site stays off this map.

nmap -sV · real capture4 open
$ nmap -sV 192.168.12.5

Service fingerprints

22/tcpSSH banner

SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.10

3000/tcpHTTP body

<title>Grafana</title> · Golang net/http

3306/tcpHandshake

MySQL 8.4.10

8080/tcpHTTP body

Aetheris Security — Sign In · X-Ratelimit-*

Simulated activity demo

See how probes move through the bait.

Decoy activity shows which fake doors, planted secrets, and dead ends drew interaction. The preview is simulated; deployed instances record their own local activity.

events-2026-07-26.jsonllive
  • 14:02:11Zauthhttp_login_fail

    user=admin ip=185.220.101.42 path=/login

  • 14:02:18Zsshssh_auth_ok

    user=admin ip=45.33.32.156 banner=CORP-PROD-SRV05.internal

  • 14:02:19Zsshssh_cmd

    cmd="cat Documents/break-glass.txt"

  • 14:02:41Zdecoymysql_handshake

    ip=91.92.242.18 result=access_denied

  • 14:03:02Zhttptrap_hit

    path=/backup/ index=infinite

FAQ

Straight answers.

Does this replace real security hardening?+

No. krain-sec gives commodity scanners believable decoys to investigate; it does not replace patching, backups, TLS, or locking down your real app. Treat it as bait that makes the real site look boring — not a shield.

Who is this good for?+

Anyone whose VPS website keeps getting poked and wants the interesting-looking doors to be fake. Built for small teams and solo operators — also useful in labs for blue teams, detection engineers, researchers, and purple-team homelabs. Not a real SSO, SIEM, or production auth stack.

How is this different from “detect + log” honeypots?+

Goal is controlled diversion, not only collecting alerts. krain-sec gives commodity scanners shinier fake doors — rabbit holes, decoy ports, planted secrets, and tarpits — that can hold opportunistic probes inside bait. Customers stay on 80/443 while decoy traffic remains isolated.

Is this legal to run?+

Only on infrastructure you own or explicitly control. Not “hack back.” Bait passwords are fake — never reuse them for real access. krain-sec is licensed under AGPL-3.0.

Can I see what happens inside the decoys?+

Yes. krain-sec keeps local activity records showing HTTP, SSH, honeytoken, WebRTC, MySQL, and Grafana interactions. They help you understand which bait worked, are retained for seven days by default, and never leave your server automatically.

Will it take down my cheap VPS?+

Designed not to. Static Go on Alpine (~23MB), hard-capped at 256MB RAM / 0.5 CPU, internal network, read-only filesystem. Soft-fail: if SSH/MySQL/Grafana can’t bind, the HTTP bait keeps running.