feat(security): deploy OpenCanary honeypot on VLAN 50 with Gotify and Discord alerting

This commit is contained in:
2026-11-07 00:22:51 -05:00
parent 0ed293b6ea
commit 3871d04d48
66 changed files with 1997 additions and 15 deletions

View File

@@ -0,0 +1,32 @@
import paramiko
import sys
import time
sys.stdout.reconfigure(encoding='utf-8')
key_path = r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet'
print("--- Sending SSH probe from Spaceport to 14.4.4.99 ---")
sp = paramiko.SSHClient()
sp.set_missing_host_key_policy(paramiko.AutoAddPolicy())
sp.connect("140.44.4.41", username="root", key_filename=key_path, timeout=10)
stdin, stdout, stderr = sp.exec_command("ssh -o StrictHostKeyChecking=no -o ConnectTimeout=3 -o BatchMode=yes admin@14.4.4.99 2>&1 || true")
print("SSH probe output:", stdout.read().decode())
sp.close()
time.sleep(2)
print("--- Checking Watcher Logs on 140.44.4.71 ---")
sw = paramiko.SSHClient()
sw.set_missing_host_key_policy(paramiko.AutoAddPolicy())
sw.connect("140.44.4.71", username="root", key_filename=key_path, timeout=10)
stdin, stdout, stderr = sw.exec_command("journalctl -u opencanary-watcher.service -n 10 --no-pager")
print(stdout.read().decode())
print("\n--- Checking Gotify Messages ---")
stdin, stdout, stderr = sw.exec_command("sqlite3 /var/lib/docker/volumes/gotify_gotify_data/_data/gotify.db 'SELECT id, appid, title, message, date FROM messages WHERE appid = 6 ORDER BY id DESC LIMIT 5;'")
print(stdout.read().decode())
sw.close()