Network Attacks, Cont CS 161: Computer Security Prof. Vern Paxson - - PowerPoint PPT Presentation

network attacks con t
SMART_READER_LITE
LIVE PREVIEW

Network Attacks, Cont CS 161: Computer Security Prof. Vern Paxson - - PowerPoint PPT Presentation

Network Attacks, Cont CS 161: Computer Security Prof. Vern Paxson TAs: Paul Bramsen, Apoorva Dornadula, David Fifield, Mia Gil Epner, David Hahn, Warren He, Grant Ho, Frank Li, Nathan Malkin, Mitar Milutinovic, Rishabh Poddar, Rebecca


slide-1
SLIDE 1

Network Attacks, Con’t

CS 161: Computer Security

  • Prof. Vern Paxson

TAs: Paul Bramsen, Apoorva Dornadula, David Fifield, Mia Gil Epner, David Hahn, Warren He, Grant Ho, Frank Li, Nathan Malkin, Mitar Milutinovic, Rishabh Poddar, Rebecca Portnoff, Nate Wang

http://inst.eecs.berkeley.edu/~cs161/

March 14, 2017

slide-2
SLIDE 2

The Transport Layer: TCP

slide-3
SLIDE 3

“Best Effort” is Lame! What to do?

  • It’s the job of our Transport (layer 4) protocols to

build data delivery services that our apps need out

  • f IP’s modest layer-3 service
slide-4
SLIDE 4

Layer 4: Transport Layer

Application Transport (Inter)Network Link Physical 7 4 3 2 1

End-to-end communication between processes Different services provided: TCP = reliable byte stream UDP = unreliable datagrams

(Datagram = single packet message)

slide-5
SLIDE 5

“Best Effort” is Lame! What to do?

  • It’s the job of our Transport (layer 4) protocols to

build data delivery services that our apps need out

  • f IP’s modest layer-3 service
  • #1 workhorse: TCP (Transmission Control Protocol)
  • Service provided by TCP:

– Connection oriented (explicit set-up / tear-down)

  • End hosts (processes) can have multiple concurrent long-lived

communication

– Reliable, in-order, byte-stream delivery

  • Robust detection & retransmission of lost data
slide-6
SLIDE 6

TCP “Bytestream” Service

Byte 0 Byte 1 Byte 2 Byte 3 Byte 0 Byte 1 Byte 2 Byte 3

Process A on host H1 Process B

  • n host H2

Byte 80 Byte 80

Processes don’t ever see packet boundaries, lost or corrupted packets, retransmissions, etc.

slide-7
SLIDE 7

Bidirectional communication:

Byte 0 Byte 1 Byte 2 Byte 3 Byte 0 Byte 1 Byte 2 Byte 3

Process B on host H2 Process A

  • n host H1

Byte 73 Byte 73

There are two separate bytestreams, one in each direction

slide-8
SLIDE 8

TCP Header

Source port Destination port Sequence number Acknowledgment Advertised window HdrLen Flags Checksum Urgent pointer Options (variable)

Data …

(IP Header) (Link Layer Header)

slide-9
SLIDE 9

TCP Header

Ports are associated with OS processes

Source port Destination port Sequence number Acknowledgment Advertised window HdrLen Flags Checksum Urgent pointer Options (variable)

Data …

(IP Header) (Link Layer Header)

slide-10
SLIDE 10

TCP Header

Ports are associated with OS processes

IP source & destination addresses plus TCP source and destination ports uniquely identifies a (bidirectional) TCP connection

Source port Destination port Sequence number Acknowledgment Advertised window HdrLen Flags Checksum Urgent pointer Options (variable)

Data …

(IP Header) (Link Layer Header)

slide-11
SLIDE 11

gateway resolver router 172.217.6.78

Ti Tie Res ti tie In e Intf tf

  • 4. Connect to google.com server

216.97.19.132

Suppose our browser used port 23144 for our connection, and Google’s server used 443. Then our connection will be fully specified by the single tuple <216.97.19.132, 23144, 172.217.6.78, 443>

slide-12
SLIDE 12

TCP Header

Ports are associated with OS processes

IP source & destination addresses plus TCP source and destination ports uniquely identifies a (bidirectional) TCP connection

Source port Destination port Sequence number Acknowledgment Advertised window HdrLen Flags Checksum Urgent pointer Options (variable)

Data …

Some port numbers are “well known” e.g. port 443 = HTTPS

slide-13
SLIDE 13

TCP Header

Starting sequence number (byte

  • ffset) of data

carried in this “segment” Source port Destination port Sequence number Acknowledgment Advertised window HdrLen Flags Checksum Urgent pointer Options (variable)

Data …

slide-14
SLIDE 14

TCP Header

Starting sequence number (byte

  • ffset) of data

carried in this “segment” Source port Destination port Sequence number Acknowledgment Advertised window HdrLen Flags Checksum Urgent pointer Options (variable)

Data …

Byte streams numbered independently in each direction

slide-15
SLIDE 15

TCP Header

Starting sequence number (byte

  • ffset) of data

carried in this “segment” Source port Destination port Sequence number Acknowledgment Advertised window HdrLen Flags Checksum Urgent pointer Options (variable)

Data …

Byte streams numbered independently in each direction Sequence number assigned to start

  • f byte stream is picked when

connection begins; doesn’t start at 0

slide-16
SLIDE 16

TCP Header

Acknowledgment gives seq # just beyond highest seq. received in order. If sender successfully sends N bytestream bytes starting at seq S then “ack” for that will be S+N. Source port Destination port Sequence number Acknowledgment Advertised window HdrLen Flags Checksum Urgent pointer Options (variable)

Data …

slide-17
SLIDE 17

Sequence Numbers

Host A Host B

TCP Data TCP Data

TCP HDR TCP HDR

ISN (initial sequence number) Sequence number from A = 1st byte of data ACK sequence number from B = next expected byte

slide-18
SLIDE 18

TCP Header

Uses include: acknowledging data (“ACK”) setting up (“SYN”) and closing connections (“FIN” and “RST”) Source port Destination port Sequence number Acknowledgment Advertised window HdrLen Flags Checksum Urgent pointer Options (variable)

Data …

slide-19
SLIDE 19

Establishing a TCP Connection

  • Three-way handshake to establish connection

A B

slide-20
SLIDE 20

Establishing a TCP Connection

  • Three-way handshake to establish connection

A B Each host tells its Initial Sequence Number (ISN) to the other host.

(Spec says to pick based

  • n a clock)
slide-21
SLIDE 21

Establishing a TCP Connection

  • Three-way handshake to establish connection

– Host A sends a SYN (open; “synchronize sequence numbers”) to host B

SYN

A B Each host tells its Initial Sequence Number (ISN) to the other host.

(Spec says to pick based

  • n a clock)
slide-22
SLIDE 22

Establishing a TCP Connection

  • Three-way handshake to establish connection

– Host A sends a SYN (open; “synchronize sequence numbers”) to host B – Host B returns a SYN acknowledgment (SYN+ACK)

SYN

SYN+ACK

A B Each host tells its Initial Sequence Number (ISN) to the other host.

(Spec says to pick based

  • n a clock)
slide-23
SLIDE 23

Establishing a TCP Connection

  • Three-way handshake to establish connection

– Host A sends a SYN (open; “synchronize sequence numbers”) to host B – Host B returns a SYN acknowledgment (SYN+ACK) – Host A sends an ACK to acknowledge the SYN+ACK

SYN

SYN+ACK

ACK

A B Each host tells its Initial Sequence Number (ISN) to the other host.

(Spec says to pick based

  • n a clock)
slide-24
SLIDE 24

Establishing a TCP Connection

  • Three-way handshake to establish connection

– Host A sends a SYN (open; “synchronize sequence numbers”) to host B – Host B returns a SYN acknowledgment (SYN+ACK) – Host A sends an ACK to acknowledge the SYN+ACK

SYN

SYN+ACK

ACK

A B

D a t a D a t a

Each host tells its Initial Sequence Number (ISN) to the other host.

(Spec says to pick based

  • n a clock)
slide-25
SLIDE 25

Timing Diagram: 3-Way Handshaking

Client (initiator) Server SYN, SeqNum = x S Y N + A C K , S e q N u m = y , A c k = x + 1 ACK, SeqNum = x + 1, Ack = y + 1 Active Open Passive Open connect() listen() accept() Different starting initial sequence numbers (ISNs) in each direction

slide-26
SLIDE 26

TCP Conn. Setup & Data Exchange

Client (initiator) IP address 1.2.1.2, port 3344 Server IP address 9.8.7.6, port 80

S r c A = 1 . 2 . 1 . 2 , S r c P = 3 3 4 4 , D s t A = 9 . 8 . 7 . 6 , D s t P = 8 , S Y N , S e q = x SrcA=9.8.7.6, SrcP=80, DstA=1.2.1.2, DstP=3344, SYN+ACK, Seq = y, Ack = x+1 S r c A = 1 . 2 . 1 . 2 , S r c P = 3 3 4 4 , D s t A = 9 . 8 . 7 . 6 , D s t P = 8 , A C K , A c k = y + 1 S r c A = 1 . 2 . 1 . 2 , S r c P = 3 3 4 4 , D s t A = 9 . 8 . 7 . 6 , D s t P = 8 , A C K , S e q = x + 1 , A c k = y + 1 , D a t a = “ “ G E T / l

  • g

i n . h t m l SrcA=9.8.7.6, SrcP=80, DstA=1.2.1.2, DstP=3344, ACK, Seq = y+1, Ack = x+16, Data=“200 OK … <html> …”

slide-27
SLIDE 27

27

  • Normally, TCP finishes (“closes”) a connection

by each side sending a FIN control message

– Reliably delivered, since other side must ack

  • But: if a TCP endpoint finds unable to continue

(process dies; info from other “peer” is inconsistent), it abruptly terminates by sending a RST control message

– Unilateral – Takes effect immediately (no ack needed) – Only accepted by peer if has correct* sequence number

TCP Threat: Disruption

slide-28
SLIDE 28

Source port Destination port Sequence number Acknowledgment Advertised window HdrLen Flags Checksum Urgent pointer Options (variable)

Data …

slide-29
SLIDE 29

Source port Destination port Sequence number Acknowledgment Advertised window HdrLen

RST

Checksum Urgent pointer Options (variable)

slide-30
SLIDE 30

Abrupt Termination

  • A sends a TCP packet with RESET (RST) flag to B

– E.g., because app. process on A crashed – (Could instead be that B sends a RST to A)

  • Assuming that the sequence numbers in the RST fit with what B

expects, That’s It: – B’s user-level process receives: ECONNRESET

– No further communication on connection is possible

SYN SYN ACK ACK D a t a R S T A C K

time

A B

X

slide-31
SLIDE 31
  • Normally, TCP finishes (“closes”) a connection

by each side sending a FIN control message

– Reliably delivered, since other side must ack

  • But: if a TCP endpoint finds unable to continue

(process dies; info from other “peer” is inconsistent), it abruptly terminates by sending a RST control message

– Unilateral – Takes effect immediately (no ack needed) – Only accepted by peer if has correct* sequence number

  • So: if attacker knows ports & sequence numbers,

can disrupt any TCP connection

TCP Threat: Disruption

slide-32
SLIDE 32

TCP RST Injection

Client (initiator) IP address 1.2.1.2, port 3344 Server IP address 9.8.7.6, port 80

S r c A = 1 . 2 . 1 . 2 , S r c P = 3 3 4 4 , D s t A = 9 . 8 . 7 . 6 , D s t P = 8 , A C K , S e q = x + 1 , A c k = y + 1 , D a t a = “ “ G E T / l

  • g

i n . h t m l

...

Attacker IP address 6.6.6.6, port N/A

SrcA=9.8.7.6, SrcP=80, DstA=1.2.1.2, DstP=3344, RST, Seq = y+1, Ack = x+16

Client dutifully removes connection

Spoofed

slide-33
SLIDE 33

TCP RST Injection

Client (initiator) IP address 1.2.1.2, port 3344 Server IP address 9.8.7.6, port 80

S r c A = 1 . 2 . 1 . 2 , S r c P = 3 3 4 4 , D s t A = 9 . 8 . 7 . 6 , D s t P = 8 , A C K , S e q = x + 1 , A c k = y + 1 , D a t a = “ “ G E T / l

  • g

i n . h t m l

...

SrcA=9.8.7.6, SrcP=80, DstA=1.2.1.2, DstP=3344, ACK, Seq = y+1, Ack = x+16, Data=“200 OK … <html> …”

Attacker IP address 6.6.6.6, port N/A

SrcA=9.8.7.6, SrcP=80, DstA=1.2.1.2, DstP=3344, RST, Seq = y+1, Ack = x+16

X

Client rejects since no active connection

Spoofed

slide-34
SLIDE 34

TCP Threat: Data Injection

  • What about inserting data rather than disrupting a connection?

– Again, all that’s required is attacker knows correct ports, seq. numbers – Receiver B is none the wiser!

  • Termed TCP connection hijacking (or “session hijacking”)

– A general means to take over an already-established connection!

  • We are toast if an attacker can see our TCP traffic!

– Because then they immediately know the port & sequence numbers

SYN SYN ACK ACK D a t a A C K

time

A B

N a s t y D a t a N a s t y D a t a 2

slide-35
SLIDE 35

TCP Data Injection

Client (initiator) IP address 1.2.1.2, port 3344 Server IP address 9.8.7.6, port 80

S r c A = 1 . 2 . 1 . 2 , S r c P = 3 3 4 4 , D s t A = 9 . 8 . 7 . 6 , D s t P = 8 , A C K , S e q = x + 1 , A c k = y + 1 , D a t a = “ “ G E T / l

  • g

i n . h t m l

...

Attacker IP address 6.6.6.6, port N/A

SrcA=9.8.7.6, SrcP=80, DstA=1.2.1.2, DstP=3344, ACK, Seq = y+1, Ack = x+16 Data=“200 OK … <poison> …”

Client dutifully processes as server’s response

Spoofed

slide-36
SLIDE 36

TCP Data Injection

Client (initiator) IP address 1.2.1.2, port 3344 Server IP address 9.8.7.6, port 80

S r c A = 1 . 2 . 1 . 2 , S r c P = 3 3 4 4 , D s t A = 9 . 8 . 7 . 6 , D s t P = 8 , A C K , S e q = x + 1 , A c k = y + 1 , D a t a = “ “ G E T / l

  • g

i n . h t m l

...

Attacker IP address 6.6.6.6, port N/A

SrcA=9.8.7.6, SrcP=80, DstA=1.2.1.2, DstP=3344, ACK, Seq = y+1, Ack = x+16 Data=“200 OK … <poison> …”

Client ignores since already processed that part of bytestream

SrcA=9.8.7.6, SrcP=80, DstA=1.2.1.2, DstP=3344, ACK, Seq = y+1, Ack = x+16, Data=“200 OK … <html> …”

Spoofed

slide-37
SLIDE 37

TCP Threat: Blind Spoofing

  • Is it possible for an attacker to inject into a TCP

connection even if they can’t see our traffic?

  • YES: if somehow they can infer or guess the port

and sequence numbers

  • Let’s look at a simpler related attack where the

goal of the attacker is to create a fake connection, rather than inject into a real one

– Why? – Perhaps to leverage a server’s trust of a given client as identified by its IP address – Perhaps to frame a given client so the attacker’s actions during the connections can’t be traced back to the attacker

slide-38
SLIDE 38

Spoofing an Entire TCP Connection

Alleged Client (not actual) IP address 1.2.1.2, port N/A Server IP address 9.8.7.6, port 80 Blind Attacker

SrcA=1.2.1.2, SrcP=5566, DstA=9.8.7.6, DstP=80, SYN, Seq = z SrcA=9.8.7.6, SrcP=80, DstA=1.2.1.2, DstP=5566, SYN+ACK, Seq = y, Ack = z+1

Attacker’s goal:

SrcA=1.2.1.2, SrcP=5566, DstA=9.8.7.6, DstP=80, ACK, Seq = z+1, ACK = y+1 SrcA=1.2.1.2, SrcP=5566, DstA=9.8.7.6, DstP=80, ACK, Seq = z+1, ACK = y+1, Data = “GET /transfer-money.html”

slide-39
SLIDE 39

Spoofing an Entire TCP Connection

Alleged Client (not actual) IP address 1.2.1.2, port NA Server IP address 9.8.7.6, port 80 Blind Attacker

SrcA=1.2.1.2, SrcP=5566, DstA=9.8.7.6, DstP=80, SYN, Seq = z SrcA=9.8.7.6, SrcP=80, DstA=1.2.1.2, DstP=5566, SYN+ACK, Seq = y, Ack = x+1

Small Note #1: if client receives this, will be confused ⇒ send a RST back to server … … So attacker may need to hurry!

slide-40
SLIDE 40

Spoofing an Entire TCP Connection

Alleged Client (not actual) IP address 1.2.1.2, port NA Server IP address 9.8.7.6, port 80 Blind Attacker

SrcA=1.2.1.2, SrcP=5566, DstA=9.8.7.6, DstP=80, SYN, Seq = z SrcA=9.8.7.6, SrcP=80, DstA=1.2.1.2, DstP=5566, SYN+ACK, Seq = y, Ack = z+1

Big Note #2: attacker doesn’t get to see this packet!

slide-41
SLIDE 41

Spoofing an Entire TCP Connection

Alleged Client (not actual) IP address 1.2.1.2, port N/A Server IP address 9.8.7.6, port 80 Blind Attacker

SrcA=1.2.1.2, SrcP=5566, DstA=9.8.7.6, DstP=80, SYN, Seq = z SrcA=9.8.7.6, SrcP=80, DstA=1.2.1.2, DstP=5566, SYN+ACK, Seq = y, Ack = z+1

So how can the attacker figure out what value of y to use for their ACK?

SrcA=1.2.1.2, SrcP=5566, DstA=9.8.7.6, DstP=80, ACK, Seq = z+1, ACK = y+1 SrcA=1.2.1.2, SrcP=5566, DstA=9.8.7.6, DstP=80, ACK, Seq = z+1, ACK = y+1, Data = “GET /transfer-money.html”

slide-42
SLIDE 42

Reminder: Establishing a TCP Connection

SYN

SYN+ACK

ACK

A B

D a t a D a t a

Each host tells its Initial Sequence Number (ISN) to the other host.

(Spec says to pick based

  • n a clock)

Hmm, any way for the attacker to know this? Sure - make a non-spoofed connection first, and see what server used for ISN y then! How Do We Fix This? Use a (Pseudo)- Random ISN

slide-43
SLIDE 43
  • An attacker who can observe your TCP connection can

manipulate it:

– Forcefully terminate by forging a RST packet – Inject (spoof) data into either direction by forging data packets – Works because they can include in their spoofed traffic the correct sequence numbers (both directions) and TCP ports – Remains a major threat today

Summary of TCP Security Issues

slide-44
SLIDE 44
  • An attacker who can observe your TCP connection can

manipulate it:

– Forcefully terminate by forging a RST packet – Inject (spoof) data into either direction by forging data packets – Works because they can include in their spoofed traffic the correct sequence numbers (both directions) and TCP ports – Remains a major threat today

  • An attacker who can predict the ISN chosen by a server

can “blind spoof” a connection to the server

– Makes it appear that host ABC has connected, and has sent data

  • f the attacker’s choosing, when in fact it hasn’t

– Undermines any security based on trusting ABC’s IP address – Allows attacker to “frame” ABC or otherwise avoid detection – Fixed (mostly) today by choosing random ISNs

Summary of TCP Security Issues

slide-45
SLIDE 45

5 Minute Break

Questions Before We Proceed?

slide-46
SLIDE 46

DNS: Operation & Threats

slide-47
SLIDE 47

Host Names vs. IP addresses

  • Host names

– Examples: www.cnn.com and bbc.co.uk – Mnemonic name appreciated by humans – Variable length, full alphabet of characters – Provide little (if any) information about location

  • IP addresses

– Examples: 64.236.16.20 and 212.58.224.131 – Numerical address appreciated by routers – Fixed length, binary number – Hierarchical, related to host location

slide-48
SLIDE 48

Mapping Names to Addresses

  • Domain Name System (DNS)

– Hierarchical name space divided into sub-trees (“zones”)

  • E.g. .edu, .berkeley.edu, .eecs.berkeley.edu

– Zones distributed over collection of DNS name servers

  • Hierarchy of DNS servers

– Root (hardwired into other servers) – Top-level domain (TLD) servers

  • E.g. .com, .org, .net, .uk, .biz

– “Authoritative” DNS servers (e.g. for facebook.com)

  • End systems configured with IP address of a

resolver to contact for their lookups

slide-49
SLIDE 49

requesting host

xyz.poly.edu gaia.cs.umass.edu

root DNS server (‘.’) local DNS server (resolver)

128.238.1.68

1 2 3 4 5 6

authoritative DNS server (‘umass.edu’, ‘cs.umass.edu’) dns.cs.umass.edu

7 8 TLD DNS server (‘.edu’)

DNS Lookups via a Resolver

Host at xyz.poly.edu wants IP address for gaia.cs.umass.edu Caching heavily used to minimize lookups

slide-50
SLIDE 50

DNS Threats

  • DNS: path-critical for just about everything we do

– Maps hostnames ⇔ IP addresses – Design only scales if we can minimize lookup traffic

  • #1 way to do so: caching
  • #2 way to do so: return not only answers to queries, but additional

info that will likely be needed shortly

  • What if attacker eavesdrops on our DNS queries?

– Simple to then redirect us w/ spoofed misinformation

  • Consider attackers who can’t eavesdrop - but still

aim to manipulate us via how the protocol functions

  • Directly interacting w/ DNS: dig program on Unix

– Allows querying of DNS system – Dumps each field in DNS responses

slide-51
SLIDE 51

dig eecs.mit.edu A

; ; <<>> DiG 9.6.0-APPLE-P2 <<>> eecs.mit.edu a ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19901 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3 ;; QUESTION SECTION: ;eecs.mit.edu. IN A ;; ANSWER SECTION: eecs.mit.edu. 21600 IN A 18.62.1.6 ;; AUTHORITY SECTION: mit.edu. 11088 IN NS BITSY.mit.edu. mit.edu. 11088 IN NS W20NS.mit.edu. mit.edu. 11088 IN NS STRAWB.mit.edu. ;; ADDITIONAL SECTION: STRAWB.mit.edu. 126738 IN A 18.71.0.151 BITSY.mit.edu. 166408 IN A 18.72.0.3 W20NS.mit.edu. 126738 IN A 18.70.0.160

Use Unix “dig” utility to look up IP address (“A”) for hostname eecs.mit.edu via DNS

slide-52
SLIDE 52

dig eecs.mit.edu A

; ; <<>> DiG 9.6.0-APPLE-P2 <<>> eecs.mit.edu a ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19901 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3 ;; QUESTION SECTION: ;eecs.mit.edu. IN A ;; ANSWER SECTION: eecs.mit.edu. 21600 IN A 18.62.1.6 ;; AUTHORITY SECTION: mit.edu. 11088 IN NS BITSY.mit.edu. mit.edu. 11088 IN NS W20NS.mit.edu. mit.edu. 11088 IN NS STRAWB.mit.edu. ;; ADDITIONAL SECTION: STRAWB.mit.edu. 126738 IN A 18.71.0.151 BITSY.mit.edu. 166408 IN A 18.72.0.3 W20NS.mit.edu. 126738 IN A 18.70.0.160

This is dig identifying its version and the query it is attempting to look up

slide-53
SLIDE 53

dig eecs.mit.edu A

; ; <<>> DiG 9.6.0-APPLE-P2 <<>> eecs.mit.edu a ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19901 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3 ;; QUESTION SECTION: ;eecs.mit.edu. IN A ;; ANSWER SECTION: eecs.mit.edu. 21600 IN A 18.62.1.6 ;; AUTHORITY SECTION: mit.edu. 11088 IN NS BITSY.mit.edu. mit.edu. 11088 IN NS W20NS.mit.edu. mit.edu. 11088 IN NS STRAWB.mit.edu. ;; ADDITIONAL SECTION: STRAWB.mit.edu. 126738 IN A 18.71.0.151 BITSY.mit.edu. 166408 IN A 18.72.0.3 W20NS.mit.edu. 126738 IN A 18.70.0.160

Status values returned from the remote name server queried by dig

slide-54
SLIDE 54

dig eecs.mit.edu A

; ; <<>> DiG 9.6.0-APPLE-P2 <<>> eecs.mit.edu a ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19901 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3 ;; QUESTION SECTION: ;eecs.mit.edu. IN A ;; ANSWER SECTION: eecs.mit.edu. 21600 IN A 18.62.1.6 ;; AUTHORITY SECTION: mit.edu. 11088 IN NS BITSY.mit.edu. mit.edu. 11088 IN NS W20NS.mit.edu. mit.edu. 11088 IN NS STRAWB.mit.edu. ;; ADDITIONAL SECTION: STRAWB.mit.edu. 126738 IN A 18.71.0.151 BITSY.mit.edu. 166408 IN A 18.72.0.3 W20NS.mit.edu. 126738 IN A 18.70.0.160

Including a 16-bit transaction identifier that enables the DNS client (dig, in this case) to match up the reply with its original request

slide-55
SLIDE 55

dig eecs.mit.edu A

; ; <<>> DiG 9.6.0-APPLE-P2 <<>> eecs.mit.edu a ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19901 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3 ;; QUESTION SECTION: ;eecs.mit.edu. IN A ;; ANSWER SECTION: eecs.mit.edu. 21600 IN A 18.62.1.6 ;; AUTHORITY SECTION: mit.edu. 11088 IN NS BITSY.mit.edu. mit.edu. 11088 IN NS W20NS.mit.edu. mit.edu. 11088 IN NS STRAWB.mit.edu. ;; ADDITIONAL SECTION: STRAWB.mit.edu. 126738 IN A 18.71.0.151 BITSY.mit.edu. 166408 IN A 18.72.0.3 W20NS.mit.edu. 126738 IN A 18.70.0.160

The name server echoes back the question that it is answering as the first part of its reply

slide-56
SLIDE 56

dig eecs.mit.edu A

; ; <<>> DiG 9.6.0-APPLE-P2 <<>> eecs.mit.edu a ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19901 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3 ;; QUESTION SECTION: ;eecs.mit.edu. IN A ;; ANSWER SECTION: eecs.mit.edu. 21600 IN A 18.62.1.6 ;; AUTHORITY SECTION: mit.edu. 11088 IN NS BITSY.mit.edu. mit.edu. 11088 IN NS W20NS.mit.edu. mit.edu. 11088 IN NS STRAWB.mit.edu. ;; ADDITIONAL SECTION: STRAWB.mit.edu. 126738 IN A 18.71.0.151 BITSY.mit.edu. 166408 IN A 18.72.0.3 W20NS.mit.edu. 126738 IN A 18.70.0.160

“Answer” tells us the IP address associated with eecs.mit.edu is 18.62.1.6 and we can cache the result for 21,600 seconds