SlideShare a Scribd company logo
IIITMK
Click to edit Master subtitle style
Indian Institute of Information Technology And Management-Kerala
Obfuscation And Mutations In Malware
Student Name: KADARI SHIVRAJ
Course : M.Sc. Cyber Security- IIIrd Semester
Roll No: 20
IIITMK
• Obfuscation:-
• obfuscation is the deliberate act of creating obfuscated code, i.e. source or
machine code that is difficult for humans to understand.
OBFUSCATION TECHNIQUES:-
i. Dead-code insertion is a simple technique that adds some ineffective instructions
to a program to change its appearance, but keep its behavior . An example of such
instructions is nop(NO OPERATION).
ii. Register reassignment is another simple technique that switches registers from
generation to generation while keeping the program code and its behavior same .
iii. Subroutine reordering obfuscates an original code by changing the order of its
subroutines in a random way . This technique can generate n! different variants, where
n is the number of subroutines. For example, Win32/Ghost had ten subroutines,
leading to 10! = 3628800 different generations.
IIITMK
iv. Instruction substitution evolves an original code by replacing some instructions
with other equivalent ones . For example, xor can be replaced with sub and
mov can be replaced with push/pop .
v. Code transposition reorders the sequence of the instructions of an original code
without having any impact on its behavior . There are two methods to achieve
this technique.
a)The first method randomly shuffles the instructions, and then recovers the
original execution order by inserting the unconditional branches or jumps.
b)The second method creates new generations by choosing and reordering
the independent instructions that have no impact on one another.
vi. In code integration, introduced by the Win95/Zmist malware (called Zmist),
a malware knits itself to the code of its target program. In order to apply this
technique, Zmist firstly decompile its target program into manageable objects,
seamlessly adds itself between them, and reassembles the integrated code into a
new generation.
IIITMK
Malware: A malware is a program with a malicious intent that has the potential to
harm, without the user consent, the machine on which it executes or the network
over which it communicates.
●The term payload refers to the action that a malicious program is designed to
perform on the infected machine.
Malwares are basically classified as first generation and second generation:-
●In first generation , structure of the malwares does not change. But in second
generation, the internal structure of malwares change in every variant while the
actions are maintained same.
●On the basis of how variances are created in malware, second generation
malwares are further classified as Encrypted, Oligomorphic,Polymorphic and
Metamorphic Malwares.
IIITMK
A)First Generation Malwares:-
●Virus: A virus is a self-replicating program that attaches itself to host programs
and propagates when an infected program executes i.e. it requires a host to
propagate.
●Worm: A malicious program that uses a network to send copies of itself to other
systems is usually called a computer worm.
●Trojan horse: As viruses, Trojan horse hide their malicious intent inside host
programs that may look useful, or at least harmless, to an unsuspecting user.
●Back-door: A back-door is a computer program designed to bypass local
security policies in order to allow external entities to have remote control over a
machine or a network.
●Spyware: The term spyware usually refers to malicious programs designed to
monitor users’ actions in order to collect private information and send them to an
external entity over the Internet.
IIITMK
2)Oligomorphic Malware: The short comings of the encrypted malware led to the
development of different concealment techniques. In Oligomorphic malwares
decryptors are mutated from one variant to other.
●The simple method to create Oligomorphic malwares is to provide a set of different
decryptors rather than one.
●For its detection, signature based techniques can be applied by making the signature of all
the decryptors.
B) Second Generation Malwares:-
1)Encrypted Malwares: Encryption was the first concealment techniques used for creating
the 2nd generation malwares .
• It consists of two parts; the encrypted body and a decryption code .
• Usually the body is XORed with a key to make it difficult to detect.
• For each infection, encrypted malware makes the body unique by using different key to
hide the signature.
IIITMK
3)Polymorphic Malwares: In Polymorphic malwares, millions of decryptors can be
generated by changing instructions in the next variant of the malware to avoid signature
based detection.
●Polymorphic malwares are created by using the obfuscation techniques (dead-code
insertion, register reassignment, subroutine reordering, instruction substitution, code
transposition/integration etc.)
4)Metamorphic Malwares: Metamorphic malwares are body-polymorphic.
i.e. Instead of generating new decryptor, a new instance (body) is created
without changing its actions.
●e.g. Phalcon/Skism Mass
IIITMK
MALWARE DETECTION METHODS
1) Signature based methods :-
●Signature is a unique feature for each file, something like a fingerprint of an
executable.
● It is based on methods that use the patterns extracted from various malwares
to identify them and are more efficient and faster than any other methods.
2) Behaviour based methods :-
●In this method, programs with the same behaviour are collected. This single
behaviour signature is used to identify various samples of malware.
●It consists of :
a) Data Collector: This component collects dynamic /static information about the
executable.
b) Interpreter: This component converts raw information collected by data
collection module into intermediate representations.
c) Matcher: It is used to compare this representation with the behaviour signatures.
IIITMK
3)HEURISTIC METHODS:-
●Heuristic malware detection methods use data mining and machine learning
techniques to learn the behaviour of an executable file.
●For example, as the first attempt, Naïve Bayes and Multi Naïve Bayes were
employed by Schultz et al. to classify malware and benign files.
●Naive Bayes is a simple but surprisingly powerful algorithm for predictive
modelling.
IIITMK
a)API/System calls :-
●Almost all programs use application programming interface (API) calls to send
their requests to the Operating System .
●API call sequences is one of the most attractive way that reflects the behaviour
of a piece of code like malware.
b)OpCode:-
●An OpCode is the subdivision of a machine language instruction that identifies
the operation to be executed.
●The most significant research on OpCodes has been done by Bilar . He showed
the ability of single OpCodes to use as a feature in malware detection.
IIITMK
d)Control flow graph:-
●CFG is a directed graph, where each node represents a statement of the program
and each edge represents control flow between the statements (i.e. what happens
after what).
●Zhao proposed a detection method based on features of the control flow graph for
PE files. At first, he created CFG for each executable file. Then, he used features
which extracted from CFG as the train data.
●These features are information about nodes, edges and subgraphs.
c)N-Grams:-
●N-Grams are all substrings of a larger string with a length of N .
●For example, the string “VIRUS”, can be segmented into 3-grams:
“VIR”, “IRU”, “RUS” .
●Tesauro et al. were the first who try to use N-Grams as a feature for malware
detection domain. They used N-Grams to detect Boot Sector Viruses using
Artificial Neural Networks (ANN).
IIITMK
e)Hybrid Features:-
●It is combination of two features.e.g. CFG and API.
●Eskandari et al. used the simple CFG and API calls to detect metamorphic malware.
●CFG was used to understand semantic of malware.
(CFG Contd….)
●After feature selection, some data mining algorithm have been used for
classification based on these features such as Decision Tree , Bagging and
Random Forest.
IIITMK
References:-
1) Issa Traore,Shahid Alam and Ibrahim Sogukpinar, "Current Trends and the Future of
Metamorphic Malware Detection".
2) Ilsun You and Kangbin Yim, "Malware Obfuscation Techniques: A Brief Survey".
3) Marco Gaudesi,Andrea Marcelli,Ernesto Sanchez,Giovanni Squillero and Alberto
Tonda ,"Malware Obfuscation through Evolutionary Packers".
4) Sachin Jain, "Malware Obfuscator for Malicious Executables".
5) Wei Wang, "Virus Obfuscation".
6) Zahra Bazrafshan, Hashem Hashemi, Seyed Mehdi Hazrati Fard and Ali Hamzeh ,"A
Survey on Heuristic Malware Detection Techniques".
7) Mila Dalla Preda, "Code Obfuscation and Malware Detection by Abstract
Interpretation".
IIITMK
Thank you for listening.

More Related Content

PPT
Image Restoration
PPT
Chapter 3: Block Ciphers and the Data Encryption Standard
PPT
Linux forensics
PDF
DNS Attacks
PPTX
Daa unit 5
PDF
ECDSA/EdDSA
PPTX
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
PPTX
Unit3 dip
Image Restoration
Chapter 3: Block Ciphers and the Data Encryption Standard
Linux forensics
DNS Attacks
Daa unit 5
ECDSA/EdDSA
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
Unit3 dip

What's hot (19)

PPTX
NOISE FILTERS IN IMAGE PROCESSING
PPT
Rsa and diffie hellman algorithms
PPTX
Multimedia basic video compression techniques
PPTX
Digital Image restoration
PPTX
Multistage graph unit 4 of algorithm.ppt
PDF
Non-Local Means and its Applications
PDF
How to use miniedit
PPT
Automatic speech recognition
PPT
Operating System 2
PPT
PGP.ppt
PPT
Hash mac algorithms
PDF
EC-Council Certified Ethical Hacker (CEH) v9 - Hackers are here. Where are you?
PPT
S-DES.ppt
PPTX
IBM Secret Key management protoco
PPT
08 frequency domain filtering DIP
PPTX
Transposition cipher techniques
PPTX
Color Models
PPTX
Searching Algorithm
NOISE FILTERS IN IMAGE PROCESSING
Rsa and diffie hellman algorithms
Multimedia basic video compression techniques
Digital Image restoration
Multistage graph unit 4 of algorithm.ppt
Non-Local Means and its Applications
How to use miniedit
Automatic speech recognition
Operating System 2
PGP.ppt
Hash mac algorithms
EC-Council Certified Ethical Hacker (CEH) v9 - Hackers are here. Where are you?
S-DES.ppt
IBM Secret Key management protoco
08 frequency domain filtering DIP
Transposition cipher techniques
Color Models
Searching Algorithm
Ad

Similar to Obfuscation and Mutation in Malware (20)

PDF
Survey on Malware Detection Techniques
PDF
A SURVEY ON MALWARE DETECTION AND ANALYSIS TOOLS
PPTX
Antimalware
PDF
Automated malware invariant generation
PPTX
Malware- Types, Detection and Future
PPTX
Malware and Anti-Malware Seminar by Benny Czarny
PPTX
04-malware.pptx "Malware creeps unseen, corrupting data and control."
PDF
Computer Viruses and Malware by John Aycock (auth.) (z-lib.org).pdf
PPTX
Type of Malware and its different analysis and its types !
PDF
Modern malware and threats
PDF
Malware Analysis: Ransomware
PPT
Malware and Modern Propagation Techniques
PPTX
Malware Classification and Analysis
PDF
A novel ensemble-based approach for Windows malware detection
PPT
PPT
The Future of Automated Malware Generation
PDF
Malware Analysis -an overview by PP Singh
PDF
'Malware Analysis' by PP Singh
PPTX
Presentation_malware_anti_malware.pptx
Survey on Malware Detection Techniques
A SURVEY ON MALWARE DETECTION AND ANALYSIS TOOLS
Antimalware
Automated malware invariant generation
Malware- Types, Detection and Future
Malware and Anti-Malware Seminar by Benny Czarny
04-malware.pptx "Malware creeps unseen, corrupting data and control."
Computer Viruses and Malware by John Aycock (auth.) (z-lib.org).pdf
Type of Malware and its different analysis and its types !
Modern malware and threats
Malware Analysis: Ransomware
Malware and Modern Propagation Techniques
Malware Classification and Analysis
A novel ensemble-based approach for Windows malware detection
The Future of Automated Malware Generation
Malware Analysis -an overview by PP Singh
'Malware Analysis' by PP Singh
Presentation_malware_anti_malware.pptx
Ad

Recently uploaded (20)

PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PPTX
Mathew Digital SEO Checklist Guidlines 2025
PDF
simpleintnettestmetiaerl for the simple testint
PDF
Containerization lab dddddddddddddddmanual.pdf
PDF
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
PDF
Understand the Gitlab_presentation_task.pdf
PPT
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
PDF
Exploring VPS Hosting Trends for SMBs in 2025
PDF
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
PDF
BIOCHEM CH2 OVERVIEW OF MICROBIOLOGY.pdf
PPTX
1402_iCSC_-_RESTful_Web_APIs_--_Josef_Hammer.pptx
PPTX
artificialintelligenceai1-copy-210604123353.pptx
PPTX
The-Importance-of-School-Sanitation.pptx
PDF
Exploring The Internet Of Things(IOT).ppt
PDF
Uptota Investor Deck - Where Africa Meets Blockchain
PPTX
Database Information System - Management Information System
PPTX
module 1-Part 1.pptxdddddddddddddddddddddddddddddddddddd
PDF
Introduction to the IoT system, how the IoT system works
PDF
Alethe Consulting Corporate Profile and Solution Aproach
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
Mathew Digital SEO Checklist Guidlines 2025
simpleintnettestmetiaerl for the simple testint
Containerization lab dddddddddddddddmanual.pdf
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
Understand the Gitlab_presentation_task.pdf
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
Power Point - Lesson 3_2.pptx grad school presentation
Exploring VPS Hosting Trends for SMBs in 2025
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
BIOCHEM CH2 OVERVIEW OF MICROBIOLOGY.pdf
1402_iCSC_-_RESTful_Web_APIs_--_Josef_Hammer.pptx
artificialintelligenceai1-copy-210604123353.pptx
The-Importance-of-School-Sanitation.pptx
Exploring The Internet Of Things(IOT).ppt
Uptota Investor Deck - Where Africa Meets Blockchain
Database Information System - Management Information System
module 1-Part 1.pptxdddddddddddddddddddddddddddddddddddd
Introduction to the IoT system, how the IoT system works
Alethe Consulting Corporate Profile and Solution Aproach

Obfuscation and Mutation in Malware

  • 1. IIITMK Click to edit Master subtitle style Indian Institute of Information Technology And Management-Kerala Obfuscation And Mutations In Malware Student Name: KADARI SHIVRAJ Course : M.Sc. Cyber Security- IIIrd Semester Roll No: 20
  • 2. IIITMK • Obfuscation:- • obfuscation is the deliberate act of creating obfuscated code, i.e. source or machine code that is difficult for humans to understand. OBFUSCATION TECHNIQUES:- i. Dead-code insertion is a simple technique that adds some ineffective instructions to a program to change its appearance, but keep its behavior . An example of such instructions is nop(NO OPERATION). ii. Register reassignment is another simple technique that switches registers from generation to generation while keeping the program code and its behavior same . iii. Subroutine reordering obfuscates an original code by changing the order of its subroutines in a random way . This technique can generate n! different variants, where n is the number of subroutines. For example, Win32/Ghost had ten subroutines, leading to 10! = 3628800 different generations.
  • 3. IIITMK iv. Instruction substitution evolves an original code by replacing some instructions with other equivalent ones . For example, xor can be replaced with sub and mov can be replaced with push/pop . v. Code transposition reorders the sequence of the instructions of an original code without having any impact on its behavior . There are two methods to achieve this technique. a)The first method randomly shuffles the instructions, and then recovers the original execution order by inserting the unconditional branches or jumps. b)The second method creates new generations by choosing and reordering the independent instructions that have no impact on one another. vi. In code integration, introduced by the Win95/Zmist malware (called Zmist), a malware knits itself to the code of its target program. In order to apply this technique, Zmist firstly decompile its target program into manageable objects, seamlessly adds itself between them, and reassembles the integrated code into a new generation.
  • 4. IIITMK Malware: A malware is a program with a malicious intent that has the potential to harm, without the user consent, the machine on which it executes or the network over which it communicates. ●The term payload refers to the action that a malicious program is designed to perform on the infected machine. Malwares are basically classified as first generation and second generation:- ●In first generation , structure of the malwares does not change. But in second generation, the internal structure of malwares change in every variant while the actions are maintained same. ●On the basis of how variances are created in malware, second generation malwares are further classified as Encrypted, Oligomorphic,Polymorphic and Metamorphic Malwares.
  • 5. IIITMK A)First Generation Malwares:- ●Virus: A virus is a self-replicating program that attaches itself to host programs and propagates when an infected program executes i.e. it requires a host to propagate. ●Worm: A malicious program that uses a network to send copies of itself to other systems is usually called a computer worm. ●Trojan horse: As viruses, Trojan horse hide their malicious intent inside host programs that may look useful, or at least harmless, to an unsuspecting user. ●Back-door: A back-door is a computer program designed to bypass local security policies in order to allow external entities to have remote control over a machine or a network. ●Spyware: The term spyware usually refers to malicious programs designed to monitor users’ actions in order to collect private information and send them to an external entity over the Internet.
  • 6. IIITMK 2)Oligomorphic Malware: The short comings of the encrypted malware led to the development of different concealment techniques. In Oligomorphic malwares decryptors are mutated from one variant to other. ●The simple method to create Oligomorphic malwares is to provide a set of different decryptors rather than one. ●For its detection, signature based techniques can be applied by making the signature of all the decryptors. B) Second Generation Malwares:- 1)Encrypted Malwares: Encryption was the first concealment techniques used for creating the 2nd generation malwares . • It consists of two parts; the encrypted body and a decryption code . • Usually the body is XORed with a key to make it difficult to detect. • For each infection, encrypted malware makes the body unique by using different key to hide the signature.
  • 7. IIITMK 3)Polymorphic Malwares: In Polymorphic malwares, millions of decryptors can be generated by changing instructions in the next variant of the malware to avoid signature based detection. ●Polymorphic malwares are created by using the obfuscation techniques (dead-code insertion, register reassignment, subroutine reordering, instruction substitution, code transposition/integration etc.) 4)Metamorphic Malwares: Metamorphic malwares are body-polymorphic. i.e. Instead of generating new decryptor, a new instance (body) is created without changing its actions. ●e.g. Phalcon/Skism Mass
  • 8. IIITMK MALWARE DETECTION METHODS 1) Signature based methods :- ●Signature is a unique feature for each file, something like a fingerprint of an executable. ● It is based on methods that use the patterns extracted from various malwares to identify them and are more efficient and faster than any other methods. 2) Behaviour based methods :- ●In this method, programs with the same behaviour are collected. This single behaviour signature is used to identify various samples of malware. ●It consists of : a) Data Collector: This component collects dynamic /static information about the executable. b) Interpreter: This component converts raw information collected by data collection module into intermediate representations. c) Matcher: It is used to compare this representation with the behaviour signatures.
  • 9. IIITMK 3)HEURISTIC METHODS:- ●Heuristic malware detection methods use data mining and machine learning techniques to learn the behaviour of an executable file. ●For example, as the first attempt, Naïve Bayes and Multi Naïve Bayes were employed by Schultz et al. to classify malware and benign files. ●Naive Bayes is a simple but surprisingly powerful algorithm for predictive modelling.
  • 10. IIITMK a)API/System calls :- ●Almost all programs use application programming interface (API) calls to send their requests to the Operating System . ●API call sequences is one of the most attractive way that reflects the behaviour of a piece of code like malware. b)OpCode:- ●An OpCode is the subdivision of a machine language instruction that identifies the operation to be executed. ●The most significant research on OpCodes has been done by Bilar . He showed the ability of single OpCodes to use as a feature in malware detection.
  • 11. IIITMK d)Control flow graph:- ●CFG is a directed graph, where each node represents a statement of the program and each edge represents control flow between the statements (i.e. what happens after what). ●Zhao proposed a detection method based on features of the control flow graph for PE files. At first, he created CFG for each executable file. Then, he used features which extracted from CFG as the train data. ●These features are information about nodes, edges and subgraphs. c)N-Grams:- ●N-Grams are all substrings of a larger string with a length of N . ●For example, the string “VIRUS”, can be segmented into 3-grams: “VIR”, “IRU”, “RUS” . ●Tesauro et al. were the first who try to use N-Grams as a feature for malware detection domain. They used N-Grams to detect Boot Sector Viruses using Artificial Neural Networks (ANN).
  • 12. IIITMK e)Hybrid Features:- ●It is combination of two features.e.g. CFG and API. ●Eskandari et al. used the simple CFG and API calls to detect metamorphic malware. ●CFG was used to understand semantic of malware. (CFG Contd….) ●After feature selection, some data mining algorithm have been used for classification based on these features such as Decision Tree , Bagging and Random Forest.
  • 13. IIITMK References:- 1) Issa Traore,Shahid Alam and Ibrahim Sogukpinar, "Current Trends and the Future of Metamorphic Malware Detection". 2) Ilsun You and Kangbin Yim, "Malware Obfuscation Techniques: A Brief Survey". 3) Marco Gaudesi,Andrea Marcelli,Ernesto Sanchez,Giovanni Squillero and Alberto Tonda ,"Malware Obfuscation through Evolutionary Packers". 4) Sachin Jain, "Malware Obfuscator for Malicious Executables". 5) Wei Wang, "Virus Obfuscation". 6) Zahra Bazrafshan, Hashem Hashemi, Seyed Mehdi Hazrati Fard and Ali Hamzeh ,"A Survey on Heuristic Malware Detection Techniques". 7) Mila Dalla Preda, "Code Obfuscation and Malware Detection by Abstract Interpretation".
  • 14. IIITMK Thank you for listening.