Chapter 9: Sniffers Flashcards
Sniffers (not a hacking tool)
used to capture & scan traffic moving across a NW (captures packets)
For effective Sniffing, switch interface to: Promiscuous mode
doesn’t discriminate between traffic, captures ALL traffic
Active vs Passive Sniffing
ACTIVE - traffic is monitored & possibly altered
PASSIVE - traffic is only monitored
HW protocol Analyzers
Besides sniffers, there are HW protocol analyzers which plug directly into the NW at the HW level & can monitor traffic w/ out manipulating traffic
Not easily accessible by ethical hackers & are extremely pricey
Lawful Inception (LI)
aka Wiretapping; legally sanctioned access to communications NW data such as telephone calls or e-mail msgs
How successful sniffing is depends on
the inherent insecurity of certain NW protcols;
TCP/IP, Telnet/rlogin Keystrokes, HTTP, SMTP (transfer of email), NNTP (nW news transfer Protocol - all communication including PWs & data sent in the clear), POP (post office protocol; retrieving mail from server), FTP, IMAP (internet msg access protocol - like SMTP)
In terms of LI, sniffing process is looked at as having 3 components
1) IAP (Intercept Access Point) - where info is fathered for the LI
2) Mediation device supplied by 3rd party that handles information processing
3) Collection function that stores &processes info intercepted by the 3rd party
Wireshark filter breakdown
Example ip.addr == 192.168.1.2
First is the protocol, next is the field, then operator, then the value
ne means NOT EQUAL
eq means EQUAL
Wireshark CLI (command-line interface) tools (don’t need to memorize)
1) tshark //cmd line version of Wireshark (like TCPdump)
2) dumpcap //capture traffic
3) capinfos //reads capture & returns stats
4) editcap //edits or translates the format of captured files
5) mergecap //combines multiple capture files into one
6) text2cap //creates a capture file from an ASCII hexdump of packets
TCPdump
//cmd based sniffer; native to linux, but its equivalent for windows is WINdump
tcpdump //allows you to start capturing packets from lowest NIC
tcpdump -w tel_capture.log //saves the capture into tel_capture.log
Switched Network Sniffing
A wired switch doesn’t allow you to sniff the whole NW; each switchport is a collosion domain, so traffic within the switch doesn’t travel between ports (traffic is separate to each switchport)
MAC Flooding
Most common method for enabling sniffing on a switch is to turn it into a device that does allow switching. We want to convert it to a hub-like environment
A switch keeps track of MAC addresses received by writing them to a content addressable memory (CAM) table;
If a switch is flooded with MAC addresses, it may overwhelm the switches ability to write its own CAM table; in turn it makes the switch fall into a giant hub
Tool: Macof
CAM table
Content Accessible Memory table with a fixed size that stores information such as MAC address of each client, port they are attached to, & any VLAN info;
A CAM table is used by the switch to help get traffic to its destination, but when it’s full…..in older switches, it would cause the switch to fail “open” & act as a hub, the flood would spill over affecting adjacent switches
Must maintain flood to keep switch acting as a hub; if flooding stop, the time outs that are set on the switch will start clearing out the CAM table entries, allowing switch to go to normal operations
(in newer switches, the success rate of mac flooding is much lower)
Overflowing a CAM table using Ubuntu
Standard repositories store the tools needed for a successful attack; obtained with APTITUDE
1) su to root
2) aptitude install dsniff //install DSNIFF (include Macof)
3) enter cmd: macof //will start flooding CAM table
4) Ctrl +Z to stop
ARP Poisoning
Address Resolution Protocol poisoning //attempts to contaminate NW w/ improper gateway mappings
What ARP does is it maps IP addresses to specific MAC addresses thereby allowing switches to know most efficient path for data being sent
CON: ARP doesn’t have prerequisites for its sending or receiving process; ARP broadcasts free to roam NW at will;
PRO: Attacker takes advantage of this open traffic concept by feeding incorrect ARP mappings to the gateway itself or to the hosts of the NW
Tools: Ettercap, Cain & Abel, Arpspoof