OpenCanary
Overview
OpenCanary is a lightweight, low-interaction honeypot daemon from Thinkst. It runs a set of decoy network services and raises an alert the moment anyone touches them. Because nothing legitimate should connect to a decoy, every interaction is a high-signal, low-noise indicator of reconnaissance or compromise, without the false-positive fatigue of a traditional intrusion detection system.
This SecureAnyCloud image installs OpenCanary into a self-contained Python virtualenv at /opt/opencanary/opencanary-env and runs it as the opencanary.service systemd unit. It enables a working decoy surface out of the box: FTP on 21, HTTP on 80, Telnet on 23, MySQL on 3306 and a decoy SSH on 2222. Every interaction is written as structured JSON to /var/log/opencanary/opencanary.log.
Two separate planes. The image keeps the decoys apart from your real administration:
- Admin plane: the operating system's own SSH on port
22, key only (your Azure SSH key). The image has no baked-in password and no shared bootstrap credential. This is how you administer the VM. The honeypot never listens on port22. - Decoy plane: the emulated FTP, HTTP, Telnet, MySQL and SSH listeners. Any touch of these is logged as an alert, which is the product working as designed. Nothing an attacker does on a decoy touches the real system. The decoy SSH is on port
2222.
A unique identity per VM. An alert node ID shared across every image would make alerts from different deployments collide and would fingerprint the image. On each VM's first boot, opencanary-firstboot.service creates a fresh, unique alert node ID and records it in a root-only info note. No two deployments share an identity, and the image gives nothing away about its origin.
What you get:
- OpenCanary (verified at 0.9.8, BSD 3-Clause) in a self-contained virtualenv at /opt/opencanary
opencanary.servicerunning the honeypot daemon under systemd- Decoy FTP (
21), HTTP (80), Telnet (23), MySQL (3306) and SSH (2222) opencanary-firstboot.servicefor the per-VM alert node ID and the instance info note- A structured JSON alert log at /var/log/opencanary/opencanary.log
- Real admin SSH kept key only on port 22, separate from the decoys
- An Ubuntu 24.04 LTS base, patched at build time, with unattended security upgrades enabled
- 24/7 SecureAnyCloud support, 24h response SLA
Prerequisites
You need an active Azure subscription, an SSH key pair, and a VNet with a subnet.
OpenCanary is lightweight, so Standard_B2s (2 vCPU / 4 GB RAM) is ample for most deployments. Alerts are stored on the OS disk. Expand the disk if you expect to keep a long alert history locally instead of forwarding it off the VM.
Deploy the virtual machine
Option A: Azure Portal
Search the Marketplace for OpenCanary Honeypot on Ubuntu 24.04. Choose your VM size and provide your SSH public key. Attach a network security group (NSG) that allows:
- TCP
22(your real admin SSH) from your management network only. - TCP
21,23,80,2222and3306(the decoys) from the networks you want to expose the sensor to. To collect real internet reconnaissance, allow these ports from the internet. To run an internal deception sensor, allow them only from the internal ranges you are monitoring.
Option B: Azure CLI
RG="opencanary-prod"; LOCATION="eastus"; VM_NAME="opencanary-01" IMAGE_URN="sac1647283583153:opencanary-ubuntu-24-04:default:latest" SSH_KEY="$(cat ~/.ssh/id_rsa.pub)" az group create --name "$RG" --location "$LOCATION" az network vnet create -g "$RG" --name oc-vnet --address-prefix 10.90.0.0/16 --subnet-name oc-subnet --subnet-prefix 10.90.1.0/24 az network nsg create -g "$RG" --name oc-nsg az network nsg rule create -g "$RG" --nsg-name oc-nsg --name allow-admin-ssh --priority 100 \
--source-address-prefixes "<your-mgmt-cidr>" --destination-port-ranges 22 --access Allow --protocol Tcp az network nsg rule create -g "$RG" --nsg-name oc-nsg --name allow-decoys --priority 110 \
--source-address-prefixes "Internet" --destination-port-ranges 21 23 80 2222 3306 --access Allow --protocol Tcp
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:opencanary-ubuntu-24-04:default:latest
az vm create -g "$RG" --name "$VM_NAME" --image "$IMAGE_URN" \
--size Standard_B2s --storage-sku StandardSSD_LRS \
--admin-username azureuser --ssh-key-values "$SSH_KEY" \
--vnet-name oc-vnet --subnet oc-subnet --nsg oc-nsg --public-ip-sku StandardConnect over SSH
Connect on the real admin port 22 with your key. This is the admin plane, kept completely separate from the decoys.
ssh azureuser@<vm-ip>To find the public IP, run az vm show -d -g opencanary-prod -n opencanary-01 --query publicIps -o tsv.
Verify the honeypot is running
OpenCanary runs as a systemd service. Confirm that it is active, that the decoys are listening, and that your real SSH stays on port 22.
sudo systemctl start opencanary 2>/dev/null || true sleep 2
sudo systemctl is-active opencanary ss -tln | grep -E ':21 |:23 |:80 |:2222 |:3306 |:22 ' || true /opt/opencanary/opencanary-env/bin/python -c 'import importlib.metadata as m; print("opencanary", m.version("opencanary"))' echo "opencanary verified"The output shows:
opencanaryreportingactive- Listening sockets for the decoys on 0.0.0.0:21,
:23,:80,:2222and:3306 - Your real admin SSH on 0.0.0.0:22
- The OpenCanary version
Read this VM's instance info
The first-boot service wrote a root-only note that describes the two planes, this VM's unique alert node ID and the decoy endpoints. Read it with sudo:
sudo cat /root/opencanary-info.txtThe note is owned by root:root with mode 0600. It records the decoy endpoints, the per-VM alert node ID and the location of the alert log.
See the honeypot detect an interaction
OpenCanary alerts on any touch of a decoy. Trigger the HTTP and FTP decoys locally to watch it detect the interaction and write a structured alert. The commands run against loopback on the VM itself, so no traffic leaves the VM. Real attackers who reach the decoys over the public IP produce the same alerts.
curl -s -m 10 -o /dev/null --user admin:admin "ftp://127.0.0.1:21/" || true
curl -s -m 10 -o /dev/null "http://127.0.0.1:80/index.html" || true sleep 2
sudo tail -n 5 /var/log/opencanary/opencanary.log | jq -c '{logtype, dst_port, src_host, logdata}' echo "decoy interaction detected and logged"Each line is a structured alert. You see two entries:
- The FTP login attempt (
dst_port21), capturing the username and password that were tried. - The HTTP request (
dst_port80), recording the path and user agent.
The decoys are emulated, so none of this touched a real service.
Read the captured alerts
Every decoy interaction is written to the structured JSON alert log. List the most recent alerts to see what OpenCanary captured.
sudo tail -n 12 /var/log/opencanary/opencanary.log | jq -c '{utc_time, logtype, dst_port, src_host, logdata}' echo "alerts read"Each alert carries a logtype, the decoy port that was touched (dst_port), the source host, and the details in logdata. For the FTP, Telnet, MySQL and SSH decoys, logdata includes the credentials that were tried. This is the intelligence you forward to your monitoring pipeline.
Forward alerts to your SIEM, email or a webhook
The JSON alert log at /var/log/opencanary/opencanary.log is designed to be shipped to a log pipeline. Point Filebeat, Fluent Bit, Vector or rsyslog at that file to forward alerts to Elasticsearch, Splunk, a Graylog input or any SIEM.
OpenCanary can also send alerts directly to email, a webhook, syslog or hpfeeds. Add a handler to the logger block in the configuration, then restart the service.
# Edit the logger.kwargs.handlers block in the config to add an email, webhook or syslog sink:
sudo nano /etc/opencanaryd/opencanary.conf
sudo systemctl restart opencanaryThe OpenCanary documentation lists the available handlers (SMTP for email, a generic Webhook handler, Slack, syslog and hpfeeds) and the fields each one needs.
Optional: catch attackers on the standard SSH port
By default the decoy SSH listens on 2222 and your real admin SSH owns port 22, so administration works out of the box. To catch attackers who probe the standard SSH port, first move your real admin SSH to another port. Then redirect inbound traffic to the decoy. Doing this in the wrong order locks you out.
# 1. FIRST move real admin SSH to 2022 and confirm you can reconnect on the new port,
# then in a NEW session:
# 2. Redirect inbound tcp/22 to the decoy SSH on 2222:
sudo iptables -t nat -A PREROUTING -p tcp --dport 22 -j REDIRECT --to-port 2222Once you have confirmed admin access on the new port, persist the iptables rule (for example with iptables-persistent). Update your NSG to allow the new admin port from your management network only.
Managing the service
sudo systemctl status opencanary
# health and recent log lines
sudo systemctl restart opencanary
# apply config changes
sudo journalctl -u opencanary -f
# live service log
sudo tail -f /var/log/opencanary/opencanary.log
# live alertsEdit /etc/opencanaryd/opencanary.conf to enable or disable decoy services, change their ports and banners, and add alert handlers. Restart the service after every change.
Server components
- OpenCanary 0.9.8 at /opt/opencanary (virtualenv at /opt/opencanary/opencanary-env)
- Decoy FTP on
0.0.0.0:21 - Decoy HTTP on 0.0.0.0:80
- Decoy Telnet on 0.0.0.0:23
- Decoy MySQL on 0.0.0.0:3306
- Decoy SSH on 0.0.0.0:2222
- Real admin SSH (OpenSSH) on
0.0.0.0:22, key only
Filesystem layout
/opt/opencanary: OpenCanary virtualenv and runtime- /opt/opencanary/opencanary-env: self-contained Python virtualenv
/etc/opencanaryd/opencanary.conf: main configuration (decoys, ports, logger)/var/log/opencanary/opencanary.log: structured JSON alert log- /root/opencanary-info.txt: root-only, per-VM instance info note
Persistence, first boot and updates
The OpenCanary install and configuration live under /opt/opencanary and /etc/opencanaryd. Both are captured into the image, so a new VM is ready immediately.
On first boot, opencanary-firstboot.service creates the per-VM alert node ID, resolves the instance address and writes the root-only info note. It then disables itself, so later reboots are unaffected. The OS is patched at build time and ships with unattended security upgrades enabled.
systemctl is-enabled opencanary opencanary-firstboot apt-mark showhold echo "no held packages expected above"Security notes
- Restrict the admin port. Limit port 22 in the NSG to your management network. Only the decoy ports should be broadly reachable.
- Keep secrets off this VM. Never place real secrets, credentials or data here. The honeypot is a sensor, and any host exposed to attackers should be treated as disposable.
- Forward alerts off the VM. Send the JSON alert log to your SIEM so captured intelligence survives if you rebuild the sensor.
- Review and rebuild. Review alerts regularly and rebuild the sensor periodically from a fresh image, so each deployment gets a new per-VM alert identity.
Support
Every SecureAnyCloud deployment includes 24/7 support with a 24-hour response SLA. Contact sales@secureanycloud.com for help with deployment, configuration or scaling.
This is a repackaged open-source software product with additional charges for SecureAnyCloud support services. OpenCanary is distributed under the BSD 3-Clause license and is a trademark of its respective owner. All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
Deploy on Azure
Launch OpenCanary on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com