SlideShare a Scribd company logo
1 of 31
Download to read offline
Finding Xori
Malware Analysis Triage with Automated Disassembly
Amanda Rousseau
Rich Seymour
About Us
Amanda Rousseau Rich Seymour
Sr. Malware Researcher,
Endgame, Inc.
@malwareunicorn
Sr. Data Scientist,
Endgame, Inc.
@rseymour
Project started in Jan 2018
● Approx 6 months
● ~36K lines of code
Quick Overview
The Current State of
Disassemblers
Functionality & Features
Brief overview of pros and cons with current
popular open source PE disassemblers.
Overview how we pulled together the different
aspects of disassemblers and emulator
Usage & Demo
How the output is used for automation. Applying
the tool on various malware samples and
shellcode.
The Problem
There are millions of malware samples to look at and a
few reverse engineers.
We need to change the way we are going about this if we
are going to keep up.
How to leverage large scale disassembly in an automated
way with many samples?
● Improve the scalability in malware analysis
● Integration and automation
Present Day Common Disassemblers
Capstone Radare2 IDA Pro Hopper Binary
Ninja
Size small small large medium large
Stability ✔ ✖ ✔ ✔ ✔
Price - - $$$ $ $$
Cross
Platform
✔ ~ ✔ ✖ ✔
Usability ~ ~ ✔ ~ ~
Accuracy ~ ~ ✔ ~ ~
Integration ✔ ~ ✖ ✖ ✖
Requirements
● Fast development
● Stability and resilience
● Cross platform
● Output can be easily integrated
● Ease of use
● Core feature set
● Output accuracy
Evaluating Disassemblers
The first step - Diving into the code:
● Verifying the accuracy of various disassemblers
● Understand each of their strengths and limitations
We adopted different aspects of disassemblers and emulator modules.
● Much of Capstone is also based on the LLVM & GDB repositories
● QEMU is the emulation is straightforward, easy to understand
● Converted some of the logic into Rust, while also fixing a few bugs along the way.
Evaluating Example
x66x90
XCHG AX, AX [Objdump]✔
X86 32bit:
NOP [Capstone]✖
NOP [Distorm]✖
XCHG AX, AX [IDA Pro]✔
OpSize Opcode
Developed in
Rust
Why Rust?
● Same capabilities in CC++
● Stack protection
● Proper memory handling (guaranteed memory
safety)
● Provides stability and speed (minimal runtime)
● Faster development
● Helpful compiler
Current Features
● Open source
● Supports i386 and x86-64 architecture only
at the moment
● Displays strings based on referenced
memory locations
● Manages memory
● Outputs Json
● 2 modes: with or without emulation
○ Light Emulation - meant to enumerate
all paths (Registers, Stack, Some
Instructions)
○ Full Emulation - only follows the
code’s path (Slow performance)
● Simulated TEB & PEB structures
● Evaluates functions based on DLL exports
Design Memory Manager
Image
TEB
PEB
DLL headers
Analysis
Functions
Disasm
Imports
PE Loader
State
CPU Registers & Flags
Stack
Loop Tracking
Analysis
This structure contains the CPU state of the registers &
flags, a new copy of the stack, and short circuiting for
looping during emulation.
State
Handles the loading of the PE image into memory and
sets up the TEB/PEB as well as initializing the offsets to
loaded DLLs and import table.
PE Loader
This structure contains all of the mmap memory for the
Image, TEB/PEB, and DLL headers. Accessors for
Read & Write to avoid errors in inaccessible memory.
Memory Manager
The core container for the disassembly, functions, and
imports.
Roll your own PE Parser
● Although a few Rust PE parsers exist: goblin, pe-rs
we decided to create our own.
● Chose to write it using the nom parser combinator
framework
● Ideally less error prone due to safe macro
constructions
● Many lessons learned
● From a historical perspective a PE parser start
reading a 16 bit DOS file
● Then optionally switches to a PE32 or a PE32+
● This is like a history of DOS and Microsoft Windows
in a single parser.
Analysis Enrichment
● The header is used to build the memory sections of
the PE Image
● Similar to the PE loader in windows, it will load the
image similar to how it would be loaded in the
addressable memory. Where the imports are given
memory address, rewritten in the image.
Image
.text
.data
.idata
.rsrc
Stack
DLLs
TEB
PEB
Symbols
● We needed a way to load DLL exports and header
information without doing it natively.
● Built a parser that would generate json files for
consumption called pesymbols.
● Instead of relying on the Import Table of the PE, it
generates virtual addresses of the DLL and API in the
Image’s Import Table. This way you can track the
actual address of the function being pushed into
various registers.
● The virtual address start is configurable as well as the
json location.
{
"name": "kernel32.dll",
"exports": [
{
"address": 696814,
"name": "AcquireSRWLockExclusive",
"ordinal": 1,
"forwarder": true,
"forwarder_name": "NTDLL.RtlAcquireSRWLockExclusive"
},
{
"address": 696847,
"name": "AcquireSRWLockShared",
"ordinal": 2,
"forwarder": true,
"forwarder_name": "NTDLL.RtlAcquireSRWLockShared"
},
...
"dll_address32": 1691680768, 0x64D50000
"dll_address64": 8789194768384, 0x7FE64D50000
"function_symbol32":
"./src/analysis/symbols/generated_user_syswow64.json",
"function_symbol64":
"./src/analysis/symbols/generated_user_system32.json",
...
Configurable in xori.json
Generated_user_syswow64.json
Dealing with Dynamic API Calls
The Stack
The TEB and PEB structures are simulated based on the
the imports and known dlls in a windows 7 environment.
TEB/PEB
Segregated memory for the local memory
storage such as the stack.
Memory Management
If references to functions are pushed into a
register or stack will be able to be tracked.
Dealing with Dynamic API Calls
0x4010ed A3 00 10 40 00 mov [0x401000], eax
0x4010f2 68 41 10 40 00 push 0x401041 ; LoadLibraryA
0x4010f7 FF 35 00 10 40 00 push [0x401000]
0x4010fd E8 C9 01 00 00 call 0x4012cb
0x401102 83 F8 00 cmp eax, 0x0
0x401105 0F 84 CF 02 00 00 je 0x4013da
0x40110b A3 04 10 40 00 mov [0x401004], eax ; wI
0x401110 68 4E 10 40 00 push 0x40104e ; VirtualProtect
0x401115 FF 35 00 10 40 00 push [0x401000]
0x40111b E8 AB 01 00 00 call 0x4012cb
0x401120 83 F8 00 cmp eax, 0x0
0x401123 0F 84 B1 02 00 00 je 0x4013da
0x401129 A3 08 10 40 00 mov [0x401008], eax
0x40112e 6A 00 push 0x0
0x401130 6A 00 push 0x0
0x401132 68 1C 10 40 00 push 0x40101c ; shell32.dll
0x401137 FF 15 04 10 40 00 call [0x401004] ; kernel32.dll!LoadLibraryA
0x40113d A3 0C 10 40 00 mov [0x40100c], eax
0x401142 68 33 10 40 00 push 0x401033 ; ShellExecuteA
0x401147 FF 35 0C 10 40 00 push [0x40100c]
0x40114d E8 79 01 00 00 call 0x4012cb
0x401152 A3 10 10 40 00 mov [0x401010], eax
Stores the address
into ptr [0x401004]
Loads LoadLibrary
from the PEB
Calls the new ptr
Header Imports
"ExitProcess"
"GetLastError"
"GetLocalTime"
"GetModuleHandleA"
Dynamic Imports
"LoadLibraryA"
"VirtualProtect"
"ShellExecuteA"
TEB & PEB
#[derive(Serialize, Deserialize)]
struct ThreadInformationBlock32
{
// reference: https://en.wikipedia.org/wiki/Win32_Thread_Information_Block
seh_frame: u32, //0x00
stack_base: u32, //0x04
stack_limit: u32, //0x08
subsystem_tib: u32, //0x0C
fiber_data: u32, //0x10
arbitrary_data: u32, //0x14
self_addr: u32, //0x18
//End of NT subsystem independent part
environment_ptr: u32, //0x1C
process_id: u32, //0x20
thread_id: u32, //0x24
active_rpc_handle: u32, //0x28
tls_addr: u32, //0x2C
peb_addr: u32, //0x30
last_error: u32, //0x34
critical_section_count: u32, //0x38
csr_client_thread: u32, //0x3C
win32_thread_info: u32, //0x40
win32_client_info: [u32; 31], //0x44
...
let teb_binary: Vec<u8> =
serialize(&teb_struct).unwrap();
In Rust, you can serialize structs into
vectors of bytes. This way you can allow
the assembly emulation to access them
natively while also managing the access.
PEB
peb_ldr_data
Entry 0: NTDLL
Entry 1: Kernel32
Entry N
Code vs. Data
● padding after a non-returning call
● calls misidentified as non-returning
● repetitive instruction sequences
● missed computed jump targets
● false computed jump targets
● missed opcode prefixes
● code following unconditional branches
● code following returns
● code following conditional branches
0x14000286a 39 05 C0 27 00 00 cmp [rip+0x27c0], eax
0x140002870 0F 95 C0 setne al
0x140002873 C3 ret ; FUNC 0x140002868 END
0x140002878 CC CC CC CC CC CC CC CC db 0xcccccccccccccccc
0x140002880 FF 25 A2 08 00 00 jmp [rip+0x8a2]
0x40116c 68 B0 12 40 00 push 0x4012b0 ; VB5!
0x401171 E8 F0 FF FF FF call 0x401166 ; FUNC 0x40116c END
0x401178 00 00 00 00 db 0x0
0x40117c 30 00 00 00 db 0x30
0x401180 40 00 00 00 db 0x40
0x401184 00 00 00 00 db 0x0
Padding after a non-returning call
Padding after returns
Handling Branches & Calls
● Branches and calls have 2 directions
○ Left & Right
● In light emulation mode, both the left and
right directions are followed
● Each direction is placed onto a queue with
it’s own copy of the state.
● Any assembly not traversed will not be
analyzed.
● All function calls are tracked for local and
import table mapping.
Queue
State
Jump/
Call/
Branch
StateLEFT
RIGHT
Back
Front
Handling Looping
● Infinite loops are hard to avoid
● Built a way to configure the maximum
amount of loops a one can take
○ Forward
○ Backward
○ Standard Loop
● The state contains the looping information
● Once the maximum is reached, it will
disable the loop
"loop_default_case": 4000,
...
Configurable in xori.json
Signature Analysis
● We needed a way to add signatures fast
● When bytes are analyzed as data, you can
apply signatures (i.e Function Headers)
● Importing FLIRT Signatures
Signature{
name: "_standard_func_header",
pattern: &[
r"x55x8BxEC", //push ebp, mov ebp,esp
r"x55x89xE5", //push ebp, mov ebp,esp
],
}
<leading bytes> <CRC16 len> <CRC16> <total length> <public name(s)> <referenced name(s)>
558BEC56FC8B750C8B4E0833CEE8........6A0056FF7614FF760C6A00FF7510 07
5FB2 0031 :0000 __CatchGuardHandler ^000E @__security_check_cookie@4
^0027 ___InternalCxxFrameHandler
558BEC8B4D0C568B7508890EE8........8B4824894E04E8........8970248B 04
7D88 0024 :0000 __CreateFrameInfo ^000D ___vcrt_getptd
Automation for Bulk Analysis
● On the Ember Test set of 1000 files, Xori processes a sample in 1.25 seconds. With 8 cores, 1000 files takes about 20 min
● Creates *valid* JSON output of PE features, control flow graph, functions from binary files allowing bulk data analysis:
clustering, outlier detection and visualization.
● You can then easily throw Xori output into a database, document store or do a little data science at the command line
$ jq '.import_table?|map(.import_address_list)?|map(.[].func_name)?|.[]' *header.json |sort | uniq -c
|sort -nr|grep -i crypt
32 "CryptReleaseContext"
23 "CryptGenRandom"
19 "CryptAcquireContextA"
12 "CryptAcquireContextW"
7 "CryptHashData"
7 "CryptGetHashParam"
7 "CryptDestroyHash"
...
Examples
Cd ./xori
Cargo build --release
./target/release/xori -f wanacry.exe
Simplest Way to Run Xori
extern crate xori;
use std::fmt::Write;
use xori::disasm::*;
use xori::arch::x86::archx86::X86Detail;
fn main()
{
let xi = Xori { arch: Arch::ArchX86, mode: Mode::Mode32 };
let start_address = 0x1000;
let binary32 = b"xe9x1ex00x00x00xb8x04
x00x00x00xbbx01x00x00x00x59xbax0f
x00x00x00xcdx80xb8x01x00x00x00xbb
x00x00x00x00xcdx80xe8xddxffxffxff
x48x65x6cx6cx6fx2cx20x57x6fx72x6c
x64x21x0dx0a";
let mut vec: Vec<Instruction<X86Detail>> = Vec::new();
xi.disasm(binary32, binary32.len(),
start_address, start_address, 0, &mut vec);
if vec.len() > 0
{
//Display values
for instr in vec.iter_mut()
{
let addr: String = format!("0x{:x}", instr.address);
println!("{:16} {:20} {} {}", addr,
hex_array(&instr.bytes, instr.size),
instr.mnemonic, instr.op_str);
}
}
}
Basic Disassembler
extern crate xori;
extern crate serde_json;
use serde_json::Value;
use std::path::Path;
use xori::analysis::analyze::analyze;
use xori::disasm::*;
fn main()
{
let mut binary32 = b"xe9x1ex00x00x00xb8x04
x00x00x00xbbx01x00x00x00x59xbax0f
x00x00x00xcdx80xb8x01x00x00x00xbb
x00x00x00x00xcdx80xe8xddxffxffxff
x48x65x6cx6cx6fx2cx20x57x6fx72x6c
x64x21x0dx0a".to_vec();
let mut config_map: Option<Value> = None;
if Path::new("xori.json").exists()
{
config_map = read_config(&Path::new("xori.json"));
}
match analyze(&Arch::ArchX86, &mut binary32, &config_map)
{
Some(analysis)=>{
if !analysis.disasm.is_empty(){
println!("{}", analysis.disasm);
}
},
None=>{},
}
}
Binary File Disassembler
WanaCry Ransomware
Xori IDA Pro
WanaCry Ransomware
Xori Radare2
Demo
github.com/endgameinc/xori
@malwareunicorn
@rseymour

More Related Content

What's hot

Csw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacketCsw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacketCanSecWest
 
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading SkillsReverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading SkillsAsuka Nakajima
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneCisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneDefconRussia
 
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...Cyber Security Alliance
 
Triton and symbolic execution on gdb
Triton and symbolic execution on gdbTriton and symbolic execution on gdb
Triton and symbolic execution on gdbWei-Bo Chen
 
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]RootedCON
 
[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...
[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...
[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...Asuka Nakajima
 
Exploring the x64
Exploring the x64Exploring the x64
Exploring the x64FFRI, Inc.
 
Software to the slaughter
Software to the slaughterSoftware to the slaughter
Software to the slaughterQuinn Wilton
 
Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23DefconRussia
 
[嵌入式系統] MCS-51 實驗 - 使用 IAR (3)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (3)[嵌入式系統] MCS-51 實驗 - 使用 IAR (3)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (3)Simen Li
 
Devirtualizing FinSpy
Devirtualizing FinSpyDevirtualizing FinSpy
Devirtualizing FinSpyjduart
 
Understanding Java byte code and the class file format
Understanding Java byte code and the class file formatUnderstanding Java byte code and the class file format
Understanding Java byte code and the class file formatRafael Winterhalter
 
Specializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackSpecializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackKernel TLV
 
Troubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device DriversTroubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device DriversSatpal Parmar
 
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)Simen Li
 
20190521 pwn 101_by_roy
20190521 pwn 101_by_roy20190521 pwn 101_by_roy
20190521 pwn 101_by_royRoy
 
W8_2: Inside the UoS Educational Processor
W8_2: Inside the UoS Educational ProcessorW8_2: Inside the UoS Educational Processor
W8_2: Inside the UoS Educational ProcessorDaniel Roggen
 
Zn task - defcon russia 20
Zn task  - defcon russia 20Zn task  - defcon russia 20
Zn task - defcon russia 20DefconRussia
 

What's hot (19)

Csw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacketCsw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacket
 
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading SkillsReverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneCisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-one
 
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
 
Triton and symbolic execution on gdb
Triton and symbolic execution on gdbTriton and symbolic execution on gdb
Triton and symbolic execution on gdb
 
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]
 
[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...
[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...
[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...
 
Exploring the x64
Exploring the x64Exploring the x64
Exploring the x64
 
Software to the slaughter
Software to the slaughterSoftware to the slaughter
Software to the slaughter
 
Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23
 
[嵌入式系統] MCS-51 實驗 - 使用 IAR (3)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (3)[嵌入式系統] MCS-51 實驗 - 使用 IAR (3)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (3)
 
Devirtualizing FinSpy
Devirtualizing FinSpyDevirtualizing FinSpy
Devirtualizing FinSpy
 
Understanding Java byte code and the class file format
Understanding Java byte code and the class file formatUnderstanding Java byte code and the class file format
Understanding Java byte code and the class file format
 
Specializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackSpecializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network Stack
 
Troubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device DriversTroubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device Drivers
 
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
 
20190521 pwn 101_by_roy
20190521 pwn 101_by_roy20190521 pwn 101_by_roy
20190521 pwn 101_by_roy
 
W8_2: Inside the UoS Educational Processor
W8_2: Inside the UoS Educational ProcessorW8_2: Inside the UoS Educational Processor
W8_2: Inside the UoS Educational Processor
 
Zn task - defcon russia 20
Zn task  - defcon russia 20Zn task  - defcon russia 20
Zn task - defcon russia 20
 

Similar to Finding Xori: Malware Analysis Triage with Automated Disassembly

Swug July 2010 - windows debugging by sainath
Swug July 2010 - windows debugging by sainathSwug July 2010 - windows debugging by sainath
Swug July 2010 - windows debugging by sainathDennis Chung
 
Writing Metasploit Plugins
Writing Metasploit PluginsWriting Metasploit Plugins
Writing Metasploit Pluginsamiable_indian
 
BlueHat v18 || A mitigation for kernel toctou vulnerabilities
BlueHat v18 || A mitigation for kernel toctou vulnerabilitiesBlueHat v18 || A mitigation for kernel toctou vulnerabilities
BlueHat v18 || A mitigation for kernel toctou vulnerabilitiesBlueHat Security Conference
 
Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1
Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1
Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1Jagadisha Maiya
 
The forgotten art of assembly
The forgotten art of assemblyThe forgotten art of assembly
The forgotten art of assemblyMarian Marinov
 
How Triton can help to reverse virtual machine based software protections
How Triton can help to reverse virtual machine based software protectionsHow Triton can help to reverse virtual machine based software protections
How Triton can help to reverse virtual machine based software protectionsJonathan Salwan
 
Shellcoding in linux
Shellcoding in linuxShellcoding in linux
Shellcoding in linuxAjin Abraham
 
Windows debugging sisimon
Windows debugging   sisimonWindows debugging   sisimon
Windows debugging sisimonSisimon Soman
 
Potapenko, vyukov forewarned is forearmed. a san and tsan
Potapenko, vyukov   forewarned is forearmed. a san and tsanPotapenko, vyukov   forewarned is forearmed. a san and tsan
Potapenko, vyukov forewarned is forearmed. a san and tsanDefconRussia
 
Buffer overflow – Smashing The Stack
Buffer overflow – Smashing The StackBuffer overflow – Smashing The Stack
Buffer overflow – Smashing The StackTomer Zait
 
Windows内核技术介绍
Windows内核技术介绍Windows内核技术介绍
Windows内核技术介绍jeffz
 
Scale17x buffer overflows
Scale17x buffer overflowsScale17x buffer overflows
Scale17x buffer overflowsjohseg
 
Revelation pyconuk2016
Revelation pyconuk2016Revelation pyconuk2016
Revelation pyconuk2016Sarah Mount
 
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012DefCamp
 
FPGA design with CλaSH
FPGA design with CλaSHFPGA design with CλaSH
FPGA design with CλaSHConrad Parker
 
Introduction to Debuggers
Introduction to DebuggersIntroduction to Debuggers
Introduction to DebuggersSaumil Shah
 
lecture16-recap-questions-and-answers.pdf
lecture16-recap-questions-and-answers.pdflecture16-recap-questions-and-answers.pdf
lecture16-recap-questions-and-answers.pdfAyushKumar93531
 
Virtual Machine Introspection with Xen
Virtual Machine Introspection with XenVirtual Machine Introspection with Xen
Virtual Machine Introspection with XenTamas K Lengyel
 

Similar to Finding Xori: Malware Analysis Triage with Automated Disassembly (20)

Swug July 2010 - windows debugging by sainath
Swug July 2010 - windows debugging by sainathSwug July 2010 - windows debugging by sainath
Swug July 2010 - windows debugging by sainath
 
Writing Metasploit Plugins
Writing Metasploit PluginsWriting Metasploit Plugins
Writing Metasploit Plugins
 
BlueHat v18 || A mitigation for kernel toctou vulnerabilities
BlueHat v18 || A mitigation for kernel toctou vulnerabilitiesBlueHat v18 || A mitigation for kernel toctou vulnerabilities
BlueHat v18 || A mitigation for kernel toctou vulnerabilities
 
Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1
Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1
Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1
 
The forgotten art of assembly
The forgotten art of assemblyThe forgotten art of assembly
The forgotten art of assembly
 
Java Memory Model
Java Memory ModelJava Memory Model
Java Memory Model
 
How Triton can help to reverse virtual machine based software protections
How Triton can help to reverse virtual machine based software protectionsHow Triton can help to reverse virtual machine based software protections
How Triton can help to reverse virtual machine based software protections
 
Debugging 2013- Jesper Brouer
Debugging 2013- Jesper BrouerDebugging 2013- Jesper Brouer
Debugging 2013- Jesper Brouer
 
Shellcoding in linux
Shellcoding in linuxShellcoding in linux
Shellcoding in linux
 
Windows debugging sisimon
Windows debugging   sisimonWindows debugging   sisimon
Windows debugging sisimon
 
Potapenko, vyukov forewarned is forearmed. a san and tsan
Potapenko, vyukov   forewarned is forearmed. a san and tsanPotapenko, vyukov   forewarned is forearmed. a san and tsan
Potapenko, vyukov forewarned is forearmed. a san and tsan
 
Buffer overflow – Smashing The Stack
Buffer overflow – Smashing The StackBuffer overflow – Smashing The Stack
Buffer overflow – Smashing The Stack
 
Windows内核技术介绍
Windows内核技术介绍Windows内核技术介绍
Windows内核技术介绍
 
Scale17x buffer overflows
Scale17x buffer overflowsScale17x buffer overflows
Scale17x buffer overflows
 
Revelation pyconuk2016
Revelation pyconuk2016Revelation pyconuk2016
Revelation pyconuk2016
 
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
 
FPGA design with CλaSH
FPGA design with CλaSHFPGA design with CλaSH
FPGA design with CλaSH
 
Introduction to Debuggers
Introduction to DebuggersIntroduction to Debuggers
Introduction to Debuggers
 
lecture16-recap-questions-and-answers.pdf
lecture16-recap-questions-and-answers.pdflecture16-recap-questions-and-answers.pdf
lecture16-recap-questions-and-answers.pdf
 
Virtual Machine Introspection with Xen
Virtual Machine Introspection with XenVirtual Machine Introspection with Xen
Virtual Machine Introspection with Xen
 

More from Priyanka Aash

Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOsPriyanka Aash
 
Verizon Breach Investigation Report (VBIR).pdf
Verizon Breach Investigation Report (VBIR).pdfVerizon Breach Investigation Report (VBIR).pdf
Verizon Breach Investigation Report (VBIR).pdfPriyanka Aash
 
Top 10 Security Risks .pptx.pdf
Top 10 Security Risks .pptx.pdfTop 10 Security Risks .pptx.pdf
Top 10 Security Risks .pptx.pdfPriyanka Aash
 
Simplifying data privacy and protection.pdf
Simplifying data privacy and protection.pdfSimplifying data privacy and protection.pdf
Simplifying data privacy and protection.pdfPriyanka Aash
 
Generative AI and Security (1).pptx.pdf
Generative AI and Security (1).pptx.pdfGenerative AI and Security (1).pptx.pdf
Generative AI and Security (1).pptx.pdfPriyanka Aash
 
EVERY ATTACK INVOLVES EXPLOITATION OF A WEAKNESS.pdf
EVERY ATTACK INVOLVES EXPLOITATION OF A WEAKNESS.pdfEVERY ATTACK INVOLVES EXPLOITATION OF A WEAKNESS.pdf
EVERY ATTACK INVOLVES EXPLOITATION OF A WEAKNESS.pdfPriyanka Aash
 
Cyber Truths_Are you Prepared version 1.1.pptx.pdf
Cyber Truths_Are you Prepared version 1.1.pptx.pdfCyber Truths_Are you Prepared version 1.1.pptx.pdf
Cyber Truths_Are you Prepared version 1.1.pptx.pdfPriyanka Aash
 
Cyber Crisis Management.pdf
Cyber Crisis Management.pdfCyber Crisis Management.pdf
Cyber Crisis Management.pdfPriyanka Aash
 
CISOPlatform journey.pptx.pdf
CISOPlatform journey.pptx.pdfCISOPlatform journey.pptx.pdf
CISOPlatform journey.pptx.pdfPriyanka Aash
 
Chennai Chapter.pptx.pdf
Chennai Chapter.pptx.pdfChennai Chapter.pptx.pdf
Chennai Chapter.pptx.pdfPriyanka Aash
 
Cloud attack vectors_Moshe.pdf
Cloud attack vectors_Moshe.pdfCloud attack vectors_Moshe.pdf
Cloud attack vectors_Moshe.pdfPriyanka Aash
 
Stories From The Web 3 Battlefield
Stories From The Web 3 BattlefieldStories From The Web 3 Battlefield
Stories From The Web 3 BattlefieldPriyanka Aash
 
Lessons Learned From Ransomware Attacks
Lessons Learned From Ransomware AttacksLessons Learned From Ransomware Attacks
Lessons Learned From Ransomware AttacksPriyanka Aash
 
Emerging New Threats And Top CISO Priorities In 2022 (Chennai)
Emerging New Threats And Top CISO Priorities In 2022 (Chennai)Emerging New Threats And Top CISO Priorities In 2022 (Chennai)
Emerging New Threats And Top CISO Priorities In 2022 (Chennai)Priyanka Aash
 
Emerging New Threats And Top CISO Priorities In 2022 (Mumbai)
Emerging New Threats And Top CISO Priorities In 2022 (Mumbai)Emerging New Threats And Top CISO Priorities In 2022 (Mumbai)
Emerging New Threats And Top CISO Priorities In 2022 (Mumbai)Priyanka Aash
 
Emerging New Threats And Top CISO Priorities in 2022 (Bangalore)
Emerging New Threats And Top CISO Priorities in 2022 (Bangalore)Emerging New Threats And Top CISO Priorities in 2022 (Bangalore)
Emerging New Threats And Top CISO Priorities in 2022 (Bangalore)Priyanka Aash
 
Cloud Security: Limitations of Cloud Security Groups and Flow Logs
Cloud Security: Limitations of Cloud Security Groups and Flow LogsCloud Security: Limitations of Cloud Security Groups and Flow Logs
Cloud Security: Limitations of Cloud Security Groups and Flow LogsPriyanka Aash
 
Cyber Security Governance
Cyber Security GovernanceCyber Security Governance
Cyber Security GovernancePriyanka Aash
 

More from Priyanka Aash (20)

Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
 
Verizon Breach Investigation Report (VBIR).pdf
Verizon Breach Investigation Report (VBIR).pdfVerizon Breach Investigation Report (VBIR).pdf
Verizon Breach Investigation Report (VBIR).pdf
 
Top 10 Security Risks .pptx.pdf
Top 10 Security Risks .pptx.pdfTop 10 Security Risks .pptx.pdf
Top 10 Security Risks .pptx.pdf
 
Simplifying data privacy and protection.pdf
Simplifying data privacy and protection.pdfSimplifying data privacy and protection.pdf
Simplifying data privacy and protection.pdf
 
Generative AI and Security (1).pptx.pdf
Generative AI and Security (1).pptx.pdfGenerative AI and Security (1).pptx.pdf
Generative AI and Security (1).pptx.pdf
 
EVERY ATTACK INVOLVES EXPLOITATION OF A WEAKNESS.pdf
EVERY ATTACK INVOLVES EXPLOITATION OF A WEAKNESS.pdfEVERY ATTACK INVOLVES EXPLOITATION OF A WEAKNESS.pdf
EVERY ATTACK INVOLVES EXPLOITATION OF A WEAKNESS.pdf
 
DPDP Act 2023.pdf
DPDP Act 2023.pdfDPDP Act 2023.pdf
DPDP Act 2023.pdf
 
Cyber Truths_Are you Prepared version 1.1.pptx.pdf
Cyber Truths_Are you Prepared version 1.1.pptx.pdfCyber Truths_Are you Prepared version 1.1.pptx.pdf
Cyber Truths_Are you Prepared version 1.1.pptx.pdf
 
Cyber Crisis Management.pdf
Cyber Crisis Management.pdfCyber Crisis Management.pdf
Cyber Crisis Management.pdf
 
CISOPlatform journey.pptx.pdf
CISOPlatform journey.pptx.pdfCISOPlatform journey.pptx.pdf
CISOPlatform journey.pptx.pdf
 
Chennai Chapter.pptx.pdf
Chennai Chapter.pptx.pdfChennai Chapter.pptx.pdf
Chennai Chapter.pptx.pdf
 
Cloud attack vectors_Moshe.pdf
Cloud attack vectors_Moshe.pdfCloud attack vectors_Moshe.pdf
Cloud attack vectors_Moshe.pdf
 
Stories From The Web 3 Battlefield
Stories From The Web 3 BattlefieldStories From The Web 3 Battlefield
Stories From The Web 3 Battlefield
 
Lessons Learned From Ransomware Attacks
Lessons Learned From Ransomware AttacksLessons Learned From Ransomware Attacks
Lessons Learned From Ransomware Attacks
 
Emerging New Threats And Top CISO Priorities In 2022 (Chennai)
Emerging New Threats And Top CISO Priorities In 2022 (Chennai)Emerging New Threats And Top CISO Priorities In 2022 (Chennai)
Emerging New Threats And Top CISO Priorities In 2022 (Chennai)
 
Emerging New Threats And Top CISO Priorities In 2022 (Mumbai)
Emerging New Threats And Top CISO Priorities In 2022 (Mumbai)Emerging New Threats And Top CISO Priorities In 2022 (Mumbai)
Emerging New Threats And Top CISO Priorities In 2022 (Mumbai)
 
Emerging New Threats And Top CISO Priorities in 2022 (Bangalore)
Emerging New Threats And Top CISO Priorities in 2022 (Bangalore)Emerging New Threats And Top CISO Priorities in 2022 (Bangalore)
Emerging New Threats And Top CISO Priorities in 2022 (Bangalore)
 
Cloud Security: Limitations of Cloud Security Groups and Flow Logs
Cloud Security: Limitations of Cloud Security Groups and Flow LogsCloud Security: Limitations of Cloud Security Groups and Flow Logs
Cloud Security: Limitations of Cloud Security Groups and Flow Logs
 
Cyber Security Governance
Cyber Security GovernanceCyber Security Governance
Cyber Security Governance
 
Ethical Hacking
Ethical HackingEthical Hacking
Ethical Hacking
 

Recently uploaded

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Recently uploaded (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Finding Xori: Malware Analysis Triage with Automated Disassembly

  • 1. Finding Xori Malware Analysis Triage with Automated Disassembly Amanda Rousseau Rich Seymour
  • 2. About Us Amanda Rousseau Rich Seymour Sr. Malware Researcher, Endgame, Inc. @malwareunicorn Sr. Data Scientist, Endgame, Inc. @rseymour Project started in Jan 2018 ● Approx 6 months ● ~36K lines of code
  • 3. Quick Overview The Current State of Disassemblers Functionality & Features Brief overview of pros and cons with current popular open source PE disassemblers. Overview how we pulled together the different aspects of disassemblers and emulator Usage & Demo How the output is used for automation. Applying the tool on various malware samples and shellcode.
  • 4. The Problem There are millions of malware samples to look at and a few reverse engineers. We need to change the way we are going about this if we are going to keep up. How to leverage large scale disassembly in an automated way with many samples? ● Improve the scalability in malware analysis ● Integration and automation
  • 5. Present Day Common Disassemblers Capstone Radare2 IDA Pro Hopper Binary Ninja Size small small large medium large Stability ✔ ✖ ✔ ✔ ✔ Price - - $$$ $ $$ Cross Platform ✔ ~ ✔ ✖ ✔ Usability ~ ~ ✔ ~ ~ Accuracy ~ ~ ✔ ~ ~ Integration ✔ ~ ✖ ✖ ✖
  • 6. Requirements ● Fast development ● Stability and resilience ● Cross platform ● Output can be easily integrated ● Ease of use ● Core feature set ● Output accuracy
  • 7. Evaluating Disassemblers The first step - Diving into the code: ● Verifying the accuracy of various disassemblers ● Understand each of their strengths and limitations We adopted different aspects of disassemblers and emulator modules. ● Much of Capstone is also based on the LLVM & GDB repositories ● QEMU is the emulation is straightforward, easy to understand ● Converted some of the logic into Rust, while also fixing a few bugs along the way.
  • 8. Evaluating Example x66x90 XCHG AX, AX [Objdump]✔ X86 32bit: NOP [Capstone]✖ NOP [Distorm]✖ XCHG AX, AX [IDA Pro]✔ OpSize Opcode
  • 9. Developed in Rust Why Rust? ● Same capabilities in CC++ ● Stack protection ● Proper memory handling (guaranteed memory safety) ● Provides stability and speed (minimal runtime) ● Faster development ● Helpful compiler
  • 10. Current Features ● Open source ● Supports i386 and x86-64 architecture only at the moment ● Displays strings based on referenced memory locations ● Manages memory ● Outputs Json ● 2 modes: with or without emulation ○ Light Emulation - meant to enumerate all paths (Registers, Stack, Some Instructions) ○ Full Emulation - only follows the code’s path (Slow performance) ● Simulated TEB & PEB structures ● Evaluates functions based on DLL exports
  • 11. Design Memory Manager Image TEB PEB DLL headers Analysis Functions Disasm Imports PE Loader State CPU Registers & Flags Stack Loop Tracking Analysis This structure contains the CPU state of the registers & flags, a new copy of the stack, and short circuiting for looping during emulation. State Handles the loading of the PE image into memory and sets up the TEB/PEB as well as initializing the offsets to loaded DLLs and import table. PE Loader This structure contains all of the mmap memory for the Image, TEB/PEB, and DLL headers. Accessors for Read & Write to avoid errors in inaccessible memory. Memory Manager The core container for the disassembly, functions, and imports.
  • 12. Roll your own PE Parser ● Although a few Rust PE parsers exist: goblin, pe-rs we decided to create our own. ● Chose to write it using the nom parser combinator framework ● Ideally less error prone due to safe macro constructions ● Many lessons learned ● From a historical perspective a PE parser start reading a 16 bit DOS file ● Then optionally switches to a PE32 or a PE32+ ● This is like a history of DOS and Microsoft Windows in a single parser.
  • 13. Analysis Enrichment ● The header is used to build the memory sections of the PE Image ● Similar to the PE loader in windows, it will load the image similar to how it would be loaded in the addressable memory. Where the imports are given memory address, rewritten in the image. Image .text .data .idata .rsrc Stack DLLs TEB PEB
  • 14. Symbols ● We needed a way to load DLL exports and header information without doing it natively. ● Built a parser that would generate json files for consumption called pesymbols. ● Instead of relying on the Import Table of the PE, it generates virtual addresses of the DLL and API in the Image’s Import Table. This way you can track the actual address of the function being pushed into various registers. ● The virtual address start is configurable as well as the json location. { "name": "kernel32.dll", "exports": [ { "address": 696814, "name": "AcquireSRWLockExclusive", "ordinal": 1, "forwarder": true, "forwarder_name": "NTDLL.RtlAcquireSRWLockExclusive" }, { "address": 696847, "name": "AcquireSRWLockShared", "ordinal": 2, "forwarder": true, "forwarder_name": "NTDLL.RtlAcquireSRWLockShared" }, ... "dll_address32": 1691680768, 0x64D50000 "dll_address64": 8789194768384, 0x7FE64D50000 "function_symbol32": "./src/analysis/symbols/generated_user_syswow64.json", "function_symbol64": "./src/analysis/symbols/generated_user_system32.json", ... Configurable in xori.json Generated_user_syswow64.json
  • 15. Dealing with Dynamic API Calls The Stack The TEB and PEB structures are simulated based on the the imports and known dlls in a windows 7 environment. TEB/PEB Segregated memory for the local memory storage such as the stack. Memory Management If references to functions are pushed into a register or stack will be able to be tracked.
  • 16. Dealing with Dynamic API Calls 0x4010ed A3 00 10 40 00 mov [0x401000], eax 0x4010f2 68 41 10 40 00 push 0x401041 ; LoadLibraryA 0x4010f7 FF 35 00 10 40 00 push [0x401000] 0x4010fd E8 C9 01 00 00 call 0x4012cb 0x401102 83 F8 00 cmp eax, 0x0 0x401105 0F 84 CF 02 00 00 je 0x4013da 0x40110b A3 04 10 40 00 mov [0x401004], eax ; wI 0x401110 68 4E 10 40 00 push 0x40104e ; VirtualProtect 0x401115 FF 35 00 10 40 00 push [0x401000] 0x40111b E8 AB 01 00 00 call 0x4012cb 0x401120 83 F8 00 cmp eax, 0x0 0x401123 0F 84 B1 02 00 00 je 0x4013da 0x401129 A3 08 10 40 00 mov [0x401008], eax 0x40112e 6A 00 push 0x0 0x401130 6A 00 push 0x0 0x401132 68 1C 10 40 00 push 0x40101c ; shell32.dll 0x401137 FF 15 04 10 40 00 call [0x401004] ; kernel32.dll!LoadLibraryA 0x40113d A3 0C 10 40 00 mov [0x40100c], eax 0x401142 68 33 10 40 00 push 0x401033 ; ShellExecuteA 0x401147 FF 35 0C 10 40 00 push [0x40100c] 0x40114d E8 79 01 00 00 call 0x4012cb 0x401152 A3 10 10 40 00 mov [0x401010], eax Stores the address into ptr [0x401004] Loads LoadLibrary from the PEB Calls the new ptr Header Imports "ExitProcess" "GetLastError" "GetLocalTime" "GetModuleHandleA" Dynamic Imports "LoadLibraryA" "VirtualProtect" "ShellExecuteA"
  • 17. TEB & PEB #[derive(Serialize, Deserialize)] struct ThreadInformationBlock32 { // reference: https://en.wikipedia.org/wiki/Win32_Thread_Information_Block seh_frame: u32, //0x00 stack_base: u32, //0x04 stack_limit: u32, //0x08 subsystem_tib: u32, //0x0C fiber_data: u32, //0x10 arbitrary_data: u32, //0x14 self_addr: u32, //0x18 //End of NT subsystem independent part environment_ptr: u32, //0x1C process_id: u32, //0x20 thread_id: u32, //0x24 active_rpc_handle: u32, //0x28 tls_addr: u32, //0x2C peb_addr: u32, //0x30 last_error: u32, //0x34 critical_section_count: u32, //0x38 csr_client_thread: u32, //0x3C win32_thread_info: u32, //0x40 win32_client_info: [u32; 31], //0x44 ... let teb_binary: Vec<u8> = serialize(&teb_struct).unwrap(); In Rust, you can serialize structs into vectors of bytes. This way you can allow the assembly emulation to access them natively while also managing the access. PEB peb_ldr_data Entry 0: NTDLL Entry 1: Kernel32 Entry N
  • 18. Code vs. Data ● padding after a non-returning call ● calls misidentified as non-returning ● repetitive instruction sequences ● missed computed jump targets ● false computed jump targets ● missed opcode prefixes ● code following unconditional branches ● code following returns ● code following conditional branches 0x14000286a 39 05 C0 27 00 00 cmp [rip+0x27c0], eax 0x140002870 0F 95 C0 setne al 0x140002873 C3 ret ; FUNC 0x140002868 END 0x140002878 CC CC CC CC CC CC CC CC db 0xcccccccccccccccc 0x140002880 FF 25 A2 08 00 00 jmp [rip+0x8a2] 0x40116c 68 B0 12 40 00 push 0x4012b0 ; VB5! 0x401171 E8 F0 FF FF FF call 0x401166 ; FUNC 0x40116c END 0x401178 00 00 00 00 db 0x0 0x40117c 30 00 00 00 db 0x30 0x401180 40 00 00 00 db 0x40 0x401184 00 00 00 00 db 0x0 Padding after a non-returning call Padding after returns
  • 19. Handling Branches & Calls ● Branches and calls have 2 directions ○ Left & Right ● In light emulation mode, both the left and right directions are followed ● Each direction is placed onto a queue with it’s own copy of the state. ● Any assembly not traversed will not be analyzed. ● All function calls are tracked for local and import table mapping. Queue State Jump/ Call/ Branch StateLEFT RIGHT Back Front
  • 20. Handling Looping ● Infinite loops are hard to avoid ● Built a way to configure the maximum amount of loops a one can take ○ Forward ○ Backward ○ Standard Loop ● The state contains the looping information ● Once the maximum is reached, it will disable the loop "loop_default_case": 4000, ... Configurable in xori.json
  • 21. Signature Analysis ● We needed a way to add signatures fast ● When bytes are analyzed as data, you can apply signatures (i.e Function Headers) ● Importing FLIRT Signatures Signature{ name: "_standard_func_header", pattern: &[ r"x55x8BxEC", //push ebp, mov ebp,esp r"x55x89xE5", //push ebp, mov ebp,esp ], } <leading bytes> <CRC16 len> <CRC16> <total length> <public name(s)> <referenced name(s)> 558BEC56FC8B750C8B4E0833CEE8........6A0056FF7614FF760C6A00FF7510 07 5FB2 0031 :0000 __CatchGuardHandler ^000E @__security_check_cookie@4 ^0027 ___InternalCxxFrameHandler 558BEC8B4D0C568B7508890EE8........8B4824894E04E8........8970248B 04 7D88 0024 :0000 __CreateFrameInfo ^000D ___vcrt_getptd
  • 22. Automation for Bulk Analysis ● On the Ember Test set of 1000 files, Xori processes a sample in 1.25 seconds. With 8 cores, 1000 files takes about 20 min ● Creates *valid* JSON output of PE features, control flow graph, functions from binary files allowing bulk data analysis: clustering, outlier detection and visualization. ● You can then easily throw Xori output into a database, document store or do a little data science at the command line $ jq '.import_table?|map(.import_address_list)?|map(.[].func_name)?|.[]' *header.json |sort | uniq -c |sort -nr|grep -i crypt 32 "CryptReleaseContext" 23 "CryptGenRandom" 19 "CryptAcquireContextA" 12 "CryptAcquireContextW" 7 "CryptHashData" 7 "CryptGetHashParam" 7 "CryptDestroyHash" ...
  • 24. Cd ./xori Cargo build --release ./target/release/xori -f wanacry.exe Simplest Way to Run Xori
  • 25. extern crate xori; use std::fmt::Write; use xori::disasm::*; use xori::arch::x86::archx86::X86Detail; fn main() { let xi = Xori { arch: Arch::ArchX86, mode: Mode::Mode32 }; let start_address = 0x1000; let binary32 = b"xe9x1ex00x00x00xb8x04 x00x00x00xbbx01x00x00x00x59xbax0f x00x00x00xcdx80xb8x01x00x00x00xbb x00x00x00x00xcdx80xe8xddxffxffxff x48x65x6cx6cx6fx2cx20x57x6fx72x6c x64x21x0dx0a"; let mut vec: Vec<Instruction<X86Detail>> = Vec::new(); xi.disasm(binary32, binary32.len(), start_address, start_address, 0, &mut vec); if vec.len() > 0 { //Display values for instr in vec.iter_mut() { let addr: String = format!("0x{:x}", instr.address); println!("{:16} {:20} {} {}", addr, hex_array(&instr.bytes, instr.size), instr.mnemonic, instr.op_str); } } } Basic Disassembler
  • 26. extern crate xori; extern crate serde_json; use serde_json::Value; use std::path::Path; use xori::analysis::analyze::analyze; use xori::disasm::*; fn main() { let mut binary32 = b"xe9x1ex00x00x00xb8x04 x00x00x00xbbx01x00x00x00x59xbax0f x00x00x00xcdx80xb8x01x00x00x00xbb x00x00x00x00xcdx80xe8xddxffxffxff x48x65x6cx6cx6fx2cx20x57x6fx72x6c x64x21x0dx0a".to_vec(); let mut config_map: Option<Value> = None; if Path::new("xori.json").exists() { config_map = read_config(&Path::new("xori.json")); } match analyze(&Arch::ArchX86, &mut binary32, &config_map) { Some(analysis)=>{ if !analysis.disasm.is_empty(){ println!("{}", analysis.disasm); } }, None=>{}, } } Binary File Disassembler
  • 29. Demo
  • 30.