This article is from the Sniffer FAQ, by Christopher Klaus cklaus@iss.net with numerous contributions by others.
To detect a sniffing device that only collects data and does not respond to
any of the information, requires physically checking all your ethernet
connections by walking around and checking the ethernet connections
individually.
It is also impossible to remotely check by sending a packet or ping if a
machine is sniffing.
A sniffer running on a machine puts the interface into promiscuous mode,
which accepts all the packets. On some Unix boxes, it is possible to detect
a promiscuous interface. It is possible to run a sniffer in non-promiscuous
mode, but it will only capture sessions from the machine it is running on.
It is also possible for the intruder to do similiar capture of sessions by
trojaning many programs such as sh, telnet, rlogin, in.telnetd, and so on to
write a log file of what the user did. They can easily watch the tty and
kmem devices as well. These attacks will only compromise sessions coming
from that one machine, while promiscuous sniffing compromises all sessions
on the ethernet.
For SunOs, NetBSD, and other possible BSD derived Unix systems, there is a
command
"ifconfig -a"
that will tell you information about all the interfaces and if they are in
promiscuous mode. DEC OSF/1 and IRIX and possible other OSes require the
device to be specified. One way to find out what interface is on the system,
you can execute:
# netstat -r
Routing tables
Internet:
Destination Gateway Flags Refs Use Interface
default iss.net UG 1 24949 le0
localhost localhost UH 2 83 lo0
 
Continue to: