1.6 KiB
1.6 KiB
OpenCanary 0.9.5 (latest)
Device preparation
Tested for Raspberry Pi 4
-
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).
-
Update and upgrade
sudo apt update && sudo apt upgrade -y
- 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'
- Install dependencies
sudo apt-get install -y python3-dev python3-pip python3-virtualenv python3-venv python3-scapy libssl-dev libpcap-dev
- 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
- Initialize config file
opencanaryd --copyconfig
#Edit config file according to your needs. Add api key to webhook.
- 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
- Enable and start service
sudo systemctl enable opencanary && sudo systemctl start opencanary