Top Banner
The Internet and Sockets Computer Security Tom Chothia
34

The Internet and Sockets

Feb 20, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Internet and Sockets

The Internet and Sockets

Computer Security Tom Chothia

Page 2: The Internet and Sockets

This Lecture

•  How the Internet works. – Some History – TCP/IP

•  Some useful network tools: – Nmap, WireShark

•  Some common attacks: – “The attacker controls the network”

Page 3: The Internet and Sockets

Before the Internet

•  Life was solitary, poor, nasty, brutish and short.

•  Computer Networks:

– local networks, – telephone line connections, – leased line.

Page 4: The Internet and Sockets

The Start 1969

•  The US Defense Advanced Research Projects Agency (then ARPA now DARPA) gives research grants to universities to buy computers.

•  They decide to link their computers. •  But how?

Page 5: The Internet and Sockets

But if everyone just sends a small packet of data, they can both use the

line at the same.

A

B D

C

Page 6: The Internet and Sockets

The Internet Protocol Packet

Page 7: The Internet and Sockets

IP Addresses

•  Every computer has an IP address. e.g. 147.188.193.15 •  Every router on the Internet keeps a

list of which connection it should use for which addresses.

Page 8: The Internet and Sockets
Page 9: The Internet and Sockets
Page 10: The Internet and Sockets
Page 11: The Internet and Sockets

Transmission Control Protocol

•  1974: daily traffic more than 3 million packets a day. Many are getting lost.

•  TCP is a protocol than runs on top on IP, if an

IP packet gets lost. It requests that it is resent. •  TCP/IP becomes allows Inter network

connections. So in 1977:

Page 12: The Internet and Sockets
Page 13: The Internet and Sockets

The ARPAnet

•  1969 the birth of the ARPAnet. •  1971 E-mail @ •  1977 the ARPAnet becomes a Inter-network. •  1978 first Spam message send. Admin assures users this will never happen

again

Page 14: The Internet and Sockets
Page 15: The Internet and Sockets

Domain Name Servers (DNS)

•  Remembering IP address is to hard. •  So people associate names with addresses.

e.g. news.bbc.com → 212.58.226.141 •  A hierarchy of servers list handle requests •  The route for most of Europe is RIPE based

in Amsterdam.

Page 16: The Internet and Sockets

The Internet

•  1988 The Morris Worm, CERT formed. •  1989 The Web: HTTP and HTML. •  1992 The first ISPs and Mosaic the first

web browser. •  1994 Yahoo

Page 17: The Internet and Sockets
Page 18: The Internet and Sockets
Page 19: The Internet and Sockets
Page 20: The Internet and Sockets

Internet Traffic

Page 21: The Internet and Sockets

Ports

•  To allow multiple connections TCP uses “ports”

•  A TCP “Socket” connection is defined by: (destination IP, destination port, source IP, source port)

•  The destination port normally depends on the service:

WWW runs on port 80, ssh on port 22, dns on 53… •  The source port is normally chosen at random.

Page 22: The Internet and Sockets

Nmap: http://nmap.org/

A network scanning tool: tells you which ports are open.

> nmap 127.0.0.01

Many other functions (see man nmap)

Page 23: The Internet and Sockets

MAC addresses Every computer has a unique media access

control address (MAC address) To use IP you need a protocol that sends IP

packets to MAC addresses, •  e.g. Ethernet or wi-fi (802.11)

MAC addresses not secure: easy to

change, snoop, steal,…

Page 24: The Internet and Sockets

The Internet Protocol Stack

Application

Transport

Network

Link/Hardware

Internet communication uses a stack of protocols.

Each protocol uses the protocol below it to sent data.

Page 25: The Internet and Sockets

The Stack, Most of the Time:

Applications

TCP (dest IP, dest port, src IP, src port)

Internet Protocol

IP address

Ethernet MAC address

Application

Transport

Network

Link/Hardware

Page 26: The Internet and Sockets

WireShark www.wireshark.org

A network protocol analyzer. It records all Internet traffic, so it can then

be views and analysed. Excellent for debugging, protocols and

finding out how Internet applications work.

Page 27: The Internet and Sockets

Who can monitor and alter my traffic?

Anyone on the route a the packet takes:

IT Services, ISPs, Governments, … but also..

Page 28: The Internet and Sockets

147.188.254.142

Local DNS

UoB

Rest of Internet

147.188.254.143

DNS server

Hubs vs Switches DHCP & ARP

DNS lookup protocols

Page 29: The Internet and Sockets

Hubs vs Switches

Local area networking equipment may be: •  Hubs (also unencrypted wi-fi, WEP):

•  All traffic is broadcast to all users •  Anyone on the network can see all traffic

•  Switches (also WPA) •  Traffic only sent to machine it is addressed to •  Much harder to snoop traffic.

Page 30: The Internet and Sockets

DHCP & ARP

Dynamic Host Configuration Protocol: •  Assigns an IP address to a new machine

(MAC address). Not stored long term. Address Resolution Protocol (ARP)

•  Lets router find out which IP address is being used by which machine.

ARP spoofing lets one machine steal the IP address of another on the same network.

Page 31: The Internet and Sockets

Domain Name System

DNS used to turn domain names into IP addresses. •  “Authoritative name servers” store all IPs for a

particular domain. •  Local servers cache domain details.

“DNS spoofing”/“DNS cache poisoning” lets an attacker insert a false record.

Page 32: The Internet and Sockets

“The Attack Owns The Network”

The Internet was not designed with security in mind.

Traffic may be monitored or altered. All good security products assume that

the attacker has complete control over the network (but can’t break encryption)

Page 33: The Internet and Sockets

This Lecture

•  How the Internet works. – Some History – TCP/IP

•  Some useful network tools: – Nmap, WireShark

•  Some common attacks: – “The attacker controls the network”

Page 34: The Internet and Sockets

Next Lecture

•  How to make communication secure.

•  How to authenticate who you are talking too.

•  This is done with the symmetric crypto, public key crypto, certificates and hashes that you have already seen.