SlideShare a Scribd company logo
Practical Malware Analysis
Ch 9: OllyDbg
Last modified 3-21-16
History
• OllyDbg was developed more than a
decade ago
• First used to crack software and to
develop exploits
• The OllyDbg 1.1 source code was
purchased by Immunity and rebranded as
Immunity Debugger
• The two products are very similar
Don't Use OllyDbg 2!
Loading Malware
Ways to Debug Malware
• You can load EXEs or DLLs directly into
OllyDbg
• If the malware is already running, you can
attach OllyDbg to the running process
Opening an EXE
• File, Open
• Add command-line arguments if needed
• OllyDbg will stop at the entry point,
WinMain, if it can be determined
• Otherwise it will break at the entry point
defined in the PE Header
– Configurable in Options, Debugging Options
Attaching to a Running Process
• File, Attach
• OllyDbg breaks in and pauses the program
and all threads
– If you catch it in DLL, set a breakpoint on
access to the entire code section to get to
the interesting code
Reloading a File
• Ctrl+F2 reloads the current executable
• F2 sets a breakpoint
The OllyDbg Interface
Disassembler
Highlight: next instruction
to be executed
Registers
Stack
Memory
dump
Modifying Data
• Disassembler window
– Press spacebar
• Registers or Stack
– Right-click, modify
• Memory dump
– Right-click, Binary, Edit
– Ctrl+G to go to a memory location
– Right-click a memory address in another pane
and click "Follow in dump"
Memory Map
View, Memory Map
• EXE and DLLs are identified
• Double-click any row to show a memory dump
• Right-click, View in Disassembler
Rebasing
• Rebasing occurs when a module is not loaded
at its preferred base address
• PE files have a preferred base address
– The image base in the PE header
– Usually the file is loaded at that address
– Most EXEs are designed to be loaded at
0x00400000
• EXEs that support Address Space Layout
Randomization (ASLR) will often be relocated
DLL Rebasing
• DLLs are more commonly relocated
– Because a single application may import many
DLLs
– Windows DLLs have different base addresses
to avoid this
– Third-party DLLs often have the same
preferred base address
Absolute v. Relative Addresses
• The first 3 instructions will work fine if
relocated because they use relative
addresses
• The last one has an absolute address that
will be wrong if the code is relocated
Fix-up Locations
• Most DLLS have a list of fix-up locations in
the .reloc section of the PE header
– These are instructions that must be changed
when code is relocated
• DLLs are loaded after the EXE and in any
order
• You cannot predict where DLLs will be
located in memory if they are rebased
DLL Rebasing
• DLLS can have their .reloc removed
– Such a DLL cannot be relocated
– Must load at its preferred base address
• Relocating DLLs is bad for performance
– Adds to load time
– So good programmers specify non-default
base addresses when compiling DLLs
Example of DLL Rebasing

Olly Memory Map
• DLL-A and DLL-B prefer location
0x100000000
IDA Pro
• IDA Pro is not attached to a real running
process
• It doesn't know about rebasing
• If you use OllyDbg and IDA Pro at the same
time, you may get different results
– To avoid this, use the "Manual Load" option in
IDA Pro
– Specify the virtual base address manually
Viewing Threads and Stacks
• View, Threads
• Right-click a thread to "Open in CPU", kill
it, etc.
Each Thread Has its Own Stack
• Visible in Memory Map
Executing Code
Run and Pause
• You could Run a program and click Pause
when it's where you want it to be
• But that's sloppy and might leave you
somewhere uninteresting, such as inside
library code
• Setting breakpoints is much better
Run and Run to Selection
• Run is useful to resume execution after
hitting a breakpoint
• Run to Selection will execute until just
before the selected instruction is
executed
– If the selection is never executed, it will run
indefinitely
Execute till Return
• Pauses execution until just before the
current function is set to return
• Can be useful if you want to finish the
current function and stop
• But if the function never ends, the
program will continue to run indefinitely
Execute till User Code
• Useful if you get lost in library code
during debugging
• Program will continue to run until it hit
compiled malware code
– Typically the .text section
Stepping Through Code
• F7 -- Single-step (also called step-into)
• F8 -- Step-over
– Stepping-over means all the code is executed,
but you don't see it happen
• Some malware is designed to fool you, by
calling routines and never returning, so
stepping over will miss the most
important part
Breakpoints
Types of Breakpoints
• Software breakpoints
• Hardware breakpoints
• Conditional breakpoints
• Breakpoints on memory
• F2 – Add or remove a breakpoint
Viewing Active Breakpoints
• View, Breakpoints, or click B icon on
toolbar
Saving Breakpoints
• When you close OllyDbg, it saves your
breakpoints
• If you open the same file again, the
breakpoints are still available
Software Breakpoints
• Useful for string decoders
• Malware authors often obfuscate strings
– With a string decoder that is called before
each string is used
String Decoders
• Put a breakpoint at the end of the
decoder routine
• The string becomes readable on the stack

Each time you press Play in OllyDbg, the
program will execute and will break when
a string is decoded for use
• This method will only reveal strings as
they are used
Conditional Breakpoints
• Breaks only when a condition is true
• Ex: Poison Ivy backdoor
– Poison Ivy allocates memory to house the
shellcode it receives from Command and
Control (C&C) servers
– Most memory allocations are for other
purposes and uninteresting
– Set a conditional breakpoint at the
VirtualAlloc function in Kernel32.dll
Normal Breakpoint
• Put a standard breakpoint at the start of
the VirtualAlloc function
• Here's the stack when it hits, showing five
items:
– Return address
– 4 parameters (Address, Size, AllocationType,
Protect)
Conditional Breakpoint
Hardware Breakpints
• Don't alter code, stack, or any target
resource
• Don't slow down execution
• But you can only set 4 at a time
• Click Breakpoint, "Hardware, on Execution"
• You can set OllyDbg to use hardware
breakpoints by default in Debugging Options
– Useful if malware uses anti-debugging
techniques
Memory Breakpoints
• Code breaks on access to specified
memory location
• OllyDbg supports software and hardware
memory breakpoints
• Can break on read, write, execute, or any
access
• Right-click memory location, click
Breakpoint, "Memory, on Access"
Memory Breakpoints
• You can only set one memory breakpoint
at a time
• OllyDbg implements memory breakpoints
by changing the attributes of memory
blocks
• This technique is not reliable and has
considerable overhead
• Use memory breakpoints sparingly
When is a DLL Used?
Loading DLLs
loaddll.exe
• DLLs cannot be executed directly
• OllyDbg uses a dummy loaddll.exe
program to load them
• Breaks at the DLL entry point DLLMain
once the DLL is loaded
• Press Play to run DLLMain and initialize
the DLL for use
Demo
• Get OllyDbg 1.10, NOT 2.00 or 2.01
– Link Ch 9a
• Use Win XP or Win 7
• In OllyDbg, open c:windows
system32ws2_32.dll
• Debug, Call DLL Export – it fails
• Reload the DLL, click Run button once
• Debug, Call DLL Export – now it works
Call Exports in ws2_32.dll
ntohl
• Converts a 32-bit number from network to
host byte order
• Click argument 1, type in 7f000001
– 127.0.0.1 in "network" byte order
• Click "Follow in Disassembler" to see the
code
• Click "Call" to run the function
• Answer in EAX
Don't Use OllyDbg 2!
Tracing
Tracing
• Powerful debugging technique
• Records detailed execution information
• Types of Tracing
– Standard Back Trace
– Call Stack Trace
– Run Trace
Standard Back Trace
• You move through the disassembler with
the Step Into and Step Over buttons
• OllyDbg is recording your movement
• Use minus key on keyboard to see previous
instructions
– But you won't see previous register values
• Plus key takes you forward
– If you used Step Over, you cannot go back and
decide to step into
Call Stack Trace
• Views the execution path to a given
function
• Click View, Call Stack
• Displays the sequence of calls to reach
your current location
Run Trace
• Code runs, and OllyDbg saves every
executed instruction and all changes to
registers and flags
• Highlight code, right-click, Run Trace,
Add Selection
• After code executes, View, Run Trace
– To see instructions that were executed
– + and - keys to step forward and backwards
Trace Into and Trace Over
• Buttons below "Options"
• Easier to use than Add Selection
• If you don't set breakpoints, OllyDbg will
attempt to trace the entire program,
which could take a long time and a lot of
memory
Debug, Set Condition
• Traces until a
condition hits
• This condition
catches Poison
Ivy shellcode,
which places
code in
dynamically
allocated
memory below
0x400000
Exception Handling
When an Exception Occurs
• OllyDbg will stop the program
• You have these options to pass the
exception into the program:
– Shift+F7 Step into exception
– Shift+F8: Step over exception
– Shift+F9: Run exception handler
• Often you just ignore all exceptions in
malware analysis
– We aren't trying to fix problems in code
Patching
Binary Edit
Fill
• Fill with 00
• Fill with NOP (0x90)
– Used to skip instructions
– e.g. to force a branch
Saving Patched Code
• Right-click disassembler window after
patching
– Copy To Executable, All Modifications, Save
File
– Copy All
• Right-click in new window
– Save File
Analyzing Shellcode
Undocumented technique
Easy Way to Analyze Shellcode
• Copy shellcode from a hex editor to
clipboard
• Within memory map, select a region of type
"Priv" (Private memory)
• Double-click rows in memory map to show a
hex dump
– Find a region of hundreds of consecutive zeroes
• Right-click chosen region in Memory Map,
Set Access, Full Access (to clear NX bit)
Analyzing Shellcode
• Highlight a region of zeroes, Binary, Binary
Paste
• Set EIP to location of shellcode
– Right-click first instruction, New Origin Here
Assistance Features
Log
• View, Log
– Shows steps to reach here
Watches Window
• View, Watches
– Watch the value of an expression
– Press SPACEBAR to set expression
– OllyDbg Help, Contents
• Instructions for Evaluation of Expressions
Labeling
• Label subroutines and loops
– Right-click an address, Label
Plug-ins
Recommended Plugins
• OllyDump
– Dumps debugged process to a PE file
– Used for unpacking
• Hide Debugger
– Hides OllyDbg from debugger detection
• Command Line
– Control OllyDbg from the command line
– Simpler to just use WinDbg
• Bookmarks
– Included by default in OllyDbg
– Bookmarks memory locations
Scriptable Debugging
Immunity Debugger (ImmDbg)
• Unlike OllyDbg, ImmDbg employs python
scripts and pas an easy-to-use API
• Scripts are located in the PyCommands
subdirectory under the install directory of
ImmDbg
• Easy to create custom scripts for ImmDbg

More Related Content

What's hot

9: OllyDbg
9: OllyDbg9: OllyDbg
9: OllyDbg
Sam Bowne
 
CNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbgCNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbg
Sam Bowne
 
Practical Malware Analysis Ch12
Practical Malware Analysis Ch12Practical Malware Analysis Ch12
Practical Malware Analysis Ch12
Sam Bowne
 
Malware Static Analysis
Malware Static AnalysisMalware Static Analysis
Malware Static Analysis
Hossein Yavari
 
CNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro CNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro
Sam Bowne
 
CNIT 126 13: Data Encoding
CNIT 126 13: Data EncodingCNIT 126 13: Data Encoding
CNIT 126 13: Data Encoding
Sam Bowne
 
CNIT 126 Ch 7: Analyzing Malicious Windows Programs
CNIT 126 Ch 7: Analyzing Malicious Windows ProgramsCNIT 126 Ch 7: Analyzing Malicious Windows Programs
CNIT 126 Ch 7: Analyzing Malicious Windows Programs
Sam Bowne
 
CNIT 126 4: A Crash Course in x86 Disassembly
CNIT 126 4: A Crash Course in x86 DisassemblyCNIT 126 4: A Crash Course in x86 Disassembly
CNIT 126 4: A Crash Course in x86 Disassembly
Sam Bowne
 
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static TechniquesCNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
Sam Bowne
 
Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging
Sam Bowne
 
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in AssemblyPractical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Sam Bowne
 
CNIT 127 Ch 6: The Wild World of Windows
CNIT 127 Ch 6: The Wild World of WindowsCNIT 127 Ch 6: The Wild World of Windows
CNIT 127 Ch 6: The Wild World of Windows
Sam Bowne
 
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
Sam Bowne
 
CNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic Analysis
CNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic AnalysisCNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic Analysis
CNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic Analysis
Sam Bowne
 
CNIT 126: 8: Debugging
CNIT 126: 8: DebuggingCNIT 126: 8: Debugging
CNIT 126: 8: Debugging
Sam Bowne
 
Practical Malware Analysis: Ch 11: Malware Behavior
Practical Malware Analysis: Ch 11: Malware BehaviorPractical Malware Analysis: Ch 11: Malware Behavior
Practical Malware Analysis: Ch 11: Malware Behavior
Sam Bowne
 
Remnux tutorial-1 Statically Analyse Portable Executable(PE) Files
Remnux tutorial-1  Statically Analyse Portable Executable(PE) FilesRemnux tutorial-1  Statically Analyse Portable Executable(PE) Files
Remnux tutorial-1 Statically Analyse Portable Executable(PE) Files
Rhydham Joshi
 
Practical Malware Analysis Ch13
Practical Malware Analysis Ch13Practical Malware Analysis Ch13
Practical Malware Analysis Ch13
Sam Bowne
 
50 Shades of Sigma
50 Shades of Sigma50 Shades of Sigma
50 Shades of Sigma
Florian Roth
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
Education
 

What's hot (20)

9: OllyDbg
9: OllyDbg9: OllyDbg
9: OllyDbg
 
CNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbgCNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbg
 
Practical Malware Analysis Ch12
Practical Malware Analysis Ch12Practical Malware Analysis Ch12
Practical Malware Analysis Ch12
 
Malware Static Analysis
Malware Static AnalysisMalware Static Analysis
Malware Static Analysis
 
CNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro CNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro
 
CNIT 126 13: Data Encoding
CNIT 126 13: Data EncodingCNIT 126 13: Data Encoding
CNIT 126 13: Data Encoding
 
CNIT 126 Ch 7: Analyzing Malicious Windows Programs
CNIT 126 Ch 7: Analyzing Malicious Windows ProgramsCNIT 126 Ch 7: Analyzing Malicious Windows Programs
CNIT 126 Ch 7: Analyzing Malicious Windows Programs
 
CNIT 126 4: A Crash Course in x86 Disassembly
CNIT 126 4: A Crash Course in x86 DisassemblyCNIT 126 4: A Crash Course in x86 Disassembly
CNIT 126 4: A Crash Course in x86 Disassembly
 
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static TechniquesCNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
 
Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging
 
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in AssemblyPractical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
 
CNIT 127 Ch 6: The Wild World of Windows
CNIT 127 Ch 6: The Wild World of WindowsCNIT 127 Ch 6: The Wild World of Windows
CNIT 127 Ch 6: The Wild World of Windows
 
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
 
CNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic Analysis
CNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic AnalysisCNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic Analysis
CNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic Analysis
 
CNIT 126: 8: Debugging
CNIT 126: 8: DebuggingCNIT 126: 8: Debugging
CNIT 126: 8: Debugging
 
Practical Malware Analysis: Ch 11: Malware Behavior
Practical Malware Analysis: Ch 11: Malware BehaviorPractical Malware Analysis: Ch 11: Malware Behavior
Practical Malware Analysis: Ch 11: Malware Behavior
 
Remnux tutorial-1 Statically Analyse Portable Executable(PE) Files
Remnux tutorial-1  Statically Analyse Portable Executable(PE) FilesRemnux tutorial-1  Statically Analyse Portable Executable(PE) Files
Remnux tutorial-1 Statically Analyse Portable Executable(PE) Files
 
Practical Malware Analysis Ch13
Practical Malware Analysis Ch13Practical Malware Analysis Ch13
Practical Malware Analysis Ch13
 
50 Shades of Sigma
50 Shades of Sigma50 Shades of Sigma
50 Shades of Sigma
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 

Viewers also liked

Practical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA ProPractical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA Pro
Sam Bowne
 
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
Sam Bowne
 
CNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise ServicesCNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise Services
Sam Bowne
 
CNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on LinuxCNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on Linux
Sam Bowne
 
CNIT 127 Ch 4: Introduction to format string bugs (rev. 2-9-17)
CNIT 127 Ch 4: Introduction to format string bugs (rev. 2-9-17)CNIT 127 Ch 4: Introduction to format string bugs (rev. 2-9-17)
CNIT 127 Ch 4: Introduction to format string bugs (rev. 2-9-17)
Sam Bowne
 
CNIT 121: 8 Forensic Duplication
CNIT 121: 8 Forensic DuplicationCNIT 121: 8 Forensic Duplication
CNIT 121: 8 Forensic Duplication
Sam Bowne
 
CNIT 123 Ch 1: Ethical Hacking Overview
CNIT 123 Ch 1: Ethical Hacking OverviewCNIT 123 Ch 1: Ethical Hacking Overview
CNIT 123 Ch 1: Ethical Hacking Overview
Sam Bowne
 
Ch 2: TCP/IP Concepts Review
Ch 2: TCP/IP Concepts ReviewCh 2: TCP/IP Concepts Review
Ch 2: TCP/IP Concepts Review
Sam Bowne
 
Ch 6: Enumeration
Ch 6: EnumerationCh 6: Enumeration
Ch 6: Enumeration
Sam Bowne
 
Ch 12: Cryptography
Ch 12: CryptographyCh 12: Cryptography
Ch 12: Cryptography
Sam Bowne
 
Ch 11: Hacking Wireless Networks
Ch 11: Hacking Wireless NetworksCh 11: Hacking Wireless Networks
Ch 11: Hacking Wireless Networks
Sam Bowne
 
Ch 13: Network Protection Systems
Ch 13: Network Protection SystemsCh 13: Network Protection Systems
Ch 13: Network Protection Systems
Sam Bowne
 
Ch 10: Hacking Web Servers
Ch 10: Hacking Web ServersCh 10: Hacking Web Servers
Ch 10: Hacking Web Servers
Sam Bowne
 
Ch 5: Port Scanning
Ch 5: Port ScanningCh 5: Port Scanning
Ch 5: Port Scanning
Sam Bowne
 
CNIT 128 5: Mobile malware
CNIT 128 5: Mobile malwareCNIT 128 5: Mobile malware
CNIT 128 5: Mobile malware
Sam Bowne
 
Introduction to Malware Analysis
Introduction to Malware AnalysisIntroduction to Malware Analysis
Introduction to Malware Analysis
Andrew McNicol
 
CNIT 127 Lecture 7: Intro to 64-Bit Assembler (not in book)
CNIT 127 Lecture 7: Intro to 64-Bit Assembler (not in book)CNIT 127 Lecture 7: Intro to 64-Bit Assembler (not in book)
CNIT 127 Lecture 7: Intro to 64-Bit Assembler (not in book)
Sam Bowne
 
CNIT 123: Ch 13: Network Protection Systems
CNIT 123: Ch 13: Network Protection SystemsCNIT 123: Ch 13: Network Protection Systems
CNIT 123: Ch 13: Network Protection Systems
Sam Bowne
 

Viewers also liked (18)

Practical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA ProPractical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA Pro
 
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
 
CNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise ServicesCNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise Services
 
CNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on LinuxCNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on Linux
 
CNIT 127 Ch 4: Introduction to format string bugs (rev. 2-9-17)
CNIT 127 Ch 4: Introduction to format string bugs (rev. 2-9-17)CNIT 127 Ch 4: Introduction to format string bugs (rev. 2-9-17)
CNIT 127 Ch 4: Introduction to format string bugs (rev. 2-9-17)
 
CNIT 121: 8 Forensic Duplication
CNIT 121: 8 Forensic DuplicationCNIT 121: 8 Forensic Duplication
CNIT 121: 8 Forensic Duplication
 
CNIT 123 Ch 1: Ethical Hacking Overview
CNIT 123 Ch 1: Ethical Hacking OverviewCNIT 123 Ch 1: Ethical Hacking Overview
CNIT 123 Ch 1: Ethical Hacking Overview
 
Ch 2: TCP/IP Concepts Review
Ch 2: TCP/IP Concepts ReviewCh 2: TCP/IP Concepts Review
Ch 2: TCP/IP Concepts Review
 
Ch 6: Enumeration
Ch 6: EnumerationCh 6: Enumeration
Ch 6: Enumeration
 
Ch 12: Cryptography
Ch 12: CryptographyCh 12: Cryptography
Ch 12: Cryptography
 
Ch 11: Hacking Wireless Networks
Ch 11: Hacking Wireless NetworksCh 11: Hacking Wireless Networks
Ch 11: Hacking Wireless Networks
 
Ch 13: Network Protection Systems
Ch 13: Network Protection SystemsCh 13: Network Protection Systems
Ch 13: Network Protection Systems
 
Ch 10: Hacking Web Servers
Ch 10: Hacking Web ServersCh 10: Hacking Web Servers
Ch 10: Hacking Web Servers
 
Ch 5: Port Scanning
Ch 5: Port ScanningCh 5: Port Scanning
Ch 5: Port Scanning
 
CNIT 128 5: Mobile malware
CNIT 128 5: Mobile malwareCNIT 128 5: Mobile malware
CNIT 128 5: Mobile malware
 
Introduction to Malware Analysis
Introduction to Malware AnalysisIntroduction to Malware Analysis
Introduction to Malware Analysis
 
CNIT 127 Lecture 7: Intro to 64-Bit Assembler (not in book)
CNIT 127 Lecture 7: Intro to 64-Bit Assembler (not in book)CNIT 127 Lecture 7: Intro to 64-Bit Assembler (not in book)
CNIT 127 Lecture 7: Intro to 64-Bit Assembler (not in book)
 
CNIT 123: Ch 13: Network Protection Systems
CNIT 123: Ch 13: Network Protection SystemsCNIT 123: Ch 13: Network Protection Systems
CNIT 123: Ch 13: Network Protection Systems
 

Similar to Practical Malware Analysis: Ch 9: OllyDbg

CNIT 126 9: OllyDbg
CNIT 126 9: OllyDbgCNIT 126 9: OllyDbg
CNIT 126 9: OllyDbg
Sam Bowne
 
CNIT 126 Ch 9: OllyDbg
CNIT 126 Ch 9: OllyDbgCNIT 126 Ch 9: OllyDbg
CNIT 126 Ch 9: OllyDbg
Sam Bowne
 
CNIT 126 8: Debugging
CNIT 126 8: DebuggingCNIT 126 8: Debugging
CNIT 126 8: Debugging
Sam Bowne
 
PHP - Introduction to PHP Bugs - Debugging
PHP -  Introduction to  PHP Bugs - DebuggingPHP -  Introduction to  PHP Bugs - Debugging
PHP - Introduction to PHP Bugs - Debugging
Vibrant Technologies & Computers
 
CNIT 126 12: Covert Malware Launching
CNIT 126 12: Covert Malware LaunchingCNIT 126 12: Covert Malware Launching
CNIT 126 12: Covert Malware Launching
Sam Bowne
 
On non existent 0-days, stable binary exploits and
On non existent 0-days, stable binary exploits andOn non existent 0-days, stable binary exploits and
On non existent 0-days, stable binary exploits and
Alisa Esage Шевченко
 
Vulnerability, exploit to metasploit
Vulnerability, exploit to metasploitVulnerability, exploit to metasploit
Vulnerability, exploit to metasploit
Tiago Henriques
 
Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1
Andrei KUCHARAVY
 
Basic buffer overflow part1
Basic buffer overflow part1Basic buffer overflow part1
Basic buffer overflow part1
Payampardaz
 
Esage on non-existent 0-days, stable binary exploits and user interaction
Esage   on non-existent 0-days, stable binary exploits and user interactionEsage   on non-existent 0-days, stable binary exploits and user interaction
Esage on non-existent 0-days, stable binary exploits and user interaction
DefconRussia
 
Ch 6: The Wild World of Windows
Ch 6: The Wild World of WindowsCh 6: The Wild World of Windows
Ch 6: The Wild World of Windows
Sam Bowne
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
Hannes Lowette
 
Chelberg ptcuser 2010
Chelberg ptcuser 2010Chelberg ptcuser 2010
Chelberg ptcuser 2010
Clay Helberg
 
Steelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with PythonSteelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with Python
infodox
 
Reverse Engineering Presentation.pdf
Reverse Engineering Presentation.pdfReverse Engineering Presentation.pdf
Reverse Engineering Presentation.pdf
AbdelrahmanShaban3
 
Ch0 1
Ch0 1Ch0 1
Practical Windows Kernel Exploitation
Practical Windows Kernel ExploitationPractical Windows Kernel Exploitation
Practical Windows Kernel Exploitation
zeroSteiner
 
The New Frontend Toolchain
The New Frontend ToolchainThe New Frontend Toolchain
The New Frontend Toolchain
Bruno Abrantes
 
Burp plugin development for java n00bs (44 con)
Burp plugin development for java n00bs (44 con)Burp plugin development for java n00bs (44 con)
Burp plugin development for java n00bs (44 con)
Marc Wickenden
 
Bug Hunting Safari
Bug Hunting SafariBug Hunting Safari
Bug Hunting Safari
Janie Clayton
 

Similar to Practical Malware Analysis: Ch 9: OllyDbg (20)

CNIT 126 9: OllyDbg
CNIT 126 9: OllyDbgCNIT 126 9: OllyDbg
CNIT 126 9: OllyDbg
 
CNIT 126 Ch 9: OllyDbg
CNIT 126 Ch 9: OllyDbgCNIT 126 Ch 9: OllyDbg
CNIT 126 Ch 9: OllyDbg
 
CNIT 126 8: Debugging
CNIT 126 8: DebuggingCNIT 126 8: Debugging
CNIT 126 8: Debugging
 
PHP - Introduction to PHP Bugs - Debugging
PHP -  Introduction to  PHP Bugs - DebuggingPHP -  Introduction to  PHP Bugs - Debugging
PHP - Introduction to PHP Bugs - Debugging
 
CNIT 126 12: Covert Malware Launching
CNIT 126 12: Covert Malware LaunchingCNIT 126 12: Covert Malware Launching
CNIT 126 12: Covert Malware Launching
 
On non existent 0-days, stable binary exploits and
On non existent 0-days, stable binary exploits andOn non existent 0-days, stable binary exploits and
On non existent 0-days, stable binary exploits and
 
Vulnerability, exploit to metasploit
Vulnerability, exploit to metasploitVulnerability, exploit to metasploit
Vulnerability, exploit to metasploit
 
Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1
 
Basic buffer overflow part1
Basic buffer overflow part1Basic buffer overflow part1
Basic buffer overflow part1
 
Esage on non-existent 0-days, stable binary exploits and user interaction
Esage   on non-existent 0-days, stable binary exploits and user interactionEsage   on non-existent 0-days, stable binary exploits and user interaction
Esage on non-existent 0-days, stable binary exploits and user interaction
 
Ch 6: The Wild World of Windows
Ch 6: The Wild World of WindowsCh 6: The Wild World of Windows
Ch 6: The Wild World of Windows
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
Chelberg ptcuser 2010
Chelberg ptcuser 2010Chelberg ptcuser 2010
Chelberg ptcuser 2010
 
Steelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with PythonSteelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with Python
 
Reverse Engineering Presentation.pdf
Reverse Engineering Presentation.pdfReverse Engineering Presentation.pdf
Reverse Engineering Presentation.pdf
 
Ch0 1
Ch0 1Ch0 1
Ch0 1
 
Practical Windows Kernel Exploitation
Practical Windows Kernel ExploitationPractical Windows Kernel Exploitation
Practical Windows Kernel Exploitation
 
The New Frontend Toolchain
The New Frontend ToolchainThe New Frontend Toolchain
The New Frontend Toolchain
 
Burp plugin development for java n00bs (44 con)
Burp plugin development for java n00bs (44 con)Burp plugin development for java n00bs (44 con)
Burp plugin development for java n00bs (44 con)
 
Bug Hunting Safari
Bug Hunting SafariBug Hunting Safari
Bug Hunting Safari
 

More from Sam Bowne

Cyberwar
CyberwarCyberwar
Cyberwar
Sam Bowne
 
3: DNS vulnerabilities
3: DNS vulnerabilities 3: DNS vulnerabilities
3: DNS vulnerabilities
Sam Bowne
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
Sam Bowne
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the Application
Sam Bowne
 
3. Attacking iOS Applications (Part 2)
 3. Attacking iOS Applications (Part 2) 3. Attacking iOS Applications (Part 2)
3. Attacking iOS Applications (Part 2)
Sam Bowne
 
12 Elliptic Curves
12 Elliptic Curves12 Elliptic Curves
12 Elliptic Curves
Sam Bowne
 
11. Diffie-Hellman
11. Diffie-Hellman11. Diffie-Hellman
11. Diffie-Hellman
Sam Bowne
 
2a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 12a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 1
Sam Bowne
 
9 Writing Secure Android Applications
9 Writing Secure Android Applications9 Writing Secure Android Applications
9 Writing Secure Android Applications
Sam Bowne
 
12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)
Sam Bowne
 
10 RSA
10 RSA10 RSA
10 RSA
Sam Bowne
 
12 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 312 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 3
Sam Bowne
 
9. Hard Problems
9. Hard Problems9. Hard Problems
9. Hard Problems
Sam Bowne
 
8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)
Sam Bowne
 
11 Analysis Methodology
11 Analysis Methodology11 Analysis Methodology
11 Analysis Methodology
Sam Bowne
 
8. Authenticated Encryption
8. Authenticated Encryption8. Authenticated Encryption
8. Authenticated Encryption
Sam Bowne
 
7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)
Sam Bowne
 
7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)
Sam Bowne
 
5. Stream Ciphers
5. Stream Ciphers5. Stream Ciphers
5. Stream Ciphers
Sam Bowne
 
6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection
Sam Bowne
 

More from Sam Bowne (20)

Cyberwar
CyberwarCyberwar
Cyberwar
 
3: DNS vulnerabilities
3: DNS vulnerabilities 3: DNS vulnerabilities
3: DNS vulnerabilities
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the Application
 
3. Attacking iOS Applications (Part 2)
 3. Attacking iOS Applications (Part 2) 3. Attacking iOS Applications (Part 2)
3. Attacking iOS Applications (Part 2)
 
12 Elliptic Curves
12 Elliptic Curves12 Elliptic Curves
12 Elliptic Curves
 
11. Diffie-Hellman
11. Diffie-Hellman11. Diffie-Hellman
11. Diffie-Hellman
 
2a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 12a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 1
 
9 Writing Secure Android Applications
9 Writing Secure Android Applications9 Writing Secure Android Applications
9 Writing Secure Android Applications
 
12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)
 
10 RSA
10 RSA10 RSA
10 RSA
 
12 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 312 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 3
 
9. Hard Problems
9. Hard Problems9. Hard Problems
9. Hard Problems
 
8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)
 
11 Analysis Methodology
11 Analysis Methodology11 Analysis Methodology
11 Analysis Methodology
 
8. Authenticated Encryption
8. Authenticated Encryption8. Authenticated Encryption
8. Authenticated Encryption
 
7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)
 
7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)
 
5. Stream Ciphers
5. Stream Ciphers5. Stream Ciphers
5. Stream Ciphers
 
6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection
 

Recently uploaded

Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
spdendr
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 

Recently uploaded (20)

Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 

Practical Malware Analysis: Ch 9: OllyDbg

  • 1. Practical Malware Analysis Ch 9: OllyDbg Last modified 3-21-16
  • 2. History • OllyDbg was developed more than a decade ago • First used to crack software and to develop exploits • The OllyDbg 1.1 source code was purchased by Immunity and rebranded as Immunity Debugger • The two products are very similar
  • 5. Ways to Debug Malware • You can load EXEs or DLLs directly into OllyDbg • If the malware is already running, you can attach OllyDbg to the running process
  • 6. Opening an EXE • File, Open • Add command-line arguments if needed • OllyDbg will stop at the entry point, WinMain, if it can be determined • Otherwise it will break at the entry point defined in the PE Header – Configurable in Options, Debugging Options
  • 7. Attaching to a Running Process • File, Attach • OllyDbg breaks in and pauses the program and all threads – If you catch it in DLL, set a breakpoint on access to the entire code section to get to the interesting code
  • 8. Reloading a File • Ctrl+F2 reloads the current executable • F2 sets a breakpoint
  • 10. Disassembler Highlight: next instruction to be executed Registers Stack Memory dump
  • 11. Modifying Data • Disassembler window – Press spacebar • Registers or Stack – Right-click, modify • Memory dump – Right-click, Binary, Edit – Ctrl+G to go to a memory location – Right-click a memory address in another pane and click "Follow in dump"
  • 13. • EXE and DLLs are identified • Double-click any row to show a memory dump • Right-click, View in Disassembler
  • 14. Rebasing • Rebasing occurs when a module is not loaded at its preferred base address • PE files have a preferred base address – The image base in the PE header – Usually the file is loaded at that address – Most EXEs are designed to be loaded at 0x00400000 • EXEs that support Address Space Layout Randomization (ASLR) will often be relocated
  • 15. DLL Rebasing • DLLs are more commonly relocated – Because a single application may import many DLLs – Windows DLLs have different base addresses to avoid this – Third-party DLLs often have the same preferred base address
  • 16. Absolute v. Relative Addresses • The first 3 instructions will work fine if relocated because they use relative addresses • The last one has an absolute address that will be wrong if the code is relocated
  • 17. Fix-up Locations • Most DLLS have a list of fix-up locations in the .reloc section of the PE header – These are instructions that must be changed when code is relocated • DLLs are loaded after the EXE and in any order • You cannot predict where DLLs will be located in memory if they are rebased
  • 18.
  • 19. DLL Rebasing • DLLS can have their .reloc removed – Such a DLL cannot be relocated – Must load at its preferred base address • Relocating DLLs is bad for performance – Adds to load time – So good programmers specify non-default base addresses when compiling DLLs
  • 20. Example of DLL Rebasing
 Olly Memory Map • DLL-A and DLL-B prefer location 0x100000000
  • 21. IDA Pro • IDA Pro is not attached to a real running process • It doesn't know about rebasing • If you use OllyDbg and IDA Pro at the same time, you may get different results – To avoid this, use the "Manual Load" option in IDA Pro – Specify the virtual base address manually
  • 22. Viewing Threads and Stacks • View, Threads • Right-click a thread to "Open in CPU", kill it, etc.
  • 23. Each Thread Has its Own Stack • Visible in Memory Map
  • 25.
  • 26. Run and Pause • You could Run a program and click Pause when it's where you want it to be • But that's sloppy and might leave you somewhere uninteresting, such as inside library code • Setting breakpoints is much better
  • 27. Run and Run to Selection • Run is useful to resume execution after hitting a breakpoint • Run to Selection will execute until just before the selected instruction is executed – If the selection is never executed, it will run indefinitely
  • 28. Execute till Return • Pauses execution until just before the current function is set to return • Can be useful if you want to finish the current function and stop • But if the function never ends, the program will continue to run indefinitely
  • 29. Execute till User Code • Useful if you get lost in library code during debugging • Program will continue to run until it hit compiled malware code – Typically the .text section
  • 30. Stepping Through Code • F7 -- Single-step (also called step-into) • F8 -- Step-over – Stepping-over means all the code is executed, but you don't see it happen • Some malware is designed to fool you, by calling routines and never returning, so stepping over will miss the most important part
  • 32. Types of Breakpoints • Software breakpoints • Hardware breakpoints • Conditional breakpoints • Breakpoints on memory • F2 – Add or remove a breakpoint
  • 33. Viewing Active Breakpoints • View, Breakpoints, or click B icon on toolbar
  • 34.
  • 35. Saving Breakpoints • When you close OllyDbg, it saves your breakpoints • If you open the same file again, the breakpoints are still available
  • 36. Software Breakpoints • Useful for string decoders • Malware authors often obfuscate strings – With a string decoder that is called before each string is used
  • 37. String Decoders • Put a breakpoint at the end of the decoder routine • The string becomes readable on the stack
 Each time you press Play in OllyDbg, the program will execute and will break when a string is decoded for use • This method will only reveal strings as they are used
  • 38. Conditional Breakpoints • Breaks only when a condition is true • Ex: Poison Ivy backdoor – Poison Ivy allocates memory to house the shellcode it receives from Command and Control (C&C) servers – Most memory allocations are for other purposes and uninteresting – Set a conditional breakpoint at the VirtualAlloc function in Kernel32.dll
  • 39. Normal Breakpoint • Put a standard breakpoint at the start of the VirtualAlloc function • Here's the stack when it hits, showing five items: – Return address – 4 parameters (Address, Size, AllocationType, Protect)
  • 41. Hardware Breakpints • Don't alter code, stack, or any target resource • Don't slow down execution • But you can only set 4 at a time • Click Breakpoint, "Hardware, on Execution" • You can set OllyDbg to use hardware breakpoints by default in Debugging Options – Useful if malware uses anti-debugging techniques
  • 42. Memory Breakpoints • Code breaks on access to specified memory location • OllyDbg supports software and hardware memory breakpoints • Can break on read, write, execute, or any access • Right-click memory location, click Breakpoint, "Memory, on Access"
  • 43. Memory Breakpoints • You can only set one memory breakpoint at a time • OllyDbg implements memory breakpoints by changing the attributes of memory blocks • This technique is not reliable and has considerable overhead • Use memory breakpoints sparingly
  • 44. When is a DLL Used?
  • 46. loaddll.exe • DLLs cannot be executed directly • OllyDbg uses a dummy loaddll.exe program to load them • Breaks at the DLL entry point DLLMain once the DLL is loaded • Press Play to run DLLMain and initialize the DLL for use
  • 47. Demo • Get OllyDbg 1.10, NOT 2.00 or 2.01 – Link Ch 9a • Use Win XP or Win 7 • In OllyDbg, open c:windows system32ws2_32.dll • Debug, Call DLL Export – it fails • Reload the DLL, click Run button once • Debug, Call DLL Export – now it works
  • 48. Call Exports in ws2_32.dll
  • 49. ntohl • Converts a 32-bit number from network to host byte order • Click argument 1, type in 7f000001 – 127.0.0.1 in "network" byte order • Click "Follow in Disassembler" to see the code • Click "Call" to run the function • Answer in EAX
  • 50.
  • 53. Tracing • Powerful debugging technique • Records detailed execution information • Types of Tracing – Standard Back Trace – Call Stack Trace – Run Trace
  • 54. Standard Back Trace • You move through the disassembler with the Step Into and Step Over buttons • OllyDbg is recording your movement • Use minus key on keyboard to see previous instructions – But you won't see previous register values • Plus key takes you forward – If you used Step Over, you cannot go back and decide to step into
  • 55. Call Stack Trace • Views the execution path to a given function • Click View, Call Stack • Displays the sequence of calls to reach your current location
  • 56.
  • 57. Run Trace • Code runs, and OllyDbg saves every executed instruction and all changes to registers and flags • Highlight code, right-click, Run Trace, Add Selection • After code executes, View, Run Trace – To see instructions that were executed – + and - keys to step forward and backwards
  • 58.
  • 59. Trace Into and Trace Over • Buttons below "Options" • Easier to use than Add Selection • If you don't set breakpoints, OllyDbg will attempt to trace the entire program, which could take a long time and a lot of memory
  • 60. Debug, Set Condition • Traces until a condition hits • This condition catches Poison Ivy shellcode, which places code in dynamically allocated memory below 0x400000
  • 62. When an Exception Occurs • OllyDbg will stop the program • You have these options to pass the exception into the program: – Shift+F7 Step into exception – Shift+F8: Step over exception – Shift+F9: Run exception handler • Often you just ignore all exceptions in malware analysis – We aren't trying to fix problems in code
  • 65. Fill • Fill with 00 • Fill with NOP (0x90) – Used to skip instructions – e.g. to force a branch
  • 66. Saving Patched Code • Right-click disassembler window after patching – Copy To Executable, All Modifications, Save File – Copy All • Right-click in new window – Save File
  • 68. Easy Way to Analyze Shellcode • Copy shellcode from a hex editor to clipboard • Within memory map, select a region of type "Priv" (Private memory) • Double-click rows in memory map to show a hex dump – Find a region of hundreds of consecutive zeroes • Right-click chosen region in Memory Map, Set Access, Full Access (to clear NX bit)
  • 69. Analyzing Shellcode • Highlight a region of zeroes, Binary, Binary Paste • Set EIP to location of shellcode – Right-click first instruction, New Origin Here
  • 71. Log • View, Log – Shows steps to reach here
  • 72. Watches Window • View, Watches – Watch the value of an expression – Press SPACEBAR to set expression – OllyDbg Help, Contents • Instructions for Evaluation of Expressions
  • 73. Labeling • Label subroutines and loops – Right-click an address, Label
  • 75. Recommended Plugins • OllyDump – Dumps debugged process to a PE file – Used for unpacking • Hide Debugger – Hides OllyDbg from debugger detection • Command Line – Control OllyDbg from the command line – Simpler to just use WinDbg • Bookmarks – Included by default in OllyDbg – Bookmarks memory locations
  • 77. Immunity Debugger (ImmDbg) • Unlike OllyDbg, ImmDbg employs python scripts and pas an easy-to-use API • Scripts are located in the PyCommands subdirectory under the install directory of ImmDbg • Easy to create custom scripts for ImmDbg