SlideShare a Scribd company logo
Fuzzing and Exploiting OSX
Vulnerabilities for Fun and Profit
Complementary
Active & Passive Fuzzing
What We Will Cover
•  Who We Are
•  Passive Fuzzing Framework
•  Exploit to Root
Moony Li
-  @Flyic
-  7 years security
-  Sandcastle
-  Deep Discovery
-  Exploit Detection
-  Mac/Windows
Kernel
-  Android Vulnerability
Jack Tang
-  @jacktang310
-  10+ years security
-  Browser
-  Document
-  Mac/Windows
Kernel
-  Virtualization
Vulnerability
CVE-2015-3787, CVE-2015-5867, CVE-2015-7021,CVE-2015-7020,
CVE-2016-1716,ZDI-CAN-3536,ZDI-CAN-3558, ZDI-
CAN-3598,ZDI-CAN-3596,ZDI-CAN-3603,CVE-2015-7067,
CVE-2015-7076,CVE-2015-7106,CVE-2015-7109,CVE-2016-1718,
CVE-2016-1747,CVE-2016-1749,CVE-2016-1753, ZDI-CAN-3693,
ZDI-CAN-3694, CVE-2016-1795, CVE-2016-1808, CVE-2016-1810,
CVE-2016-1817, CVE-2016-1820, CVE-2016-1798,
CVE-2016-1799, CVE-2016-1812, CVE-2016-1814,
CVE-2016-1818, CVE-2016-1816, CVE-2016-4648,
CVE-2016-4699,CVE-2016-4700,CVE-2016-4750
CVE Credits
Github Access
h"ps://
github.com/
SilverMoonSecu
rity
What We Will Cover
•  Comparing Approaches
•  Our Approach/
Consideration
•  Implementation
•  Best Practice
Methods Disadvantage Notes
	
Tradi1onal	Fuzz	
Choice	the	IOKit	service	name	
they	want	to	test.		Pour	fuzzing	
data	into	the	IOKit	usermode	
API		
(e.g.	IOConnectCallMethod)		
Call	sequence	dependency	 AppleCamIn	(OpenDevice,	
PowerOnCamera…)	
Input	data	dependency	 AppleHDAEngineInput(input	as	user	
mode	buffer	pointer)	
Timing	dependency	 IOHDIXHDDriveOutKernel(	mount	
dmg)	
	
Code	Review
Un-scalable	 Depend	on	Human	experience
Cost	effort	for	Reverse	
Engineering	
so	many	IOKit	services	and	
userclient.	
Comparing Other Approaches
Our Approach|Consideration
Interception & Poison
Are they similarJ
Comparison River	Dam Passive	Fuzz
Basic	
FuncHon
Stream	intercept ExecuNon	intercept
Up	Stream User	mode	data
Down	Stream Kernel	mode	data
Create	
Chaos
Poisoning	upstream	 Fuzzing	user	data
Downstream	fish	die Kernel	crash
Track	the	poison’s	origin Reproduce
…… ……
Just Like This …
Origianl function
Hooker
IOAcceleratorFamily2.kext
Targeted application from apple store
Suspicious
module/function
manifest
IOThunderboltFamily.kext IOUSBFamily.kext
AppleGraphicsPowerManagement.kext AppleHDA.kext … …
I. 	is_io_connect_method
II. is_io_connect_async_method
III. iokit_user_client_trap
IV. IOMemoryDescriptor::createMappingInTask
V. ipc_kmsg_get
VI. ipc_kmsg_send
VII. Copyio
…...
Conditon Checker
Ring3
Ring0
Target
drivers
XNU/
IOKit
Tamper
StackFrame,
Process,
UserClient,
MsgID,
…...
Context Matcher
Implementation – Architecture
Overview
TargetAPI(params):
//Call Original_TargetAPI(params)
if (matchWhitelistParameter(params)) goto _exit();
if !(matchStackFrame() &&
matchBlacklistParameter(params))
goto _exit;
if (random()) {record(params); fuzz(params);}
Call Original_TargetAPI(params);
if (matchContext(params)) alert;
Implementation – Pseudo Code
• Hooker
•  Directly accessible by user
•  One hook for many processes
•  Inline hook in kernel mode.
• Tamper
•  Only fuzz buffer content accessible by user
•  e.g. Inband_input, scalar_input, ool_input
•  NOT size! (bypass getTargetAndMethodForIndex check)
Implementation – Hook & Tamper
int, bool, Gen575TextureBuffer**) + 0x12e
0xffffff80c0c7b7c0 0xffffff7fa96f2bd5 AppleIntelHD3000Graphics`Gen6GLContext::process_token_BindTextures(VendorGLStreamInfo&) + 0x103
0xffffff80c0c7b7f0 0xffffff7fa96b6242 AppleIntelHD3000Graphics`IOIntelGLContext::processCommandBuffer(VendorCommandDescriptor*) +
0x12c
0xffffff80c0c7b820 0xffffff7fa96ec1eb AppleIntelHD3000Graphics`Gen6GLContext::processCommandBuffer(VendorCommandDescriptor*) +
0x7b
0xffffff80c0c7b900 0xffffff7fa96b540a AppleIntelHD3000Graphics`IOIntelGLContext::clientMemoryForType(unsigned int, unsigned int*,
IOMemoryDescriptor**) + 0x5bc
0xffffff80c0c7b950 0xffffff7fa96b39c3 AppleIntelHD3000Graphics`IOIntelGLContext::submit_command_buffer(unsigned int,
sIOGLGetCommandBuffer*) + 0x63
0xffffff80c0c7b980 0xffffff80276b9626 ::shim_io_connect_method_scalarI_structureO(IOExternalMethod *, IOService *, const io_user_scalar_t *,
mach_msg_type_number_t, char *, IOByteCount *)((IOExternalMethod *) method = <>, , (IOService *) object = <>, , (const io_user_scalar_t *) input
= <>, , (mach_msg_type_number_t) inputCount = <>, , (char *) output = <register r10 is not available>, , (IOByteCount *) outputCount = <register r11
is not available>, )
0xffffff80c0c7b9e0 0xffffff80276baef0 IOUserClient::externalMethod(unsigned int, IOExternalMethodArguments*, IOExternalMethodDispatch*,
OSObject*, void*)((IOUserClient *) this = <>, , (uint32_t) selector = <>, , (IOExternalMethodArguments *) args = 0xffffff80c0c7ba00,
(IOExternalMethodDispatch *) dispatch = <>, , (OSObject *) target = <>, , (void *) reference = <>, )
0xffffff80c0c7bb20 0xffffff80276b7f77 ::is_io_connect_method(io_connect_t, uint32_t, io_user_scalar_t *,
mach_msg_type_number_t, char *, mach_msg_type_number_t, mach_vm_address_t, mach_vm_size_t, char *,
mach_msg_type_number_t *, io_user_scalar_t *, mach_msg_type_number_t *, mach_vm_address_t, mach_vm_size_t *)
((io_connect_t) connection = 0xffffff80c0c7ba60, (uint32_t) selector = 16, (io_user_scalar_t *) scalar_input = <>, ,
(mach_msg_type_number_t) scalar_inputCnt = <>, , (char *) inband_input = <>, , (mach_msg_type_number_t)
inband_inputCnt = 0, (mach_vm_address_t) ool_input = <>, , (mach_vm_size_t) ool_input_size = <no location, value may
have been optimized out>, , (char *) inband_output = <no location, value may have been optimized out>, ,
(mach_msg_type_number_t *) inband_outputCnt = <no location, value may have been optimized out>, , (io_user_scalar_t *)
scalar_output = <>, , (mach_msg_type_number_t *) scalar_outputCnt = <no location, value may have been optimized
out>, , (mach_vm_address_t) ool_output = <>, , (mach_vm_size_t *) ool_output_size = <>, )
0xffffff80c0c7bcd0 0xffffff7fa9cd34ab trampline_is_io_connect_method((io_connect_t) connection = 0xffffff8035637000,
(uint32_t) selector = 16, (io_user_scalar_t *) scalar_input = 0xffffff80331a4dcc, (mach_msg_type_number_t)
scalar_inputCnt = 1, (char *) inband_input = 0xffffff80331a4dd8 "", (mach_msg_type_number_t) inband_inputCnt = 0,
(mach_vm_address_t) ool_input = 0, (mach_vm_size_t) ool_input_size = 0, (char *) inband_output = 0xffffff8035805600 "",
(mach_msg_type_number_t *) inband_outputCnt = 0xffffff80358055fc, (io_user_scalar_t *) scalar_output =
0xffffff80c0c7bd30, (mach_msg_type_number_t *) scalar_outputCnt = 0xffffff80c0c7bd2c, (mach_vm_address_t)
ool_output = 0, (mach_vm_size_t *) ool_output_size = 0xffffff80331a4df8)
0xffffff80c0c7bde0 0xffffff8027158750 _Xio_connect_method((mach_msg_header_t *) InHeadP = <>, ,
(mach_msg_header_t *) OutHeadP = 0xffffff80358055d0)
Implementation – Hook & Tamper
(Snippet – Unreported Crash)
•  (Driver interface)is_io_connect_method
•  (Driver
interface)is_io_connect_async_method
•  (Kernel)iokit_user_client_trap
•  (Kernel)IOMemoryDescriptor::createMappingInTas
k
•  (Mach Msg)ipc_kmsg_get
•  (Mach Msg)ipc_kmsg_send
•  (General IO)Copyio
• …
Implementation – Hook Summary
Implementation – Hook Summary Sinnpet
Keep fuzzing stable
•  Get rid of noise
o  busy call, black screen call, hung call,
o  reproduced crashes
Hunt according to vulnerability context
•  Kernel heap address leak
•  Map user data into kernel and read as buffer size
•  …
Implementation – Why Condition
Checker?
•  &&, ||, *(wild match), white(black)
•  Process
•  User id (root/Non-root)
•  Process Name (e.g. Safari, RCE, sandbox-evasion)
•  Module
•  Module Name
•  Function
•  Symbol Name/Address
•  Offset range
Implementation – Dimension of
Condition 1/3
//Config for mac prodetail_control_entry_t g_white_listing_detail_control[] ={ //
procName,uid,driverBundleName, driverClassName, selFunctionNO //"*",
0,"*","*",ANY_MATCH_INTEGER,#if 0 //Reported or collected yet: //
{"*",PROCESS_UID_ANY_INTEGER,"*","AGPMClient",7312}, //
{"*",PROCESS_UID_ANY_INTEGER,"*", "nvDeviceTesla", 5}, //
{"*",PROCESS_UID_ANY_INTEGER,"*", "NV2DContextTesla", 17}, //
{"*",PROCESS_UID_ANY_INTEGER,"*","IONVSurfaceTesla",10}, //
{"*",PROCESS_UID_ANY_INTEGER,"*","IOHDIXHDDriveOutKernelUserClient",2},
{"*",PROCESS_UID_ANY_INTEGER,"*","IGAccelSharedUserClient",1},//crash-24
{"*",PROCESS_UID_ANY_INTEGER,"*","AccelSurface",16},//crash-23
{"*",PROCESS_UID_ANY_INTEGER,"*",OBJECT_CLASS_NAME_NO_FOUND,16},
{"*",PROCESS_UID_ANY_INTEGER,"*","HD",2},//
crash-21 //"*",PROCESS_UID_ANY_INTEGER,"*","Accel",2,//
crash-28 //"*",PROCESS_UID_ANY_INTEGER,"*","IG",2,//
crash-28 //"*",PROCESS_UID_ANY_INTEGER,"*","Con",2,//crash-28
"*",PROCESS_UID_ANY_INTEGER,"*","IGAccelSharedUserClient",0,//crash-29
"*",PROCESS_UID_ANY_INTEGER,"*","IOThunderboltFamilyUserClient",22,//
crash-30 //"*",PROCESS_UID_ANY_INTEGER,"*","IG",ANY_MATCH_INTEGER, //"*",PROCE
SS_UID_ANY_INTEGER,"*","Accel",ANY_MATCH_INTEGER, //"vm",PROCESS_UID_ANY_INT
EGER,"*","*",ANY_MATCH_INTEGER, //"*",PROCESS_UID_ANY_INTEGER,"*","vm",ANY_MA
TCH_INTEGER, "sandbox",PROCESS_UID_ANY_INTEGER,"*","*",ANY_MATCH_INTEGER,
"dog",PROCESS_UID_ANY_INTEGER,"*","*",ANY_MATCH_INTEGER, //
{"WindowServer",PROCESS_UID_ANY_INTEGER,"*","AccelSurface",16},//
crash-23 //"*",PROCESS_UID_ANY_INTEGER,"*","SMC",ANY_MATCH_INTEGER, //"window
server",PROCESS_UID_ANY_INTEGER,"*","*",ANY_MATCH_INTEGER,};
Implementation – White Listing
Sample
•  Data
•  is_address_RWX
•  Copy direction(in/out)
•  Kernel or User space (SMAP noise)
•  Call-Stack
•  Function ret
•  Stack Level (from bottom to top)
•  Level range[,]
Implementation – Dimension of
Condition 2/3
stack_match_item_t stack_matcher_for_copyio[]={
//If any item in list match, then match
//{routineName, cache}, routineAddress, offSetFrom, offsetTo, levelLow, levelHigh
{{"_shim_io_connect_method_scalarI_scalarO",STACK_ANY_INTEGER},STACK_ANY_INTEGE
R,0, 0xC120-0xB8B0, STACK_ALL_LEVEL_RANGE},
{{"_shim_io_connect_method_scalarI_structureO",STACK_ANY_INTEGER},STACK_ANY_INTE
GER,0, 0xDB94-0xD5C0, STACK_ALL_LEVEL_RANGE},
{{"_shim_io_connect_method_scalarI_structureI",STACK_ANY_INTEGER},STACK_ANY_INTEG
ER,0, 0xEA97-0xE490, STACK_ALL_LEVEL_RANGE},
{{"_shim_io_connect_method_structureI_structureO",STACK_ANY_INTEGER},STACK_ANY_IN
TEGER,0, 0xF588-0xF270, STACK_ALL_LEVEL_RANGE},
{{"_is_io_connect_method",STACK_ANY_INTEGER},STACK_ANY_INTEGER,0,
0xb2a9-0xaf10,STACK_ALL_LEVEL_RANGE},
}
Implementation – Stack Frame
Sample
Dimension of condition 3/3
•  Misc
•  Mach_msg
•  msg subsystem id…
•  Userclient
•  serviceName,ClassName,selector…
detail_control_entry_t g_white_listing_detail_control[] ={
// procName,uid,driverBundleName, driverClassName, selFunctionNO
//{"*",PROCESS_UID_ANY_INTEGER,"*","AGPMClient",7312},,
{"*",PROCESS_UID_ANY_INTEGER,"*","IGAccelSharedUserClient",1},//crash-24
{"*",PROCESS_UID_ANY_INTEGER,"*","AccelSurface",16},//crash-23
{"*",PROCESS_UID_ANY_INTEGER,"*",OBJECT_CLASS_NAME_NO_FOUND,16},
{"*",PROCESS_UID_ANY_INTEGER,"*","HD",2},//crash-21
{"*",PROCESS_UID_ANY_INTEGER,"*","IX",2},//crash-21
"*",PROCESS_UID_ANY_INTEGER,"*","AGPM",7312,//crash-11
"*",PROCESS_UID_ANY_INTEGER,"*","IGAccelGLContext",2,//crash-28
Implementation – UserClient Sample
#define KMSG_IOKIT_SUBSYSTEM_RANGE 0xAF0, 0x0B47
detail_control_entry_for_ipc_kmsg_send_t g_black_listing_detail_control_foripc_kmsg_send[]
={
//procName,uid,msg_id_from, msg_id_to, routineName, addr, addr_offset_from, addr_offset_to
"chrome",PROCESS_UID_ANY_INTEGER,
KMSG_IOKIT_SUBSYSTEM_RANGE,"__Xio_connect_method",KMSG_ADDR_OFFSET_ANY_RANGE,
KMSG_LEAVING,};
•  #define KMSG_IOKIT_SUBSYSTEM_RANGE 0xAF0, 0x0B47
•  #define KMSG_MACH_VM_SUBSYSTEM_RANGE 0x12C0, 0x12D4
•  #define KMSG_MACH_PORT_SUBSYSTEM_RANGE 0xC80, 0x0CA4
•  #define KMSG_MACH_HOST_SUBSYSTEM_RANGE 0xC8, 0xE4
•  #define KMSG_HOST_PRIV_SUBSYSTEM_RANGE 0x190, 0x1AA
•  ……
Implementation – Mach-msg
Sample
• Enlightenment for code review
•  Buggy module, interface for RE……
• The Pattern accumulated in bug hunting
activities
• No vulnerability but indicates
suspicious vulnerability
• Implemented through condition checker
Implementation – What Is Context?
•  Some IOKit related memory corruption
vulnerabilities may happen in the following
context:
•  Call IOMemoryDescriptor :: createMappingInTask
to mapping user mode buffer space to kernel
mode.
•  Read a value from the buffer and use it as a size to
read or write a buffer.
•  Some kernel information leak vulnerability
may happen in the following context:
•  The output buffer’s content has 0xFFFFFF prefix.
Implementation – Context Sample
•  Fuzzing Source:
•  Multiple applications
•  AppStore (MMORPG games, FaceTime,USB hardisk, BlueTooth, Wifi,
VM,DirectX…)
•  Virus Total, Apple OpenSource UT, github sample code
•  Combination of rich kind of fuzzing source
•  Active fuzzing, Python watchdog, browsing WebGL
•  Fuzzing Stability:
•  Bypass active hang, black screen, reproduced cases using
condition checker(nvTestlaSurfaceTesla, IGAccelGLContext,
IGAccelSurface…)
Best Practice – For Passive 1/3
•  Reproduction:
•  Log through network
•  Log to NVRAM? Log to memory and kdp_panic_dump
callback?
•  Core dump server
•  sh-3.2# nvram boot-args=”pmuflags=1 debug=0xd44 kext-dev-mode=1 kcsuffix=development –
v _panicd_ip=10.64.80.106”
•  Thunderbolt+fwkdp+lldb
•  Automation
•  kdp_panic_dump callback+dump+reboot?
Best Practice – For Passive 2/3
Miscellaneous Tips
•  Occasional fuzz activities recommended
•  Normal program running – sudden fuzz
•  Keep OS version updated with latest KDK
Best Practice – For Passive 3/3
Best Practice – How to
complementary passive fuzzing?
Best Practice – For Active Fuzz 1/4
Active Fuzz Passive Fuzz
Researcher
[1]Provide more IOKit call
[2]Suspicious moudle/function manifest
[3]Context Pattern
[2]Suspicious moudle/function manifest
Code Reviewer
•  Statistical data from passive fuzz
•  Accessible user client, non-root, non-sandbox,
crash frequencies, crash types(UAF, OOB)…
•  Contact API in lower level to bypass
unnecessary checks (if possible)
•  Resolve Mac-O format, find symbol, hard-code offset
•  e.g. IOServiceGetMatchingServices(mach_port_t, CFDictionaryRef, io_iterator_t
*)
->io_service_get_matching_services_bin(mach_port_t, char*,int, void*)
Best Practice – For Active 1/4
•  Reproduce:
•  No need to record your random call/random
parameter - just record your pseudorandom
number seed (E.g. Mt19937-64/Mt19937-32)
•  The kernel crash is easily reproduced, no matter
how randomly you call API and fuzz parameters
Best Practice – For Active 2/4
seed = CrahsedCases[i]
for(randomSelect every kernel module)
for(randomSelect every interface)
APICall( randomByte() )
Best Practice – For Active 2/4
Pseudo code for reproduce
for (every fuzz session)
seed = generate()
sendSeedOutside()
for(randomSelect every kernel module)
for(randomSelect every interface)
APICall( randomByte() )
Best Practice – For Active 3/4
Pseudo code for active fuzzing
•  Reproduce:
•  Web seed server for multiple connections
•  One pseudorandom seed for a relatively short
fuzz cycle
Best Practice – For Active 4/4
What We Will Cover
•  Security Mitigation
§ Exploit Methods
•  Exploit Practice
•  SIP (System Integrity Protection)
•  KALSR(e.g. PEGASUS CVE-2016-4655)
•  SMAP
•  SMEP
https://speakerdeck.com/marcograss/dont-trust-your-eye-apple-
graphics-is-compromised
Security Mitigation
•  Bypass KASLR
– Using vulnerability to leak kernel code segment
address in run time
– Build up payload with leaked API
(e.g. thread_exception_return)
•  Bypass SMAP
– Using vulnerability to leak kernel heap address
– Build up ROP chain in kernel heap
– Kernel heap address would be needed
•  Bypass SMEP
– Using vulnerability to execute RIP in kernel
– Execute ROP chain to disable SMEP/SMAP
– Payload execution
Exploit Methods
•  The OSX/iOS hacking guru Stefan Esser
(@i0n1c) propose OSUnserializeXML is a
good way in SyScan 2012
h"ps://reverse.put.as/wp-content/uploads/2011/06/
SyScan2012_StefanEsser_iOS_Kernel_Heap_Armageddon.pdf	
Tips of Heap FengShui
OSUnerializeXML()
•  In most cases, the OSDictionary allocated by
OSUnserializeXML will be freed by
OSObject::release in one system call
。。。	
However…
•  If the allocated object is referenced by
another component, it will not be released
even if call object::release to it.
•  IORegistry is a good choice for Heap
Fengshui
•  So we find OSUnserializeXML invoking
nearby IORegistry method calling …
However…
•  In IOKIT service IOMProotDomain , slector 7
(kPMSleepSystemOptions)
RootDomainUserClient::secureSleepSystemOptions
。。。	
Always an exceptionJ
We Exploit apple to root by bugs
found and Heap Fengshui tips
•  CVE-2016-xxx :
This is typical UAF vulnerability in
AppleHDAEngineInput kernel module.
•  CVE-2016-xxxx:
Another bug in the Disk image module can
leak an object address. The address exists in
kernel heap.
Bugs
payload
Ring3
Ring0
kernel
SMAP
SMEP
KASLR
kslide
Driver
Memory address – Disk Address
Call current_proc
Call proc_ucred
Call posix_cred_get
Call thread_exception_return
IOCommand
Exploit App
ROP Gadgets
mov cr4 rax; ret
Call payload
StackPivot
0x68
Object
0x108
AppleHDAEngineInput
IOHDIXHDDriveOutKernel
vtable_addr +0
+8
call [vtable+0]
[1]Leak kernel buffer IOCommand address
[3]Spray freed IOCommand
with OSData(StackPivot)
[2]Free IOCommand
[4]Free Object
[5]Spray freed Object with
OSData(leaked IOCommand and
ROP)
[0]Leak kslide to
build up payload
[6]Trigger execution
by use Object
Exploit Process 1/2
IOCommandStackPivot
Object
Exploit Apppayload
+0
+8
Exploit Process 2/2
Demo
Thanks very much
Special thanks :
Herry Li, @zenhumany
Juwei Lin, @fuzzerDOTcn

More Related Content

What's hot

Applications secure by default
Applications secure by defaultApplications secure by default
Applications secure by default
SecuRing
 
Live Updating Swift Code
Live Updating Swift CodeLive Updating Swift Code
Live Updating Swift Code
Bartosz Polaczyk
 
Reverse engineering20151112
Reverse engineering20151112Reverse engineering20151112
Reverse engineering20151112
Bordeaux I
 
JVM code reading -- C2
JVM code reading -- C2JVM code reading -- C2
JVM code reading -- C2
ytoshima
 
Finding Xori: Malware Analysis Triage with Automated Disassembly
Finding Xori: Malware Analysis Triage with Automated DisassemblyFinding Xori: Malware Analysis Triage with Automated Disassembly
Finding Xori: Malware Analysis Triage with Automated Disassembly
Priyanka Aash
 
iOS Automation Primitives
iOS Automation PrimitivesiOS Automation Primitives
iOS Automation Primitives
Synack
 
Notes for xx_use_serialgc
Notes for xx_use_serialgcNotes for xx_use_serialgc
Notes for xx_use_serialgc
ytoshima
 
Java bytecode Malware Analysis
Java bytecode Malware AnalysisJava bytecode Malware Analysis
Java bytecode Malware Analysis
Brian Baskin
 
Sandboxie process isolation with kernel hooks
Sandboxie process isolation with kernel hooksSandboxie process isolation with kernel hooks
Sandboxie process isolation with kernel hooks
KarlFrank99
 
NYU hacknight, april 6, 2016
NYU hacknight, april 6, 2016NYU hacknight, april 6, 2016
NYU hacknight, april 6, 2016
Mikhail Sosonkin
 
Tactical Assassins
Tactical AssassinsTactical Assassins
Tactical Assassins
Prathan Phongthiproek
 
Verifikation - Metoder og Libraries
Verifikation - Metoder og LibrariesVerifikation - Metoder og Libraries
Verifikation - Metoder og Libraries
InfinIT - Innovationsnetværket for it
 
Sniffing Mach Messages
Sniffing Mach MessagesSniffing Mach Messages
Sniffing Mach Messages
Mikhail Sosonkin
 
Bitcoin, the Protocol
Bitcoin, the ProtocolBitcoin, the Protocol
Bitcoin, the Protocol
G-J van Rooyen
 
Tetcon2016 160104
Tetcon2016 160104Tetcon2016 160104
Tetcon2016 160104
Bordeaux I
 
Troubleshooting tips and tricks for Oracle Database Oct 2020
Troubleshooting tips and tricks for Oracle Database Oct 2020Troubleshooting tips and tricks for Oracle Database Oct 2020
Troubleshooting tips and tricks for Oracle Database Oct 2020
Sandesh Rao
 
OpenBot-Code
OpenBot-CodeOpenBot-Code
OpenBot-Code
Anshuman Dhar
 
Open bot
Open bot Open bot
Open bot
Anshuman Dhar
 
Software Attacks on Hardware Wallets
Software Attacks on Hardware WalletsSoftware Attacks on Hardware Wallets
Software Attacks on Hardware Wallets
Priyanka Aash
 

What's hot (20)

Applications secure by default
Applications secure by defaultApplications secure by default
Applications secure by default
 
Live Updating Swift Code
Live Updating Swift CodeLive Updating Swift Code
Live Updating Swift Code
 
Arduino
ArduinoArduino
Arduino
 
Reverse engineering20151112
Reverse engineering20151112Reverse engineering20151112
Reverse engineering20151112
 
JVM code reading -- C2
JVM code reading -- C2JVM code reading -- C2
JVM code reading -- C2
 
Finding Xori: Malware Analysis Triage with Automated Disassembly
Finding Xori: Malware Analysis Triage with Automated DisassemblyFinding Xori: Malware Analysis Triage with Automated Disassembly
Finding Xori: Malware Analysis Triage with Automated Disassembly
 
iOS Automation Primitives
iOS Automation PrimitivesiOS Automation Primitives
iOS Automation Primitives
 
Notes for xx_use_serialgc
Notes for xx_use_serialgcNotes for xx_use_serialgc
Notes for xx_use_serialgc
 
Java bytecode Malware Analysis
Java bytecode Malware AnalysisJava bytecode Malware Analysis
Java bytecode Malware Analysis
 
Sandboxie process isolation with kernel hooks
Sandboxie process isolation with kernel hooksSandboxie process isolation with kernel hooks
Sandboxie process isolation with kernel hooks
 
NYU hacknight, april 6, 2016
NYU hacknight, april 6, 2016NYU hacknight, april 6, 2016
NYU hacknight, april 6, 2016
 
Tactical Assassins
Tactical AssassinsTactical Assassins
Tactical Assassins
 
Verifikation - Metoder og Libraries
Verifikation - Metoder og LibrariesVerifikation - Metoder og Libraries
Verifikation - Metoder og Libraries
 
Sniffing Mach Messages
Sniffing Mach MessagesSniffing Mach Messages
Sniffing Mach Messages
 
Bitcoin, the Protocol
Bitcoin, the ProtocolBitcoin, the Protocol
Bitcoin, the Protocol
 
Tetcon2016 160104
Tetcon2016 160104Tetcon2016 160104
Tetcon2016 160104
 
Troubleshooting tips and tricks for Oracle Database Oct 2020
Troubleshooting tips and tricks for Oracle Database Oct 2020Troubleshooting tips and tricks for Oracle Database Oct 2020
Troubleshooting tips and tricks for Oracle Database Oct 2020
 
OpenBot-Code
OpenBot-CodeOpenBot-Code
OpenBot-Code
 
Open bot
Open bot Open bot
Open bot
 
Software Attacks on Hardware Wallets
Software Attacks on Hardware WalletsSoftware Attacks on Hardware Wallets
Software Attacks on Hardware Wallets
 

Viewers also liked

Lucas apa pacsec_slides_jp-final
Lucas apa pacsec_slides_jp-finalLucas apa pacsec_slides_jp-final
Lucas apa pacsec_slides_jp-final
PacSecJP
 
Kavya racharla ndh-naropanth_fin_jp-final
Kavya racharla ndh-naropanth_fin_jp-finalKavya racharla ndh-naropanth_fin_jp-final
Kavya racharla ndh-naropanth_fin_jp-final
PacSecJP
 
Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)
Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)
Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)
PacSecJP
 
Anıl kurmuş pacsec3
Anıl kurmuş pacsec3Anıl kurmuş pacsec3
Anıl kurmuş pacsec3
PacSecJP
 
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
PacSecJP
 
Kavya racharla ndh-naropanth_fin
Kavya racharla ndh-naropanth_finKavya racharla ndh-naropanth_fin
Kavya racharla ndh-naropanth_fin
PacSecJP
 
Di shen pacsec_jp-final
Di shen pacsec_jp-finalDi shen pacsec_jp-final
Di shen pacsec_jp-final
PacSecJP
 
Wenyuan xu Minrui yan can you trust autonomous vehicles_slides_liu_final
Wenyuan xu Minrui yan can you trust autonomous vehicles_slides_liu_finalWenyuan xu Minrui yan can you trust autonomous vehicles_slides_liu_final
Wenyuan xu Minrui yan can you trust autonomous vehicles_slides_liu_final
PacSecJP
 
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_finalYuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final
PacSecJP
 
Yunusov babin 7 sins pres atm v2
Yunusov babin 7 sins pres atm v2Yunusov babin 7 sins pres atm v2
Yunusov babin 7 sins pres atm v2
PacSecJP
 
Di shen pacsec_final
Di shen pacsec_finalDi shen pacsec_final
Di shen pacsec_final
PacSecJP
 
Shusei tomonaga pac_sec_20171026
Shusei tomonaga pac_sec_20171026Shusei tomonaga pac_sec_20171026
Shusei tomonaga pac_sec_20171026
PacSecJP
 
Jurczyk windows metafile_pacsec_v2
Jurczyk windows metafile_pacsec_v2Jurczyk windows metafile_pacsec_v2
Jurczyk windows metafile_pacsec_v2
PacSecJP
 
Marc schoenefeld grandma‘s old handbag_draft2
Marc schoenefeld grandma‘s old handbag_draft2Marc schoenefeld grandma‘s old handbag_draft2
Marc schoenefeld grandma‘s old handbag_draft2
PacSecJP
 
Lucas apa pacsec slides
Lucas apa pacsec slidesLucas apa pacsec slides
Lucas apa pacsec slides
PacSecJP
 
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-j
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-jYuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-j
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-j
PacSecJP
 
Ryder robertson pac-sec skeleton 2017_jp
Ryder robertson pac-sec skeleton 2017_jpRyder robertson pac-sec skeleton 2017_jp
Ryder robertson pac-sec skeleton 2017_jp
PacSecJP
 
Yunusov babin 7sins-pres_atm_v4(2)_jp
Yunusov babin 7sins-pres_atm_v4(2)_jpYunusov babin 7sins-pres_atm_v4(2)_jp
Yunusov babin 7sins-pres_atm_v4(2)_jp
PacSecJP
 
Rouault imbert view_alpc_rpc_pacsec_jp
Rouault imbert view_alpc_rpc_pacsec_jpRouault imbert view_alpc_rpc_pacsec_jp
Rouault imbert view_alpc_rpc_pacsec_jp
PacSecJP
 
Rouault imbert alpc_rpc_pacsec
Rouault imbert alpc_rpc_pacsecRouault imbert alpc_rpc_pacsec
Rouault imbert alpc_rpc_pacsec
PacSecJP
 

Viewers also liked (20)

Lucas apa pacsec_slides_jp-final
Lucas apa pacsec_slides_jp-finalLucas apa pacsec_slides_jp-final
Lucas apa pacsec_slides_jp-final
 
Kavya racharla ndh-naropanth_fin_jp-final
Kavya racharla ndh-naropanth_fin_jp-finalKavya racharla ndh-naropanth_fin_jp-final
Kavya racharla ndh-naropanth_fin_jp-final
 
Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)
Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)
Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)
 
Anıl kurmuş pacsec3
Anıl kurmuş pacsec3Anıl kurmuş pacsec3
Anıl kurmuş pacsec3
 
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
 
Kavya racharla ndh-naropanth_fin
Kavya racharla ndh-naropanth_finKavya racharla ndh-naropanth_fin
Kavya racharla ndh-naropanth_fin
 
Di shen pacsec_jp-final
Di shen pacsec_jp-finalDi shen pacsec_jp-final
Di shen pacsec_jp-final
 
Wenyuan xu Minrui yan can you trust autonomous vehicles_slides_liu_final
Wenyuan xu Minrui yan can you trust autonomous vehicles_slides_liu_finalWenyuan xu Minrui yan can you trust autonomous vehicles_slides_liu_final
Wenyuan xu Minrui yan can you trust autonomous vehicles_slides_liu_final
 
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_finalYuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final
 
Yunusov babin 7 sins pres atm v2
Yunusov babin 7 sins pres atm v2Yunusov babin 7 sins pres atm v2
Yunusov babin 7 sins pres atm v2
 
Di shen pacsec_final
Di shen pacsec_finalDi shen pacsec_final
Di shen pacsec_final
 
Shusei tomonaga pac_sec_20171026
Shusei tomonaga pac_sec_20171026Shusei tomonaga pac_sec_20171026
Shusei tomonaga pac_sec_20171026
 
Jurczyk windows metafile_pacsec_v2
Jurczyk windows metafile_pacsec_v2Jurczyk windows metafile_pacsec_v2
Jurczyk windows metafile_pacsec_v2
 
Marc schoenefeld grandma‘s old handbag_draft2
Marc schoenefeld grandma‘s old handbag_draft2Marc schoenefeld grandma‘s old handbag_draft2
Marc schoenefeld grandma‘s old handbag_draft2
 
Lucas apa pacsec slides
Lucas apa pacsec slidesLucas apa pacsec slides
Lucas apa pacsec slides
 
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-j
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-jYuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-j
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-j
 
Ryder robertson pac-sec skeleton 2017_jp
Ryder robertson pac-sec skeleton 2017_jpRyder robertson pac-sec skeleton 2017_jp
Ryder robertson pac-sec skeleton 2017_jp
 
Yunusov babin 7sins-pres_atm_v4(2)_jp
Yunusov babin 7sins-pres_atm_v4(2)_jpYunusov babin 7sins-pres_atm_v4(2)_jp
Yunusov babin 7sins-pres_atm_v4(2)_jp
 
Rouault imbert view_alpc_rpc_pacsec_jp
Rouault imbert view_alpc_rpc_pacsec_jpRouault imbert view_alpc_rpc_pacsec_jp
Rouault imbert view_alpc_rpc_pacsec_jp
 
Rouault imbert alpc_rpc_pacsec
Rouault imbert alpc_rpc_pacsecRouault imbert alpc_rpc_pacsec
Rouault imbert alpc_rpc_pacsec
 

Similar to Moony li pacsec-1.8

The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...Positive Hack Days
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
Wim Godden
 
What Lies Beneath
What Lies BeneathWhat Lies Beneath
What Lies Beneath
Maurice Naftalin
 
Static analysis of C++ source code
Static analysis of C++ source codeStatic analysis of C++ source code
Static analysis of C++ source code
PVS-Studio
 
Static analysis of C++ source code
Static analysis of C++ source codeStatic analysis of C++ source code
Static analysis of C++ source code
Andrey Karpov
 
include ltiostreamgt include ltstringgt include .pdf
include ltiostreamgt include ltstringgt include .pdfinclude ltiostreamgt include ltstringgt include .pdf
include ltiostreamgt include ltstringgt include .pdf
contact32
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
Wim Godden
 
Whose Stack Is It Anyway?
Whose Stack Is It Anyway?Whose Stack Is It Anyway?
Whose Stack Is It Anyway?
Ian Thomas
 
Sangam 2019 - The Latest Features
Sangam 2019 - The Latest FeaturesSangam 2019 - The Latest Features
Sangam 2019 - The Latest Features
Connor McDonald
 
Sysprog 13
Sysprog 13Sysprog 13
Sysprog 13
Ahmed Mekkawy
 
Interesting facts on c
Interesting facts on cInteresting facts on c
Interesting facts on c
Durgadevi palani
 
Georgy Nosenko - An introduction to the use SMT solvers for software security
Georgy Nosenko - An introduction to the use SMT solvers for software securityGeorgy Nosenko - An introduction to the use SMT solvers for software security
Georgy Nosenko - An introduction to the use SMT solvers for software securityDefconRussia
 
C++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical ReviewerC++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical Reviewer
Andrey Karpov
 
为什么 rust-lang 吸引我?
为什么 rust-lang 吸引我?为什么 rust-lang 吸引我?
为什么 rust-lang 吸引我?
勇浩 赖
 
HCE tutorial
HCE tutorialHCE tutorial
HCE tutorial
Chien-Ming Chou
 
Managing console
Managing consoleManaging console
Managing console
Shiva Saxena
 
Hypercritical C++ Code Review
Hypercritical C++ Code ReviewHypercritical C++ Code Review
Hypercritical C++ Code Review
Andrey Karpov
 
Mach-O par Stéphane Sudre
Mach-O par Stéphane SudreMach-O par Stéphane Sudre
Mach-O par Stéphane Sudre
CocoaHeads France
 

Similar to Moony li pacsec-1.8 (20)

The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
What Lies Beneath
What Lies BeneathWhat Lies Beneath
What Lies Beneath
 
Static analysis of C++ source code
Static analysis of C++ source codeStatic analysis of C++ source code
Static analysis of C++ source code
 
Static analysis of C++ source code
Static analysis of C++ source codeStatic analysis of C++ source code
Static analysis of C++ source code
 
include ltiostreamgt include ltstringgt include .pdf
include ltiostreamgt include ltstringgt include .pdfinclude ltiostreamgt include ltstringgt include .pdf
include ltiostreamgt include ltstringgt include .pdf
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
Whose Stack Is It Anyway?
Whose Stack Is It Anyway?Whose Stack Is It Anyway?
Whose Stack Is It Anyway?
 
Sangam 2019 - The Latest Features
Sangam 2019 - The Latest FeaturesSangam 2019 - The Latest Features
Sangam 2019 - The Latest Features
 
Sysprog 13
Sysprog 13Sysprog 13
Sysprog 13
 
Interesting facts on c
Interesting facts on cInteresting facts on c
Interesting facts on c
 
Georgy Nosenko - An introduction to the use SMT solvers for software security
Georgy Nosenko - An introduction to the use SMT solvers for software securityGeorgy Nosenko - An introduction to the use SMT solvers for software security
Georgy Nosenko - An introduction to the use SMT solvers for software security
 
Marat-Slides
Marat-SlidesMarat-Slides
Marat-Slides
 
3
33
3
 
C++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical ReviewerC++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical Reviewer
 
为什么 rust-lang 吸引我?
为什么 rust-lang 吸引我?为什么 rust-lang 吸引我?
为什么 rust-lang 吸引我?
 
HCE tutorial
HCE tutorialHCE tutorial
HCE tutorial
 
Managing console
Managing consoleManaging console
Managing console
 
Hypercritical C++ Code Review
Hypercritical C++ Code ReviewHypercritical C++ Code Review
Hypercritical C++ Code Review
 
Mach-O par Stéphane Sudre
Mach-O par Stéphane SudreMach-O par Stéphane Sudre
Mach-O par Stéphane Sudre
 

More from PacSecJP

Ryder robertson security-considerations_in_the_supply_chain_2017.11.02
Ryder robertson security-considerations_in_the_supply_chain_2017.11.02Ryder robertson security-considerations_in_the_supply_chain_2017.11.02
Ryder robertson security-considerations_in_the_supply_chain_2017.11.02
PacSecJP
 
Anıl kurmuş pacsec3-ja
Anıl kurmuş pacsec3-jaAnıl kurmuş pacsec3-ja
Anıl kurmuş pacsec3-ja
PacSecJP
 
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
PacSecJP
 
Shusei tomonaga pac_sec_20171026_jp
Shusei tomonaga pac_sec_20171026_jpShusei tomonaga pac_sec_20171026_jp
Shusei tomonaga pac_sec_20171026_jp
PacSecJP
 
Marc schoenefeld grandma‘s old handbag_draft2_ja
Marc schoenefeld grandma‘s old handbag_draft2_jaMarc schoenefeld grandma‘s old handbag_draft2_ja
Marc schoenefeld grandma‘s old handbag_draft2_ja
PacSecJP
 
Kasza smashing the_jars_j-corrected
Kasza smashing the_jars_j-correctedKasza smashing the_jars_j-corrected
Kasza smashing the_jars_j-corrected
PacSecJP
 
Jurczyk windows metafile_pacsec_jp3
Jurczyk windows metafile_pacsec_jp3Jurczyk windows metafile_pacsec_jp3
Jurczyk windows metafile_pacsec_jp3
PacSecJP
 
Wenyuan xu Minrui Yan can you trust autonomous vehicles_slides_liu_final-ja
Wenyuan xu Minrui Yan can you trust autonomous vehicles_slides_liu_final-jaWenyuan xu Minrui Yan can you trust autonomous vehicles_slides_liu_final-ja
Wenyuan xu Minrui Yan can you trust autonomous vehicles_slides_liu_final-ja
PacSecJP
 
Nishimura i os版firefoxの脆弱性を見つけ出す_jp
Nishimura i os版firefoxの脆弱性を見つけ出す_jpNishimura i os版firefoxの脆弱性を見つけ出す_jp
Nishimura i os版firefoxの脆弱性を見つけ出す_jp
PacSecJP
 
Moony li pacsec-1.5_j4-truefinal
Moony li pacsec-1.5_j4-truefinalMoony li pacsec-1.5_j4-truefinal
Moony li pacsec-1.5_j4-truefinal
PacSecJP
 

More from PacSecJP (10)

Ryder robertson security-considerations_in_the_supply_chain_2017.11.02
Ryder robertson security-considerations_in_the_supply_chain_2017.11.02Ryder robertson security-considerations_in_the_supply_chain_2017.11.02
Ryder robertson security-considerations_in_the_supply_chain_2017.11.02
 
Anıl kurmuş pacsec3-ja
Anıl kurmuş pacsec3-jaAnıl kurmuş pacsec3-ja
Anıl kurmuş pacsec3-ja
 
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
 
Shusei tomonaga pac_sec_20171026_jp
Shusei tomonaga pac_sec_20171026_jpShusei tomonaga pac_sec_20171026_jp
Shusei tomonaga pac_sec_20171026_jp
 
Marc schoenefeld grandma‘s old handbag_draft2_ja
Marc schoenefeld grandma‘s old handbag_draft2_jaMarc schoenefeld grandma‘s old handbag_draft2_ja
Marc schoenefeld grandma‘s old handbag_draft2_ja
 
Kasza smashing the_jars_j-corrected
Kasza smashing the_jars_j-correctedKasza smashing the_jars_j-corrected
Kasza smashing the_jars_j-corrected
 
Jurczyk windows metafile_pacsec_jp3
Jurczyk windows metafile_pacsec_jp3Jurczyk windows metafile_pacsec_jp3
Jurczyk windows metafile_pacsec_jp3
 
Wenyuan xu Minrui Yan can you trust autonomous vehicles_slides_liu_final-ja
Wenyuan xu Minrui Yan can you trust autonomous vehicles_slides_liu_final-jaWenyuan xu Minrui Yan can you trust autonomous vehicles_slides_liu_final-ja
Wenyuan xu Minrui Yan can you trust autonomous vehicles_slides_liu_final-ja
 
Nishimura i os版firefoxの脆弱性を見つけ出す_jp
Nishimura i os版firefoxの脆弱性を見つけ出す_jpNishimura i os版firefoxの脆弱性を見つけ出す_jp
Nishimura i os版firefoxの脆弱性を見つけ出す_jp
 
Moony li pacsec-1.5_j4-truefinal
Moony li pacsec-1.5_j4-truefinalMoony li pacsec-1.5_j4-truefinal
Moony li pacsec-1.5_j4-truefinal
 

Recently uploaded

test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
cuobya
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
vmemo1
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
nhiyenphan2005
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
CIOWomenMagazine
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
harveenkaur52
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
cuobya
 

Recently uploaded (20)

test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
 

Moony li pacsec-1.8

  • 1. Fuzzing and Exploiting OSX Vulnerabilities for Fun and Profit Complementary Active & Passive Fuzzing
  • 2. What We Will Cover •  Who We Are •  Passive Fuzzing Framework •  Exploit to Root
  • 3.
  • 4. Moony Li -  @Flyic -  7 years security -  Sandcastle -  Deep Discovery -  Exploit Detection -  Mac/Windows Kernel -  Android Vulnerability
  • 5. Jack Tang -  @jacktang310 -  10+ years security -  Browser -  Document -  Mac/Windows Kernel -  Virtualization Vulnerability
  • 6.
  • 7. CVE-2015-3787, CVE-2015-5867, CVE-2015-7021,CVE-2015-7020, CVE-2016-1716,ZDI-CAN-3536,ZDI-CAN-3558, ZDI- CAN-3598,ZDI-CAN-3596,ZDI-CAN-3603,CVE-2015-7067, CVE-2015-7076,CVE-2015-7106,CVE-2015-7109,CVE-2016-1718, CVE-2016-1747,CVE-2016-1749,CVE-2016-1753, ZDI-CAN-3693, ZDI-CAN-3694, CVE-2016-1795, CVE-2016-1808, CVE-2016-1810, CVE-2016-1817, CVE-2016-1820, CVE-2016-1798, CVE-2016-1799, CVE-2016-1812, CVE-2016-1814, CVE-2016-1818, CVE-2016-1816, CVE-2016-4648, CVE-2016-4699,CVE-2016-4700,CVE-2016-4750 CVE Credits
  • 9.
  • 10. What We Will Cover •  Comparing Approaches •  Our Approach/ Consideration •  Implementation •  Best Practice
  • 11. Methods Disadvantage Notes Tradi1onal Fuzz Choice the IOKit service name they want to test. Pour fuzzing data into the IOKit usermode API (e.g. IOConnectCallMethod) Call sequence dependency AppleCamIn (OpenDevice, PowerOnCamera…) Input data dependency AppleHDAEngineInput(input as user mode buffer pointer) Timing dependency IOHDIXHDDriveOutKernel( mount dmg) Code Review Un-scalable Depend on Human experience Cost effort for Reverse Engineering so many IOKit services and userclient. Comparing Other Approaches
  • 13. Are they similarJ Comparison River Dam Passive Fuzz Basic FuncHon Stream intercept ExecuNon intercept Up Stream User mode data Down Stream Kernel mode data Create Chaos Poisoning upstream Fuzzing user data Downstream fish die Kernel crash Track the poison’s origin Reproduce …… ……
  • 15. Origianl function Hooker IOAcceleratorFamily2.kext Targeted application from apple store Suspicious module/function manifest IOThunderboltFamily.kext IOUSBFamily.kext AppleGraphicsPowerManagement.kext AppleHDA.kext … … I. is_io_connect_method II. is_io_connect_async_method III. iokit_user_client_trap IV. IOMemoryDescriptor::createMappingInTask V. ipc_kmsg_get VI. ipc_kmsg_send VII. Copyio …... Conditon Checker Ring3 Ring0 Target drivers XNU/ IOKit Tamper StackFrame, Process, UserClient, MsgID, …... Context Matcher Implementation – Architecture Overview
  • 16. TargetAPI(params): //Call Original_TargetAPI(params) if (matchWhitelistParameter(params)) goto _exit(); if !(matchStackFrame() && matchBlacklistParameter(params)) goto _exit; if (random()) {record(params); fuzz(params);} Call Original_TargetAPI(params); if (matchContext(params)) alert; Implementation – Pseudo Code
  • 17. • Hooker •  Directly accessible by user •  One hook for many processes •  Inline hook in kernel mode. • Tamper •  Only fuzz buffer content accessible by user •  e.g. Inband_input, scalar_input, ool_input •  NOT size! (bypass getTargetAndMethodForIndex check) Implementation – Hook & Tamper
  • 18. int, bool, Gen575TextureBuffer**) + 0x12e 0xffffff80c0c7b7c0 0xffffff7fa96f2bd5 AppleIntelHD3000Graphics`Gen6GLContext::process_token_BindTextures(VendorGLStreamInfo&) + 0x103 0xffffff80c0c7b7f0 0xffffff7fa96b6242 AppleIntelHD3000Graphics`IOIntelGLContext::processCommandBuffer(VendorCommandDescriptor*) + 0x12c 0xffffff80c0c7b820 0xffffff7fa96ec1eb AppleIntelHD3000Graphics`Gen6GLContext::processCommandBuffer(VendorCommandDescriptor*) + 0x7b 0xffffff80c0c7b900 0xffffff7fa96b540a AppleIntelHD3000Graphics`IOIntelGLContext::clientMemoryForType(unsigned int, unsigned int*, IOMemoryDescriptor**) + 0x5bc 0xffffff80c0c7b950 0xffffff7fa96b39c3 AppleIntelHD3000Graphics`IOIntelGLContext::submit_command_buffer(unsigned int, sIOGLGetCommandBuffer*) + 0x63 0xffffff80c0c7b980 0xffffff80276b9626 ::shim_io_connect_method_scalarI_structureO(IOExternalMethod *, IOService *, const io_user_scalar_t *, mach_msg_type_number_t, char *, IOByteCount *)((IOExternalMethod *) method = <>, , (IOService *) object = <>, , (const io_user_scalar_t *) input = <>, , (mach_msg_type_number_t) inputCount = <>, , (char *) output = <register r10 is not available>, , (IOByteCount *) outputCount = <register r11 is not available>, ) 0xffffff80c0c7b9e0 0xffffff80276baef0 IOUserClient::externalMethod(unsigned int, IOExternalMethodArguments*, IOExternalMethodDispatch*, OSObject*, void*)((IOUserClient *) this = <>, , (uint32_t) selector = <>, , (IOExternalMethodArguments *) args = 0xffffff80c0c7ba00, (IOExternalMethodDispatch *) dispatch = <>, , (OSObject *) target = <>, , (void *) reference = <>, ) 0xffffff80c0c7bb20 0xffffff80276b7f77 ::is_io_connect_method(io_connect_t, uint32_t, io_user_scalar_t *, mach_msg_type_number_t, char *, mach_msg_type_number_t, mach_vm_address_t, mach_vm_size_t, char *, mach_msg_type_number_t *, io_user_scalar_t *, mach_msg_type_number_t *, mach_vm_address_t, mach_vm_size_t *) ((io_connect_t) connection = 0xffffff80c0c7ba60, (uint32_t) selector = 16, (io_user_scalar_t *) scalar_input = <>, , (mach_msg_type_number_t) scalar_inputCnt = <>, , (char *) inband_input = <>, , (mach_msg_type_number_t) inband_inputCnt = 0, (mach_vm_address_t) ool_input = <>, , (mach_vm_size_t) ool_input_size = <no location, value may have been optimized out>, , (char *) inband_output = <no location, value may have been optimized out>, , (mach_msg_type_number_t *) inband_outputCnt = <no location, value may have been optimized out>, , (io_user_scalar_t *) scalar_output = <>, , (mach_msg_type_number_t *) scalar_outputCnt = <no location, value may have been optimized out>, , (mach_vm_address_t) ool_output = <>, , (mach_vm_size_t *) ool_output_size = <>, ) 0xffffff80c0c7bcd0 0xffffff7fa9cd34ab trampline_is_io_connect_method((io_connect_t) connection = 0xffffff8035637000, (uint32_t) selector = 16, (io_user_scalar_t *) scalar_input = 0xffffff80331a4dcc, (mach_msg_type_number_t) scalar_inputCnt = 1, (char *) inband_input = 0xffffff80331a4dd8 "", (mach_msg_type_number_t) inband_inputCnt = 0, (mach_vm_address_t) ool_input = 0, (mach_vm_size_t) ool_input_size = 0, (char *) inband_output = 0xffffff8035805600 "", (mach_msg_type_number_t *) inband_outputCnt = 0xffffff80358055fc, (io_user_scalar_t *) scalar_output = 0xffffff80c0c7bd30, (mach_msg_type_number_t *) scalar_outputCnt = 0xffffff80c0c7bd2c, (mach_vm_address_t) ool_output = 0, (mach_vm_size_t *) ool_output_size = 0xffffff80331a4df8) 0xffffff80c0c7bde0 0xffffff8027158750 _Xio_connect_method((mach_msg_header_t *) InHeadP = <>, , (mach_msg_header_t *) OutHeadP = 0xffffff80358055d0) Implementation – Hook & Tamper (Snippet – Unreported Crash)
  • 19. •  (Driver interface)is_io_connect_method •  (Driver interface)is_io_connect_async_method •  (Kernel)iokit_user_client_trap •  (Kernel)IOMemoryDescriptor::createMappingInTas k •  (Mach Msg)ipc_kmsg_get •  (Mach Msg)ipc_kmsg_send •  (General IO)Copyio • … Implementation – Hook Summary
  • 20. Implementation – Hook Summary Sinnpet
  • 21. Keep fuzzing stable •  Get rid of noise o  busy call, black screen call, hung call, o  reproduced crashes Hunt according to vulnerability context •  Kernel heap address leak •  Map user data into kernel and read as buffer size •  … Implementation – Why Condition Checker?
  • 22. •  &&, ||, *(wild match), white(black) •  Process •  User id (root/Non-root) •  Process Name (e.g. Safari, RCE, sandbox-evasion) •  Module •  Module Name •  Function •  Symbol Name/Address •  Offset range Implementation – Dimension of Condition 1/3
  • 23. //Config for mac prodetail_control_entry_t g_white_listing_detail_control[] ={ // procName,uid,driverBundleName, driverClassName, selFunctionNO //"*", 0,"*","*",ANY_MATCH_INTEGER,#if 0 //Reported or collected yet: // {"*",PROCESS_UID_ANY_INTEGER,"*","AGPMClient",7312}, // {"*",PROCESS_UID_ANY_INTEGER,"*", "nvDeviceTesla", 5}, // {"*",PROCESS_UID_ANY_INTEGER,"*", "NV2DContextTesla", 17}, // {"*",PROCESS_UID_ANY_INTEGER,"*","IONVSurfaceTesla",10}, // {"*",PROCESS_UID_ANY_INTEGER,"*","IOHDIXHDDriveOutKernelUserClient",2}, {"*",PROCESS_UID_ANY_INTEGER,"*","IGAccelSharedUserClient",1},//crash-24 {"*",PROCESS_UID_ANY_INTEGER,"*","AccelSurface",16},//crash-23 {"*",PROCESS_UID_ANY_INTEGER,"*",OBJECT_CLASS_NAME_NO_FOUND,16}, {"*",PROCESS_UID_ANY_INTEGER,"*","HD",2},// crash-21 //"*",PROCESS_UID_ANY_INTEGER,"*","Accel",2,// crash-28 //"*",PROCESS_UID_ANY_INTEGER,"*","IG",2,// crash-28 //"*",PROCESS_UID_ANY_INTEGER,"*","Con",2,//crash-28 "*",PROCESS_UID_ANY_INTEGER,"*","IGAccelSharedUserClient",0,//crash-29 "*",PROCESS_UID_ANY_INTEGER,"*","IOThunderboltFamilyUserClient",22,// crash-30 //"*",PROCESS_UID_ANY_INTEGER,"*","IG",ANY_MATCH_INTEGER, //"*",PROCE SS_UID_ANY_INTEGER,"*","Accel",ANY_MATCH_INTEGER, //"vm",PROCESS_UID_ANY_INT EGER,"*","*",ANY_MATCH_INTEGER, //"*",PROCESS_UID_ANY_INTEGER,"*","vm",ANY_MA TCH_INTEGER, "sandbox",PROCESS_UID_ANY_INTEGER,"*","*",ANY_MATCH_INTEGER, "dog",PROCESS_UID_ANY_INTEGER,"*","*",ANY_MATCH_INTEGER, // {"WindowServer",PROCESS_UID_ANY_INTEGER,"*","AccelSurface",16},// crash-23 //"*",PROCESS_UID_ANY_INTEGER,"*","SMC",ANY_MATCH_INTEGER, //"window server",PROCESS_UID_ANY_INTEGER,"*","*",ANY_MATCH_INTEGER,}; Implementation – White Listing Sample
  • 24. •  Data •  is_address_RWX •  Copy direction(in/out) •  Kernel or User space (SMAP noise) •  Call-Stack •  Function ret •  Stack Level (from bottom to top) •  Level range[,] Implementation – Dimension of Condition 2/3
  • 25. stack_match_item_t stack_matcher_for_copyio[]={ //If any item in list match, then match //{routineName, cache}, routineAddress, offSetFrom, offsetTo, levelLow, levelHigh {{"_shim_io_connect_method_scalarI_scalarO",STACK_ANY_INTEGER},STACK_ANY_INTEGE R,0, 0xC120-0xB8B0, STACK_ALL_LEVEL_RANGE}, {{"_shim_io_connect_method_scalarI_structureO",STACK_ANY_INTEGER},STACK_ANY_INTE GER,0, 0xDB94-0xD5C0, STACK_ALL_LEVEL_RANGE}, {{"_shim_io_connect_method_scalarI_structureI",STACK_ANY_INTEGER},STACK_ANY_INTEG ER,0, 0xEA97-0xE490, STACK_ALL_LEVEL_RANGE}, {{"_shim_io_connect_method_structureI_structureO",STACK_ANY_INTEGER},STACK_ANY_IN TEGER,0, 0xF588-0xF270, STACK_ALL_LEVEL_RANGE}, {{"_is_io_connect_method",STACK_ANY_INTEGER},STACK_ANY_INTEGER,0, 0xb2a9-0xaf10,STACK_ALL_LEVEL_RANGE}, } Implementation – Stack Frame Sample
  • 26. Dimension of condition 3/3 •  Misc •  Mach_msg •  msg subsystem id… •  Userclient •  serviceName,ClassName,selector…
  • 27. detail_control_entry_t g_white_listing_detail_control[] ={ // procName,uid,driverBundleName, driverClassName, selFunctionNO //{"*",PROCESS_UID_ANY_INTEGER,"*","AGPMClient",7312},, {"*",PROCESS_UID_ANY_INTEGER,"*","IGAccelSharedUserClient",1},//crash-24 {"*",PROCESS_UID_ANY_INTEGER,"*","AccelSurface",16},//crash-23 {"*",PROCESS_UID_ANY_INTEGER,"*",OBJECT_CLASS_NAME_NO_FOUND,16}, {"*",PROCESS_UID_ANY_INTEGER,"*","HD",2},//crash-21 {"*",PROCESS_UID_ANY_INTEGER,"*","IX",2},//crash-21 "*",PROCESS_UID_ANY_INTEGER,"*","AGPM",7312,//crash-11 "*",PROCESS_UID_ANY_INTEGER,"*","IGAccelGLContext",2,//crash-28 Implementation – UserClient Sample
  • 28. #define KMSG_IOKIT_SUBSYSTEM_RANGE 0xAF0, 0x0B47 detail_control_entry_for_ipc_kmsg_send_t g_black_listing_detail_control_foripc_kmsg_send[] ={ //procName,uid,msg_id_from, msg_id_to, routineName, addr, addr_offset_from, addr_offset_to "chrome",PROCESS_UID_ANY_INTEGER, KMSG_IOKIT_SUBSYSTEM_RANGE,"__Xio_connect_method",KMSG_ADDR_OFFSET_ANY_RANGE, KMSG_LEAVING,}; •  #define KMSG_IOKIT_SUBSYSTEM_RANGE 0xAF0, 0x0B47 •  #define KMSG_MACH_VM_SUBSYSTEM_RANGE 0x12C0, 0x12D4 •  #define KMSG_MACH_PORT_SUBSYSTEM_RANGE 0xC80, 0x0CA4 •  #define KMSG_MACH_HOST_SUBSYSTEM_RANGE 0xC8, 0xE4 •  #define KMSG_HOST_PRIV_SUBSYSTEM_RANGE 0x190, 0x1AA •  …… Implementation – Mach-msg Sample
  • 29. • Enlightenment for code review •  Buggy module, interface for RE…… • The Pattern accumulated in bug hunting activities • No vulnerability but indicates suspicious vulnerability • Implemented through condition checker Implementation – What Is Context?
  • 30. •  Some IOKit related memory corruption vulnerabilities may happen in the following context: •  Call IOMemoryDescriptor :: createMappingInTask to mapping user mode buffer space to kernel mode. •  Read a value from the buffer and use it as a size to read or write a buffer. •  Some kernel information leak vulnerability may happen in the following context: •  The output buffer’s content has 0xFFFFFF prefix. Implementation – Context Sample
  • 31. •  Fuzzing Source: •  Multiple applications •  AppStore (MMORPG games, FaceTime,USB hardisk, BlueTooth, Wifi, VM,DirectX…) •  Virus Total, Apple OpenSource UT, github sample code •  Combination of rich kind of fuzzing source •  Active fuzzing, Python watchdog, browsing WebGL •  Fuzzing Stability: •  Bypass active hang, black screen, reproduced cases using condition checker(nvTestlaSurfaceTesla, IGAccelGLContext, IGAccelSurface…) Best Practice – For Passive 1/3
  • 32. •  Reproduction: •  Log through network •  Log to NVRAM? Log to memory and kdp_panic_dump callback? •  Core dump server •  sh-3.2# nvram boot-args=”pmuflags=1 debug=0xd44 kext-dev-mode=1 kcsuffix=development – v _panicd_ip=10.64.80.106” •  Thunderbolt+fwkdp+lldb •  Automation •  kdp_panic_dump callback+dump+reboot? Best Practice – For Passive 2/3
  • 33. Miscellaneous Tips •  Occasional fuzz activities recommended •  Normal program running – sudden fuzz •  Keep OS version updated with latest KDK Best Practice – For Passive 3/3
  • 34. Best Practice – How to complementary passive fuzzing?
  • 35. Best Practice – For Active Fuzz 1/4 Active Fuzz Passive Fuzz Researcher [1]Provide more IOKit call [2]Suspicious moudle/function manifest [3]Context Pattern [2]Suspicious moudle/function manifest Code Reviewer
  • 36. •  Statistical data from passive fuzz •  Accessible user client, non-root, non-sandbox, crash frequencies, crash types(UAF, OOB)… •  Contact API in lower level to bypass unnecessary checks (if possible) •  Resolve Mac-O format, find symbol, hard-code offset •  e.g. IOServiceGetMatchingServices(mach_port_t, CFDictionaryRef, io_iterator_t *) ->io_service_get_matching_services_bin(mach_port_t, char*,int, void*) Best Practice – For Active 1/4
  • 37. •  Reproduce: •  No need to record your random call/random parameter - just record your pseudorandom number seed (E.g. Mt19937-64/Mt19937-32) •  The kernel crash is easily reproduced, no matter how randomly you call API and fuzz parameters Best Practice – For Active 2/4
  • 38. seed = CrahsedCases[i] for(randomSelect every kernel module) for(randomSelect every interface) APICall( randomByte() ) Best Practice – For Active 2/4 Pseudo code for reproduce
  • 39. for (every fuzz session) seed = generate() sendSeedOutside() for(randomSelect every kernel module) for(randomSelect every interface) APICall( randomByte() ) Best Practice – For Active 3/4 Pseudo code for active fuzzing
  • 40. •  Reproduce: •  Web seed server for multiple connections •  One pseudorandom seed for a relatively short fuzz cycle Best Practice – For Active 4/4
  • 41.
  • 42. What We Will Cover •  Security Mitigation § Exploit Methods •  Exploit Practice
  • 43. •  SIP (System Integrity Protection) •  KALSR(e.g. PEGASUS CVE-2016-4655) •  SMAP •  SMEP https://speakerdeck.com/marcograss/dont-trust-your-eye-apple- graphics-is-compromised Security Mitigation
  • 44. •  Bypass KASLR – Using vulnerability to leak kernel code segment address in run time – Build up payload with leaked API (e.g. thread_exception_return) •  Bypass SMAP – Using vulnerability to leak kernel heap address – Build up ROP chain in kernel heap – Kernel heap address would be needed •  Bypass SMEP – Using vulnerability to execute RIP in kernel – Execute ROP chain to disable SMEP/SMAP – Payload execution Exploit Methods
  • 45. •  The OSX/iOS hacking guru Stefan Esser (@i0n1c) propose OSUnserializeXML is a good way in SyScan 2012 h"ps://reverse.put.as/wp-content/uploads/2011/06/ SyScan2012_StefanEsser_iOS_Kernel_Heap_Armageddon.pdf Tips of Heap FengShui OSUnerializeXML()
  • 46. •  In most cases, the OSDictionary allocated by OSUnserializeXML will be freed by OSObject::release in one system call 。。。 However…
  • 47. •  If the allocated object is referenced by another component, it will not be released even if call object::release to it. •  IORegistry is a good choice for Heap Fengshui •  So we find OSUnserializeXML invoking nearby IORegistry method calling … However…
  • 48. •  In IOKIT service IOMProotDomain , slector 7 (kPMSleepSystemOptions) RootDomainUserClient::secureSleepSystemOptions 。。。 Always an exceptionJ
  • 49. We Exploit apple to root by bugs found and Heap Fengshui tips
  • 50. •  CVE-2016-xxx : This is typical UAF vulnerability in AppleHDAEngineInput kernel module. •  CVE-2016-xxxx: Another bug in the Disk image module can leak an object address. The address exists in kernel heap. Bugs
  • 51. payload Ring3 Ring0 kernel SMAP SMEP KASLR kslide Driver Memory address – Disk Address Call current_proc Call proc_ucred Call posix_cred_get Call thread_exception_return IOCommand Exploit App ROP Gadgets mov cr4 rax; ret Call payload StackPivot 0x68 Object 0x108 AppleHDAEngineInput IOHDIXHDDriveOutKernel vtable_addr +0 +8 call [vtable+0] [1]Leak kernel buffer IOCommand address [3]Spray freed IOCommand with OSData(StackPivot) [2]Free IOCommand [4]Free Object [5]Spray freed Object with OSData(leaked IOCommand and ROP) [0]Leak kslide to build up payload [6]Trigger execution by use Object Exploit Process 1/2
  • 53. Demo
  • 55. Special thanks : Herry Li, @zenhumany Juwei Lin, @fuzzerDOTcn