SlideShare una empresa de Scribd logo
1 de 48
Descargar para leer sin conexión
Mining
Mach Services
within
OS X Sandbox

Meder Kydyraliev, 2013
Agenda
•
•
•

Sandboxing: what? why? how?
OS X Sandbox aka Seatbelt

•
•

Quick overview
Enumerating attack surface

Mach services

•
•

Quick overview
Fuzzing!
Disclaimer
IANAR
(I Am Not A Reverser)
Sandboxing: What?
•
•
•

Sandbox - a mechanism for segregation and
containment of a piece of code exposed to
untrusted inputs
MAC & RBAC
Sandbox flavors:

•
•

LSM: SELinux, AppArmor, TOMOYO
TrustedBSD MAC: Seatbelt
Sandboxing: Why?
• Good software is hard
• Fixing bugs in software security

researchers used to not care about is
even harder (e.g. Adobe Reader)

• Indicator of “acceptance” by
software vendors
Sandboxing: How?
• It all boils down to hooks:
int connect_nocancel(__unused proc_t p, struct connect_nocancel_args *uap,
__unused int32_t *retval) {
...
#if CONFIG_MACF_SOCKET_SUBSET
! if ((error = mac_socket_check_connect(kauth_cred_get(), so, sa)) != 0) {
! ! if (want_free)
! ! ! FREE(sa, M_SONAME);
! ! goto out;
! }
#endif /* MAC_SOCKET_SUBSET */
...
}
Sandboxing: How?
• It all boils down to hooks:
int connect_nocancel(__unused proc_t p, struct connect_nocancel_args *uap,
__unused int32_t *retval) {
...
#if CONFIG_MACF_SOCKET_SUBSET
! if ((error = mac_socket_check_connect(kauth_cred_get(), so, sa)) != 0) {
! ! if (want_free)
! ! ! FREE(sa, M_SONAME);
! ! goto out;
! }
#endif /* MAC_SOCKET_SUBSET */
...
}
OS X Sandbox
• Based on TrustedBSD MAC Framework
• Prior work:
• Iozzo, V. (2012).“A Sandbox odyssey”.
• Blazakis, D. (2011). “The Apple
Sandbox”.
TrustedBSD MAC
•
•
•
•

A bunch of hooks are sprayed throughout the
kernel
Hooks loop over registered policy modules
invoking corresponding functions (e.g.
mac_vnode_check_open)
Allows coexistence of multiple implementations
Provides multiplex system call mac_syscall()
for modules to expose functionality
Issues with TrustedBSD/MAC

•
•
•

Relies on hooks to be present (missing vs.
unimplemented)
Argument parsing prior to hooks represents
attack surface
XNU extras:

•

Retrofitted for Mach (more hooks sprayed in
user-land Mach services, e.g. mach-lookup)
mac_syscall()
_syscall_set_profile

_syscall_set_profile_builtin
_syscall_check_sandbox
_syscall_note
_syscall_container

_syscall_suspend

applies profile to a process
applies default builtin profile to a process
checks specified action(e.g. mach-lookup) against policy
associated “note” with current proc’s sandbox label
???
Suspends sandbox checks on supplied PID by setting boolean value
on proc's label. PID must belong to the same user. Calling process
must have com.apple.private.security.sandbox-manager
entitlement and target process has to either have
com.apple.security.print entitlement value set to 1 or
com.apple.security.temporary-exception.audio-unithost set to 1.

_syscall_unsuspend

Resume suspended sandbox checks.

_syscall_passthrough_access

??? Seems to take a descriptor, get corresponding vnode and call
vnode_authorize() on parent's vnode.

_syscall_vtrace
mac_syscall()
_syscall_set_profile

_syscall_set_profile_builtin
_syscall_check_sandbox
_syscall_note
_syscall_container

_syscall_suspend

applies profile to a process
applies default builtin profile to a process
checks specified action(e.g. mach-lookup) against policy
associated “note” with current proc’s sandbox label
???
Suspends sandbox checks on supplied PID by setting boolean value
on proc's label. PID must belong to the same user. Calling process
must have com.apple.private.security.sandbox-manager
entitlement and target process has to either have
com.apple.security.print entitlement value set to 1 or
com.apple.security.temporary-exception.audio-unithost set to 1.

_syscall_unsuspend

Resume suspended sandbox checks.

_syscall_passthrough_access

??? Seems to take a descriptor, get corresponding vnode and call
vnode_authorize() on parent's vnode.

_syscall_vtrace
mac_syscall()
_syscall_extension_issue

returns extension for a file operation or Mach lookup

_syscall_extension_consume

uses the above extension to augment current proc’s policy by
adding action authorized by the extension to the policy

_syscall_extension_release

disassociates “consumed” extension from the policy

_syscall_extension_update_file

???

_syscall_extension_twiddle

???
Seatbelt Extensions
Usage:
extension = _syscall_extension_issue("com.apple.app-sandbox.read", "/etc/passwd");
_syscall_extension_consume(extension);
FILE* f = fopen("/etc/passwd","r");

Issuer Policy:
(allow file-issue-extension ....

Consumer Policy:
(allow file-read* (extension "com.apple.app-sandbox.read"))
(allow mach-lookup (extension "com.apple.app-sandbox.mach"))
/etc/passwd
5. fopen("/etc/passwd")

4. _syscall_extension_consume(
extension for /etc/passwd)

PRIVILEGED
(issuer)

2.

SANDBOXED
(consumer)

ex
/e te
tc ns
/p io
as n
sw fo
d r

3. extension for
/etc/passwd

Sandbox kernel
module

5. updates policy to
allow /etc/passwd
to be read

1. _syscall_extension_issue()
for /etc/passwd
Seatbelt Extensions
•

How to they work?

58ffd694274b2b5575eff5e497fe4de1de815124;00000000;000000000000001a;com.app
le.app-sandbox.read;00000001;01000004;00000000000041ee;/private/etc/passwd

58ffd6942....5e497fe4de1de815124
0
000000000000001a
com.apple.app-sandbox.read
1
1000004
00000000000041ee
/private/etc/passwd

SHA1 HMAC value.
0
Length of the extension type string that follows.
Extension type
1
File system ID (fsid_t) with type truncated.
inode number
file path
Seatbelt Extensions
• SHA1 HMAC key generated on startup by
Sandbox.kext

• Constant time comparison
Users
• Used by Google Chrome.
• Used by Adobe Reader X(I).
• In some form or the other used by
most OS X apps.
Challenges
• Complex interactions between

components (server vs client apps)

• One-time sensitive resource access
(e.g. config load on startup)

• Legacy apps: sandbox-aware vs.
sandbox-unaware
Process Warm-up
•
•

What?

•

exercise of code paths prior to sandbox
being enabled

Why?

•
•

communications channels are established
files are open/read/written
Enumerating Attack
Surface
•

•
•

BSD system calls

•
•

code that runs before MAC hook
hooks provided by MAC, but not implemented by
Seatbelt

Mach Services

•
•

in-kernel
user-land

I/O Kit
BSD system calls
• There are a number of system call

MAC hooks not implemented/allowed
by Seatbelt, e.g.:

•
•
•

socket() - AF_INET/AF_LOCAL sockets of SOCK_DGRAM/
SOCK_STREAM type are allowed
setsockopt(), ioctl(), mmap() - unimplemented by Seatbelt
getfsstat(), readdir() - unimplemented and provide the fsid and
inode for extensions (if you already have the key)
...speaking of setsockopt()
•

Turns out you can set SO_EXECPATH(0x1085) to a
path of a preauthorized binary to bypass firewall
prompts:
•/usr/libexec/configd
•/usr/sbin/mDNSResponder
•/usr/sbin/racoon
•/usr/bin/nmblookup* - doesn't exist hence prompt is displayed
•/System/Library/PrivateFrameworks/Admin.framework/Versions/A/Resources/
readconfig

• Setting 0x1085 to any string without ‘/’ results in
panic() (NULL deref)
Mach Services
Remember warm-up?
•
•

Exercising code paths leaves some interesting
artifacts...Mach ports.
Chrome renderer:

•
•

policy: only fontd
reality (showipcint from kgmacros):

•
•
•
•

coreservicesd
cfprefsd
notifyd
distnoted
Mach Services Intro
•
•
•
•

•

Mach service is essentially a queue consumer
Mach ports represent descriptors for queues
Send == enqueue, receive == dequeue
Sender/receiver can be either:

•
•

another process(e.g. coreservicesd)
kernel (e.g. thread_set_state ptrace
replacement)

See also Dai Zovi’s “Hacking at Mach Speed”
Mach Ports
•
•
•

Port just a descriptor of a port in task’s (i.e.
proc’s) IPC namespace
Lots of types end up being defined as
mach_port_t (e.g. clock_serv_t)
Mach ports can be obtained by:

•
•

calling Mach traps (e.g. task_self_trap,
task_for_pid, mach_port_allocate)
via boostrap/launchd...
Mach Lookup via launchd
mach_port_t bootstrap, svc_port;
task_get_bootstrap_port(mach_task_self(), &bootstrap);
bootstrap_look_up(bootstrap,
"com.apple.FontObjectsServer",
&svc_port);
...
mach_msg(...);
launchd
•

And here’s what happens in launchd:

job_mig_look_up2(job_t j, mach_port_t srp, name_t servicename, mach_port_t *serviceportp, pid_t
target_pid, uuid_t instance_id, uint64_t flags)
{
...
#endif
#if HAVE_SANDBOX
!
/* We don't do sandbox checking for XPC domains because, by definition, all
!
* the services within your domain should be accessible to you.
!
*/
!
if (!xpc_req && unlikely(sandbox_check(ldc->pid, "mach-lookup", per_pid_lookup ?
SANDBOX_FILTER_LOCAL_NAME : SANDBOX_FILTER_GLOBAL_NAME, servicename) > 0)) {
!
!
return BOOTSTRAP_NOT_PRIVILEGED;
!
}
#endif
Anatomy of a Mach Message
Mach Message - Header
mach_msg_body_t
mach_msg_descriptor_t

inline data
mach_msg_trailer_t

MACH_MSGH_BITS_COMPLEX

msgh_size

mach_msg_header_t

typedef struct
{
 mach_msg_bits_t msgh_bits;
 mach_msg_size_t msgh_size;
 mach_port_t     msgh_remote_port;
 mach_port_t     msgh_local_port;
 mach_msg_size_t msgh_reserved;
 mach_msg_id_t   msgh_id;
} mach_msg_header_t;

• msgh_bits - determines how
msgh_remote_port and
msgh_local_port are handled and
specifies if message is complex
(MACH_MSGH_BITS_COMPLEX)
• msgh_local_port - reply port
• msgh_id - used by services to
demux calls.
Mach Message - Body
mach_msg_header_t
complex
message with
typed data

mach_msg_body_t

mach_msg_port_descriptor_t
mach_msg_ool_descriptor_t

typedef struct
{
 mach_msg_size_t msgh_descriptor_count;
} mach_msg_body_t

typedef struct                                    
 
{
 void*                     address;              
 
 boolean_t            deallocate: 8;
 mach_msg_copy_options_t    copy: 8;             
 
 unsigned int               pad1: 8;  
 mach_msg_descriptor_type_t type: 8;             
 
 mach_msg_size_t               size;             
 
} mach_msg_ool_descriptor_t;

mach_msg_ool_ports_descriptor_t
mach_msg_descriptor_t
inline data
mach_msg_trailer_t

• address, size - pointer to out-ofline(OOL) memory and it's size
• copy - option instructing kernel on
how to treat the memory
(MACH_MSG_VIRTUAL_COPY or
MACH_MSG_PHYSICAL_COPY)
Mach Message - Body
mach_msg_body_t
mach_msg_descriptor
_t

inline data
mach_msg_trailer_t

MACH_MSGH_BITS_COMPLEX

msgh_size

mach_msg_header_t

typedef struct
{
 mach_msg_trailer_type_t       msgh_trailer_type;
 mach_msg_trailer_size_t       msgh_trailer_size;
 mach_port_seqno_t             msgh_seqno;
 security_token_t              msgh_sender;
 audit_token_t                 msgh_audit;
 mach_vm_address_t             msgh_context;
 int! !
!
!
       msgh_ad;
 msg_labels_t                  msgh_labels;
} mach_msg_mac_trailer_t;

• Trailer is requested by supplying
MACH_RCV_TRAILER_TYPE(MACH_RCV_TRAIL
ER_SENDER) option to mach_msg().
• audit_token_to_au32() extracts {r,e}uid/
gid and pid from audit_token_t
Sending/Receiving
mach_msg()/mach_msg_overwrite() are used to
both send and receive messages:
mach_msg_return_t   mach_msg
                   (mach_msg_header_t                msg,
                    mach_msg_option_t             option,
                    mach_msg_size_t            send_size,
                    mach_msg_size_t        receive_limit,
                    mach_port_t             receive_name,
                    mach_msg_timeout_t           timeout,
                    mach_port_t                   notify);

•option - MACH_SEND_MSG,

MACH_RCV_MSG
Fuzzing Mach Services
https://github.com/meder/mach-fuzz
...but before that
• Mach services generally considered
less sexy:

• local privesc
• require extra knowledge

• Some Mach services are a b!@#$% to
fuzz...
coreservicesd
•
•
•
•

Runs as root
Will segfault within seconds of fuzzing

•
•

Out-of-memory reads
Huge allocations

...which brings down lots of other stuff (must
restart)
Instead of fuzzing explored APIs exposed over
Mach...
coreservicesd
• Has checks sprinkled to check if app
is sandboxed

• Checks are missing/wrong in:
•
•
•

__XSetContentTypeHandler
__XSetSchemeHandler
_XRegisterItemInfo
coreservicesd
•

__XSetContentTypeHandler - associates arbitrary registered
bundle ID with arbitrary MIME type. Attack: associate public.plaintext with com.apple.JarLauncher

•

__XSetSchemeHandler - associated URL schemes with arbitrary
registered bundle ID. Attack: change default browser, mail agent,
PDF reader.

•

_XRegisterItemInfo - registers items (e.g. applications) with
launchd. Used by mdworker to automatically register any valid .app
directories on your HDD (e.g. if you unzipped something with .app
and Info.plist) with launchd. Newly registered bundle ID can be used in
above calls. NOTE: calls processIsInAppSandbox(), which returns
false for Chrome.
...back to fuzzing
• Usual steps involved:
• pick target
• collect samples
• fuzz
Collecting Samples
•
•

Can’t download off the internet :(
Random generation ineffective

•

msgh_id - correct ID range is crucial for
reaching target code:
mov
add
cmp
jbe
xor
jmp

•

eax,0xffffc180;
eax,DWORD PTR [rdi+0x14] ; msgh_id
eax,0x21
; 0x3e80
process_message
eax,eax
return

msgh_size - size is often checked right after
msgh_id for expected size.
Collecting Samples
•
•

mach_dump.py on target process

•

uses gdb + python

trigger code paths (e.g. drag and drop, install
stuff, visit web pages)

•
•

OS X gdb 6.3.50-20050815

•

use both!

Compile + sign latest gdb for Python
support(symbols are borked)
mach_dump.py
•
•
•
•

Parses Mach message and saves it on disk (including
OOL memory)
Implements GDB breakpoint
Must be set right after server-side mach_msg() call
and given register name with mach message
To find the right spot:
break mach_msg
commands
bt
c
end
Sample stacktrace
#0
#1
#2
#3
#4
#5
#6
#7
#8
#9

 0x00007fff8389dc0d in mach_msg ()
 0x00007fff8c030835 in serverMainHandler ()
 0x00007fff8c623e40 in __CFMachPortPerform ()
 0x00007fff8c623d09 in
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
 0x00007fff8c623a49 in __CFRunLoopDoSource1 ()
 0x00007fff8c656c02 in __CFRunLoopRun ()
 0x00007fff8c6560e2 in CFRunLoopRunSpecific ()
 0x00007fff8c664dd1 in CFRunLoopRun ()
 0x00007fff8c02fff7 in main_handler ()
 0x00007fff8cf807e1 in start ()
Fuzzing
• Basic fuzzer
• Parses messages saved with
mach_dump.py

• Allocates ports where needed
• Can cycle through a range of
msgh_ids
Results (fontd)
• Incorrectly bounded rol loop on

stack with attacker controlled count

• Arbitrary vm_deallocate() on a
pointer

• Over reading in memcpy/memmove
• Huge allocations
Recommendations
• Know the descriptors and ports

accessible from sandboxed process

• Close unused mach ports
OR

• Broker out mach calls (tricky!)
References
•
•
•
•

Iozzo, V. (2012). “A Sandbox odyssey”: http://
prezi.com/lxljhvzem6js/a-sandbox-odysseyinfiltrate-2012/
Dai Zovi. (2011). “Hacking at Mach2”: http://
blog.trailofbits.com/2011/01/11/hacking-at-mach-2/
Blazakis, D. (2011). “The Apple Sandbox”: http://
securityevaluators.com/files/papers/apple-sandbox.pdf
Tinnes, Evans (2009). Security In-Depth for Linux
Software: https://www.cr0.org/paper/jt-ce-sid_linux.pdf

Más contenido relacionado

La actualidad más candente

BlueHat v18 || Hardening hyper-v through offensive security research
BlueHat v18 || Hardening hyper-v through offensive security researchBlueHat v18 || Hardening hyper-v through offensive security research
BlueHat v18 || Hardening hyper-v through offensive security researchBlueHat Security Conference
 
Kernel Recipes 2015: Anatomy of an atomic KMS driver
Kernel Recipes 2015: Anatomy of an atomic KMS driverKernel Recipes 2015: Anatomy of an atomic KMS driver
Kernel Recipes 2015: Anatomy of an atomic KMS driverAnne Nicolas
 
Kernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisKernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisBuland Singh
 
Debugging linux kernel tools and techniques
Debugging linux kernel tools and  techniquesDebugging linux kernel tools and  techniques
Debugging linux kernel tools and techniquesSatpal Parmar
 
Linux Kernel Crashdump
Linux Kernel CrashdumpLinux Kernel Crashdump
Linux Kernel CrashdumpMarian Marinov
 
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)Gavin Guo
 
Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'Jen Andre
 
CSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershell
CSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershellCSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershell
CSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershellCanSecWest
 
Linux Crash Dump Capture and Analysis
Linux Crash Dump Capture and AnalysisLinux Crash Dump Capture and Analysis
Linux Crash Dump Capture and AnalysisPaul V. Novarese
 
Troubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device DriversTroubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device DriversSatpal Parmar
 
syzbot and the tale of million kernel bugs
syzbot and the tale of million kernel bugssyzbot and the tale of million kernel bugs
syzbot and the tale of million kernel bugsDmitry Vyukov
 
Ищем уязвимости нулевого дня в ядре Linux
Ищем уязвимости нулевого дня в ядре LinuxИщем уязвимости нулевого дня в ядре Linux
Ищем уязвимости нулевого дня в ядре LinuxPositive Hack Days
 
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacketCsw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacketCanSecWest
 
Feldo: Function Event Listing and Dynamic Observing for Detecting and Prevent...
Feldo: Function Event Listing and Dynamic Observing for Detecting and Prevent...Feldo: Function Event Listing and Dynamic Observing for Detecting and Prevent...
Feldo: Function Event Listing and Dynamic Observing for Detecting and Prevent...Tzung-Bi Shih
 
Csw2016 economou nissim-getting_physical
Csw2016 economou nissim-getting_physicalCsw2016 economou nissim-getting_physical
Csw2016 economou nissim-getting_physicalCanSecWest
 
Vulnerability desing patterns
Vulnerability desing patternsVulnerability desing patterns
Vulnerability desing patternsPeter Hlavaty
 
Security research over Windows #defcon china
Security research over Windows #defcon chinaSecurity research over Windows #defcon china
Security research over Windows #defcon chinaPeter Hlavaty
 

La actualidad más candente (20)

BlueHat v18 || Hardening hyper-v through offensive security research
BlueHat v18 || Hardening hyper-v through offensive security researchBlueHat v18 || Hardening hyper-v through offensive security research
BlueHat v18 || Hardening hyper-v through offensive security research
 
Kernel Recipes 2015: Anatomy of an atomic KMS driver
Kernel Recipes 2015: Anatomy of an atomic KMS driverKernel Recipes 2015: Anatomy of an atomic KMS driver
Kernel Recipes 2015: Anatomy of an atomic KMS driver
 
Kernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisKernel_Crash_Dump_Analysis
Kernel_Crash_Dump_Analysis
 
Debugging linux kernel tools and techniques
Debugging linux kernel tools and  techniquesDebugging linux kernel tools and  techniques
Debugging linux kernel tools and techniques
 
Linux Kernel Crashdump
Linux Kernel CrashdumpLinux Kernel Crashdump
Linux Kernel Crashdump
 
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
 
Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'
 
CSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershell
CSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershellCSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershell
CSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershell
 
Linux Crash Dump Capture and Analysis
Linux Crash Dump Capture and AnalysisLinux Crash Dump Capture and Analysis
Linux Crash Dump Capture and Analysis
 
Troubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device DriversTroubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device Drivers
 
Debugging linux
Debugging linuxDebugging linux
Debugging linux
 
syzbot and the tale of million kernel bugs
syzbot and the tale of million kernel bugssyzbot and the tale of million kernel bugs
syzbot and the tale of million kernel bugs
 
Ищем уязвимости нулевого дня в ядре Linux
Ищем уязвимости нулевого дня в ядре LinuxИщем уязвимости нулевого дня в ядре Linux
Ищем уязвимости нулевого дня в ядре Linux
 
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacketCsw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacket
 
Feldo: Function Event Listing and Dynamic Observing for Detecting and Prevent...
Feldo: Function Event Listing and Dynamic Observing for Detecting and Prevent...Feldo: Function Event Listing and Dynamic Observing for Detecting and Prevent...
Feldo: Function Event Listing and Dynamic Observing for Detecting and Prevent...
 
Learning Dtrace
Learning DtraceLearning Dtrace
Learning Dtrace
 
Csw2016 economou nissim-getting_physical
Csw2016 economou nissim-getting_physicalCsw2016 economou nissim-getting_physical
Csw2016 economou nissim-getting_physical
 
Cuda debugger
Cuda debuggerCuda debugger
Cuda debugger
 
Vulnerability desing patterns
Vulnerability desing patternsVulnerability desing patterns
Vulnerability desing patterns
 
Security research over Windows #defcon china
Security research over Windows #defcon chinaSecurity research over Windows #defcon china
Security research over Windows #defcon china
 

Similar a Meder Kydyraliev - Mining Mach Services within OS X Sandbox

Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsFederico Michele Facca
 
IstSec'14 - İbrahim BALİÇ - Automated Malware Analysis
IstSec'14 - İbrahim BALİÇ -  Automated Malware AnalysisIstSec'14 - İbrahim BALİÇ -  Automated Malware Analysis
IstSec'14 - İbrahim BALİÇ - Automated Malware AnalysisBGA Cyber Security
 
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak   CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak PROIDEA
 
Replatforming Legacy Packaged Applications: Block-by-Block with Minecraft
Replatforming Legacy Packaged Applications: Block-by-Block with MinecraftReplatforming Legacy Packaged Applications: Block-by-Block with Minecraft
Replatforming Legacy Packaged Applications: Block-by-Block with MinecraftVMware Tanzu
 
Automated malware analysis
Automated malware analysisAutomated malware analysis
Automated malware analysisIbrahim Baliç
 
Software Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in JavaSoftware Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in JavaIsuru Perera
 
TENTACLE: Environment-Sensitive Malware Palpation(PacSec 2014)
TENTACLE: Environment-Sensitive Malware Palpation(PacSec 2014)TENTACLE: Environment-Sensitive Malware Palpation(PacSec 2014)
TENTACLE: Environment-Sensitive Malware Palpation(PacSec 2014)FFRI, Inc.
 
Linux Integrity Mechanisms - Protecting Container Runtime as an example
Linux Integrity Mechanisms - Protecting Container Runtime as an exampleLinux Integrity Mechanisms - Protecting Container Runtime as an example
Linux Integrity Mechanisms - Protecting Container Runtime as an exampleClay (Chih-Hao) Chang
 
OSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ InfosectrainOSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ InfosectrainInfosecTrain
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefMatt Ray
 
Intro To Node.js
Intro To Node.jsIntro To Node.js
Intro To Node.jsChris Cowan
 
Shall we play a game?
Shall we play a game?Shall we play a game?
Shall we play a game?Maciej Lasyk
 
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey GordeychikCODE BLUE
 
Stream Processing with Apache Kafka and .NET
Stream Processing with Apache Kafka and .NETStream Processing with Apache Kafka and .NET
Stream Processing with Apache Kafka and .NETconfluent
 
FPC for the Masses (SANSFire Edition)
FPC for the Masses (SANSFire Edition)FPC for the Masses (SANSFire Edition)
FPC for the Masses (SANSFire Edition)Xavier Mertens
 
DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...
DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...
DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...Felipe Prado
 
Larson Macaulay apt_malware_past_present_future_out_of_band_techniques
Larson Macaulay apt_malware_past_present_future_out_of_band_techniquesLarson Macaulay apt_malware_past_present_future_out_of_band_techniques
Larson Macaulay apt_malware_past_present_future_out_of_band_techniquesScott K. Larson
 
Continuous Security: From tins to containers - now what!
Continuous Security: From tins to containers - now what!Continuous Security: From tins to containers - now what!
Continuous Security: From tins to containers - now what!Michael Man
 

Similar a Meder Kydyraliev - Mining Mach Services within OS X Sandbox (20)

Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platforms
 
IstSec'14 - İbrahim BALİÇ - Automated Malware Analysis
IstSec'14 - İbrahim BALİÇ -  Automated Malware AnalysisIstSec'14 - İbrahim BALİÇ -  Automated Malware Analysis
IstSec'14 - İbrahim BALİÇ - Automated Malware Analysis
 
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak   CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak
 
Replatforming Legacy Packaged Applications: Block-by-Block with Minecraft
Replatforming Legacy Packaged Applications: Block-by-Block with MinecraftReplatforming Legacy Packaged Applications: Block-by-Block with Minecraft
Replatforming Legacy Packaged Applications: Block-by-Block with Minecraft
 
Automated malware analysis
Automated malware analysisAutomated malware analysis
Automated malware analysis
 
Software Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in JavaSoftware Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in Java
 
TENTACLE: Environment-Sensitive Malware Palpation(PacSec 2014)
TENTACLE: Environment-Sensitive Malware Palpation(PacSec 2014)TENTACLE: Environment-Sensitive Malware Palpation(PacSec 2014)
TENTACLE: Environment-Sensitive Malware Palpation(PacSec 2014)
 
Linux Integrity Mechanisms - Protecting Container Runtime as an example
Linux Integrity Mechanisms - Protecting Container Runtime as an exampleLinux Integrity Mechanisms - Protecting Container Runtime as an example
Linux Integrity Mechanisms - Protecting Container Runtime as an example
 
OSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ InfosectrainOSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ Infosectrain
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
 
Us 17-krug-hacking-severless-runtimes
Us 17-krug-hacking-severless-runtimesUs 17-krug-hacking-severless-runtimes
Us 17-krug-hacking-severless-runtimes
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and Chef
 
Intro To Node.js
Intro To Node.jsIntro To Node.js
Intro To Node.js
 
Shall we play a game?
Shall we play a game?Shall we play a game?
Shall we play a game?
 
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
 
Stream Processing with Apache Kafka and .NET
Stream Processing with Apache Kafka and .NETStream Processing with Apache Kafka and .NET
Stream Processing with Apache Kafka and .NET
 
FPC for the Masses (SANSFire Edition)
FPC for the Masses (SANSFire Edition)FPC for the Masses (SANSFire Edition)
FPC for the Masses (SANSFire Edition)
 
DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...
DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...
DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...
 
Larson Macaulay apt_malware_past_present_future_out_of_band_techniques
Larson Macaulay apt_malware_past_present_future_out_of_band_techniquesLarson Macaulay apt_malware_past_present_future_out_of_band_techniques
Larson Macaulay apt_malware_past_present_future_out_of_band_techniques
 
Continuous Security: From tins to containers - now what!
Continuous Security: From tins to containers - now what!Continuous Security: From tins to containers - now what!
Continuous Security: From tins to containers - now what!
 

Más de DefconRussia

[Defcon Russia #29] Борис Савков - Bare-metal programming на примере Raspber...
[Defcon Russia #29] Борис Савков -  Bare-metal programming на примере Raspber...[Defcon Russia #29] Борис Савков -  Bare-metal programming на примере Raspber...
[Defcon Russia #29] Борис Савков - Bare-metal programming на примере Raspber...DefconRussia
 
[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...
[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...
[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...DefconRussia
 
[Defcon Russia #29] Алексей Тюрин - Spring autobinding
[Defcon Russia #29] Алексей Тюрин - Spring autobinding[Defcon Russia #29] Алексей Тюрин - Spring autobinding
[Defcon Russia #29] Алексей Тюрин - Spring autobindingDefconRussia
 
[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux
[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux
[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/LinuxDefconRussia
 
Георгий Зайцев - Reversing golang
Георгий Зайцев - Reversing golangГеоргий Зайцев - Reversing golang
Георгий Зайцев - Reversing golangDefconRussia
 
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC [DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC DefconRussia
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneCisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneDefconRussia
 
Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...
Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...
Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...DefconRussia
 
HTTP HOST header attacks
HTTP HOST header attacksHTTP HOST header attacks
HTTP HOST header attacksDefconRussia
 
Attacks on tacacs - Алексей Тюрин
Attacks on tacacs - Алексей ТюринAttacks on tacacs - Алексей Тюрин
Attacks on tacacs - Алексей ТюринDefconRussia
 
Weakpass - defcon russia 23
Weakpass - defcon russia 23Weakpass - defcon russia 23
Weakpass - defcon russia 23DefconRussia
 
nosymbols - defcon russia 20
nosymbols - defcon russia 20nosymbols - defcon russia 20
nosymbols - defcon russia 20DefconRussia
 
static - defcon russia 20
static  - defcon russia 20static  - defcon russia 20
static - defcon russia 20DefconRussia
 
Zn task - defcon russia 20
Zn task  - defcon russia 20Zn task  - defcon russia 20
Zn task - defcon russia 20DefconRussia
 
Vm ware fuzzing - defcon russia 20
Vm ware fuzzing  - defcon russia 20Vm ware fuzzing  - defcon russia 20
Vm ware fuzzing - defcon russia 20DefconRussia
 
Nedospasov defcon russia 23
Nedospasov defcon russia 23Nedospasov defcon russia 23
Nedospasov defcon russia 23DefconRussia
 
Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23DefconRussia
 
Miasm defcon russia 23
Miasm defcon russia 23Miasm defcon russia 23
Miasm defcon russia 23DefconRussia
 
Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...
Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...
Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...DefconRussia
 
Sergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условиях
Sergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условияхSergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условиях
Sergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условияхDefconRussia
 

Más de DefconRussia (20)

[Defcon Russia #29] Борис Савков - Bare-metal programming на примере Raspber...
[Defcon Russia #29] Борис Савков -  Bare-metal programming на примере Raspber...[Defcon Russia #29] Борис Савков -  Bare-metal programming на примере Raspber...
[Defcon Russia #29] Борис Савков - Bare-metal programming на примере Raspber...
 
[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...
[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...
[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...
 
[Defcon Russia #29] Алексей Тюрин - Spring autobinding
[Defcon Russia #29] Алексей Тюрин - Spring autobinding[Defcon Russia #29] Алексей Тюрин - Spring autobinding
[Defcon Russia #29] Алексей Тюрин - Spring autobinding
 
[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux
[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux
[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux
 
Георгий Зайцев - Reversing golang
Георгий Зайцев - Reversing golangГеоргий Зайцев - Reversing golang
Георгий Зайцев - Reversing golang
 
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC [DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneCisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-one
 
Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...
Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...
Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...
 
HTTP HOST header attacks
HTTP HOST header attacksHTTP HOST header attacks
HTTP HOST header attacks
 
Attacks on tacacs - Алексей Тюрин
Attacks on tacacs - Алексей ТюринAttacks on tacacs - Алексей Тюрин
Attacks on tacacs - Алексей Тюрин
 
Weakpass - defcon russia 23
Weakpass - defcon russia 23Weakpass - defcon russia 23
Weakpass - defcon russia 23
 
nosymbols - defcon russia 20
nosymbols - defcon russia 20nosymbols - defcon russia 20
nosymbols - defcon russia 20
 
static - defcon russia 20
static  - defcon russia 20static  - defcon russia 20
static - defcon russia 20
 
Zn task - defcon russia 20
Zn task  - defcon russia 20Zn task  - defcon russia 20
Zn task - defcon russia 20
 
Vm ware fuzzing - defcon russia 20
Vm ware fuzzing  - defcon russia 20Vm ware fuzzing  - defcon russia 20
Vm ware fuzzing - defcon russia 20
 
Nedospasov defcon russia 23
Nedospasov defcon russia 23Nedospasov defcon russia 23
Nedospasov defcon russia 23
 
Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23
 
Miasm defcon russia 23
Miasm defcon russia 23Miasm defcon russia 23
Miasm defcon russia 23
 
Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...
Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...
Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...
 
Sergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условиях
Sergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условияхSergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условиях
Sergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условиях
 

Último

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
[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
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Último (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[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
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
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
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Meder Kydyraliev - Mining Mach Services within OS X Sandbox

  • 1. Mining Mach Services within OS X Sandbox Meder Kydyraliev, 2013
  • 2. Agenda • • • Sandboxing: what? why? how? OS X Sandbox aka Seatbelt • • Quick overview Enumerating attack surface Mach services • • Quick overview Fuzzing!
  • 4. Sandboxing: What? • • • Sandbox - a mechanism for segregation and containment of a piece of code exposed to untrusted inputs MAC & RBAC Sandbox flavors: • • LSM: SELinux, AppArmor, TOMOYO TrustedBSD MAC: Seatbelt
  • 5. Sandboxing: Why? • Good software is hard • Fixing bugs in software security researchers used to not care about is even harder (e.g. Adobe Reader) • Indicator of “acceptance” by software vendors
  • 6. Sandboxing: How? • It all boils down to hooks: int connect_nocancel(__unused proc_t p, struct connect_nocancel_args *uap, __unused int32_t *retval) { ... #if CONFIG_MACF_SOCKET_SUBSET ! if ((error = mac_socket_check_connect(kauth_cred_get(), so, sa)) != 0) { ! ! if (want_free) ! ! ! FREE(sa, M_SONAME); ! ! goto out; ! } #endif /* MAC_SOCKET_SUBSET */ ... }
  • 7. Sandboxing: How? • It all boils down to hooks: int connect_nocancel(__unused proc_t p, struct connect_nocancel_args *uap, __unused int32_t *retval) { ... #if CONFIG_MACF_SOCKET_SUBSET ! if ((error = mac_socket_check_connect(kauth_cred_get(), so, sa)) != 0) { ! ! if (want_free) ! ! ! FREE(sa, M_SONAME); ! ! goto out; ! } #endif /* MAC_SOCKET_SUBSET */ ... }
  • 8. OS X Sandbox • Based on TrustedBSD MAC Framework • Prior work: • Iozzo, V. (2012).“A Sandbox odyssey”. • Blazakis, D. (2011). “The Apple Sandbox”.
  • 9. TrustedBSD MAC • • • • A bunch of hooks are sprayed throughout the kernel Hooks loop over registered policy modules invoking corresponding functions (e.g. mac_vnode_check_open) Allows coexistence of multiple implementations Provides multiplex system call mac_syscall() for modules to expose functionality
  • 10. Issues with TrustedBSD/MAC • • • Relies on hooks to be present (missing vs. unimplemented) Argument parsing prior to hooks represents attack surface XNU extras: • Retrofitted for Mach (more hooks sprayed in user-land Mach services, e.g. mach-lookup)
  • 11. mac_syscall() _syscall_set_profile _syscall_set_profile_builtin _syscall_check_sandbox _syscall_note _syscall_container _syscall_suspend applies profile to a process applies default builtin profile to a process checks specified action(e.g. mach-lookup) against policy associated “note” with current proc’s sandbox label ??? Suspends sandbox checks on supplied PID by setting boolean value on proc's label. PID must belong to the same user. Calling process must have com.apple.private.security.sandbox-manager entitlement and target process has to either have com.apple.security.print entitlement value set to 1 or com.apple.security.temporary-exception.audio-unithost set to 1. _syscall_unsuspend Resume suspended sandbox checks. _syscall_passthrough_access ??? Seems to take a descriptor, get corresponding vnode and call vnode_authorize() on parent's vnode. _syscall_vtrace
  • 12. mac_syscall() _syscall_set_profile _syscall_set_profile_builtin _syscall_check_sandbox _syscall_note _syscall_container _syscall_suspend applies profile to a process applies default builtin profile to a process checks specified action(e.g. mach-lookup) against policy associated “note” with current proc’s sandbox label ??? Suspends sandbox checks on supplied PID by setting boolean value on proc's label. PID must belong to the same user. Calling process must have com.apple.private.security.sandbox-manager entitlement and target process has to either have com.apple.security.print entitlement value set to 1 or com.apple.security.temporary-exception.audio-unithost set to 1. _syscall_unsuspend Resume suspended sandbox checks. _syscall_passthrough_access ??? Seems to take a descriptor, get corresponding vnode and call vnode_authorize() on parent's vnode. _syscall_vtrace
  • 13. mac_syscall() _syscall_extension_issue returns extension for a file operation or Mach lookup _syscall_extension_consume uses the above extension to augment current proc’s policy by adding action authorized by the extension to the policy _syscall_extension_release disassociates “consumed” extension from the policy _syscall_extension_update_file ??? _syscall_extension_twiddle ???
  • 14. Seatbelt Extensions Usage: extension = _syscall_extension_issue("com.apple.app-sandbox.read", "/etc/passwd"); _syscall_extension_consume(extension); FILE* f = fopen("/etc/passwd","r"); Issuer Policy: (allow file-issue-extension .... Consumer Policy: (allow file-read* (extension "com.apple.app-sandbox.read")) (allow mach-lookup (extension "com.apple.app-sandbox.mach"))
  • 15. /etc/passwd 5. fopen("/etc/passwd") 4. _syscall_extension_consume( extension for /etc/passwd) PRIVILEGED (issuer) 2. SANDBOXED (consumer) ex /e te tc ns /p io as n sw fo d r 3. extension for /etc/passwd Sandbox kernel module 5. updates policy to allow /etc/passwd to be read 1. _syscall_extension_issue() for /etc/passwd
  • 16. Seatbelt Extensions • How to they work? 58ffd694274b2b5575eff5e497fe4de1de815124;00000000;000000000000001a;com.app le.app-sandbox.read;00000001;01000004;00000000000041ee;/private/etc/passwd 58ffd6942....5e497fe4de1de815124 0 000000000000001a com.apple.app-sandbox.read 1 1000004 00000000000041ee /private/etc/passwd SHA1 HMAC value. 0 Length of the extension type string that follows. Extension type 1 File system ID (fsid_t) with type truncated. inode number file path
  • 17. Seatbelt Extensions • SHA1 HMAC key generated on startup by Sandbox.kext • Constant time comparison
  • 18. Users • Used by Google Chrome. • Used by Adobe Reader X(I). • In some form or the other used by most OS X apps.
  • 19. Challenges • Complex interactions between components (server vs client apps) • One-time sensitive resource access (e.g. config load on startup) • Legacy apps: sandbox-aware vs. sandbox-unaware
  • 20. Process Warm-up • • What? • exercise of code paths prior to sandbox being enabled Why? • • communications channels are established files are open/read/written
  • 21. Enumerating Attack Surface • • • BSD system calls • • code that runs before MAC hook hooks provided by MAC, but not implemented by Seatbelt Mach Services • • in-kernel user-land I/O Kit
  • 22. BSD system calls • There are a number of system call MAC hooks not implemented/allowed by Seatbelt, e.g.: • • • socket() - AF_INET/AF_LOCAL sockets of SOCK_DGRAM/ SOCK_STREAM type are allowed setsockopt(), ioctl(), mmap() - unimplemented by Seatbelt getfsstat(), readdir() - unimplemented and provide the fsid and inode for extensions (if you already have the key)
  • 23. ...speaking of setsockopt() • Turns out you can set SO_EXECPATH(0x1085) to a path of a preauthorized binary to bypass firewall prompts: •/usr/libexec/configd •/usr/sbin/mDNSResponder •/usr/sbin/racoon •/usr/bin/nmblookup* - doesn't exist hence prompt is displayed •/System/Library/PrivateFrameworks/Admin.framework/Versions/A/Resources/ readconfig • Setting 0x1085 to any string without ‘/’ results in panic() (NULL deref)
  • 25. Remember warm-up? • • Exercising code paths leaves some interesting artifacts...Mach ports. Chrome renderer: • • policy: only fontd reality (showipcint from kgmacros): • • • • coreservicesd cfprefsd notifyd distnoted
  • 26. Mach Services Intro • • • • • Mach service is essentially a queue consumer Mach ports represent descriptors for queues Send == enqueue, receive == dequeue Sender/receiver can be either: • • another process(e.g. coreservicesd) kernel (e.g. thread_set_state ptrace replacement) See also Dai Zovi’s “Hacking at Mach Speed”
  • 27. Mach Ports • • • Port just a descriptor of a port in task’s (i.e. proc’s) IPC namespace Lots of types end up being defined as mach_port_t (e.g. clock_serv_t) Mach ports can be obtained by: • • calling Mach traps (e.g. task_self_trap, task_for_pid, mach_port_allocate) via boostrap/launchd...
  • 28. Mach Lookup via launchd mach_port_t bootstrap, svc_port; task_get_bootstrap_port(mach_task_self(), &bootstrap); bootstrap_look_up(bootstrap, "com.apple.FontObjectsServer", &svc_port); ... mach_msg(...);
  • 29. launchd • And here’s what happens in launchd: job_mig_look_up2(job_t j, mach_port_t srp, name_t servicename, mach_port_t *serviceportp, pid_t target_pid, uuid_t instance_id, uint64_t flags) { ... #endif #if HAVE_SANDBOX ! /* We don't do sandbox checking for XPC domains because, by definition, all ! * the services within your domain should be accessible to you. ! */ ! if (!xpc_req && unlikely(sandbox_check(ldc->pid, "mach-lookup", per_pid_lookup ? SANDBOX_FILTER_LOCAL_NAME : SANDBOX_FILTER_GLOBAL_NAME, servicename) > 0)) { ! ! return BOOTSTRAP_NOT_PRIVILEGED; ! } #endif
  • 30. Anatomy of a Mach Message
  • 31. Mach Message - Header mach_msg_body_t mach_msg_descriptor_t inline data mach_msg_trailer_t MACH_MSGH_BITS_COMPLEX msgh_size mach_msg_header_t typedef struct {  mach_msg_bits_t msgh_bits;  mach_msg_size_t msgh_size;  mach_port_t     msgh_remote_port;  mach_port_t     msgh_local_port;  mach_msg_size_t msgh_reserved;  mach_msg_id_t   msgh_id; } mach_msg_header_t; • msgh_bits - determines how msgh_remote_port and msgh_local_port are handled and specifies if message is complex (MACH_MSGH_BITS_COMPLEX) • msgh_local_port - reply port • msgh_id - used by services to demux calls.
  • 32. Mach Message - Body mach_msg_header_t complex message with typed data mach_msg_body_t mach_msg_port_descriptor_t mach_msg_ool_descriptor_t typedef struct {  mach_msg_size_t msgh_descriptor_count; } mach_msg_body_t typedef struct                                       {  void*                     address;                  boolean_t            deallocate: 8;  mach_msg_copy_options_t    copy: 8;                 unsigned int               pad1: 8;    mach_msg_descriptor_type_t type: 8;                 mach_msg_size_t               size;                } mach_msg_ool_descriptor_t; mach_msg_ool_ports_descriptor_t mach_msg_descriptor_t inline data mach_msg_trailer_t • address, size - pointer to out-ofline(OOL) memory and it's size • copy - option instructing kernel on how to treat the memory (MACH_MSG_VIRTUAL_COPY or MACH_MSG_PHYSICAL_COPY)
  • 33. Mach Message - Body mach_msg_body_t mach_msg_descriptor _t inline data mach_msg_trailer_t MACH_MSGH_BITS_COMPLEX msgh_size mach_msg_header_t typedef struct {  mach_msg_trailer_type_t       msgh_trailer_type;  mach_msg_trailer_size_t       msgh_trailer_size;  mach_port_seqno_t             msgh_seqno;  security_token_t              msgh_sender;  audit_token_t                 msgh_audit;  mach_vm_address_t             msgh_context;  int! ! ! !        msgh_ad;  msg_labels_t                  msgh_labels; } mach_msg_mac_trailer_t; • Trailer is requested by supplying MACH_RCV_TRAILER_TYPE(MACH_RCV_TRAIL ER_SENDER) option to mach_msg(). • audit_token_to_au32() extracts {r,e}uid/ gid and pid from audit_token_t
  • 34. Sending/Receiving mach_msg()/mach_msg_overwrite() are used to both send and receive messages: mach_msg_return_t   mach_msg                    (mach_msg_header_t                msg,                     mach_msg_option_t             option,                     mach_msg_size_t            send_size,                     mach_msg_size_t        receive_limit,                     mach_port_t             receive_name,                     mach_msg_timeout_t           timeout,                     mach_port_t                   notify); •option - MACH_SEND_MSG, MACH_RCV_MSG
  • 36. ...but before that • Mach services generally considered less sexy: • local privesc • require extra knowledge • Some Mach services are a b!@#$% to fuzz...
  • 37. coreservicesd • • • • Runs as root Will segfault within seconds of fuzzing • • Out-of-memory reads Huge allocations ...which brings down lots of other stuff (must restart) Instead of fuzzing explored APIs exposed over Mach...
  • 38. coreservicesd • Has checks sprinkled to check if app is sandboxed • Checks are missing/wrong in: • • • __XSetContentTypeHandler __XSetSchemeHandler _XRegisterItemInfo
  • 39. coreservicesd • __XSetContentTypeHandler - associates arbitrary registered bundle ID with arbitrary MIME type. Attack: associate public.plaintext with com.apple.JarLauncher • __XSetSchemeHandler - associated URL schemes with arbitrary registered bundle ID. Attack: change default browser, mail agent, PDF reader. • _XRegisterItemInfo - registers items (e.g. applications) with launchd. Used by mdworker to automatically register any valid .app directories on your HDD (e.g. if you unzipped something with .app and Info.plist) with launchd. Newly registered bundle ID can be used in above calls. NOTE: calls processIsInAppSandbox(), which returns false for Chrome.
  • 40. ...back to fuzzing • Usual steps involved: • pick target • collect samples • fuzz
  • 41. Collecting Samples • • Can’t download off the internet :( Random generation ineffective • msgh_id - correct ID range is crucial for reaching target code: mov add cmp jbe xor jmp • eax,0xffffc180; eax,DWORD PTR [rdi+0x14] ; msgh_id eax,0x21 ; 0x3e80 process_message eax,eax return msgh_size - size is often checked right after msgh_id for expected size.
  • 42. Collecting Samples • • mach_dump.py on target process • uses gdb + python trigger code paths (e.g. drag and drop, install stuff, visit web pages) • • OS X gdb 6.3.50-20050815 • use both! Compile + sign latest gdb for Python support(symbols are borked)
  • 43. mach_dump.py • • • • Parses Mach message and saves it on disk (including OOL memory) Implements GDB breakpoint Must be set right after server-side mach_msg() call and given register name with mach message To find the right spot: break mach_msg commands bt c end
  • 44. Sample stacktrace #0 #1 #2 #3 #4 #5 #6 #7 #8 #9  0x00007fff8389dc0d in mach_msg ()  0x00007fff8c030835 in serverMainHandler ()  0x00007fff8c623e40 in __CFMachPortPerform ()  0x00007fff8c623d09 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()  0x00007fff8c623a49 in __CFRunLoopDoSource1 ()  0x00007fff8c656c02 in __CFRunLoopRun ()  0x00007fff8c6560e2 in CFRunLoopRunSpecific ()  0x00007fff8c664dd1 in CFRunLoopRun ()  0x00007fff8c02fff7 in main_handler ()  0x00007fff8cf807e1 in start ()
  • 45. Fuzzing • Basic fuzzer • Parses messages saved with mach_dump.py • Allocates ports where needed • Can cycle through a range of msgh_ids
  • 46. Results (fontd) • Incorrectly bounded rol loop on stack with attacker controlled count • Arbitrary vm_deallocate() on a pointer • Over reading in memcpy/memmove • Huge allocations
  • 47. Recommendations • Know the descriptors and ports accessible from sandboxed process • Close unused mach ports OR • Broker out mach calls (tricky!)
  • 48. References • • • • Iozzo, V. (2012). “A Sandbox odyssey”: http:// prezi.com/lxljhvzem6js/a-sandbox-odysseyinfiltrate-2012/ Dai Zovi. (2011). “Hacking at Mach2”: http:// blog.trailofbits.com/2011/01/11/hacking-at-mach-2/ Blazakis, D. (2011). “The Apple Sandbox”: http:// securityevaluators.com/files/papers/apple-sandbox.pdf Tinnes, Evans (2009). Security In-Depth for Linux Software: https://www.cr0.org/paper/jt-ce-sid_linux.pdf