CH06 CH10 Computer Security 1
CH06 CH10 Computer Security 1
Practice
Fourth Edition ① Assignment I
Chapter 6
Malicious Software
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
↑
& -
↑
e g
. S
↑
Malware
-
>
-
·
&
-
-- -
-
-
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
C
195
-
Adware Advertising that is integrated into software. It can result in pop-up ads or
redirection of a browser to a commercial site.
Loading…
Advertising
Attack kit Set of tools for generating new malware automatically using a variety of supplied
-
Backdoor (trapdoor) Any mechanism that bypasses a normal security check; it may allow unauthorized
access to functionality in a program, or onto a compromised system.
Downloaders Code that installs other items on a machine that is under attack. It is normally
included in the malware code first inserted on to a compromised system to then
import a larger malware package.
Drive-by-download An attack using code on a compromised website that exploits a browser
-
Logic bomb Code inserted into malware by an intruder. A logic bomb lies dormant until a
-
Predefined condition is met; the code then triggers some payload.
- -
Macro virus A type of virus that uses macro or scripting code, typically embedded in a
· is
Document or document template, and triggered when the document is viewed or
macro
edited, to run and replicate itself into other such documents.
Mobile code Software (e.g., script and macro) that can be shipped unchanged to a
heterogeneous collection of platforms and execute with identical semantics.
Rootkit Set of hacker tools used after attacker has broken into a computer system and
gained root-level access.
, sjiisMokl
Spam &
Spammer programs Used to send large volumes of unwanted e-mail.
Spyware Software that collects information from a computer and transmits it to another
- system by monitoring keystrokes, screen data, and/or network traffic; or by
scanning files on the system for sensitive information.
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Table 6.1 Malware Terminology (3 of 3)
Name Description
Trojan horse A computer program that appears to have a useful function, but also has a
hidden and potentially malicious function that evades security mechanisms,
jiy w
sometimes by exploiting legitimate authorizations of a system entity that
invokes it.
Loading…
Virus Malware that, when executed, tries to replicate itself into other executable
J:
iS machine or script code; when it succeeds, the code is said to be infected.
· -
S: zil When the infected code is executed, the virus also executes.
Worm A computer program that can run independently and can propagate a
&S S
complete working version of itself onto other hosts on a network, by exploiting
.
D* s
· P -
·
S
--
1
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
* je
Classification of Malware
• Classified into two broad categories:
– -Based first on how it spreads or propagates to reach the
> -
-
is reached
-
-
like
a
- .
%– -
-
other systems
-
-
-
sig– ↳
Exploit of software vulnerabilities by worms or drive-by-downloads to
-
-
--
-
allow
- -
the malware to replicate
-–-
Social engineering attacks that convince users to bypass security
· - -
-
include: eli)
· 2 ES1 ,
2
– Corruption of system or data files
-
-
botnet
-
ad ·
– Stealthing/hiding its presence on the system
S -
E
-
-
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
9
Attack Kits
• Initially the development and deployment of malware required considerable
technical skill by software authors
– The development of virus-creation toolkits in the early 1990s and then
more general attack kits in the 2000s greatly assisted in the
development and deployment of malware
C
• Examples are:
– Zeus
>
– Angler
-
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
31 ,
Attack Sources
• Another significant malware development is the change from
attackers being individuals often motivated to demonstrate their
technical competence to their peers to more organized and
dangerous attack sources such as:
-
O
& – Politically motivated attackers > - Els
-
-
② – Criminals -
59
. 3
-
-
3 – Organized crime
O Psyin sun i
-
-
19 i ↓
④ – Organizations that sell their services to companies and nations
-
-
----
Y
g -
I
-
- -
-
(usually business or political)
-
-
-
, . .
5 0
•-
Differ from-
--
other types of attack by their careful target
-
-
selection
-
and stealthy
-
-
intrusion efforts over extended
periods of example APT attack
- &
-
-
include-
• High profile attacks> Aurora, RSA, APT1, and
=
Stuxnet
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
&
APT Characteristics (1 of 2)
i
·
• Advanced
=
-
and malwareE
- -
-
-
including the development of custom malware if
- -
required
Loading…
– The individual components may not necessarily be technically
---
- -
- -
success
& - -
is compromised
- ·Iss
55%
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
APT Characteristics (2 of 2)
E
•-
Threats -
>
threat level from that due to automated attacks tools, and also the
-
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
APT Attacks
>
-
jl
O
• Aim: -
Q ②
– Varies from theft of intellectual property or security and infrastructure
- -
-
• Techniques used:
-
– Social engineering
-
-
– Spear-phishing email
-
G
-
G
-
• Intent: · % .
⑤
E 105
•-
Piece of software that infects programs
.
- -
· S– Modifies them to include a copy of the virus
-
-
s - T sa % &'
[&
– Replicates and goes on to infect other content
-
-
-
assis,–-
-
S
Easily spread through network environments
#
/
·j # 45
Ed
• When attached to an executable program a G virus can do
.
=
--
-
/
– Executes secretly when the host program is run
I
%9
Ei
51 &
--
-
-
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
24ge
Virus Components
S,T
• Infection mechanism ·
>
-
/gu4)
– Means by which a virus spreads or propagates
↑
· • Trigger-
, &1/1 , 5
5,/
activated or delivered
-
S
• Payload >
-
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
MBR
· boot infctor 55 3
,
Virus Classifications (1 of 2)
.
& booting
-
ri
i
&I
-
Classification by target
Jod
II
E
S
!
-
• Boot sector infector
- -
& 9S1,1
– Infects a master boot record or boot record and spreads when a
-- S
- - -
- -
·S: 555519dis .
File infector
,
I
& -
⑤
– Infects files that the operating system or shell considers to be
executable
- ⑤
dist
• Macro virus
②
=
– Infects files with macro or scripting code that is interpreted by an
-
-
application
-
• Multipartite virus
③
– Infects files in E
multiple ways
-
-
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Virus Classifications (2 of 2)
/
Classification by concealment strategy
-
• Encrypted virus
s
– A portion of the virus creates a random encryption key and encrypts the
- - - -
I
&
-
• Stealth virus
1
software
-
i
,
• Polymorphic virus Se
jet's !
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
-4)
Worms
28% XS
• Program that actively seeks out more machines to infect and each infected
- -
machines · to Di ; 5 .
• Spreads through shared media (USB drives, CD, DVD data disks)
- um m u
& ge
-
Iis
-
j
• Upon activation the worm may replicate and propagate again
- - -
X
• First known implementation was done in Xerox Palo Alto Labs in the early
1980s
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
-15 1
Target Discovery
e &
• Scanning (or fingerprinting)
–&First function in the propagation phase for a network
- -
- -
worm
-
– Searches
-
for other systems to infect
-
gli
• Random
S
Sis
– Each compromised host probes random
- -
-
-
addresses in
-
· = -- -
-
-
· 1955
& (bridis 24 (
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
--
Worm Technology
• Multiplatform - -
• Multi-exploit >
- Dis s
,
• Polymorphic Sugi
>
-
, s
• Metamorphic >
- I
,
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
·, () 04/)
Malvertising
&s
• Places malware on websites without actually compromising them
-
&& / &%
• The attacker pays for advertisements that are highly likely to be placed on
-- -
• Using these malicious ads, attackers can infect visitors to sites displaying
is - -
-
them ·leving Ess i I
%
• Has grown rapidly in recent years because they are easy to place on desired
- - -
& hist, 09 ve
• Attackers can place these ads for as little as a few hours, when they expect
- -
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
&I wa
Clickjacking
• Also known as a user-interface (UI) redress attack
-
hijacked
-
the attacker
-
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Social Engineering
• “Tricking” users to assist in the compromise of their own systems
-
-
• Spam
-
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
stop
here
&.
go
&
: I#
13 Feb
&
5% &..&
-
Ransomware
Gemm
• WannaCry
– Infected a large number of systems in many countries in May 2017
– When installed on infected systems, it encrypted a large number of files
and then demanded a ransom payment in Bitcoins to recover them
– Recovery of this information was generally only possible if the
organization had good backups and an appropriate incident response
and disaster recovery plan
– Targets widened beyond personal computer systems to include mobile
devices and Linux servers
– Tactics such as threatening to publish sensitive personal information, or
to permanently destroy the encryption key after a short period of time,
are sometimes used to increase the pressure on the victim to pay up
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
saleig%38 .
• =>
Uses:
– Distributed denial-of-service (DDoS) attacks
-
– Spamming
-
– Sniffing traffic
-
– Keylogging
-
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
.
9
-S
information
-
I
• Spyware
S
↑
- M
--
I
s .
T
– Subverts the compromised machine to allow monitoring of a
- -
▪ Redirecting certain -
-
Web page requests to fake sites
▪ Dynamically modifying data exchanged between the browser
- - - -
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
·SS
Malware Countermeasure Approaches
• Ideal solution to the threat of malware is prevention
-
G
• Four main elements of prevention:
-
– Policy
-
- -
– Awareness
-
-
541
– Vulnerability mitigation
-
is
>
-
– Threat mitigation
-
-
E
↑
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
· Siste .
J i
Generations of Anti-Virus Software
• First generation: simple scanners
- -
Loading…
– Uses heuristic rules to search for probable malware instances
– Another approach is integrity checking
• Third generation: activity traps
- -
>
-
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Host-Based Behavior-Blocking Software
• Integrates with the operating system of a host computer and
monitors program behavior in real time for malicious action
– Blocks potentially malicious actions before they have a
chance to affect the system
– Blocks software in real time so it has an advantage over
anti-virus detection techniques such as fingerprinting or
heuristics
• Limitations
– Because malicious code must run on the target machine
before all its behaviors can be identified, it can cause harm
before it has been detected and blocked
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Computer Security: Principles and
Practice
Fourth Edition
20 -
Feb
-
Chapter 10
Buffer Overflow
Copyright
Copyright ©
© 2018,
2018, 2015,
2015, 2012 Pearson Education,
2012 Pearson Education, Inc.
Inc. All
All Rights
Rights Reserved
Reserved
Buffer Overflow (1 of 2) c dis
(
get (
• A very common
-
attack mechanism Y
His > &5
Mis
- ,
↑
7
3&
s
overflow 85 0
• Still of major concern
-
-
-
·
>
Es
,
– Legacy of buggy code in widely deployed operating
Si
-
9
systems and applications
·
P
.
,
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Buffer Overflow (2 of 2)
&
A buffer overflow, also known as a buffer overrun, is defined
-
I I
“A condition at an interface under which more input can be
- -
-
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
I
-s
&
I
-
- -
dr s -
buffer
-
-
– Unexpected transfer of
8 --
-
S
- -
locations
-
g – Memory access violations
& -
- -
85Access
– Locations could hold other assi
-
--
"g – Execution of code chosen
-
- -
program variables, ·
I
-
-
by attacker
-
-
parameters, or program
-
-
0
•C
Buffer could be located on the
stack, in the heap, or in the data
=
-
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Figure 10.1 Basic Buffer Overflow
Example
local
variable
/ .
-!
4 sr
X
Str2 Bis ple
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Figure 10.2 Basic Buffer Overflow Stack
Values
X =
4
C
!
jjjos 6
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Buffer Overflow Attacks
↓i Y
,
·
• To exploit a buffer overflow an attacker needs:
- -
– To
-
understand how that buffer
- -
is stored in memory and
determine potential for corruption
-
-
! sa's
• Identifying vulnerable programs can be done by: -
:i S i
I
-
y – Inspection of program source
-
-
-
- -
oversized input
-
-
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Stack Buffer Overflows
X
• Occur when buffer is located on stack
2
another
>
-
name
C smashing
For buffer
– Also referred to as stack
stack .
values
-
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Figure 10.3 Example Stack Frame With
Functions P and Q
X
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Figure 10.4 Program Loading Into Process
Memory
· Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Figure 10.5 Basic Stack Overflow Example
X
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Figure 10.6 Basic Stack Overflow Stack
Values
X His
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Figure 10.7 Another Stack Overflow
Example
X
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Table 10.2 Some Common Unsafe C
Standard Library Routines
-
gets(char *str) read line from standard input into str
sprintf(char *str, char *format, ...) create str according to supplied format and
variables
strcat(char *dest, char *src) append contents of string src to string dest
strcpy(char *dest, char *src) copy contents of string src to string dest
vsprintf(char *str, char *fmt, va_list ap) create str according to supplied format and
variables
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Shellcode
98 %39 6
,
.
interpreter (shell)
-
Remote(SS1
Access % s
overfloodI
• Machine code
-
↳ from user
&
convert from
C
- - - to assembly to know
C to c
language .
startee
-
j
&
Assembly language .
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
Figure 10.9 Example Stack Overflow
Attack
limit Access
root
N, C
As
imputy
output
A posi
,
g
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
-
Stack Overflow Variants
• Target program can be: • Shellcode functions
– A trusted system utility – Launch a remote shell when
– Network service connected to
daemon – Create a reverse shell that
– Commonly used library connects back to the hacker
code – Use local exploits that establish a
-
shell
– Flush firewall rules that currently
-
block other attacks
– Break out of a chroot (restricted
execution) environment, giving full
access to the system
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved
⑳ving
Buffer Overflow Defenses
• Buffer overflows are widely exploited
• Two
-
broad defense approaches
–-Compile-time
▪ Aim to harden programs to resist attacks in new
- -
programs
–#Run-time
▪ Aim to detect and abort attacks in existing
--
programs
Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved