Lecture 2 Basic Network and Security
Lecture 2 Basic Network and Security
Review
2
Some are not even “network” related, but the network provides
access to Oscar
One successful attack can lead to another!
Needs a lot of care and sometimes paranoia
This Class
3
Example
4
IP Address
MAC Address Oscar
PPP
ARP
DHCP RIP
BOOTP OSPF
Core
DNS
DHCP
Telnet
FTP BGP
HTTP
RPC
P2P
POP/IMAP
SMTP
Root DNS Server
It is Complex!
5
Basic Concepts
6
socket
We know TCP as
A transport layer protocol that is carried by IP
A “packet” of TCP is called a segment and it is identified by
a source port and a destination port
IP is unreliable - TCP maintains the sequence of packets in
the right order and provides for acknowledgment and
retransmission of lost packets
TCP provides flow control
It throttles the flow of packets if the receiver cannot handle the rate at
which packets are sent
If a packet is dropped because of congestion, TCP will reduce the
sending rate by changing the congestion window size
It limits the number of segments sent, but yet to be acknowledged
12
TCP Connection Management
Client wants to initiate connection
to server
It sends a special TCP segment to
the server with the SYN bit set to 1
The initial sequence number is say
client_isn
This is called a SYN segment
Server receives the SYN segment
It allocates buffers and variables to
the connection and replies
Reply has SYN = 1, acknowledgment
number = client_isn +1
Sequence number is server_isn
This is called a SYNACK segment
Connection is completed
13
18
Legitimate ICMP Activity
19
DNS
20
DNS Details
22
Resource Records
24
Zone Transfers
26
Zone
Name spaces are divided into zones based on
separating “periods” in the name
Example: kmutnb.ac.th is a zone
Each zone maintains primary and secondary
name servers
Secondary servers periodically poll primary
servers to obtain zone data
If data has changed, a zone transfer is initiated
that downloads the entire database
Recursive Queries
Local server does not know the
IP address of host
It contacts the root server
The root server also does not
know the IP address
It contacts an authoritative
name server that returns the
address
Root server returns the address
to local server
Local server forwards the IP
address to requesting host
Intermediate servers may also
be used
27
Iterative Queries
If any server does not know the
IP address, it may send the
address of the next server in the
list to the requesting host
The requesting host makes
direct request to the new name
server
Typically most requests are
recursive, except when made to
a root server
Query chains are a mix of
iterative and recursive queries
28
Inverse Lookup
29
DNS Software
30
ATLAS
Advanced Translation Look-up And Signaling
Phases
Reconnaissance
Exploitation
Reinforcement
Consolidation
Pillage
Classes of Attacks
/การ จ าน
มต!รรวมด นด
ร
!
32
อาการปล
↑ค
ลด
รอยเต
password
&ขโมย Later
Reconnaissance
Makes extensive use of “Information Leakage”
Passive and active leakage is possible
Passive reconnaissance is hard to detect
Example: Google search
Pillage
Good example is Denial of Service Attacks
Stealing Passwords
36
Password in cleartext
Password and login are sent in cleartext by some
protocols
Several cracker tools exist to sniff packets and get
passwords
Dictionary attacks
Access to the hashed password file (information leak)
Users typically choose a small subset of passwords – not
one random password of 280 choices
Faster to break using current technology
Other attacks
Crafted Javascripts can fool users into revealing
passwords
Other social engineering attacks
Passwords in Cleartext
39
Dictionary Attacks
40
SPOOFING ATTACKS
Authentication Failure
42
Definition of sorts
Mechanisms to verify that the source of a request or
command is legitimate fail to stop Oscar
Common examples
SMTP
You trust that the e-mail originated from the person whose e-
mail address shows up in the From field
You cannot really trust this…
The “r” commands
Commands like rlogin, rsh, etc. depend on the source address
of the requesting host + assertion of username as verification of
legitimacy
Cryptographic authentication protocols are a
must, but typically not used
IP Spoofing
43
IP addresses
In IPv4, the address source address and destination address are
both 32 bits long
The 32 bits are divided into two parts
Network portion and Host portion
Today people use classless inter-domain routing (CIDR)
Example: 136.142.116.28/24 means the first 24 bits are the network
field
IP address as authenticators
A lot of services and tools use the IP source address for
authentication
If the IP source address is valid, trust the packet and the request!
You cannot rely on the validity of the source IP
address except under very controlled
circumstances
ARP Spoofing
44
Cookies etc.
48
HTTP is stateless
Each HTTP request and response are treated in isolation
Hard for web servers to determine their state with the client they
are serving
Cookies
Maintain state information for servers
Sometimes hidden input fields or special fields in URLs are used
to maintain state
Some web servers rely on cookies for authentication
Cookies can be easily spoofed
Users can change cookies
Server can encrypt cookies but it is subject to other kinds of
attacks (like?)
Canned shopping carts…
Other authentication failures
49
Social Engineering
52