From 9197bd1652cb89c592b7fecbf00ed05918e4992a Mon Sep 17 00:00:00 2001 From: opa334 Date: Fri, 12 Jan 2024 16:28:28 +0100 Subject: [PATCH] Don't defend against executables with no entitlements --- Exploits/fastPathSign/src/coretrust_bug.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Exploits/fastPathSign/src/coretrust_bug.c b/Exploits/fastPathSign/src/coretrust_bug.c index 5978529..6e2ec9d 100644 --- a/Exploits/fastPathSign/src/coretrust_bug.c +++ b/Exploits/fastPathSign/src/coretrust_bug.c @@ -142,17 +142,6 @@ int apply_coretrust_bypass(const char *machoPath) CS_DecodedBlob *mainCodeDirBlob = csd_superblob_find_blob(decodedSuperblob, CSSLOT_CODEDIRECTORY, NULL); CS_DecodedBlob *alternateCodeDirBlob = csd_superblob_find_blob(decodedSuperblob, CSSLOT_ALTERNATE_CODEDIRECTORIES, NULL); - CS_DecodedBlob *entitlementsBlob = csd_superblob_find_blob(decodedSuperblob, CSSLOT_ENTITLEMENTS, NULL); - CS_DecodedBlob *derEntitlementsBlob = csd_superblob_find_blob(decodedSuperblob, CSSLOT_DER_ENTITLEMENTS, NULL); - - if (!entitlementsBlob && !derEntitlementsBlob && macho->machHeader.filetype == MH_EXECUTE) { - printf("Error: Unable to find existing entitlements blobs in executable MachO, please make sure to ad-hoc sign with entitlements before running the bypass.\n"); - csd_blob_free(mainCodeDirBlob); - if (alternateCodeDirBlob) csd_blob_free(alternateCodeDirBlob); - macho_free(macho); - return -1; - } - if (!mainCodeDirBlob) { printf("Error: Unable to find code directory, make sure the input binary is ad-hoc signed.\n"); return -1;