Skip to main content

What

Blacknet 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.

Requirements

Installation

Blacknet 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 using pip: $ pip install blacknet

  • Take a copy of blacknet.cfg.example and make your own configuration in /etc/blacknet/ or ${HOME}/.blacknet/

  • Run blacknet-install.sql in your MySQL database.

  • You can update (and fill) the database with geolocation updates using the command blacknet-updater.

  • You can also scrub your data to generate reports or perform metadata checks using blacknet-scrubber (please consult –help for details)

  • Command blacknet-scrubber might 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 certificates

Please use EasyRSA or equivalent to generate your own PKI and deliver certificates between your server and your honeypots.

# First clone the easyrsa repository
cd /tmp/
git clone https://github.com/OpenVPN/easy-rsa.git

# Then create a new Authority
cd /tmp/easy-rsa/easyrsa3
./easyrsa init-pki

# When asked provide a Common Name for your CA (eg: Blacknet CA)
./easyrsa build-ca nopass

# Generate and sign a certificate for master server (here called maestro)
./easyrsa gen-req maestro nopass
./easyrsa sign server maestro

# Same for sensors
./easyrsa gen-req honeypot_00 nopass
./easyrsa sign client honeypot_00

PEM file format used by Blacknet starts with the private key and then concatenates with the certificate (example bellow).

cat pki/private/maestro.key pki/issued/maestro.crt > maestro.pem

History

The 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 with Cowrie should 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.

Credits

  • Romain Bezut (2010, 2017)

  • Vivien Bernet-Rollande (2010)

Thanks

  • We would like to thank the UTC (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.

Release files for blacknet 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blacknet 2.1.0
File Size Uploaded
blacknet-2.1.0.tar.gz 36.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for blacknet 2.1.0
File Interpreter ABI Platform
blacknet-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 72.3 kB

Release files / blacknet-2.1.0.tar.gz

Download URL blacknet-2.1.0.tar.gz
Size 36.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1ea76ca53c7279476e891ddb0f7876c8a5c39a972b0163f8c433b2a8f7fdbdd4
BLAKE2b-256 checksum
How to use checksums
20a8cf7d012efc45432b39586865eda610dccf936f231fd82a8c790657eb2047
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / blacknet-2.1.0-py3-none-any.whl

Download URL blacknet-2.1.0-py3-none-any.whl
Size 35.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9efe780fcf6d84836ec474c33b90c61e0c6f43ce33535e4991090a6abeb93db7
BLAKE2b-256 checksum
How to use checksums
b4eee5a093a8d1a245583c29ddb184d36000e1f13a07decba2bec682b18a0cf2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page