HOME

TheInfoList



OR:

DenyHosts is a
log Log most often refers to: * Trunk (botany), the stem and main wooden axis of a tree, called logs when cut ** Logging, cutting down trees for logs ** Firewood, logs used for fuel ** Lumber or timber, converted from wood logs * Logarithm, in mathe ...
-based intrusion-prevention security tool for
SSH The Secure Shell Protocol (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network. Its most notable applications are remote login and command-line execution. SSH applications are based on ...
servers written in
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
. It is intended to prevent
brute-force attack In cryptography, a brute-force attack consists of an attacker submitting many passwords or passphrases with the hope of eventually guessing correctly. The attacker systematically checks all possible passwords and passphrases until the correc ...
s on SSH servers by monitoring invalid login attempts in the authentication log and blocking the originating
IP address An Internet Protocol address (IP address) is a numerical label such as that is connected to a computer network that uses the Internet Protocol for communication.. Updated by . An IP address serves two main functions: network interface ident ...
es. DenyHosts is developed by Phil Schwartz, who is also the developer of Kodos Python Regular Expression Debugger.


Operation

DenyHosts checks the end of the authentication log for recent failed login attempts. It records information about their originating IP addresses and compares the number of invalid attempts to a user-specified threshold. If there have been too many invalid attempts it assumes a
dictionary attack In cryptanalysis and computer security, a dictionary attack is an attack using a restricted subset of a keyspace to defeat a cipher or authentication mechanism by trying to determine its decryption key or passphrase, sometimes trying thousands o ...
is occurring and prevents the IP address from making any further attempts by adding it to /etc/hosts.deny on the server. DenyHosts 2.0 and above support centralized synchronization, so that repeat offenders are blocked from many computers. The sit
denyhosts.net
gathers statistics from computers running the software. DenyHosts is restricted to connections using IPv4. It does not work with
IPv6 Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. IPv ...
. DenyHosts may be run manually, as a
daemon Daimon or Daemon (Ancient Greek: , "god", "godlike", "power", "fate") originally referred to a lesser deity or guiding spirit such as the daimons of ancient Greek religion and Greek mythology, mythology and of later Hellenistic religion and Hell ...
, or as a cron job.


Discoveries

In July 2007,
The Register ''The Register'' is a British technology news website co-founded in 1994 by Mike Magee, John Lettice and Ross Alderson. The online newspaper's masthead sublogo is "''Biting the hand that feeds IT''." Their primary focus is information te ...
reported that from May until July that year, "compromised computers" at Oracle UK were listed among the ten worst offenders for launching brute force SSH attacks on the Internet, according to public DenyHosts listings. After an investigation, Oracle denied suggestions that any of its computers had been compromised.


Vulnerabilities

Daniel B. Cid wrote a paper showing that DenyHosts, as well the similar programs
Fail2ban Fail2ban is an intrusion prevention software framework. Written in the Python programming language, it is designed to prevent against brute-force attacks. It is able to run on POSIX systems that have an interface to a packet-control system or f ...
and BlockHosts, were vulnerable to remote log injection, an attack technique similar to
SQL injection In computing, SQL injection is a code injection technique used to attack data-driven applications, in which malicious SQL statements are inserted into an entry field for execution (e.g. to dump the database contents to the attacker). SQL in ...
, in which a specially crafted user name is used to trigger a block against a site chosen by the attacker. This was fixed in version 2.6.


Forks and descendants

Since there had been no further development by the original author Phil Schwartz after the release of version 2.6 (December 2006) and claimed version 2.7 (November 2008) for which no actual downloadable package is available, development was first continued in February 2012 by Matt Ruffalo in a
GitHub GitHub, Inc. () is an Internet hosting service for software development and version control using Git. It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, continu ...
repository. An independent and separate
fork In cutlery or kitchenware, a fork (from la, furca 'pitchfork') is a utensil, now usually made of metal, whose long handle terminates in a head that branches into several narrow and often slightly curved tine (structural), tines with which one ...
was started at the almost-identically named DenyHost SourceForge project site with the release of a different version 2.7 in May 2014. After version 2.9, the new SourceForge project has merged with the earlier GitHub repository, and newer versions are available via both means. The software that runs the centralized synchronization server which DenyHosts versions 2.0 and above can use, has never been released. Independent synchronization server software has been developed by Jan-Pascal van Best since June 2015.DenyHosts_Sync GitHub repositor
initial commitcurrent status
/ref>


See also

*
Fail2ban Fail2ban is an intrusion prevention software framework. Written in the Python programming language, it is designed to prevent against brute-force attacks. It is able to run on POSIX systems that have an interface to a packet-control system or f ...
, a similar program that prevents brute force attacks against SSH and other services * OSSEC *
TCP Wrapper __NOTOC__ TCP Wrappers (also known as tcp_wrappers) is a host-based networking ACL system, used to filter network access to Internet Protocol servers on (Unix-like) operating systems such as Linux or BSD. It allows host or subnetwork IP address ...


References

General references *Carla Schroder, ''Linux Networking Cookbook'', O'Reilly, 2007
pp. 223–226
*Ken Leyba
''Protect your server with Deny Hosts''
2008-01-28,
Free Software Magazine ''Free Software Magazine'' (also known as ''FSM'' and originally titled ''The Open Voice'') is a Web site that produces a (generally bi-monthly) mostly free-content online magazine about free software. It was started in November 2004 by Australi ...
issue 21 *Daniel Bachfeld, 24 July 2009,
Protecting SSH from brute force attacks. DenyHosts
',
H-online Heise (officially ''Heise Gruppe'', formerly ''Verlag Heinz Heise'') is a German media conglomerate headquartered in Hanover, Lower Saxony. It was founded in 1949 by and is still family-owned. Its core business is directory media as well as gen ...


External links

*{{Official website, www.denyhosts.net
Blue Box page on installing DenyHost
Free security software Free network-related software Free software programmed in Python Brute force blocking software Linux security software