the_open_door
coffee
ESEN
← Back to index

finger User Enumeration (TCP 79)

ATT&CKT1087

finger dates from 1977 and its purpose is exactly the one that helps us: ask a system about a user and have it answer who they are, when they last logged in and from where. It asks for no authentication. Where it still shows up it is almost always Solaris, AIX or some old distribution that left it running out of inertia.

The protocol is so simple that no client is needed: send the name and a newline, and the server answers.


echo "<user>" | nc -vn <ip> 79

The difference between a user who exists and one who does not is the content of the reply, not its presence: for a name that does not exist the server returns an empty line or a no such user, while for a real one it returns the record with the home directory and the shell. That asymmetry is the oracle.

Two special queries are worth more than any wordlist when they work:

With a wordlist, pentestmonkey's classic tool automates the same query:


wget https://raw.githubusercontent.com/pentestmonkey/finger-user-enum/master/finger-user-enum.pl

./finger-user-enum.pl -U <users.txt> -t <ip>

What comes out is not access, it is the missing half of a credential. A confirmed username turns a password attack from impossible into viable, because there is no longer a need to guess two things at once.

Requirements. The fingerd service listening on 79. Nothing else: there is no credential, no session and no attempt limit in the vast majority of implementations. An account that shows up in finger exists, but that does not say it has a shell or that it is enabled.

How to detect it. A burst of connections to port 79 from a single address is the whole signature: the service has effectively zero legitimate volume, so anything beyond a handful of queries is enumeration. On the host, the fingerd log (or xinetd, which usually launches it) with dozens of queries back to back. And what comes next gives away the purpose: SSH authentication attempts against exactly the names just confirmed.

Defence. Turn fingerd off. It has no use on a modern network and what it publishes is precisely what an attacker needs. If for some reason it must stay, at least firewall it to the management network.

It chains into password brute forcing, which is what the list is for, and it is a relative of SMTP user enumeration: the same oracle on another protocol that also asks for no credentials.

Machines where it's used