The bee is the public facing endpoint in the Alvarium honeypot project.
It can:
Right now, a Linux system like Ubuntu or Debian is required. We might extend the program to Windows and others in the future.
Because we need to drop the Kernel responses to incoming traffic (to avoid that the Kernel sends RST packets for closed ports), we apply an nftables configuration automatically. Open ports are excluded from the rules to avoid that running services like SSH are blocked.
Note: We currently only support nftables.
If your system is using legacy iptables (not iptables-nft
), disable automatic nftables generation using the -disableNftables
flag.
Then, please make sure that you apply proper iptables rules, similar to the nftables rules the program would apply.
Also, make sure that your endpoint configuration in the frontend blocks your open ports!
-bind <ipAddress>
flag.docker
with its compose
plugin installed.command
field in the compose file (the entrypoint of the Docker image is set to the binary).BEE_REGISTRATION_TOKEN
environment variable to the value you copied above.Start the container
docker compose up -d
Make sure your system has nftables
installed, since the program uses the nft
tool.
Do one of the following to get your binary.
Currently, the binary requires elevated privileges because of the network operations. Hence, either run the binary with sudo
, or set the necessary capabilities using sudo setcap cap_net_admin,cap_net_raw=eip ./bee
. Remember to also set the flags described above if needed.
sudo ./bee
Finally, you should be asked to input the registration token copied above.
The Bee should now be up and running. Note that it stores relevant data in a bee.store
file. If that file is lost, you need to reregister the Bee.
Go must be installed on the machine. Please follow this instruction from the official Go website to install the latest version.
Make sure that the bin
folder of your Go installation is part of your PATH
, e.g. export PATH+=:~/go/bin
.
Building the binary requires the libpcap header files, which are part of the libpcap-dev
package on Debian-based distros. Adjust the command according to your package manager.
sudo apt install libpcap-dev
Clone the project.
git clone --recurse-submodules git@github.com:Cybersecurity-and-Enterprise-Security/bee.git
cd bee
Install dependencies.
make generate-deps
Build the binary.
make build