CSEC - 3

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/100

encourage image

There's no tags or description

Looks like no tags are added yet.

101 Terms

1
New cards

What is a protocol?

A set of rules (basically a deterministic algorithm/program) that says what to do with a message

2
New cards

Why do we have lots of different protocols?

To bridge the gap between different parts of the network stack

3
New cards

Which layer does ARP handle in the simplified stack?

LAN routing (link layer)

4
New cards

Which layer does IP handle in the simplified stack?

Internet routing

5
New cards

Which layer does TCP handle in the simplified stack?

Reliability (TLS above it gives security and HTTPS is the application layer)

6
New cards

IP address - which layer and who decides it?

Network layer. Allocated by someone (an admin or a pool allocator). Devices do not pick their own

7
New cards

MAC address - which layer and who decides it?

Data link layer. Assigned at manufacture and put in the device memory

8
New cards

Which addresses do high level vs low level protocols use?

High level protocols use IP addresses. Low level protocols use MAC addresses

9
New cards

What does ARP stand for?

Address Resolution Protocol

10
New cards

What does ARP do?

Maps IP addresses (network layer) to MAC addresses (data link layer)

11
New cards

What two mechanisms is ARP based on?

Broadcast messages and local caching

12
New cards

Define broadcast (ARP context)

Shouting a message to every device on the network

13
New cards

Define caching (ARP context)

Saving the answer in memory so you do not need to ask again

14
New cards

Which security properties does ARP lack?

Confidentiality + integrity + authentication (designed when everyone was assumed honest)

15
New cards

Which RFC defines ARP?

RFC 826

16
New cards

What does an ARP request say and how is it sent?

Who has tell - sent as a BROADCAST to everyone

17
New cards

What does an ARP reply say and how is it sent?

is at - sent directly (unicast) back to the requester
18
New cards

Who answers an ARP request?

Only the machine that owns the requested IP. Everyone else ignores it

19
New cards

What does the requesting machine do with an ARP reply?

Saves it in its ARP cache

20
New cards

Command to display the ARP table?

arp -a (works on Linux and Windows and OSX)

21
New cards

Command to flush the ARP cache (Windows)?

arp -a -d

22
New cards

Dynamic vs static ARP cache entries?

Dynamic = learned by running ARP. Static = hand-written by an administrator

23
New cards

Another name for ARP cache poisoning?

ARP spoofing

24
New cards

What is ARP cache poisoning?

Filling a machine's ARP cache with false IP-to-MAC mappings

25
New cards

Why is ARP cache poisoning possible? (4 reasons)

1 Table updates on ANY reply. 2 Requests are not tracked (stateless). 3 Replies are not authenticated. 4 Machines simply trust each other

26
New cards

What is a gratuitous ARP reply?

An unsolicited ARP reply that nobody asked for. Used to poison caches

27
New cards

Is a machine's ARP cache updated only after it sent a request?

No. Implementations are stateless so it updates on any reply even if it never asked

28
New cards

Trusted vs trustworthy?

Trusted = we assume it tells the truth. Trustworthy = it actually does. ARP machines are only trusted

29
New cards

Describe the ARP poisoning attack on Alice and Bob

Eve tells Bob that Alice's IP is at Eve's MAC and tells Alice that Bob's IP is at Eve's MAC. Their traffic then flows through Eve

30
New cards

What type of attack does ARP poisoning enable?

Mal actor-in-the-middle (MITM) attack on a LAN and so eavesdropping

31
New cards

Defence against ARP poisoning and its drawback?

Static ARP entries cannot be overwritten. But they are almost impossible to manage and do not scale (every IP change needs updating on every machine)

32
New cards

Why does a router have two interfaces?

One inside (LAN) address and one outside (Internet-facing) address

33
New cards

What happens to private LAN IP addresses at the gateway?

They are only valid inside the private network and get dropped at the router

34
New cards

List the 4 IP vulnerabilities

Unencrypted transmission + no source authentication + no integrity checking + no bandwidth constraints

35
New cards

Unencrypted IP transmission leads to what?

Eavesdropping at any intermediate host during routing

36
New cards

What is IP spoofing?

The sender writes any source address they like in the packet header. Hard to trace back to the attacker

37
New cards

Why can an attacker change an IP packet without detection?

No integrity checking - they can edit header and payload and recompute the checksums themselves

38
New cards

Attacks enabled by no IP integrity?

Content forgeries + redirections + mal actor-in-the-middle attacks

39
New cards

Attacks enabled by no bandwidth constraints?

Denial of service by injecting a huge number of packets. Broadcast addresses give extra leverage

40
New cards

The 4 network attack types in the diagrams

Wiretapping (sniffing) + Creation (spoofing) + Tampering (active) + Block (DoS)

41
New cards

Why is IP level blocking easy for an adversary?

All routing info is in the header so it cannot be hidden. They can drop any packet going to a chosen destination

42
New cards

Is UDP stateful?

No - it is stateless. Send the packet and forget it

43
New cards

Is UDP reliable?

No - it is an unreliable datagram protocol with no delivery guarantees or acknowledgments

44
New cards

What layer is UDP at?

Transport layer (built on top of IP)

45
New cards

Why is UDP efficient?

No acknowledgments or delivery guarantees or connection state

46
New cards

What must apps using UDP be ready for?

Corrupted and lost data

47
New cards

UDP header size and fields?

8 bytes: source port + destination port + length + checksum

48
New cards

Typical UDP uses and why packet loss is OK

VoIP + streaming video + streaming audio. Our eyes and ears fill in small gaps

49
New cards

Can UDP serve multiple apps on one host?

Yes - through port numbers

50
New cards

What does TCP stand for?

Transmission Control Protocol

51
New cards

Main properties of TCP

Reliable + in-order delivery + stateful + supports multiple applications on one host (via ports)

52
New cards

Protocols built on top of TCP?

HTTP and SSH

53
New cards

Is TCP stateful?

Yes - it keeps track of connection state in memory (e.g. where it is in the handshake and how many packets are pending)

54
New cards

How does TCP keep packets in order?

Each packet gets a sequence number so the receiver can reorder them (packets may take different paths and arrive out of order)

55
New cards

What happens every time TCP receives a packet?

It sends an acknowledgement (ACK)

56
New cards

What if an ACK is lost or never arrives?

The sender waits (timer) and then retransmits the packet

57
New cards

How does TCP adapt its sending speed?

Fast ACKs mean it speeds up. Slow ACKs mean it slows down. No ACKs mean it waits and resends

58
New cards

What do ACKs and window size let TCP track?

Packet loss + network congestion + flow control

59
New cards

How does TCP check for errors?

A 16-bit checksum of the data and parts of the header (including source and destination)

60
New cards

What is a port?

A 16-bit number identifying which application/service on a host the data is directed to (apartment door analogy)

61
New cards

How is a port written with an IP?

After the address with a colon e.g. 192.168.0.1:80 or example.co.uk:8080

62
New cards

Which ports does the TCP header contain?

Both a source port and a destination port

63
New cards

Port range 0-1023

Well-known/reserved for known protocols

64
New cards

Port range 1024-49151

User (registered) ports - free for anyone to use e.g. a game server

65
New cards

Port range 49152 and above

Dynamic ports

66
New cards

Port for SSH

22

67
New cards

Port for HTTP

80

68
New cards

Port for HTTPS

443

69
New cards

List the fields of the TCP header

Source port + destination port + sequence number + acknowledgment number + offset + reserved + flags + window size + checksum + urgent pointer + options then payload

70
New cards

How big is the TCP header (before options and payload)?

160 bits (5 rows of 32 bits)

71
New cards

How are TCP connections established?

Three-way handshake (usually the client initiates and the server is a passive listener)

72
New cards

Step 1 of the TCP handshake

Client sends SYN with Seq = x

73
New cards

Step 2 of the TCP handshake

Server replies SYN-ACK with Seq = y and Ack = x + 1

74
New cards

Step 3 of the TCP handshake

Client replies ACK with Seq = x + 1 and Ack = y + 1

75
New cards

What does SYN stand for and do?

Synchronize - carries the initial sequence number

76
New cards

What is exchanged during the handshake?

Initial sequence numbers

77
New cards

Why the +1 in ACK numbers?

It tells the other side which sequence number/connection is being acknowledged

78
New cards

Describe a SYN flooding attack

Attacker sends thousands of SYN packets and never answers the SYN-ACKs. The victim keeps half-open connections until its state table is full and it drops new legit connections

79
New cards

What is a half-open connection?

Server has sent SYN-ACK and is waiting for the final ACK

80
New cards

Why does SYN flooding work?

TCP is stateful so the victim must store state for every connection request

81
New cards

Problem 1 with basic SYN flooding for the attacker

Attribution - their own IP is in the packets so they are easy to trace and block

82
New cards

Problem 2 with basic SYN flooding for the attacker

Bandwidth - they use their own bandwidth which is likely smaller than the server's

83
New cards

SYN flooding is effective against what?

Small targets (e.g. a home game server)

84
New cards

SYN flooding is NOT effective against what?

Large targets (e.g. a company website with DoS protection like Cloudflare)

85
New cards

How does spoofing improve SYN flooding?

Forge a random source address in each SYN. Harder to trace and the SYN-ACKs go to another computer so it uses less attacker bandwidth

86
New cards

Side effect of spoofed SYN floods on others?

The SYN-ACKs hit innocent third-party computers

87
New cards

Defence against spoofed source addresses?

Ingress filtering - drop packets leaving a network with source addresses outside its own range (assumes the network is not adversarial)

88
New cards

What does ICMP stand for?

Internet Control Message Protocol

89
New cards

What is ping?

An ICMP echo request. The remote host replies to say it is online

90
New cards

What is smurfing?

A DoS reflection attack using ICMP ping sent to a broadcast address (directed broadcast)

91
New cards

What is a Smurf amplifier?

A network that replies to pings sent to its broadcast address

92
New cards

Example broadcast address?

10.01.34.255 (last octet 255)

93
New cards

Smurf attack steps

1 Forge a ping with the VICTIM's IP as source. 2 Send it to the amplifier's broadcast address. 3 Every host replies to the victim

94
New cards

Why is smurfing an amplification attack?

One small ping becomes hundreds or thousands of replies (e.g. 1000 hosts = 1000 replies) using other people's bandwidth

95
New cards

Why is smurfing called a reflection attack?

The attack traffic is bounced off many third-party machines onto the victim

96
New cards

Defence against Smurf attacks?

Fix badly configured LANs so they do not respond to broadcast pings. Blacklist known Smurf amplifier networks (e.g. the Smurf Amplifier Registry)

97
New cards

SYN flood vs Smurf - what exhausts the victim?

SYN flood exhausts the state table (memory). Smurf exhausts bandwidth

98
New cards

Root cause of all these attacks

Network protocols have no built-in confidentiality or integrity or authentication - everyone trusts the packet header

99
New cards

Why are network protocols sent in plaintext?

Networks need plain readable headers to talk to each other

100
New cards

How will we fix the lack of security later in the course?

Mostly cryptography (e.g. TLS at the application layer) plus extra non-crypto layers of security