2024-12-21 18:44:39 +01:00
2024-12-21 18:44:39 +01:00

OpenCanary 0.9.5 (latest)

Device preparation

Tested for Raspberry Pi 4

  1. Install OS Ubuntu 24.10 using RaspberryPi Imager. Browse for OS throug imager. Set OS configuration using imager (create canary user and other stuff you want).

  2. Update and upgrade

sudo apt update && sudo apt upgrade -y
  1. Change SSH server port to be able to use Canary SSH on port 22
sudo nano /etc/ssh/sshd_config
#Uncoment Port section and change port from 22 to 33
#Reboot device:
sudo reboot now

#Connect SSH using terminal with: ssh -l canary -p 33 'HostIP'
  1. Install dependencies
sudo apt-get install -y python3-dev python3-pip python3-virtualenv python3-venv python3-scapy libssl-dev libpcap-dev
  1. Create folder, activate env and install opencanary
mkdir opencanary
cd opencanary
virtualenv env/
. env/bin/activate
pip install cryptography==38.0.1
pip install opencanary==0.9.5
pip install scapy pcapy-ng
  1. Initialize config file
opencanaryd --copyconfig

#Edit config file according to your needs. Add api key to webhook.
  1. Create OpenCanary service
sudo nano /etc/systemd/system/opencanary.service

#Add following lines into it
[Unit]
Description=OpenCanary
After=syslog.target
After=network.target

[Service]
User=root
Type=simple
RemainAfterExit=yes
Restart=always
ExecStart=/home/canary/opencanary/env/bin/opencanaryd --start
ExecStop=/home/canary/opencanary/env/bin/opencanaryd --stop

[Install]
WantedBy=multi-user.target
  1. Enable and start service
sudo systemctl enable opencanary && sudo systemctl start opencanary
Description
No description provided
Readme 26 KiB