1.9 KiB
1.9 KiB
OpenCanary
Device preparation
-
Install OS Armbian 11 Bullseye. During installation process create user canary.
-
Update and upgrade
sudo apt update && sudo apt upgrade -y
- Download OpenCanary config file
wget https://download.csec.ba/tinkerboard/opencanary.conf
- Install Python3
sudo apt install -y python3-dev python3-pip python3-venv
- Install prerequisites
sudo apt install -y build-essential libssl-dev libffi-dev libpcap-dev net-tools
- Install Rust
sudo apt install rustc -y
- Instal Cargo
sudo apt install cargo -y
- Disable build Rust
export CRYPTOGRAPHY_DONT_BUILD_RUST=
- Install dependencies
mkdir ~/opencanary
cd ~/opencanary
python3 -m venv env
source env/bin/activate
pip install wheel
pip install rdpy
pip install opencanary
pip install scapy pcapy
- Create config file and copy it to the path
opencanaryd --copyconfig
sudo cp /home/canary/opencanary.conf /etc/opencanaryd/opencanary.conf
sudo mv /home/canary/opencanary.conf /home/canary/opencanary/opencanary.conf
- 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
- or you can symply download install script to avoid all manual work
wget https://download.csec.ba/tinkerboard/opencanary.sh
#Make it executable
sudo chmod +x opencanary.conf
#Execute script
sudo ./opencanary.sh