Chapter 3 - Application and Networking Based Attac
Chapter 3 - Application and Networking Based Attac
Security Fundamentals,
Fifth Edition
Chapter 3
Application and Networking-Based
Attacks
Objectives
List and explain the different types of server-side
web application attacks
Define client-side attacks
Explain how overflow attacks works
List different types of networking-based attacks
Cross-site scripting
SQL injection
XML injection
Command injection/directory traversal
10
Cross-Site Scripting
Not all attacks on websites are designed to steal
content or deface it
Some attacks use web server as a platform to
launch attacks on other computers that access it
Cross-site scripting (XSS) - Injects scripts into
web application server to direct attacks at
unsuspecting clients
Many web applications are designed to customize
content for user by taking what user enters and
then displaying that input back to user
Security+ Guide to Network Security Fundamentals, Fifth Edition
11
12
13
14
15
SQL Injection
SQL (Structured Query Language) - Used to
manipulate data stored in relational database
SQL Injection - Targets SQL servers by
introducing malicious commands
16
17
18
19
XML Attack
XML Attack - Similar to SQL injection attack
Attacker discovers Web site that does not filter user
data
Injects XML tags and data into the database
Xpath injection:
Specific type of XML injection attack
Attempts to exploit XML Path Language queries
20
Directory Traversal/Command
Injection
Web server users typically restricted to root
directory
Users may be able to access subdirectories but not
parallel or higher level directories
Helps to protect sensitive files
Directory traversal - Uses malformed input or
takes advantage of vulnerability to move from root
directory to restricted directories
Command injection - Attacker enters commands
to execute on server or view confidential files
Security+ Guide to Network Security Fundamentals, Fifth Edition
21
22
23
Drive-By Download
Drive-by download:
Client computer compromised simply by viewing a
Web page
Attackers inject content into vulnerable Web server
to gain access to servers operating system
Attackers craft a zero pixel frame to avoid visual
detection
Embed an HTML document inside main document
Clients browser downloads malicious script
Instructs computer to download malware
Security+ Guide to Network Security Fundamentals, Fifth Edition
24
HTTP Header
HTTP header consists of fields that characterize
data being transmitted
Header fields are comprised of:
Field name
Colon
Field value
25
26
Header Manipulation
HTTP header manipulation - Attack modifies
HTTP headers
HTTP header manipulation is not actual attack but
rather vehicle through which other attacks like
(XSS) can be launched.
HTTP header manipulation allows an attacker to
pass malicious instructions from own malicious
website or through an infected site to the web
browser via HTTP headers
27
28
Cookies
Cookies - Store user-specific information on users
local computer
Web sites use cookies to identify repeat visitors
Examples of information:
Travel Web sites may store users travel itinerary
Personal information provided when visiting a site
29
Types of Cookies
First-party cookie - Cookie created by Web site
user currently visiting
Third-party cookie - Site advertisers (third parties)
place cookie to record user preferences
Session cookie - Stored in RAM and expires when
browser is closed
Persistent cookie - Recorded on computers hard
drive and does not expire when browser closes
30
31
Risks of Cookies
Cookies have security and privacy risks
First-party cookies can be stolen and used to
impersonate the user
Third-party cookies can be used to track the
browsing or buying habits of a user
When multiple websites are serviced by a single
marketing organization, cookies can be used to
track browsing habits on all clients site
32
Attachments
Attachments - Files that are coupled to email
messages
Malicious attachments commonly used to spread
viruses, Trojans, and other malware when opened
Most users routinely open any email attachment
received even if from an unknown sender
Attackers often include information in the subject
line that entices even reluctant users to open the
attachment, such as a current event
33
Session Token
User accessing secure web application needs be
verified to prevent an imposter from jumping in to
interaction
Session token - Verification through which random
string assigned to interaction between user and web
application currently being accessed (session)
Web application server assigns a unique session
token
Each subsequent request from users web browser to
web application contains session token verifying user
identity
Security+ Guide to Network Security Fundamentals, Fifth Edition
34
Session Hijacking
Session hijacking - Attacker attempts to
impersonate the user by using er session token
Attacker can attempt to obtain session token:
Use XSS or other attacks to steal the session token
cookie from the victims computer
Eavesdropping on the transmission
Guessing the session token (successful if generation
of session tokens not truly random)
35
36
37
Malicious Add-Ons
Attackers can create malicious add-ons to launch
attacks against users computer
ActiveX - Set of rules for how applications under the
Microsoft Windows operating system should share
information
ActiveX controls (add-ons) - Specific way of
implementing ActiveX and are sometimes called
ActiveX applications
ActiveX controls can be invoked from webpages
through the use of a scripting language or directly by
HTML command
Security+ Guide to Network Security Fundamentals, Fifth Edition
38
39
40
41
Integer Overflow
Integer overflow - Condition occurs when result of
arithmetic operation (addition or multiplication)
exceeds the maximum size of the integer type used
to store it
When overflow occurs, the interpreted value then
wraps around from maximum value to minimum
value
42
43
44
Network Attacks
Attackers place high priority on targeting networks
Exploiting single vulnerability may expose
hundreds or thousands of devices to an attacker
Types of attacks that target a network or network
process:
Denial of service
Interception
Poisoning
Attacks on access rights
45
46
47
48
Interception
Man-in-the-middle - Interception of legitimate
communication
Forging a fictitious response to the sender
Passive attack records transmitted data, active
attack alters contents of transmission before sending
to recipient
Replay - Similar to passive man-in-the-middle attack
Replay makes a copy of the transmission before
sending it to the recipient for use at a later time (the
man-in-the-middle replays it)
Security+ Guide to Network Security Fundamentals, Fifth Edition
49
ARP Poisoning
ARP poisoning
Attacker modifies MAC address in ARP cache to
point to different computer
50
51
DNS Poisoning
Domain Name System - Current basis for name
resolution to IP address
DNS poisoning - Substitutes DNS addresses to
redirect computer to another device
DNS poisoning
Two locations for DNS poisoning:
Local host table
External DNS server
52
53
54
55
Transitive Trust
Transitive - Relation with a property so that if a
relation exists been A and B, and there is also a
relation between B and C, then there is a relation
between A and C
Transitive trust - If Alice trusts Bob, and Bob trusts
Carol, then Alice trusts Carol
56
Transitive Access
Transitive trust can result in transitive access:
System 1 can access System 2, and because
System 2 can access System 3, then System 1 can
access System 3
Intention may not be for System 1 to access
System 3, but instead for System 1 to be restricted
to accessing only System 2
Inadvertent and unauthorized access can result in
serious security risks
57