SlideShare a Scribd company logo
Reverse Engineering
Protecting and Breaking the Software
WORKSHOP
Satria Ady Pradana
https://xathrya.id
Reversing.ID
Revealing the Truth through Breaking Things
# Whoami?
 Cyber Security Consultant at Mitra Integrasi Informatika (MII)
 Researcher at dracOs Dev Team
 Coordinator of Reversing.ID
 Member of Indonesia Honeynet Project
Overview
 Engage in practical basic reverse engineering activity
 Three basic reverse engineering principle.
 Common reversing technique
Review the Reversing
What, Why, and How?
The Term
 Originally used in the context of mechanical engineering
 Breaks down an existing object or system to its construction
and then rebuild it based on new demand.
 Extracting knowledge or design information from anything man-
mad and reproducing it or reproduce anything based on the
extracted information.
Fundamental Principle
 Comprehension
 Gain knowledge of basic principle or mechanics of object, the
behavior, and knowledge that might related to subject.
 Decomposition
 Breaking down the system into its structure and gain insight about
inherent structure and properties of the component that make the
system.
 Reconstruction
 Reform or reconstruct the components based on need.
Common Practice
 Resource Modification (Modding)
 Modify the application resource.
 Control Flow Bypass
 Alter program flow, force the execution to takes or jump over the
intended action.
 Code Caving
 Writing code to specific region of process.
The Language
 Various programming language exists with unique and
distinctive characteristic.
 Typically, divided into two classes of programming language:
native, interpreted.
 Native: C, C++, Pascal, Rust, Assembly.
 Interpreted: Python, Ruby, Java, .NET
The Executable Format
 Application has a format.
 Identify by magic number.
 Structured and has some sections for data, code, resource, etc.
 Function might be provided by foreign module (ex: DLL), list of
imported function is maintained.
Reverse Engineering: Protecting and Breaking the Software (Workshop)
Reverse Engineering: Protecting and Breaking the Software (Workshop)
Common Tools
 Hex Editor
 Disassembler
 Debugger
 Resource Editor
Our Tools
 Radare2
 Mono
Our Target
 CrackMe.cs
 Challenge.cs
 Compile them
 mcs CrackMe.cs
Dwelling to the New Language
 Learning one programming language might speed up learning
curve for learning other programming language.
 The basic programming syntax you need to know:
 Basic type declaration
 Control Flow:
 Decision (if, switch, etc)
 Loop (for, while, etc)
 Function
 The rest is about language charactestic.
C#
 Managed code, interpreted
 Run on top of .NET framework
 Translated into “bytecode” or some kind of “assembly”
 The language is called Common Interpreted Language (CIL)
 The interpreter is called Common Language Runtime (CLR)
 Very similar to its high level code.
Operations to Know in “Assembly”
 Assignment
 Load/Store data
 Branching (Jump & Call)
 Arithmetic
 Logical
 Language specific feature
Hands On: CrackMe in C#
Task 1: Get Binary Information
 $ file CrackMe.exe
 $ rabin2 –I CrackMe.exe
Task 2: Disassembler and Assembler the
Code
 $ monodis CrackMe.exe --output=CrackMe.cil
 $ ilasm /exe /output:CrackMe2.exe CrackMe.cil
Task 3: Modify Resource (String)
 Disassemble the file
 Search for header string, such as “Personalize Crackme for
Satria”
 Change to exclusive for you, such as “Personalize Crackme for
Ady”
 Assemble the file
Task 4: Get the Right Password
 We are asked for password.
 Grab it.
 It is hardcoded so you may need to scroll the code.
Task 5: Bypass the Jump
 Something happen, our code is stopped. Jump to the next
stage, please.
 There is a mechanism that checking the condition. See the
return value of stage1() and see the required value.
Task 6: Change Target Function
 We got the wrong destination, let see if we are able to change
it.
 Currently we are calling a function stage3() while the function
we want is stage3_true()
 Change the code to the respective intention.
Task 7: Inject Custom Code
 Mayday!
 We need code!
 Write it by yourself.
 The last stage require specific value assigned to access the
function. We can create a function to change this value and call
it before calling the function.
Challenge

More Related Content

PPTX
Reverse Engineering: Protecting and Breaking the Software
PPTX
(Workshop) Reverse Engineering - Protecting and Breaking the Software
PPTX
Reverse Engineering - Protecting and Breaking the Software
PPTX
Malware for Red Team
PDF
Silabus Training Reverse Engineering
PPTX
(Training) Malware - To the Realm of Malicious Code
PPTX
Go Hack Yourself - 10 Pen Test Tactics for Blue Teamers
PPTX
Student Spring 2021
Reverse Engineering: Protecting and Breaking the Software
(Workshop) Reverse Engineering - Protecting and Breaking the Software
Reverse Engineering - Protecting and Breaking the Software
Malware for Red Team
Silabus Training Reverse Engineering
(Training) Malware - To the Realm of Malicious Code
Go Hack Yourself - 10 Pen Test Tactics for Blue Teamers
Student Spring 2021

What's hot (19)

PPTX
Firmware Reverse Engineering
PDF
Introduction to Memory Analysis
PDF
Windows Threat Hunting
PDF
Real World Application Threat Modelling By Example
PDF
Automating Analysis and Exploitation of Embedded Device Firmware
PPTX
Billions & Billions of Logs
PDF
Finacle - Secure Coding Practices
PPTX
Server Side Template Injection by Mandeep Jadon
PDF
SmartphoneHacking_Android_Exploitation
PPTX
Dissecting Android APK
PDF
A journey into Application Security
PDF
Over-the-Air: How we Remotely Compromised the Gateway, BCM, and Autopilot ECU...
PPTX
Investigating Malware using Memory Forensics
PDF
Cyber_Attack_Forecasting_Jones_2015
PPTX
AlienVault Brute Force Attacks- Keeping the Bots at Bay with AlienVault USM +...
PDF
Persistence in windows
PPTX
Understand How Machine Learning Defends Against Zero-Day Threats
PPTX
Dracos forensic flavor
Firmware Reverse Engineering
Introduction to Memory Analysis
Windows Threat Hunting
Real World Application Threat Modelling By Example
Automating Analysis and Exploitation of Embedded Device Firmware
Billions & Billions of Logs
Finacle - Secure Coding Practices
Server Side Template Injection by Mandeep Jadon
SmartphoneHacking_Android_Exploitation
Dissecting Android APK
A journey into Application Security
Over-the-Air: How we Remotely Compromised the Gateway, BCM, and Autopilot ECU...
Investigating Malware using Memory Forensics
Cyber_Attack_Forecasting_Jones_2015
AlienVault Brute Force Attacks- Keeping the Bots at Bay with AlienVault USM +...
Persistence in windows
Understand How Machine Learning Defends Against Zero-Day Threats
Dracos forensic flavor
Ad

Similar to Reverse Engineering: Protecting and Breaking the Software (Workshop) (20)

PPTX
Reverse Engineering: The Crash Course
PDF
Nt1310 Unit 3 Language Analysis
PDF
MobSecCon 2015 - Dynamic Analysis of Android Apps
PDF
Object Oriented Programming With C 2140705 Darshan All Unit Darshan Institute...
PPTX
Framework engineering JCO 2011
PPTX
Presentation5
PPT
C++ classes tutorials
PDF
OOPs Interview Questions PDF By ScholarHat
PDF
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
PDF
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
PDF
Answer ado.net pre-exam2018
DOCX
Java interview questions and answers
PDF
Agile_goa_2013_clean_code_tdd
PPTX
Php oop (1)
PPTX
Session 02 - Elements of Java Language
PPTX
iOS course day 1
PPTX
Top 20 Asp.net interview Question and answers
PDF
Java chapter 3 - OOPs concepts
PPT
Java Basics
PPTX
Some more Concepts of DOT cvcvcvNET.pptx
Reverse Engineering: The Crash Course
Nt1310 Unit 3 Language Analysis
MobSecCon 2015 - Dynamic Analysis of Android Apps
Object Oriented Programming With C 2140705 Darshan All Unit Darshan Institute...
Framework engineering JCO 2011
Presentation5
C++ classes tutorials
OOPs Interview Questions PDF By ScholarHat
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
Answer ado.net pre-exam2018
Java interview questions and answers
Agile_goa_2013_clean_code_tdd
Php oop (1)
Session 02 - Elements of Java Language
iOS course day 1
Top 20 Asp.net interview Question and answers
Java chapter 3 - OOPs concepts
Java Basics
Some more Concepts of DOT cvcvcvNET.pptx
Ad

More from Satria Ady Pradana (20)

PPTX
Down The Rabbit Hole, From Networker to Security Professional
PPTX
MITM: Tales of Trust and Betrayal
PPTX
Berkarir di Cyber Security
PPTX
IOT Security FUN-damental
PPTX
Python-Assisted Red-Teaming Operation
PPTX
IoT Security - Preparing for the Worst
PPTX
Practical Security - Modern Day Software
PPTX
The Offensive Python: Practical Python for Penetration Testing
PPTX
From Reversing to Exploitation: Android Application Security in Essence
PPTX
Android Security: Art of Exploitation
PPTX
Bypass Security Checking with Frida
PPTX
Malware: To The Realm of Malicious Code (Training)
PPTX
Memory Forensic: Investigating Memory Artefact (Workshop)
PPTX
Memory Forensic: Investigating Memory Artefact
PPTX
Another Side of Hacking
PPTX
Automatic Malware Analysis & Repository
PPTX
Web Security Jumpstart
PPTX
DracOs Forensic Flavor - Workshop
PPTX
DracOs Forensic Flavor
PPTX
Path of Cyber Security
Down The Rabbit Hole, From Networker to Security Professional
MITM: Tales of Trust and Betrayal
Berkarir di Cyber Security
IOT Security FUN-damental
Python-Assisted Red-Teaming Operation
IoT Security - Preparing for the Worst
Practical Security - Modern Day Software
The Offensive Python: Practical Python for Penetration Testing
From Reversing to Exploitation: Android Application Security in Essence
Android Security: Art of Exploitation
Bypass Security Checking with Frida
Malware: To The Realm of Malicious Code (Training)
Memory Forensic: Investigating Memory Artefact (Workshop)
Memory Forensic: Investigating Memory Artefact
Another Side of Hacking
Automatic Malware Analysis & Repository
Web Security Jumpstart
DracOs Forensic Flavor - Workshop
DracOs Forensic Flavor
Path of Cyber Security

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Empathic Computing: Creating Shared Understanding
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
KodekX | Application Modernization Development
PDF
Approach and Philosophy of On baking technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
20250228 LYD VKU AI Blended-Learning.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
NewMind AI Weekly Chronicles - August'25 Week I
Empathic Computing: Creating Shared Understanding
MYSQL Presentation for SQL database connectivity
Chapter 3 Spatial Domain Image Processing.pdf
Machine learning based COVID-19 study performance prediction
Encapsulation_ Review paper, used for researhc scholars
Understanding_Digital_Forensics_Presentation.pptx
Spectral efficient network and resource selection model in 5G networks
The AUB Centre for AI in Media Proposal.docx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
KodekX | Application Modernization Development
Approach and Philosophy of On baking technology
Big Data Technologies - Introduction.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Advanced methodologies resolving dimensionality complications for autism neur...

Reverse Engineering: Protecting and Breaking the Software (Workshop)

  • 1. Reverse Engineering Protecting and Breaking the Software WORKSHOP Satria Ady Pradana https://xathrya.id Reversing.ID Revealing the Truth through Breaking Things
  • 2. # Whoami?  Cyber Security Consultant at Mitra Integrasi Informatika (MII)  Researcher at dracOs Dev Team  Coordinator of Reversing.ID  Member of Indonesia Honeynet Project
  • 3. Overview  Engage in practical basic reverse engineering activity  Three basic reverse engineering principle.  Common reversing technique
  • 5. The Term  Originally used in the context of mechanical engineering  Breaks down an existing object or system to its construction and then rebuild it based on new demand.  Extracting knowledge or design information from anything man- mad and reproducing it or reproduce anything based on the extracted information.
  • 6. Fundamental Principle  Comprehension  Gain knowledge of basic principle or mechanics of object, the behavior, and knowledge that might related to subject.  Decomposition  Breaking down the system into its structure and gain insight about inherent structure and properties of the component that make the system.  Reconstruction  Reform or reconstruct the components based on need.
  • 7. Common Practice  Resource Modification (Modding)  Modify the application resource.  Control Flow Bypass  Alter program flow, force the execution to takes or jump over the intended action.  Code Caving  Writing code to specific region of process.
  • 8. The Language  Various programming language exists with unique and distinctive characteristic.  Typically, divided into two classes of programming language: native, interpreted.  Native: C, C++, Pascal, Rust, Assembly.  Interpreted: Python, Ruby, Java, .NET
  • 9. The Executable Format  Application has a format.  Identify by magic number.  Structured and has some sections for data, code, resource, etc.  Function might be provided by foreign module (ex: DLL), list of imported function is maintained.
  • 12. Common Tools  Hex Editor  Disassembler  Debugger  Resource Editor
  • 14. Our Target  CrackMe.cs  Challenge.cs  Compile them  mcs CrackMe.cs
  • 15. Dwelling to the New Language  Learning one programming language might speed up learning curve for learning other programming language.  The basic programming syntax you need to know:  Basic type declaration  Control Flow:  Decision (if, switch, etc)  Loop (for, while, etc)  Function  The rest is about language charactestic.
  • 16. C#  Managed code, interpreted  Run on top of .NET framework  Translated into “bytecode” or some kind of “assembly”  The language is called Common Interpreted Language (CIL)  The interpreter is called Common Language Runtime (CLR)  Very similar to its high level code.
  • 17. Operations to Know in “Assembly”  Assignment  Load/Store data  Branching (Jump & Call)  Arithmetic  Logical  Language specific feature
  • 19. Task 1: Get Binary Information  $ file CrackMe.exe  $ rabin2 –I CrackMe.exe
  • 20. Task 2: Disassembler and Assembler the Code  $ monodis CrackMe.exe --output=CrackMe.cil  $ ilasm /exe /output:CrackMe2.exe CrackMe.cil
  • 21. Task 3: Modify Resource (String)  Disassemble the file  Search for header string, such as “Personalize Crackme for Satria”  Change to exclusive for you, such as “Personalize Crackme for Ady”  Assemble the file
  • 22. Task 4: Get the Right Password  We are asked for password.  Grab it.  It is hardcoded so you may need to scroll the code.
  • 23. Task 5: Bypass the Jump  Something happen, our code is stopped. Jump to the next stage, please.  There is a mechanism that checking the condition. See the return value of stage1() and see the required value.
  • 24. Task 6: Change Target Function  We got the wrong destination, let see if we are able to change it.  Currently we are calling a function stage3() while the function we want is stage3_true()  Change the code to the respective intention.
  • 25. Task 7: Inject Custom Code  Mayday!  We need code!  Write it by yourself.  The last stage require specific value assigned to access the function. We can create a function to change this value and call it before calling the function.