Package: blacknet
WhatBlacknet is a low interaction SSH multi-head honeypot system with logging
capabilities.You can use it to gather all SSH attempts performed on multiple IPv4 address
you own on the internet and draw and export statistics out of it.
A dedicated web interface allows live tracking of what happens on your
honeypots, which IP addresses are targeting you and from where.RequirementsPython dependencies:CPython>= 3.9MsgPack>= 1.0.0PyMySQLParamikoMySQL Server:MySQL(tested with only 5.2+)MariaDBInstallationBlacknet provides two components, a SSH Server (sensor) and a master server.
The master server (blacknet-master) is where the database is located.
The SSH server (blacknet-sensor) is just a honeypot instance communicating with
the master server.
Please read –help from both commands and read blacknet.cfg.example carefully.You need to generate SSL certificates in order to make blacknet work
correctly over network stacks (please see next section).Installation usingpip:
$ pip install blacknetTake a copy of blacknet.cfg.example and make your own configuration in/etc/blacknet/or${HOME}/.blacknet/Runblacknet-install.sqlin your MySQL database.You can update (and fill) the database with geolocation updates using
the commandblacknet-updater.You can also scrub your data to generate reports or perform metadata checks
usingblacknet-scrubber(please consult –help for details)Commandblacknet-scrubbermight be best run in a crontab (with –quiet)You might want to filter out some specific users for some or all honeypots.
Please see blacklist.cfg.example and put it in an appropriate directory.Create your SSL certificatesPlease useEasyRSAor equivalent to generate your own PKI and deliver
certificates between your server and your honeypots.# First clone the easyrsa repositorycd/tmp/gitclonehttps://github.com/OpenVPN/easy-rsa.git# Then create a new Authoritycd/tmp/easy-rsa/easyrsa3./easyrsainit-pki# When asked provide a Common Name for your CA (eg: Blacknet CA)./easyrsabuild-canopass# Generate and sign a certificate for master server (here called maestro)./easyrsagen-reqmaestronopass./easyrsasignservermaestro# Same for sensors./easyrsagen-reqhoneypot_00nopass./easyrsasignclienthoneypot_00PEM file format used by Blacknet starts with the private key and then
concatenates with the certificate (example bellow).catpki/private/maestro.keypki/issued/maestro.crt>maestro.pemHistoryThe initial project featured a modified VirtualBox environment as a high
interaction honeypot, gathering commands and events such as password changes.
We then moved to supporting Kippo, a medium interaction SSH honeypot written
in Python. Today’s  version uses a lightweight paramiko server as a
low-interaction honeypot since there are no more plans (and no more time) to
handle commands and events automatically
(there are many security concerns around doing high interaction automatically).
The underlying MySQL schemes still refers to commands or events but they are
mostly kept for backward compatibility reasons.Integration withCowrieshould not be hard to extend Blacknet features and
make it highly interactive again.This project was initially conducted during our engineering studies in 2010.
It was rewritten in 2017 to lower maintenance and installation efforts and to
fit with modern python programming standards.CreditsRomain Bezut (2010, 2017)Vivien Bernet-Rollande (2010)ThanksWe would like to thank theUTC(Université de Technologie de Compiègne).
Our school brought us support and have made this project possible during
class. Special thanks go to our teacher who supervised this project.We would like to thank all our friends who helped finding issues and
review this project in its early versions.The hackers and bots who contributed in spite of themselves to this project.