SlideShare una empresa de Scribd logo
1 de 42
Descargar para leer sin conexión
DeathNote of
Microsoft Windows Kernel
windows kernel internals
$whoami
• @zer0mem
• Windows kernel research at
KeenLab, Tencent
• pwn2own winner (2015 / 2016),
pwnie nominee (2015)
• fuzzing focus : state
• wushu player
Daniel
• @long123king
• Windows kernel research at
KeenLab, Tencent
• pwn2own winner (2016)
• fuzzing focus : data 'format'
• windbg guy
Peter
agenda
sandbox
ntoskrnl
extension
clfs
internals
Sandbox
• limiting attack surface
• potantional landscape for bugs
• available methods for abusing it
• ACL vs access to various kernel objects
• non ntos, non w32k drivers
• various ntos objects
• w32k filtering
• depends on sandboxed app needs
• w32k lockdown
Sandbox targets
mutex
memory
thread PE
section
pipe ...
... plus ?
• Nt*Transaction*
• Nt*Enlistment*
• Nt*Manager*
what ?
• Kernel Transaction Manager
• Purpose
• The Kernel Transaction Manager (KTM) enables the
development of applications that use transactions. The
transaction engine itself is within the kernel, but transactions
can be developed for kernel- or user-mode transactions, and
within a single host or among distributed hosts.
• The KTM is used to implement Transactional NTFS (TxF) and
Transactional Registry (TxR). TxF allows transacted file system
operations within the NTFS file system. TxR allows transacted
registry operations. KTM enables client applications to
coordinate file system and registry operations with a
transaction.
tm.sys
• simple object state
• few syscalls available
• not much code involved
• however interestingly interconnected
• Results :
• 1 nullptr deref
• 1 exploitable vulnerability
tm indirection
• tm.sys simple
purpose driver
• but interesting
module involved
at backend
• CLFS.sys
CLFS.sys
• Purpose
• The Common Log File System (CLFS) API provides a high-performance,
general-purpose log file subsystem that dedicated client applications
can use and multiple clients can share to optimize log access.
• Any user-mode application that needs logging or recovery support can
use CLFS.
• Where applicable
• You can use CLFS for data and event management and to develop
server and enterprise applications.
• For data management, you can use CLFS with the following:
• Database systems
• Messaging, such as store-and-forward systems
• Online transactional processing (OLTP) systems
• Other kinds of transactional systems
CLFS.sys
• well integrated to transactions and more!
• c++ code base
• serve fair attack surface
• ... but not at appcontainer or untrusted level ...
• or does it ?
NtCreateTransactionManager
• depends on CLFS
• use CLFS for its checkpoints
• therefore implies :
• Opens CLFS
• *PARSE* CLFS
• interact with CLFS
• lets try it out!
CLFS - data fuzzing I.
• i am not fan of data fuzzing in kernel
• as i am strongly against data parsing at kernel at all :)
• lets do quick probe, that i am ok with :
• mutate randomly file
• results = 0
• cool for me, i am not much interested anyway
• get back to original idea!
CLFS - state fuzzing
• approach 1.
• RE clfs.sys
• go to ioctl
• .. ah too lazy to do that from scratch ...
• approach 2.
• go trough msdn docs
• understand how those api works
• callstack necessary to suceed to call one or another api
• implement that logic to Qilin (our internal fuzzer)
• mess with logic in Qilin little bit
bugz++
• after first dry run of fuzzer in 15 min first crashes
• ... wtf
• but ddos only
• eliminate that
• another bugz apear
• now time to rethink .. data fuzzing really so bad
idea afterall ?
CLFS - data fuzzing II.
• RE where & how are data parsed
• EntryPoint : ClfsCreateLogFile
• ouch ... magic .. dummy fuzz proof
• I. crc
• II. rellocation required
CLFS - lets fuzz more seriously
• too lazy to re-implement existing code, but is it
even necesary ?
CLFS - lets fuzz more seriously
• too lazy to implement crc &
rellocations
CLFS { state, dummy, enhanced }
Data Enhanced fuzz
27% ++
Data Dummy Fuzz
40%
State Fuzz
33%
CLFS FUZZING STRATEGIES => RESULTS
CLFS internals
... under the hood ...
BLF (Base Log File) Format
Record Header
Control Record
Base Log Record
Container Record
Symbol Header
Client Context
Container Context
CClfsBaseFilePersisted::ReadImage
Record Parameter
CClfsBaseFile::GetBaseLogRecord
CClfsBaseFile::GetBaseLogRecord(CClfsBaseFile* this)
xor eax, eax
cmp ax, [rcx+28h]
jz short locret_1C00335DB
mov rcx, [rcx+30h]
mov rcx, [rcx+30h]
test rcx, rcx
jz short locret_1C00335DB
mov eax, [rcx+28h]
add rax, rcx
locret_1C00335DB:
retn
CClfsBaseFile::AcquireMetadataBlock
Use of AcquireMetadataBlock
CClfsBaseFilePersisted::OpenImage
Symbol Hash Function
__int64 ClfsHashPJW(const struct _UNICODE_STRING *a1)
{
unsigned int v1 = 0, v4 = 0, v6;
PWSTR wchar_buffer = a1->Buffer;
const struct _UNICODE_STRING *v3 = a1;
if ( a1->Length & 0xFFFE ){
do{
int v5 = 0x10 * v1 + RtlUpcaseUnicodeChar(*wchar_buffer);
v6 = v5 & 0xF0000000;
if ( v5 & 0xF0000000 )
v5 ^= v6 >> 0x18;
v1 = v6 ^ v5;
++wchar_buffer;
++v4;
}
while ( v4 < (unsigned int)v3->Length >> 1 );
}
return v1;
}
Enhanced CLFS format fuzzing
• If you know the target well enough, you can fuzz it
well.
• Since now, we know:
• BLF file format
• Control Record
• Base Log Record
• Symbol Header
• Client Context
• Container Context
• Container Record
• Clfs.sys has its own logic to parse these formats, is
it robust enough?
Enhanced CLFS format fuzzing
Select
Deserialize
Mutate
Inmune
Serialize
push
Enhanced CLFS format fuzzing
class CControlRecord : public CFormatBase<CControlRecord>
{
……
virtual bool serialize(ostream & out) const override;
virtual bool deserialize(istream & in) override;
virtual bool mutate() override;
……
};
class CBaseLogRecord : public CFormatBase<CBaseLogRecord>
{
……
virtual bool serialize(ostream & out) const override;
virtual bool deserialize(istream & in) override;
virtual bool mutate() override;
……
};
……
Enhanced CLFS format fuzzing
bool CCLFSFormat::deserialize(istream & in)
{
……
m_controlRecord.deserialize(in);
m_controlRecordShadow.deserialize(in);
m_baseLogRecord.deserialize(in);
m_baseLogRecordShadow.deserialize(in);
m_truncateRecord.deserialize(in);
m_truncateRecordShadow.deserialize(in);
……
}
bool CCLFSFormat::mutate(istream & in)
{ …… }
bool CCLFSFormat::serialize(istream & in)
{ …… }
Enhanced CLFS format fuzzing
CCLFSDocument::CCLFSDocument(const string filename)
:m_template_filename(filename)
,m_template_stream(filename, ios::in | ios::binary)
{
/* number: 0 */m_engine.registerFilter(make_unique<CCommonErrorBypass>());
/* number: 1 */m_engine.registerFilter(make_unique<CPOC_XXX_1>());
/* number: 2 */m_engine.registerFilter(make_unique<CPOC_XXX_2>());
/* number: 3 */m_engine.registerFilter(make_unique<CPOC_XXX_3>());
/* number: 4 */m_engine.registerFilter(make_unique<CPOC_XXX_4>());
/* number: 5 */m_engine.registerFilter(make_unique<CPOC_XXX_5>());
……
}
void CCLFSDocument::mutate()
{
m_clfs_format.mutate();
m_engine.triggerFilter(3, m_orginal_clfs_format, m_clfs_format);
}
Enhanced CLFS format fuzzing
bool CPOCFilterEngine::triggerFilter(size_t filterIndex,
CCLFSFormat& originalFormat, CCLFSFormat& format)
{
bool b_triggered = false;
for (size_t i = 0; i < m_filters.size(); i++)
{
if (i == filterIndex)
{
m_filters[i]->infect(originalFormat, format);
b_triggered = true;
}
else
m_filters[i]->immune(originalFormat, format);
}
return b_triggered;
}
Q & A
Thank you!

Más contenido relacionado

La actualidad más candente

Sigreturn Oriented Programming
Sigreturn Oriented ProgrammingSigreturn Oriented Programming
Sigreturn Oriented ProgrammingAngel Boy
 
Linux Binary Exploitation - Stack buffer overflow
Linux Binary Exploitation - Stack buffer overflowLinux Binary Exploitation - Stack buffer overflow
Linux Binary Exploitation - Stack buffer overflowAngel Boy
 
Linux Binary Exploitation - Return-oritend Programing
Linux Binary Exploitation - Return-oritend ProgramingLinux Binary Exploitation - Return-oritend Programing
Linux Binary Exploitation - Return-oritend ProgramingAngel Boy
 
Advanced heap exploitaion
Advanced heap exploitaionAdvanced heap exploitaion
Advanced heap exploitaionAngel Boy
 
Make static instrumentation great again, High performance fuzzing for Windows...
Make static instrumentation great again, High performance fuzzing for Windows...Make static instrumentation great again, High performance fuzzing for Windows...
Make static instrumentation great again, High performance fuzzing for Windows...Lucas Leong
 
Play with FILE Structure - Yet Another Binary Exploit Technique
Play with FILE Structure - Yet Another Binary Exploit TechniquePlay with FILE Structure - Yet Another Binary Exploit Technique
Play with FILE Structure - Yet Another Binary Exploit TechniqueAngel Boy
 
TDOH x 台科 pwn課程
TDOH x 台科 pwn課程TDOH x 台科 pwn課程
TDOH x 台科 pwn課程Weber Tsai
 
Windows 10 Nt Heap Exploitation (Chinese version)
Windows 10 Nt Heap Exploitation (Chinese version)Windows 10 Nt Heap Exploitation (Chinese version)
Windows 10 Nt Heap Exploitation (Chinese version)Angel Boy
 
Linux Binary Exploitation - Heap Exploitation
Linux Binary Exploitation - Heap Exploitation Linux Binary Exploitation - Heap Exploitation
Linux Binary Exploitation - Heap Exploitation Angel Boy
 
Linux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledgeLinux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledgeAngel Boy
 
Abusing Microsoft Kerberos - Sorry you guys don't get it
Abusing Microsoft Kerberos - Sorry you guys don't get itAbusing Microsoft Kerberos - Sorry you guys don't get it
Abusing Microsoft Kerberos - Sorry you guys don't get itBenjamin Delpy
 
MacOS memory allocator (libmalloc) Exploitation
MacOS memory allocator (libmalloc) ExploitationMacOS memory allocator (libmalloc) Exploitation
MacOS memory allocator (libmalloc) ExploitationAngel Boy
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and moreBrendan Gregg
 
Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...
Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...
Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...Maksim Shudrak
 
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
 
Return to dlresolve
Return to dlresolveReturn to dlresolve
Return to dlresolveAngel Boy
 
Compromising Linux Virtual Machines with Debugging Mechanisms
Compromising Linux Virtual Machines with Debugging MechanismsCompromising Linux Virtual Machines with Debugging Mechanisms
Compromising Linux Virtual Machines with Debugging MechanismsRussell Sanford
 
Tcache Exploitation
Tcache ExploitationTcache Exploitation
Tcache ExploitationAngel Boy
 

La actualidad más candente (20)

Sigreturn Oriented Programming
Sigreturn Oriented ProgrammingSigreturn Oriented Programming
Sigreturn Oriented Programming
 
Linux Binary Exploitation - Stack buffer overflow
Linux Binary Exploitation - Stack buffer overflowLinux Binary Exploitation - Stack buffer overflow
Linux Binary Exploitation - Stack buffer overflow
 
Linux Binary Exploitation - Return-oritend Programing
Linux Binary Exploitation - Return-oritend ProgramingLinux Binary Exploitation - Return-oritend Programing
Linux Binary Exploitation - Return-oritend Programing
 
Advanced heap exploitaion
Advanced heap exploitaionAdvanced heap exploitaion
Advanced heap exploitaion
 
Kernel Pool
Kernel PoolKernel Pool
Kernel Pool
 
Make static instrumentation great again, High performance fuzzing for Windows...
Make static instrumentation great again, High performance fuzzing for Windows...Make static instrumentation great again, High performance fuzzing for Windows...
Make static instrumentation great again, High performance fuzzing for Windows...
 
Play with FILE Structure - Yet Another Binary Exploit Technique
Play with FILE Structure - Yet Another Binary Exploit TechniquePlay with FILE Structure - Yet Another Binary Exploit Technique
Play with FILE Structure - Yet Another Binary Exploit Technique
 
TDOH x 台科 pwn課程
TDOH x 台科 pwn課程TDOH x 台科 pwn課程
TDOH x 台科 pwn課程
 
Windows 10 Nt Heap Exploitation (Chinese version)
Windows 10 Nt Heap Exploitation (Chinese version)Windows 10 Nt Heap Exploitation (Chinese version)
Windows 10 Nt Heap Exploitation (Chinese version)
 
Linux Binary Exploitation - Heap Exploitation
Linux Binary Exploitation - Heap Exploitation Linux Binary Exploitation - Heap Exploitation
Linux Binary Exploitation - Heap Exploitation
 
Linux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledgeLinux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledge
 
Abusing Microsoft Kerberos - Sorry you guys don't get it
Abusing Microsoft Kerberos - Sorry you guys don't get itAbusing Microsoft Kerberos - Sorry you guys don't get it
Abusing Microsoft Kerberos - Sorry you guys don't get it
 
MacOS memory allocator (libmalloc) Exploitation
MacOS memory allocator (libmalloc) ExploitationMacOS memory allocator (libmalloc) Exploitation
MacOS memory allocator (libmalloc) Exploitation
 
Execution
ExecutionExecution
Execution
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and more
 
Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...
Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...
Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...
 
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
 
Return to dlresolve
Return to dlresolveReturn to dlresolve
Return to dlresolve
 
Compromising Linux Virtual Machines with Debugging Mechanisms
Compromising Linux Virtual Machines with Debugging MechanismsCompromising Linux Virtual Machines with Debugging Mechanisms
Compromising Linux Virtual Machines with Debugging Mechanisms
 
Tcache Exploitation
Tcache ExploitationTcache Exploitation
Tcache Exploitation
 

Destacado

When is something overflowing
When is something overflowingWhen is something overflowing
When is something overflowingPeter Hlavaty
 
Rainbow Over the Windows: More Colors Than You Could Expect
Rainbow Over the Windows: More Colors Than You Could ExpectRainbow Over the Windows: More Colors Than You Could Expect
Rainbow Over the Windows: More Colors Than You Could ExpectPeter Hlavaty
 
Ice Age melting down: Intel features considered usefull!
Ice Age melting down: Intel features considered usefull!Ice Age melting down: Intel features considered usefull!
Ice Age melting down: Intel features considered usefull!Peter Hlavaty
 
Power of linked list
Power of linked listPower of linked list
Power of linked listPeter Hlavaty
 
Moony li pacsec-1.8
Moony li pacsec-1.8Moony li pacsec-1.8
Moony li pacsec-1.8PacSecJP
 
AMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does It
AMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does ItAMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does It
AMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does ItNikhil Mittal
 
DbiFuzz framework #ZeroNights E.0x03 slides
DbiFuzz framework #ZeroNights E.0x03 slidesDbiFuzz framework #ZeroNights E.0x03 slides
DbiFuzz framework #ZeroNights E.0x03 slidesPeter Hlavaty
 
Zeronights 2016 | A blow under the belt. How to avoid WAF/IPS/DLP | Удар ниже...
Zeronights 2016 | A blow under the belt. How to avoid WAF/IPS/DLP | Удар ниже...Zeronights 2016 | A blow under the belt. How to avoid WAF/IPS/DLP | Удар ниже...
Zeronights 2016 | A blow under the belt. How to avoid WAF/IPS/DLP | Удар ниже...Дмитрий Бумов
 
Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)Nate Lawson
 
You're Off the Hook: Blinding Security Software
You're Off the Hook: Blinding Security SoftwareYou're Off the Hook: Blinding Security Software
You're Off the Hook: Blinding Security SoftwareCylance
 
Find your own iOS kernel bug
Find your own iOS kernel bugFind your own iOS kernel bug
Find your own iOS kernel bugGustavo Martinez
 
Attacking the Webkit heap [Or how to write Safari exploits]
Attacking the Webkit heap [Or how to write Safari exploits]Attacking the Webkit heap [Or how to write Safari exploits]
Attacking the Webkit heap [Or how to write Safari exploits]Seguridad Apple
 
Software Security : From school to reality and back!
Software Security : From school to reality and back!Software Security : From school to reality and back!
Software Security : From school to reality and back!Peter Hlavaty
 
How Safe is your Link ?
How Safe is your Link ?How Safe is your Link ?
How Safe is your Link ?Peter Hlavaty
 
Exploit techniques and mitigation
Exploit techniques and mitigationExploit techniques and mitigation
Exploit techniques and mitigationYaniv Shani
 

Destacado (20)

When is something overflowing
When is something overflowingWhen is something overflowing
When is something overflowing
 
Rainbow Over the Windows: More Colors Than You Could Expect
Rainbow Over the Windows: More Colors Than You Could ExpectRainbow Over the Windows: More Colors Than You Could Expect
Rainbow Over the Windows: More Colors Than You Could Expect
 
Ice Age melting down: Intel features considered usefull!
Ice Age melting down: Intel features considered usefull!Ice Age melting down: Intel features considered usefull!
Ice Age melting down: Intel features considered usefull!
 
Power of linked list
Power of linked listPower of linked list
Power of linked list
 
Back to the CORE
Back to the COREBack to the CORE
Back to the CORE
 
Attack on the Core
Attack on the CoreAttack on the Core
Attack on the Core
 
Moony li pacsec-1.8
Moony li pacsec-1.8Moony li pacsec-1.8
Moony li pacsec-1.8
 
AMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does It
AMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does ItAMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does It
AMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does It
 
DbiFuzz framework #ZeroNights E.0x03 slides
DbiFuzz framework #ZeroNights E.0x03 slidesDbiFuzz framework #ZeroNights E.0x03 slides
DbiFuzz framework #ZeroNights E.0x03 slides
 
Racing with Droids
Racing with DroidsRacing with Droids
Racing with Droids
 
Zeronights 2016 | A blow under the belt. How to avoid WAF/IPS/DLP | Удар ниже...
Zeronights 2016 | A blow under the belt. How to avoid WAF/IPS/DLP | Удар ниже...Zeronights 2016 | A blow under the belt. How to avoid WAF/IPS/DLP | Удар ниже...
Zeronights 2016 | A blow under the belt. How to avoid WAF/IPS/DLP | Удар ниже...
 
iOS Application Exploitation
iOS Application ExploitationiOS Application Exploitation
iOS Application Exploitation
 
How2heap
How2heap How2heap
How2heap
 
Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)
 
You're Off the Hook: Blinding Security Software
You're Off the Hook: Blinding Security SoftwareYou're Off the Hook: Blinding Security Software
You're Off the Hook: Blinding Security Software
 
Find your own iOS kernel bug
Find your own iOS kernel bugFind your own iOS kernel bug
Find your own iOS kernel bug
 
Attacking the Webkit heap [Or how to write Safari exploits]
Attacking the Webkit heap [Or how to write Safari exploits]Attacking the Webkit heap [Or how to write Safari exploits]
Attacking the Webkit heap [Or how to write Safari exploits]
 
Software Security : From school to reality and back!
Software Security : From school to reality and back!Software Security : From school to reality and back!
Software Security : From school to reality and back!
 
How Safe is your Link ?
How Safe is your Link ?How Safe is your Link ?
How Safe is your Link ?
 
Exploit techniques and mitigation
Exploit techniques and mitigationExploit techniques and mitigation
Exploit techniques and mitigation
 

Similar a DeathNote of Microsoft Windows Kernel

Security research over Windows #defcon china
Security research over Windows #defcon chinaSecurity research over Windows #defcon china
Security research over Windows #defcon chinaPeter Hlavaty
 
Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014Barney Hanlon
 
Metasploit & Windows Kernel Exploitation
Metasploit & Windows Kernel ExploitationMetasploit & Windows Kernel Exploitation
Metasploit & Windows Kernel ExploitationzeroSteiner
 
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the CoreNSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the CoreNoSuchCon
 
Open Source Cyber Weaponry
Open Source Cyber WeaponryOpen Source Cyber Weaponry
Open Source Cyber WeaponryJoshua L. Davis
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudyJohn Adams
 
Practical Windows Kernel Exploitation
Practical Windows Kernel ExploitationPractical Windows Kernel Exploitation
Practical Windows Kernel ExploitationzeroSteiner
 
PyCon India 2012: Celery Talk
PyCon India 2012: Celery TalkPyCon India 2012: Celery Talk
PyCon India 2012: Celery TalkPiyush Kumar
 
Powering up on PowerShell - BSides Charleston - Nov 2018
Powering up on PowerShell - BSides Charleston - Nov 2018Powering up on PowerShell - BSides Charleston - Nov 2018
Powering up on PowerShell - BSides Charleston - Nov 2018Fernando Tomlinson, CISSP, MBA
 
Dynamic Instrumentation- OpenEBS Golang Meetup July 2017
Dynamic Instrumentation- OpenEBS Golang Meetup July 2017Dynamic Instrumentation- OpenEBS Golang Meetup July 2017
Dynamic Instrumentation- OpenEBS Golang Meetup July 2017OpenEBS
 
[若渴計畫] Challenges and Solutions of Window Remote Shellcode
[若渴計畫] Challenges and Solutions of Window Remote Shellcode[若渴計畫] Challenges and Solutions of Window Remote Shellcode
[若渴計畫] Challenges and Solutions of Window Remote ShellcodeAj MaChInE
 
44CON 2014 - Meterpreter Internals, OJ Reeves
44CON 2014 - Meterpreter Internals, OJ Reeves44CON 2014 - Meterpreter Internals, OJ Reeves
44CON 2014 - Meterpreter Internals, OJ Reeves44CON
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications OpenEBS
 
Braxton McKee, Founder & CEO, Ufora at MLconf SF - 11/13/15
Braxton McKee, Founder & CEO, Ufora at MLconf SF - 11/13/15Braxton McKee, Founder & CEO, Ufora at MLconf SF - 11/13/15
Braxton McKee, Founder & CEO, Ufora at MLconf SF - 11/13/15MLconf
 
Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)
Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)
Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)Issac Buenrostro
 
Serverless: A love hate relationship
Serverless: A love hate relationshipServerless: A love hate relationship
Serverless: A love hate relationshipJürgen Brüder
 
Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Vinay Kumar
 
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...NETWAYS
 

Similar a DeathNote of Microsoft Windows Kernel (20)

Security research over Windows #defcon china
Security research over Windows #defcon chinaSecurity research over Windows #defcon china
Security research over Windows #defcon china
 
Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014
 
Metasploit & Windows Kernel Exploitation
Metasploit & Windows Kernel ExploitationMetasploit & Windows Kernel Exploitation
Metasploit & Windows Kernel Exploitation
 
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the CoreNSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
 
Open Source Cyber Weaponry
Open Source Cyber WeaponryOpen Source Cyber Weaponry
Open Source Cyber Weaponry
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudy
 
Practical Windows Kernel Exploitation
Practical Windows Kernel ExploitationPractical Windows Kernel Exploitation
Practical Windows Kernel Exploitation
 
PyCon India 2012: Celery Talk
PyCon India 2012: Celery TalkPyCon India 2012: Celery Talk
PyCon India 2012: Celery Talk
 
Powering up on PowerShell - BSides Charleston - Nov 2018
Powering up on PowerShell - BSides Charleston - Nov 2018Powering up on PowerShell - BSides Charleston - Nov 2018
Powering up on PowerShell - BSides Charleston - Nov 2018
 
Dynamic Instrumentation- OpenEBS Golang Meetup July 2017
Dynamic Instrumentation- OpenEBS Golang Meetup July 2017Dynamic Instrumentation- OpenEBS Golang Meetup July 2017
Dynamic Instrumentation- OpenEBS Golang Meetup July 2017
 
Powering up on PowerShell - BSides Greenville 2019
Powering up on PowerShell  - BSides Greenville 2019Powering up on PowerShell  - BSides Greenville 2019
Powering up on PowerShell - BSides Greenville 2019
 
[若渴計畫] Challenges and Solutions of Window Remote Shellcode
[若渴計畫] Challenges and Solutions of Window Remote Shellcode[若渴計畫] Challenges and Solutions of Window Remote Shellcode
[若渴計畫] Challenges and Solutions of Window Remote Shellcode
 
44CON 2014 - Meterpreter Internals, OJ Reeves
44CON 2014 - Meterpreter Internals, OJ Reeves44CON 2014 - Meterpreter Internals, OJ Reeves
44CON 2014 - Meterpreter Internals, OJ Reeves
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications
 
Braxton McKee, Founder & CEO, Ufora at MLconf SF - 11/13/15
Braxton McKee, Founder & CEO, Ufora at MLconf SF - 11/13/15Braxton McKee, Founder & CEO, Ufora at MLconf SF - 11/13/15
Braxton McKee, Founder & CEO, Ufora at MLconf SF - 11/13/15
 
Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)
Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)
Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)
 
Serverless: A love hate relationship
Serverless: A love hate relationshipServerless: A love hate relationship
Serverless: A love hate relationship
 
Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17
 
Powering up on power shell avengercon - 2018
Powering up on power shell   avengercon - 2018Powering up on power shell   avengercon - 2018
Powering up on power shell avengercon - 2018
 
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
 

Último

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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
 
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
 
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
 

Último (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 
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
 
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
 

DeathNote of Microsoft Windows Kernel

  • 1. DeathNote of Microsoft Windows Kernel windows kernel internals
  • 2. $whoami • @zer0mem • Windows kernel research at KeenLab, Tencent • pwn2own winner (2015 / 2016), pwnie nominee (2015) • fuzzing focus : state • wushu player Daniel • @long123king • Windows kernel research at KeenLab, Tencent • pwn2own winner (2016) • fuzzing focus : data 'format' • windbg guy Peter
  • 4. Sandbox • limiting attack surface • potantional landscape for bugs • available methods for abusing it • ACL vs access to various kernel objects • non ntos, non w32k drivers • various ntos objects • w32k filtering • depends on sandboxed app needs • w32k lockdown
  • 6. ... plus ? • Nt*Transaction* • Nt*Enlistment* • Nt*Manager*
  • 7. what ? • Kernel Transaction Manager • Purpose • The Kernel Transaction Manager (KTM) enables the development of applications that use transactions. The transaction engine itself is within the kernel, but transactions can be developed for kernel- or user-mode transactions, and within a single host or among distributed hosts. • The KTM is used to implement Transactional NTFS (TxF) and Transactional Registry (TxR). TxF allows transacted file system operations within the NTFS file system. TxR allows transacted registry operations. KTM enables client applications to coordinate file system and registry operations with a transaction.
  • 8. tm.sys • simple object state • few syscalls available • not much code involved • however interestingly interconnected • Results : • 1 nullptr deref • 1 exploitable vulnerability
  • 9. tm indirection • tm.sys simple purpose driver • but interesting module involved at backend • CLFS.sys
  • 10. CLFS.sys • Purpose • The Common Log File System (CLFS) API provides a high-performance, general-purpose log file subsystem that dedicated client applications can use and multiple clients can share to optimize log access. • Any user-mode application that needs logging or recovery support can use CLFS. • Where applicable • You can use CLFS for data and event management and to develop server and enterprise applications. • For data management, you can use CLFS with the following: • Database systems • Messaging, such as store-and-forward systems • Online transactional processing (OLTP) systems • Other kinds of transactional systems
  • 11. CLFS.sys • well integrated to transactions and more! • c++ code base • serve fair attack surface • ... but not at appcontainer or untrusted level ... • or does it ?
  • 12. NtCreateTransactionManager • depends on CLFS • use CLFS for its checkpoints • therefore implies : • Opens CLFS • *PARSE* CLFS • interact with CLFS • lets try it out!
  • 13. CLFS - data fuzzing I. • i am not fan of data fuzzing in kernel • as i am strongly against data parsing at kernel at all :) • lets do quick probe, that i am ok with : • mutate randomly file • results = 0 • cool for me, i am not much interested anyway • get back to original idea!
  • 14. CLFS - state fuzzing • approach 1. • RE clfs.sys • go to ioctl • .. ah too lazy to do that from scratch ... • approach 2. • go trough msdn docs • understand how those api works • callstack necessary to suceed to call one or another api • implement that logic to Qilin (our internal fuzzer) • mess with logic in Qilin little bit
  • 15. bugz++ • after first dry run of fuzzer in 15 min first crashes • ... wtf • but ddos only • eliminate that • another bugz apear • now time to rethink .. data fuzzing really so bad idea afterall ?
  • 16. CLFS - data fuzzing II. • RE where & how are data parsed • EntryPoint : ClfsCreateLogFile • ouch ... magic .. dummy fuzz proof • I. crc • II. rellocation required
  • 17. CLFS - lets fuzz more seriously • too lazy to re-implement existing code, but is it even necesary ?
  • 18. CLFS - lets fuzz more seriously • too lazy to implement crc & rellocations
  • 19. CLFS { state, dummy, enhanced } Data Enhanced fuzz 27% ++ Data Dummy Fuzz 40% State Fuzz 33% CLFS FUZZING STRATEGIES => RESULTS
  • 20. CLFS internals ... under the hood ...
  • 21. BLF (Base Log File) Format
  • 31. CClfsBaseFile::GetBaseLogRecord CClfsBaseFile::GetBaseLogRecord(CClfsBaseFile* this) xor eax, eax cmp ax, [rcx+28h] jz short locret_1C00335DB mov rcx, [rcx+30h] mov rcx, [rcx+30h] test rcx, rcx jz short locret_1C00335DB mov eax, [rcx+28h] add rax, rcx locret_1C00335DB: retn
  • 35. Symbol Hash Function __int64 ClfsHashPJW(const struct _UNICODE_STRING *a1) { unsigned int v1 = 0, v4 = 0, v6; PWSTR wchar_buffer = a1->Buffer; const struct _UNICODE_STRING *v3 = a1; if ( a1->Length & 0xFFFE ){ do{ int v5 = 0x10 * v1 + RtlUpcaseUnicodeChar(*wchar_buffer); v6 = v5 & 0xF0000000; if ( v5 & 0xF0000000 ) v5 ^= v6 >> 0x18; v1 = v6 ^ v5; ++wchar_buffer; ++v4; } while ( v4 < (unsigned int)v3->Length >> 1 ); } return v1; }
  • 36. Enhanced CLFS format fuzzing • If you know the target well enough, you can fuzz it well. • Since now, we know: • BLF file format • Control Record • Base Log Record • Symbol Header • Client Context • Container Context • Container Record • Clfs.sys has its own logic to parse these formats, is it robust enough?
  • 37. Enhanced CLFS format fuzzing Select Deserialize Mutate Inmune Serialize push
  • 38. Enhanced CLFS format fuzzing class CControlRecord : public CFormatBase<CControlRecord> { …… virtual bool serialize(ostream & out) const override; virtual bool deserialize(istream & in) override; virtual bool mutate() override; …… }; class CBaseLogRecord : public CFormatBase<CBaseLogRecord> { …… virtual bool serialize(ostream & out) const override; virtual bool deserialize(istream & in) override; virtual bool mutate() override; …… }; ……
  • 39. Enhanced CLFS format fuzzing bool CCLFSFormat::deserialize(istream & in) { …… m_controlRecord.deserialize(in); m_controlRecordShadow.deserialize(in); m_baseLogRecord.deserialize(in); m_baseLogRecordShadow.deserialize(in); m_truncateRecord.deserialize(in); m_truncateRecordShadow.deserialize(in); …… } bool CCLFSFormat::mutate(istream & in) { …… } bool CCLFSFormat::serialize(istream & in) { …… }
  • 40. Enhanced CLFS format fuzzing CCLFSDocument::CCLFSDocument(const string filename) :m_template_filename(filename) ,m_template_stream(filename, ios::in | ios::binary) { /* number: 0 */m_engine.registerFilter(make_unique<CCommonErrorBypass>()); /* number: 1 */m_engine.registerFilter(make_unique<CPOC_XXX_1>()); /* number: 2 */m_engine.registerFilter(make_unique<CPOC_XXX_2>()); /* number: 3 */m_engine.registerFilter(make_unique<CPOC_XXX_3>()); /* number: 4 */m_engine.registerFilter(make_unique<CPOC_XXX_4>()); /* number: 5 */m_engine.registerFilter(make_unique<CPOC_XXX_5>()); …… } void CCLFSDocument::mutate() { m_clfs_format.mutate(); m_engine.triggerFilter(3, m_orginal_clfs_format, m_clfs_format); }
  • 41. Enhanced CLFS format fuzzing bool CPOCFilterEngine::triggerFilter(size_t filterIndex, CCLFSFormat& originalFormat, CCLFSFormat& format) { bool b_triggered = false; for (size_t i = 0; i < m_filters.size(); i++) { if (i == filterIndex) { m_filters[i]->infect(originalFormat, format); b_triggered = true; } else m_filters[i]->immune(originalFormat, format); } return b_triggered; }
  • 42. Q & A Thank you!