Security Chap 6
Security Chap 6
Malicious Software
Malware
• Examples are:
• Zeus
• Angler
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:
• Techniques used:
• Social engineering
• Spear-phishing email
• Drive-by-downloads from selected compromised websites likely to be
visited by personnel in the target organization
• Intent:
• To infect the target with sophisticated malware with multiple
propagation mechanisms and payloads
• Once they have gained initial access to systems in the target
organization a further range of attack tools are used to maintain and
extend their access
Viruses
• Computer virus refers to a program which damages computer
systems and/or destroys or erases data files.
• A malicious program that self-replicates by copying itself to
another program. spreads by itself into other executable code or
documents.
• The purpose of creating a computer virus is to infect vulnerable
systems, gain admin control and steal user sensitive data.
Symptoms:
• Letter looks like they are falling to the bottom of the screen.
• The computer system becomes slow.
• The size of available free memory reduces.
• The hard disk runs out of space.
• The computer does not boot.
Virus Components
Virus Phases
Types of Computer Virus:
• Parasitic –
These are the executable (.COM or .EXE execution starts at first instruction).
Propagated by attaching itself to particular file or program. Generally resides at
the start (prepending) or at the end (appending) of a file, e.g. Jerusalem.
• Boot Sector –
Spread with infected floppy or pen drives used to boot the computers. During
system boot, boot sector virus is loaded into main memory and destroys data
stored in hard disk, e.g. Polyboot, Disk killer, Stone, AntiEXE.
• Polymorphic –
Changes itself with each infection and creates multiple copies. Multipartite: use
more than one propagation method. >Difficult for antivirus to detect, e.g.
Involutionary, Cascade, Evil, Virus 101., Stimulate.
Three major parts: Encrypted virus body, Decryption routine varies from
infection to infection, and Mutation engine.
• Memory Resident –
Installs code in the computer memory. Gets activated for OS run and damages
all files opened at that time, e.g. Randex, CMJ, Meve.
Types of Computer Virus:
• Stealth –
Hides its path after infection. It modifies itself hence difficult to
detect and masks the size of infected file, e.g. Frodo, Joshi, Whale.
• Macro –
Associated with application software like word and excel. When
opening the infected document, macro virus is loaded into main
memory and destroys the data stored in hard disk. As attached with
documents; spreads with those infected documents only, e.g. DMV,
Melissa, A, Relax, Nuclear, Word Concept.
• E-Mail Viruses– Melissa, Happy99
– exploits MS Word macro in attached doc
– if attachment opened, macro activates
– sends email to all on users address list and does local damage
Macro and Scripting Viruses
• macro virus :
“a virus that attaches itself to documents and uses the macro
programming capabilities of the document’s application to execute and
propagate”
•Macro viruses infect scripting code used to support
active content in a variety of user document types
•Are threatening for a number of reasons:
•Is platform independent
•Infect documents, not executable portions of code
•Are easily spread
•Because they infect user documents rather than system programs,
traditional file system access controls are of limited use in preventing their
spread, since users are expected to modify them
•Are much easier to write or to modify than traditional executable viruses
Virus Classifications
1st Generation, Simple Scanners: (bit patterns all the same)searched files for any of a library of
known virus “signatures.”
Checked executable files for length changes.
limited to the detection of known malware
4th Generation, Full Featured: combine the best of the techniques above.
• packages consisting of a variety of anti-virus techniques used in conjunction
• include scanning and activity trap components and access control capability
Advanced Antivirus Techniques
GENERIC DECRYPTION (GD)
• GD technology enables the anti-virus program to easily detect complex
polymorphic viruses and other malware while maintaining fast scanning
speeds
• executable files are run through a GD scanner which contains the following
elements:
• CPU emulator: A software-based virtual computer. Instructions in an
executable file are interpreted by the emulator rather than executed on the
underlying processor. The emulator includes software versions of all
registers and other processor hardware, so that the underlying processor is
unaffected by programs interpreted on the emulator
• virus signature scanner: A module that scans the target code looking for
known virus signatures.
• emulation control module: Controls the execution(manage process) of the
target code.
Lets virus decrypt itself in interpreter
Periodically scan for virus signatures
the most difficult design issue with a GD scanner is to determine how long to
run each interpretation
Advanced Antivirus Techniques
Digital immune system :The digital immune system is a
comprehensive approach to virus protection developed by IBM
Monitored behaviors:
-Attempts to open, view, delete, modify files
-Attempts to format drives
-Modifications to the logic of executables
-Modifications to critical system settings
-Scripting of emails to send exec contents
Features of Antivirus:
• Malware Detection & Removal:
• Firewall:
• Auto SandBoxing Technique:
• Virus Scan:
• Identity protection:
• Backup:
• Email Protection:
• Social media Protection:
worm
• A worm is a destructive program that fills a computer system with self-
replicating information, clogging the system so that its operations are slowed
down or stopped.
• Program that actively seeks out more machines to infect and each infected
machine serves as an automated launching pad for attacks on other
machines
• Exploits software vulnerabilities in client or server programs
• Can use network connections to spread from system to system
• Spreads through shared media (USB drives, CD, DVD data disks)
• Upon activation the worm may replicate and propagate again
• Has phases like a virus:
dormant, propagation, triggering, execution
• propagation phase: searches for other systems, connects to it, copies self to
it and runs
• Usually carries some form of payload
• First known implementation was done in Xerox Palo Alto Labs in the early
1980s
Types of Worm:
4. Relaxation period
(based on threshold)
Mobile Code
• Mobile code refers to programs (e.g., script, macro, or other portable
instruction) that can be shipped unchanged to a heterogeneous
collection of platforms and execute with identical semantics
• Transmitted from a remote system to a local system and then
executed on the local system
• Often acts as a mechanism for a virus, worm, or Trojan horse
• Takes advantage of vulnerabilities to perform its own exploits
• Can act as an agent for viruses, works, and Trojan horses
• Most common ways of using mobile code for malicious operations on
local system are:
• Cross-site scripting
• Interactive and dynamic Web sites
• E-mail attachments
• Downloads from untrusted sites or of untrusted software
Mobile Phone Worms
• Worms first appeared on mobile phones with the
discovery of the Cabir worm in 2004, and then Lasco
and CommWarrior in 2005. These worms
communicate through Bluetooth wireless connections
or via the multimedia messaging service (MMS).
• Target is the smartphone
• Can completely disable the phone, delete data on the
phone, or force the device to send costly messages
• communicate the Bluetooth connections (e.g.,
CommWarrior on Symbian but attempts on Android
and iPhone)
Client-Side Vulnerabilities and
Drive-by-Downloads
• A common technique exploits browser vulnerabilities
so that when the user views a Web page controlled
by the attacker, it contains code that exploits the
browser bug to download and install malware on the
system without the user’s knowledge or consent.
• This is known as a drive-by download attack and is a
common exploit in recent attack kits. In most cases,
this malware does not actively propagate as a worm
does, but rather waits for unsuspecting users to visit
the malicious Web page in order to spread to their
systems
Clickjacking
• Also known as a user- • Vulnerability used by an
attacker to collect an
interface (UI) redress infected user’s clicks
attack • The attacker can force the user to do a
variety of things from adjusting the
• Using a similar technique, user’s computer settings to unwittingly
sending the user to Web sites that
might have malicious code
keystrokes can also be
• By taking advantage of Adobe Flash or
hijacked JavaScript an attacker could even place
a button under or over a legitimate
• A user can be led to believe button making it difficult for users to
detect
they are typing in the • A typical attack uses multiple
password to their email or transparent or opaque layers to trick a
user into clicking on a button or link on
bank account, but are another page when they were
intending to click on the top level page
instead typing into an
• The attacker is hijacking clicks meant
invisible frame controlled for one page and routing them to
another page
by the attacker
Types of clickjacking attacks
• Likejacking
Likejacking tricks social media users into liking things they didn’t intend to.
• Cursorjacking
Cursorjacking changes the user’s cursor position to a different place from
where the user perceives it.
• Cookiejacking
Cookiejacking is a UI redress attack that steals the victim’s cookies. Once the
attacker obtains the cookies, they can access the information they contain
and use it to impersonate the victim. This is typically achieved by tricking the
victim into dragging and dropping an element on the page. What they are
actually doing is selecting the contents of their cookies on the embedded
invisible page and handing that over to the attacker. The attacker can then
perform actions on the target website on behalf of the user.
• Filejacking
• Filejacking allows the attacker to access the victim’s local file system and
take files. For example, when you upload a photo to social media, a file
browser window appears and you can navigate your file system.
What is social engineering
• Social engineering is the term used for a broad range of malicious activities
accomplished through human interactions. It uses psychological manipulation to trick
users into making security mistakes or giving away sensitive information.
• The attack cycle gives these criminals a reliable process for deceiving you. Steps for the
social engineering attack cycle are usually as follows:
• Prepare by gathering background information on you or a larger group you are a part of.
• Infiltrate by establishing a relationship or initiating an interaction, started by building
trust.
• Exploit the victim once trust and a weakness are established to advance the attack.
• Disengage once the user has taken the desired action.
Social Engineering
• The final category of malware propagation we consider involves
social engineering, “tricking” users to assist in the compromise of
their own systems or personal information. This can occur when a
user views and responds to some SPAM e-mail, or permits the
installation and execution of some Trojan horse program or
scripting code
Types of Social Engineering Attacks
1. Phishing
2. Pretexting
3. Baiting
4. Quid Pro Quo
5. Tailgating
6. CEO Fraud
Trojan Horse
A destructive program. It usually pretends as computer games or
application software. If executed, the computer system will be
damaged. Trojan Horse usually comes with monitoring tools and
key loggers. These are active only when specific events are alive.
These are hidden with packers, crypters and wrappers. Hence,
difficult to detect through antivirus. These can use manual
removal or firewall precaution.
Example of Trojan Horses
• Remote access Trojans (RATs)
• Backdoor Trojans (backdoors)
• IRC Trojans (IRCbots)
• Keylogging Trojans.
Malware Payload
• a payload is the part of a computer virus or other
malware containing the code that carries out the virus's
harmful activity.
• A payload is the part of a computer worm or virus that
executes the code that conducts malicious activity.
Some viruses search for and steal information, monitor
activity, delete files, or encrypt files to hold them
hostage. The other parts of a virus are the vector, which
is the method the virus uses to infect the computer, and
the trigger, which is the condition that activates the
payload.
Payload-System Corruption
• Once malware is active on the target system, the next concern is
what actions it will take on this system. That is, what payload does
it carry. Some malware has a nonexistent or nonfunctional payload.
Its only purpose, either deliberate or due to accidental early
release, is to spread. More commonly, it carries one or more
payloads that perform covert actions for the attacker.
• Data destruction, theft
• Data encryption (ransomware)
• Real-world damage
• Causes damage to physical equipment
• Chernobyl virus rewrites BIOS code
• Stuxnet worm
• Targets specific industrial control system software
• There are concerns about using sophisticated targeted malware
for industrial sabotage
• Logic bomb
• Code embedded in the malware that is set to “explode” when certain
conditions are met
Logic Bombs
• A logic bomb is a program that performs a malicious action as a result
of a certain logic condition.
• The classic example of a logic bomb is a programmer coding up the
software for the payroll system who puts in code that makes the
program crash should it ever process two consecutive payrolls without
paying him.
• Another classic example combines a logic bomb with a backdoor,
where a programmer puts in a logic bomb that will crash the program
on a certain date.
The Omega Engineering Logic Bomb
• An example of a logic bomb that was actually
triggered and caused damage is one that
programmer Tim Lloyd was convicted of using
on his former employer, Omega Engineering
Corporation. On July 31, 1996, a logic bomb
was triggered on the server for Omega
Engineering’s manufacturing operations,
which ultimately cost the company millions of
dollars in damages and led to it laying off
many of its employees.
Payload
System Corruption
Payload – Attack Agents
Bots (zombie/drone)
• Program taking over other computers and launch
attacks
– hard to trace attacks
• If coordinated form a botnet
• Characteristics:
– remote control facility (distinguishing factor)
• via IRC (Internet Relay Chat)/HTTP etc
– spreading mechanism
• attack software, vulnerability, scanning strategy
• Various counter-measures applicable ( Intrusion
Detection System (IDS), honeypots, …)
Uses of bots
• DDoS an attack on a computer system or network that causes a loss of
service to users
• Spamming With the help of a botnet and thousands of bots, an attacker
is able to send massive amounts of bulk e-mail (spam).
• Sniffing traffic Bots can also use a packet sniffer to watch for interesting
clear text data passing by a compromised machine. The sniffers are
mostly used to retrieve sensitive information like usernames and
passwords
• Keylogging by using a keylogger, which captures keystrokes on the
infected machine, an attacker can retrieve sensitive information
• Spreading malware Botnets are used to spread new bots
• Installing advertisement by setting up a fake Web site with some
advertisements
• Manipulating games and polls Online polls/games are getting more and
more attention and it is rather easy to manipulate them with botnets
Remote Control Facility