Web Security

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

1/34

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 8:34 PM on 7/27/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

35 Terms

1
New cards

Web based threats

Web connects huge number of

• users; targets and attackers

• services, with valuable data

2
New cards

Web server vulnerabilities past-present

In the past, web servers would return a static http page.

Nowadays, web servers fetch applications and databases which are more vulnerable. Vulnerability levels of client and server have mostly remained the same

3
New cards

SQL injection

Attacker injects SQL code into the user input of a web application

Ex. password field used to fill in partial SQL code

<p>Attacker injects SQL code into the user input of a web application</p><p>Ex. password field used to fill in partial SQL code</p>
4
New cards

SQL Injection and the Kill Chain

Find a vulnerable web app on a server with access to an interesting DB. Discovers vulnerabilities and related attacker capabilities (login, read DB, write,...), how to get around defenses, etc.

Crafts input that achieves those capabilities by achieving an intended action, or getting the means to perform an action (ex. credentials)

5
New cards

SQL Injection Countermeasures & Mitigations

Input filtering / sanitation, disabling DB features, parameterizing queries by using DB function instead of direct query

6
New cards

Cross Site Scripting (XSS)

Attacker injects code (script) into a trusted webpage (ex. through posted comments / responses to parameterized requests)

Victim runs code on their own machine for attacker’s own gain (credentials, info, privileges, etc.)

7
New cards

XSS using request parameters

Exploit webpage rendering nonexistent parameter in HTML by injecting malicious code in the url itself, creating a malformed url. This malformed link is then distributed to a victim (malicious code can be designed not to show an error)

<p>Exploit webpage rendering nonexistent parameter in HTML by injecting malicious code in the url itself, creating a malformed url. This malformed link is then distributed to a victim (malicious code can be designed not to show an error)</p>
8
New cards

How can the attacker get a user to accept a malformed link?

Hide from view with long url, or encode it

9
New cards

XSS countermeasures

Client side: Difficult to distinguish, hence user education - do not follow sketchy links even if from trusted site

Server side: Filtering of input data and converting to safe strings (ex. < to &it). Difficult for some service such as email which needs html in url

Decrease value of information that can be stolen; e.g., accept cookies only from correct IP.

10
New cards

XSS Injection and the Kill Chain (Conclusion)

knowt flashcard image
11
New cards

XSRF (Cross-Site Request Forgery)

Exploit user’s logged in session, attacker creates malicious website with a link that activates API request with user’s session cookie (ex. transferring money to a different user).

12
New cards

XSRF Login Variant

Victim is tricked into entering malicious website which logs into the attacker’s account on a service via API request. Victim unknowingly uses this account and enters sensitive data

<p>Victim is tricked into entering malicious website which logs into the attacker’s account on a service via API request. Victim unknowingly uses this account and enters sensitive data</p>
13
New cards

(D)DoS

Exploit vulnerability of network service implementations

Overload the service with requests

14
New cards

Exploit vulnerability of network service implementations Example

Ping of Death Service flaw (1990s):

Correctly formed ICMP (echo) message typically small (eg 56bytes), but IP message can carry a much bigger payload.

Use an abnormally sized packet to cause buffer overflow resulting in unpredictable behavior (crash)

15
New cards

Overload the service with requests - examples

Use protocol features; e.g. (SYN flood - intentionally do not complete the handshake to make server stay idle for abnormal period of time)

Duplicate messages by involving others (eg broadcast addresses contacting all devices in network, spoof receiver’s IP to another server so they receive amplified responses)

Simply have more (distributed) resources that target (botnet, DDoS), attack through multiple sources

16
New cards

IP spoofing

Source IP Address can be modified with no validation method for receiver

Checksums only check for bit errors, not authentication itself

17
New cards

DDoS Ping Amplification Example

Attacker spoofs IP, sends ping request to broadcast address which distributes ping request to all users on network. Each response is directed to target IP

<p>Attacker spoofs IP, sends ping request to broadcast address which distributes ping request to all users on network. Each response is directed to target IP</p>
18
New cards

NTP monlist amplification attack

Use monlist (600 last connected IPs), send ping requests to each of these IPs using spoofed IP of victim

<p>Use monlist (600 last connected IPs), send ping requests to each of these IPs using spoofed IP of victim</p>
19
New cards

Distributed Attacker Resources

Many attacks use large quantity of IoT devices: subvert large number of machines (bots aka zombies) to form botnet. Botnet bombards target with requests at specific time

20
New cards

DDoS mitigation

CP 38->SAV(I), uRPF, IP traceback

21
New cards

BCP 38

Network device checks if a packet's source IP address actually belongs to the network it came from. If it doesn't, the packet is dropped

22
New cards

SAV(I)

Inspect network signals like DHCP messages or router advertisements to create a very accurate "binding" between a device's IP address and its physical location on the network, preventing

23
New cards

uRPF

Router looks at the source IP address of an incoming packet. It then checks its routing table to see if the router would use the same interface to send a packet back to that source. If not, packet is dropped

24
New cards

IP Traceback

Goal: reconstruct the path of the attack traffic and identify the ingress point—the router closest to the actual attacker

25
New cards
<p>Controlling the bot net</p>

Controlling the bot net

Hierarchy to control the bot net;

• Attacker controls `master bots’

• Which each control `slave bots’

• Reflectors: The uncompromised machines that are used to aid in the attack (can also provide amplification)

26
New cards

Attack prevention and preemption DoS Countermeasures

Prepare to endure attack attempts without denying service to legitimate clients

  • enforcing policies for resource consumption (ex. quotas) & providing backup resources available on demand; cloud-hosted services, IP Anycast.

  • modify systems/protocols to limit (D)DoS potential; configure only servers to respond to ping, disable (access to) broadcast address, etc.

27
New cards

Cloud hosted services

Large capacity data centers; more resources than single server

Can upscale resources used for busy services.

28
New cards

Anycast

Allows multiple servers to provide the same service (on same IP);

• geographically distribution can lower latency

• offers load balancing, makes DDoS harder and limits its effects

29
New cards

Attack detection and filtering (during the attack) DoS Countermeasures

Attempt to detect the attack as it begins and respond immediately to minimize impact.

• Detection involves looking for suspicious patterns of behavior

• Response involves filtering out packets likely to be part of the attack

• Collaborate with upstream networks where possible

30
New cards

Attack source traceback and identification (during and after the attack)

Attempt to identify source of the attack as first step in preventing future attacks.

Difficult, may not be fast enough to mitigate ongoing attack.

31
New cards
<p>Standard Domain to IP Resolve Process</p>

Standard Domain to IP Resolve Process

Client asks local NS if it is cached. If not, asks Root NS, which will recursively redirect request to deeper level NS until NS of the actual web domain is found

32
New cards
<p>DNS Spoofing / Poisoning</p>

DNS Spoofing / Poisoning

Attacker sends DNS request to target name server. It also sends fake authoritative NS responses associating the domain with a spoofed IP linking to attacker’s NS, which the target name server stores as cache (glue record)

33
New cards
<p>DNS Spoofing / poisoning against Client</p>

DNS Spoofing / poisoning against Client

If attacker successfully spoofs domain, client will use attacker’s NS instead and retrieve a harmful webpage

34
New cards
<p>DNSSEC</p>

DNSSEC

When redirects to NS are given, associated public key of that NS signed by the current NS’s private key is also given, ensuring a chain of trust

35
New cards

DNS over TLS(DoT)/HTTPS(DoH)

TLS rather then UDP based, uses authentication and encryption protocols of TLS to secure connection rather than the data itself (DNSSEC has same capabilities but must be setup manually)

TLS is more expensive due to handshakes for simple interactions - vulnerable to DDoS attacks