Week 2
Week 2
Week 2
Reverse
Engineering
[email protected]
Reverse Engineering
Static Techniques
Dynamic Techniques
Hybrid Techniques
Static Techniques
Static Technique
Decompilation is particularly useful when you want Ghidra: Ghidra features a built-in decompiler
for reverse engineering various architectures.
to retrieve the logic or algorithms used in the
program for modification, debugging, or analysis IDA Pro: It also includes an advanced
decompiler that generates high-level
purposes. It is also valuable in identifying pseudocode, making it easier to reverse
vulnerabilities or understanding malware behaviors. engineer complex software.
Disassembly
This technique is used to represent a system’s Enterprise Architect: A comprehensive UML modeling tool that can
reverse-engineer code into UML diagrams for various programming
architecture or behavior visually, making it languages.
easier for developers or analysts to understand Eclipse MoDisco: A tool which is often used to extract architectural
models from existing systems and generate UML diagrams from
the overall structure of the software. source code.
Business Process Modeling Frameworks
• Archimate View
• It provides a uniform way to describe the construction and operation of business
processes, organizational structures, information flows, IT systems, and technical
infrastructures.
• Business Layer
• Focused on how an organization operates, encompassing its processes, people, and
products.
• Application Layer
• Describes the software systems and applications that support the business
processes.
• Technology Layer
• Focuses on the physical and technological infrastructure that supports the
application layer
Business Process Modeling Frameworks
• Zachman Framework
• It provides a structured way of viewing and defining an enterprise. It was developed
by John Zachman in 1987 and is often referred to as a taxonomy for enterprise
architecture.
• The Framework is structured as a two-dimensional grid. It consists of six columns
representing different perspectives and six rows representing different aspects of an
enterprise.
Business Process Modeling Frameworks
Perspective / Aspect What (Data) How (Function) Where (Network) Who (People) When (Time) Why (Motivation)
Planner Contextual Data Contextual Function Contextual Network Contextual People Contextual Time Contextual Motivation
Owner Business Data Business Function Business Network Business People Business Time Business Motivation
Designer System Data System Function System Network System People System Time System Motivation
Builder Technology Data Technology Function Technology Network Technology People Technology Time Technology Motivation
Subcontractor Component Data Component Function Component Network Component People Component Time Component Motivation
Enterprise Detailed Data Detailed Function Detailed Network Detailed People Detailed Time Detailed Motivation
Business Process Modeling Frameworks
• TOGAF (The Open Group Architecture Framework)
• It is used by organizations to design, plan, implement, and govern enterprise architecture. It provides a
structured approach for designing, managing, and improving an organization’s information technology.
1. Preliminary Phase: Establishing the architecture framework.
2. Architecture Vision: Developing a high-level vision of the project.
3. Business Architecture: Designing the business process architecture.
4. Information Systems Architecture:
• Data Architecture: Structure of an organization’s data assets.
• Application Architecture: Software applications supporting business processes.
5. Technology Architecture: Infrastructure supporting the business processes.
6. Opportunities and Solutions: Identifying candidate solutions for implementation.
7. Migration Planning: Creating a roadmap for implementation.
8. Implementation Governance: Ensuring compliance with the architecture.
9. Architecture Change Management: Managing changes to the architecture.
Binary Inspection
It refers to the examination and analysis of a compiled program's binary code without
executing it.
The binary file (e.g., .exe, .dll, or other compiled formats) is inspected to understand the
underlying structure, functionality, and behavior of the software.
Symbol Tables Hexadecimal Control Flow Data Flow
Disassembly Decompilation Code Patterns String Analysis File Structure
and Metadata Representation Analysis Analysis
Signature-based Analysis
• A method where specific known patterns or “signatures” in a
program's binary code are compared to a database of predefined
signatures.
• This technique is commonly used to detect known malware, identify
functions, or recognize particular code behaviors by looking for
matching byte sequences, API calls, or other distinct code
characteristics.
• YARA
• Antivirus Engines
• Ghidra
• IDA Pro
Dynamic Techniques
Dynamic Technique
• Dynamic analysis involves executing the software and monitoring its behavior in real-
time.
• This approach helps to understand how the software interacts with the operating system,
hardware, network, and other components under actual working conditions.
Dynamic Analysis Techniques
System Binary
Tracing Profiling Debugging
Monitoring Instrumentation
Tracing
• A technique that involves monitoring the execution flow of a program
to record its behavior during runtime.
• It focuses on capturing critical runtime information, such as system
calls, function invocations, memory access, and interactions between
different components of the software or system.
Profiling
• A technique used to measure the performance of a program while it runs.
• It helps to understand how much time the program spends on different
tasks, how much memory it uses, and how efficiently it uses system
resources like the CPU and network.
• A bottleneck is a part of the program that slows everything down.
• Profiling helps you find these bottlenecks by showing which parts of the program
take the longest to run or use the most resources.
• CPU Profiling
• Memory Profiling
• I/O Profiling
• Functional Level Profiling
System Monitoring
• Observing how a program interacts with the entire operating system
and external resources in real time.
• It’s mainly used to track external actions a program takes, such as
reading/writing files, making network connections, or using system
resources like memory and CPU.
• Tools
• Process Monitor
• Wireshark
• Sysdig
Tracing vs Profiling vs System Monitoring
Purpose Captures detailed, step-by-step execution of code Measures performance (e.g., CPU, memory usage) Tracks overall system health and resource usage
Output Logs of events/method calls with timestamps Statistical performance data per function/thread Dashboard of metrics, logs, graphs, alerts
Focus Specific functions or processes Code-level resource usage Entire system performance
Tools Android Systrace, Event Tracing for Windows (ETW) Android Studio Profiler, VisualVM System Activity Monitor, Nagios, Prometheus
Debugging
Watchpoints