All Projects → clearlinux → tallow

clearlinux / tallow

Licence: GPL-3.0 license
Block hosts that attempt to bruteforce SSH using the journald API.

Programming Languages

c
50402 projects - #5 most used programming language
M4
1887 projects
Makefile
30231 projects
shell
77523 projects

Projects that are alternatives of or similar to tallow

Ssh Mitm
ssh mitm server for security audits supporting public key authentication, session hijacking and file manipulation
Stars: ✭ 335 (+324.05%)
Mutual labels:  ssh-server, ssh-client
python-executor
Programmer friendly subprocess wrapper
Stars: ✭ 88 (+11.39%)
Mutual labels:  ssh-server, ssh-client
ansible-ssh-keys
Ansible role to manage ssh keys in Debian-like systems
Stars: ✭ 26 (-67.09%)
Mutual labels:  ssh-server, ssh-client
Wolfssh
wolfSSH is a small, fast, portable SSH implementation, including support for SCP and SFTP.
Stars: ✭ 142 (+79.75%)
Mutual labels:  ssh-server, ssh-client
Bastillion
Bastillion is a web-based SSH console that centrally manages administrative access to systems. Web-based administration is combined with management and distribution of user's public SSH keys.
Stars: ✭ 2,730 (+3355.7%)
Mutual labels:  ssh-server, ssh-client
Ssb
Secure Shell Bruteforcer — A faster & simpler way to bruteforce SSH server
Stars: ✭ 832 (+953.16%)
Mutual labels:  ssh-server, ssh-client
Bastillion Ec2
A web-based SSH console to execute commands and manage multiple EC2 instances simultaneously running on Amazon Web Services (AWS).
Stars: ✭ 410 (+418.99%)
Mutual labels:  ssh-server, ssh-client
Libssh Esp32
Libssh SSH client & server port to ESP32 Arduino library
Stars: ✭ 52 (-34.18%)
Mutual labels:  ssh-server, ssh-client
Addon Ssh
SSH & Web Terminal - Home Assistant Community Add-ons
Stars: ✭ 114 (+44.3%)
Mutual labels:  ssh-server
Secure Wireguard Implementation
A guide on implementing a secure Wireguard server on OVH (or any other Debian VPS) with DNSCrypt, Port Knocking & an SSH-Honeypot
Stars: ✭ 200 (+153.16%)
Mutual labels:  ssh-server
Faassh
simple go SSH server with reverse tunneling designed for running in cloud functions like AWS lambda
Stars: ✭ 69 (-12.66%)
Mutual labels:  ssh-server
Sshserver
This is a tutorial on how to build a basic SSH Server in C#, but you are welcome to try following in any language.
Stars: ✭ 114 (+44.3%)
Mutual labels:  ssh-server
Pyrexecd
Standalone SSH server for Windows
Stars: ✭ 207 (+162.03%)
Mutual labels:  ssh-server
Mockssh
Mock an SSH server and define all commands it supports (Python, Twisted)
Stars: ✭ 107 (+35.44%)
Mutual labels:  ssh-server
termscp
🖥 A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/S3
Stars: ✭ 707 (+794.94%)
Mutual labels:  ssh-client
Ssh
Easy SSH servers in Golang
Stars: ✭ 2,254 (+2753.16%)
Mutual labels:  ssh-server
Ssh Proxy
SSH proxy that allows support agents go to customers servers with using intermediate corporate SSH key
Stars: ✭ 53 (-32.91%)
Mutual labels:  ssh-server
cloudflare-block-bad-bot-ruleset
🚦 Block malicious crawlers with Cloudflare Firewall Rules
Stars: ✭ 178 (+125.32%)
Mutual labels:  firewall-rules
Jumpserver
JumpServer 是全球首款开源的堡垒机,是符合 4A 的专业运维安全审计系统。
Stars: ✭ 17,563 (+22131.65%)
Mutual labels:  ssh-server
Ssh2docker
🐳 standalone SSH server that connects you to your Docker containers
Stars: ✭ 159 (+101.27%)
Mutual labels:  ssh-server

tallow

Tallow is a fail2ban/lard replacement that uses systemd's native journal API to scan for attempted ssh logins, and issues temporary IP bans for clients that violate certain login patterns.

Author: Auke Kok [email protected]

How it works

Tallow attaches to the journal and subscribes to messages from /usr/sbin/sshd. The messages are matched against rules and the IP address is extracted from the message. For each IP address that is extracted, the last timestamp and count is kept. Once the count exceeds a threshold, the offending IP address is added to an ipset and blocked with a corresponding firewall rule. It will use firewalld or iptables / ip6tables.

The timestamp is kept for pruning. Records are pruned from the list if the IP address hasn't been seen by tallow for longer than the threshold. If the IP was blocked and the threshold was exceeded, the IP is unblocked. If the threshold was never reached, the record is removed as well.

Pruning is done automatically after incoming messages are processed, so there is a chance that if no messages arrive, that IP addresses remain blocked for longer than the default blocking period.

Motivation

This program was originally written to demonstrate the journal API. One of the typical use cases for journal (or syslog) readers was to act dynamically on certain syslog messages, and many types of actions can be imagined. This is trivial to implement on systems that use the journal API, and often doesn't take much code at all.

The journal is attached to and forwarder to the end. We place a simple message filter, and then process each incoming message. For more information check out the sd-journal manual pages, which contain example code that demonstrates almost the exact same code flow.

Security

DISCLAIMER: THIS IS NOT A SECURITY APPLICATION !!!

Tallow is meant to reduce log clutter and system resource usage at the cost of denying access to potentially valid users.

Even if you reduce the threshold at which clients are blocked to 1, an attacker may still gain access to your server if the attacker uses the correct credentials.

By itself, tallow is an application that creates a Denial of Service. It's sole purpose and function is to block IP addresses. Therefore, with tallow running on a service, you could potentially deny valid users access to your systems if you deploy tallow.

Be very careful if you deploy tallow on systems that expect valid users to log on from many random source addresses. If your user mistypes their username, they could find themselves denied access.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].