


































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



































































Traffic Analysis
Traffic Analysis
Packet Dissection with TCPDUMP
Example in Chapter 7 (sidestep program)
Need right formats: IP, TCP, ICMP, etc. Use tcpdump –x to obtain Hex (or Ethereal) Ethernet header usually appears as first 14bytes in Ethereal Output. Ethernet header must be requested fromtcpdump with –e flag.
Traffic Analysis
Idea: Insert an extra packet (NIDS receives buttarget does not) to confuse pattern-matchingalgorithms on the IDS.^
Do it in such a way that the target host won’t see theextra packet(s). ^
Good example in text: Suppose hacker hasestablished a backdoor account (REWT) on targetmachine. IDS system knows to look for attemptedlog-in to REWT on port 23 (telnet). ^
But hacker sends “R” in correctly formattedpacket followed by “O” with invalid TCP checksum.This accepted by IDS and not by target host.Hacker then follows with “EWT” which IDS doesnot detect because “ROEWT” is ok. But host seesa connectiont to “REWT.”
Traffic Analysis
Traffic Analysis
Firewall may block this.
Traffic Analysis
We’ve covered the function. ^
You may see particular TCP/IP stacks sending“discovery” frames with DF flag set (to newdestination) to try to determine MTU along path. ^
Some stacks set DF on particular packets andnmap uses this as a technique for identifyingoperating systems. ^
If packet arrives at a NIDS from a network with alarger MTU, then DF flag may prevent NIDS fromforwarding to target host. This technique can beused for an insertion attack.
Traffic Analysis
IP Address Considerations ^
An internal address entering your network from anexternal interface is probably spoofed. (Firewallshould block.) ^
Should not see packets with private addressesarriving from outside the network: ^
The Internet Assigned Numbers Authority (IANA) hasreserved the following three blocks of the IP addressspace for private internets: 10.0.0.0 - 10.255.255.255(10/8 prefix) 172.16.0.0 - 172.31.255.255 (172.16/12prefix) 192.168.0.0 - 192.168.255.255 (192.168/16prefix) We will refer to the first block as "24-bit block",the second as "20-bit block", and to the third as "16-bit" block. Note that (in pre-CIDR notation) the firstblock is nothing but a single class A network number,while the second block is a set of 16 contiguous classB network numbers, and third block is a set of 256contiguous class C network numbers.
Traffic Analysis
Usually incremented by 1 but may be 254 Should wrap at 65,
Traffic Analysis
Embedded Protocol Headers - TCP
Two 16-bit fields ranging 1-65,
If see many SYNs with constant source port,this is also likely to be a scan (nmap).
Traffic Analysis
Note pseudo-header in Figure 9.1.^ • Source and destination IP @^ • 1 byte zero pad^ • 1 byte protocol field^ • 2 bytes TCP length (TCP header plus data) Uses same 1-s complement arithmetic as IPheader on 16-bit fields and includes pseudoheader.^ • May catch an IP destination address corruption that
occurs within a router.
Traffic Analysis
Ack flag set and zero number may imply annmap scan.
Gets past router filtering because it looks liketraffic from ongoing TCP connection.
Traffic Analysis
^
Vern Paxson labels as crud the “innocuousimplementation errors” that create trafficpattern pathologies similar to genuine attacks.
Traffic Analysis
^
two “phases”^
slow start (exponentialincrease) congestion avoidance(linear increase)
-^ On timeout, thresholdset to half congwin andcongwin set to 1 MSS.
^
important variables:^ ^
Congwin ^
threshold:
defines
threshold between twoslow start phases.
^
“probing” for usablebandwidth:^
ideally: transmit as fastas possible (
Congwin
as
large as possible)without loss
increase
Congwin
until
loss (congestion) ^
loss:
decrease
Congwin
,
then begin probing(increasing) again
Traffic Analysis
exponential increase (perRTT) in window size (not soslow!) ^ initialize: Congwin = 1for (each segment ACKed)loss event: timeout (TahoeTCP) and/or or threeduplicate ACKs (Reno TCP)
Congwin++ until (loss event OR
CongWin > threshold) Slowstart algorithm
Host A
one segment
RTT
Host B
time
two segmentsfour segments