diff --git a/AppDelegate.m b/AppDelegate.m index 0fd3e00..5bc16f1 100755 --- a/AppDelegate.m +++ b/AppDelegate.m @@ -93,8 +93,8 @@ //center [self.window center]; - //no need to have a first responder - [self.window makeFirstResponder:nil]; + //first responder: filter tasks + [self.window makeFirstResponder:self.filterTasksBox]; //make main window front [self.window makeKeyAndOrderFront:self]; @@ -115,8 +115,6 @@ //check [self check4Update:nil]; - return; - //register for hotkey presses [self registerKeypressHandler]; @@ -516,7 +514,7 @@ bail: __block NSUInteger row = 0; //run everything on main thread - // ->ensures table view isn't changed out from under us.... + // ensures table view isn't changed out from under us.... dispatch_async(dispatch_get_main_queue(), ^{ //top table (pane) @@ -530,22 +528,30 @@ bail: if(YES != [tableView isKindOfClass:[NSOutlineView class]]) { //no filtering - // ->grab row from all tasks + // grab row from all tasks if(YES != self.taskTableController.isFiltered) { - //get row - row = [self.taskEnumerator.tasks indexOfKey:((Task*)item).pid]; + //sync to get row + @synchronized (self.taskEnumerator.tasks) + { + //get row + row = [self.taskEnumerator.tasks indexOfKey:((Task*)item).pid]; + } } //filtering - // ->grab row from filtered tasks + // grab row from filtered tasks else { - //get row - row = [self.taskTableController.filteredItems indexOfObject:item]; + //sync to get row + @synchronized (self.taskTableController.filteredItems) + { + //get row + row = [self.taskTableController.filteredItems indexOfObject:item]; + } } } //reload item - // ->tree view, so no need to worry about filtering + // tree view, so no need to worry about filtering else { //get row @@ -763,7 +769,9 @@ bail: [(id)self.bottomViewController reloadTable]; //no items? - if(0 == self.bottomViewController.tableItems.count) + // but there is something in top.... + if( (0 == self.bottomViewController.tableItems.count) && + (nil != self.currentTask) ) { //how self.noItemsLabel.hidden = NO; @@ -1476,16 +1484,20 @@ bail: // ->check if its still alive if(nil != self.currentTask) { - //helper method that takes care of all check/handling dead tasks :) + //helper method that takes care of all check/handling dead tasks [self.taskTableController handleRowSelection]; } //when no current task - // ->set to first task in sorted tasks + // set to first task in sorted tasks, unless filtering if(nil == self.currentTask) { - //set to first - self.currentTask = self.taskEnumerator.tasks[[self.taskEnumerator.tasks keyAtIndex:0]]; + if( (YES != self.taskTableController.isFiltered) || + ( (YES == self.taskTableController.isFiltered) && (0 != self.taskTableController.filteredItems.count) ) ) + { + //set to first + self.currentTask = self.taskEnumerator.tasks[[self.taskEnumerator.tasks keyAtIndex:0]]; + } } //get segment tag diff --git a/Consts.h b/Consts.h index f6dfae8..905b315 100644 --- a/Consts.h +++ b/Consts.h @@ -30,10 +30,24 @@ //success #define STATUS_SUCCESS 0 -//keys for signing stuff + +//signers +enum Signer{None, Apple, AppStore, DevID, AdHoc}; + +//signature status #define KEY_SIGNATURE_STATUS @"signatureStatus" -#define KEY_SIGNING_AUTHORITIES @"signingAuthorities" -#define KEY_SIGNING_IS_APPLE @"signedByApple" + +//signer +#define KEY_SIGNATURE_SIGNER @"signatureSigner" + +//signing auths +#define KEY_SIGNATURE_AUTHORITIES @"signatureAuthorities" + +//code signing id +#define KEY_SIGNATURE_IDENTIFIER @"signatureIdentifier" + +//entitlements +#define KEY_SIGNATURE_ENTITLEMENTS @"signatureEntitlements" //OS version x #define OS_MAJOR_VERSION_X 10 @@ -47,6 +61,8 @@ //OS minor version el capitan #define OS_MINOR_VERSION_EL_CAPITAN 11 +//OS minor version mojave +#define OS_MINOR_VERSION_MOJAVE 14 //executable path #define EXECUTABLE_PATH @"@executable_path" @@ -102,6 +118,9 @@ //dyld_ key for applications #define APPLICATION_DYLD_KEY @"LSEnvironment" +//path to window server +#define WINDOW_SERVER @"/System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/Resources/WindowServer" + //menu //tag for prefs menu item @@ -179,9 +198,6 @@ // ->filter apple signed/known items #define KEY_SCANNER_FILTER @"filterItems" -//plugin key -//#define KEY_RESULT_PLUGIN @"plugin" - //XPC Service name #define XPC_SERVICE @"remoteTaskService.xpc" @@ -191,6 +207,8 @@ //location of kernel in Yosemite+ #define KERNEL_YOSEMITE @"/System/Library/Kernels/kernel" +// + //top pane #define PANE_TOP 0x0 @@ -380,6 +398,7 @@ //more info button tag #define BUTTON_MORE_INFO 101 + //patreon url #define PATREON_URL @"https://www.patreon.com/objective_see" diff --git a/Filter.m b/Filter.m index 3048e28..b32af1c 100644 --- a/Filter.m +++ b/Filter.m @@ -617,7 +617,8 @@ bail: //check // ->just look at signing info - if(YES == [item.signingInfo[KEY_SIGNING_IS_APPLE] boolValue]) + if( (noErr == [item.signingInfo[KEY_SIGNATURE_STATUS] integerValue]) && + (Apple == [item.signingInfo[KEY_SIGNATURE_SIGNER] intValue]) ) { //set flag isApple = YES; diff --git a/InfoWindowController.m b/InfoWindowController.m index 447b315..6a5acb2 100644 --- a/InfoWindowController.m +++ b/InfoWindowController.m @@ -9,9 +9,10 @@ #import "Task.h" #import "File.h" #import "Binary.h" -#import "Connection.h" #import "Consts.h" +#import "Signing.h" #import "Utilities.h" +#import "Connection.h" #import "InfoWindowController.h" @interface InfoWindowController () @@ -195,7 +196,15 @@ if(nil == task.binary.signingInfo) { //generate signing info - task.binary.signingInfo = extractSigningInfo(task.binary.path); + task.binary.signingInfo = extractSigningInfo(task.pid.intValue, nil, kSecCSDefaultFlags); + + //failed? + // try extract signing info statically + if(nil == task.binary.signingInfo) + { + //extract signing info statically + task.binary.signingInfo = extractSigningInfo(0, task.binary.path, kSecCSCheckAllArchitectures | kSecCSCheckNestedCode | kSecCSDoNotValidateResources); + } } //set signing info @@ -248,7 +257,7 @@ if(nil == dylib.signingInfo) { //generate signing info - dylib.signingInfo = extractSigningInfo(dylib.path); + dylib.signingInfo = extractSigningInfo(-1, dylib.path, kSecCSCheckAllArchitectures | kSecCSCheckNestedCode | kSecCSDoNotValidateResources); } //set signing info diff --git a/ItemView.m b/ItemView.m index 146f3d1..de84b04 100644 --- a/ItemView.m +++ b/ItemView.m @@ -104,45 +104,54 @@ NSImage* getCodeSigningIcon(Binary* binary) //signature image NSImage* codeSignIcon = nil; - //set signature status icon - if(nil != binary.signingInfo) + //none? + // just set to unknown + if(nil == binary.signingInfo) { - //binary is signed by apple - if(YES == [binary.signingInfo[KEY_SIGNING_IS_APPLE] boolValue]) - { - //set - codeSignIcon = [NSImage imageNamed:@"signedAppleIcon"]; - } - - //binary is signed - else if(STATUS_SUCCESS == [binary.signingInfo[KEY_SIGNATURE_STATUS] integerValue]) - { - //set - codeSignIcon = [NSImage imageNamed:@"signed"]; - } - - //binary not signed - else if(errSecCSUnsigned == [binary.signingInfo[KEY_SIGNATURE_STATUS] integerValue]) - { - //set - codeSignIcon = [NSImage imageNamed:@"unsigned"]; - } - - //unknown - else - { - //set - codeSignIcon = [NSImage imageNamed:@"unknown"]; - } - } - //signing info is nil - // ->just to unknown - else - { - //set + //set icon codeSignIcon = [NSImage imageNamed:@"unknown"]; + + //bail + goto bail; } + //parse signing info + switch([binary.signingInfo[KEY_SIGNATURE_STATUS] intValue]) + { + //happily signed + case noErr: + + //item signed by apple + if(Apple == [binary.signingInfo[KEY_SIGNATURE_SIGNER] intValue]) + { + //set icon + codeSignIcon = [NSImage imageNamed:@"signedAppleIcon"]; + } + //signed by dev id/ad hoc, etc + else + { + //set icon + codeSignIcon = [NSImage imageNamed:@"signed"]; + } + + break; + + //unsigned + case errSecCSUnsigned: + + //set icon + codeSignIcon = [NSImage imageNamed:@"unsigned"]; + + break; + + default: + + //set icon + codeSignIcon = [NSImage imageNamed:@"unknown"]; + } + +bail: + return codeSignIcon; } diff --git a/Items/Binary.m b/Items/Binary.m index c471df2..437686e 100644 --- a/Items/Binary.m +++ b/Items/Binary.m @@ -8,6 +8,7 @@ #import "Binary.h" #import "Consts.h" +#import "Signing.h" #import "Utilities.h" #import "AppDelegate.h" @@ -87,8 +88,8 @@ bail: //unset 'packed' flag for apple signed binaries // ->as apple doesn't pack binaries, but packer algo has some false positives - if( (nil != [self.signingInfo objectForKey:KEY_SIGNING_IS_APPLE]) && - (YES == [self.signingInfo[KEY_SIGNING_IS_APPLE] boolValue]) ) + if( (noErr == [self.signingInfo[KEY_SIGNATURE_STATUS] intValue]) && + (Apple == [self.signingInfo[KEY_SIGNATURE_SIGNER] intValue]) ) { //unset self.parser.binaryInfo[KEY_IS_PACKED] = NO; @@ -201,7 +202,7 @@ bail: -(void)generatedSigningInfo { //set signing info - self.signingInfo = extractSigningInfo(self.path); + self.signingInfo = extractSigningInfo(1, self.path, kSecCSCheckAllArchitectures | kSecCSCheckNestedCode | kSecCSDoNotValidateResources); return; } @@ -268,7 +269,7 @@ bail: prettyPrint = [NSMutableString string];//stringWithString:@"signed by:"]; //add each signing auth - for(NSString* signingAuthority in self.signingInfo[KEY_SIGNING_AUTHORITIES]) + for(NSString* signingAuthority in self.signingInfo[KEY_SIGNATURE_AUTHORITIES]) { //append [prettyPrint appendString:[NSString stringWithFormat:@"%@, ", signingAuthority]]; diff --git a/SearchWindowController.m b/SearchWindowController.m index 5fe5da9..594c6c3 100644 --- a/SearchWindowController.m +++ b/SearchWindowController.m @@ -95,14 +95,13 @@ } //init the UI -// ->each time window is shown, reset, show enumeration status, etc +// each time window is shown, reset, show enumeration status, etc -(void)initUI { //center [self.window center]; - + //table reload - // ->make sure all is reset [self.searchTable reloadData]; //reset search string @@ -139,6 +138,8 @@ //spin up thread to monitor update enumeration state [NSThread detachNewThreadSelector:@selector(updateEnumerationState) toTarget:self withObject:nil]; + + return; } @@ -234,7 +235,7 @@ if(0 == self.searchResults.count) { //set msg - self.searchResultsMessage.stringValue = @"nothing found"; + self.searchResultsMessage.stringValue = @"no items matched"; } //update status mesasge with count @@ -551,11 +552,11 @@ bail: self.searchBox.enabled = NO; //grab all tasks - // ->make copy to avoid threading issues + // make copy to avoid threading issues allTasks = [((AppDelegate*)[[NSApplication sharedApplication] delegate]).taskEnumerator.tasks copy]; //kick off filtering in background - // ->will call back into to refresh UI when done + // will call back into to refresh UI when done dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ //nap to allow message to show diff --git a/Signing.h b/Signing.h new file mode 100644 index 0000000..b4b1c79 --- /dev/null +++ b/Signing.h @@ -0,0 +1,32 @@ +// +// File: Signing.h +// Project: Proc Info +// +// Created by: Patrick Wardle +// Copyright: 2017 Objective-See +// License: Creative Commons Attribution-NonCommercial 4.0 International License +// + +#ifndef Signing_h +#define Signing_h + +#import +#import + +/* FUNCTIONS */ + +//get the signing info of a item +// pid specified: extract dynamic code signing info +// path specified: generate static code signing info +NSMutableDictionary* extractSigningInfo(pid_t pid, NSString* path, SecCSFlags flags); + +//determine who signed item +NSNumber* extractSigner(SecStaticCodeRef code, SecCSFlags flags, BOOL isDynamic); + +//validate a requirement +OSStatus validateRequirement(SecStaticCodeRef code, SecRequirementRef requirement, SecCSFlags flags, BOOL isDynamic); + +//extract (names) of signing auths +NSMutableArray* extractSigningAuths(NSDictionary* signingDetails); + +#endif diff --git a/Signing.m b/Signing.m new file mode 100644 index 0000000..62155a8 --- /dev/null +++ b/Signing.m @@ -0,0 +1,323 @@ +// +// File: Signing.m +// Project: Proc Info +// +// Created by: Patrick Wardle +// Copyright: 2017 Objective-See +// License: Creative Commons Attribution-NonCommercial 4.0 International License +// + +#import "Consts.h" +#import "Signing.h" +#import "Utilities.h" + +#import +#import + +//get the signing info of a item +// pid specified: extract dynamic code signing info +// path specified: generate static code signing info +NSMutableDictionary* extractSigningInfo(pid_t pid, NSString* path, SecCSFlags flags) +{ + //info dictionary + NSMutableDictionary* signingInfo = nil; + + //status + OSStatus status = !errSecSuccess; + + //static code ref + SecStaticCodeRef staticCode = NULL; + + //dynamic code ref + SecCodeRef dynamicCode = NULL; + + //signing details + CFDictionaryRef signingDetails = NULL; + + //signing authorities + NSMutableArray* signingAuths = nil; + + //init signing status + signingInfo = [NSMutableDictionary dictionary]; + + //dynamic code checks + // no path, dynamic check via pid + if(nil == path) + { + //generate dynamic code ref via pid + status = SecCodeCopyGuestWithAttributes(NULL, (__bridge CFDictionaryRef _Nullable)(@{(__bridge NSString *)kSecGuestAttributePid : [NSNumber numberWithInt:pid]}), kSecCSDefaultFlags, &dynamicCode); + if(errSecSuccess != status) + { + //set error + signingInfo[KEY_SIGNATURE_STATUS] = [NSNumber numberWithInt:status]; + + //bail + goto bail; + } + + //validate code + status = SecCodeCheckValidity(dynamicCode, flags, NULL); + if(errSecSuccess != status) + { + //set error + signingInfo[KEY_SIGNATURE_STATUS] = [NSNumber numberWithInt:status]; + + //bail + goto bail; + } + + //happily signed + signingInfo[KEY_SIGNATURE_STATUS] = [NSNumber numberWithInt:errSecSuccess]; + + //determine signer + // apple, app store, dev id, adhoc, etc... + signingInfo[KEY_SIGNATURE_SIGNER] = extractSigner(dynamicCode, flags, YES); + + //extract signing info + status = SecCodeCopySigningInformation(dynamicCode, kSecCSSigningInformation, &signingDetails); + if(errSecSuccess != status) + { + //bail + goto bail; + } + } + + //static code checks + else + { + //create static code ref via path + status = SecStaticCodeCreateWithPath((__bridge CFURLRef)([NSURL fileURLWithPath:path]), kSecCSDefaultFlags, &staticCode); + if(errSecSuccess != status) + { + //set error + signingInfo[KEY_SIGNATURE_STATUS] = [NSNumber numberWithInt:status]; + + //bail + goto bail; + } + + //check signature + status = SecStaticCodeCheckValidity(staticCode, flags, NULL); + if(errSecSuccess != status) + { + //set error + signingInfo[KEY_SIGNATURE_STATUS] = [NSNumber numberWithInt:status]; + + //bail + goto bail; + } + + //happily signed + signingInfo[KEY_SIGNATURE_STATUS] = [NSNumber numberWithInt:errSecSuccess]; + + //determine signer + // apple, app store, dev id, adhoc, etc... + signingInfo[KEY_SIGNATURE_SIGNER] = extractSigner(staticCode, flags, NO); + + //extract signing info + status = SecCodeCopySigningInformation(staticCode, kSecCSSigningInformation, &signingDetails); + if(errSecSuccess != status) + { + //bail + goto bail; + } + } + + //extract code signing id + if(nil != [(__bridge NSDictionary*)signingDetails objectForKey:(__bridge NSString*)kSecCodeInfoIdentifier]) + { + //extract/save + signingInfo[KEY_SIGNATURE_IDENTIFIER] = [(__bridge NSDictionary*)signingDetails objectForKey:(__bridge NSString*)kSecCodeInfoIdentifier]; + } + + //extract entitlements + if(nil != [(__bridge NSDictionary*)signingDetails objectForKey:(__bridge NSString*)kSecCodeInfoEntitlementsDict]) + { + //extract/save + signingInfo[KEY_SIGNATURE_ENTITLEMENTS] = [(__bridge NSDictionary*)signingDetails objectForKey:(__bridge NSString*)kSecCodeInfoEntitlementsDict]; + } + + //extract signing authorities + signingAuths = extractSigningAuths((__bridge NSDictionary *)(signingDetails)); + if(0 != signingAuths.count) + { + //save + signingInfo[KEY_SIGNATURE_AUTHORITIES] = signingAuths; + } + +bail: + + //free signing info + if(NULL != signingDetails) + { + //free + CFRelease(signingDetails); + + //unset + signingDetails = NULL; + } + + //free dynamic code + if(NULL != dynamicCode) + { + //free + CFRelease(dynamicCode); + + //unset + dynamicCode = NULL; + } + + //free static code + if(NULL != staticCode) + { + //free + CFRelease(staticCode); + + //unset + staticCode = NULL; + } + + return signingInfo; +} + +//determine who signed item +NSNumber* extractSigner(SecStaticCodeRef code, SecCSFlags flags, BOOL isDynamic) +{ + //result + NSNumber* signer = nil; + + //"anchor apple" + static SecRequirementRef isApple = nil; + + //"anchor apple generic" + static SecRequirementRef isDevID = nil; + + //"anchor apple generic and certificate leaf [subject.CN] = \"Apple Mac OS Application Signing\"" + static SecRequirementRef isAppStore = nil; + + //token + static dispatch_once_t onceToken = 0; + + //only once + // init requirements + dispatch_once(&onceToken, ^{ + + //init apple signing requirement + SecRequirementCreateWithString(CFSTR("anchor apple"), kSecCSDefaultFlags, &isApple); + + //init dev id signing requirement + SecRequirementCreateWithString(CFSTR("anchor apple generic"), kSecCSDefaultFlags, &isDevID); + + //init app store signing requirement + SecRequirementCreateWithString(CFSTR("anchor apple generic and certificate leaf [subject.CN] = \"Apple Mac OS Application Signing\""), kSecCSDefaultFlags, &isAppStore); + }); + + //check 1: "is apple" (proper) + if(errSecSuccess == validateRequirement(code, isApple, flags, isDynamic)) + { + //set signer to apple + signer = [NSNumber numberWithInt:Apple]; + } + + //check 2: "is app store" + // note: this is more specific than dev id, so do it first + else if(errSecSuccess == validateRequirement(code, isAppStore, flags, isDynamic)) + { + //set signer to app store + signer = [NSNumber numberWithInt:AppStore]; + } + + //check 3: "is dev id" + else if(errSecSuccess == validateRequirement(code, isDevID, flags, isDynamic)) + { + //set signer to dev id + signer = [NSNumber numberWithInt:DevID]; + } + + //otherwise + // has to be adhoc? + else + { + //set signer to ad hoc + signer = [NSNumber numberWithInt:AdHoc]; + } + + return signer; +} + +//validate a requirement +OSStatus validateRequirement(SecStaticCodeRef code, SecRequirementRef requirement, SecCSFlags flags, BOOL isDynamic) +{ + //result + OSStatus result = -1; + + //dynamic check? + if(YES == isDynamic) + { + //validate dynamically + result = SecCodeCheckValidity((SecCodeRef)code, flags, requirement); + } + //static check + else + { + //validate statically + result = SecStaticCodeCheckValidity(code, flags, requirement); + } + + return result; +} + +//extract (names) of signing auths +NSMutableArray* extractSigningAuths(NSDictionary* signingDetails) +{ + //signing auths + NSMutableArray* authorities = nil; + + //cert chain + NSArray* certificateChain = nil; + + //index + NSUInteger index = 0; + + //cert + SecCertificateRef certificate = NULL; + + //common name on chert + CFStringRef commonName = NULL; + + //init array for certificate names + authorities = [NSMutableArray array]; + + //get cert chain + certificateChain = [signingDetails objectForKey:(__bridge NSString*)kSecCodeInfoCertificates]; + if(0 == certificateChain.count) + { + //no certs + goto bail; + } + + //extract/save name of all certs + for(index = 0; index < certificateChain.count; index++) + { + //reset + commonName = NULL; + + //extract cert + certificate = (__bridge SecCertificateRef)([certificateChain objectAtIndex:index]); + + //get common name + if( (errSecSuccess == SecCertificateCopyCommonName(certificate, &commonName)) && + (NULL != commonName) ) + { + //save + [authorities addObject:(__bridge id _Nonnull)(commonName)]; + + //release + CFRelease(commonName); + } + } + +bail: + + return authorities; +} diff --git a/Task.m b/Task.m index f323754..4540617 100644 --- a/Task.m +++ b/Task.m @@ -268,6 +268,23 @@ bail: //alloc array for new dylibs newDylibs = [NSMutableArray array]; + //on mojave + // skip launchd (apple bug) + if( (1 == self.pid.integerValue) && + (getVersion(gestaltSystemVersionMinor) >= OS_MINOR_VERSION_MOJAVE) ) + { + //skip + return; + } + + //skip window server + // hangs the UI otherwise! + if(YES == [self.binary.path isEqualToString:WINDOW_SERVER]) + { + //skip + return; + } + //alloc XPC connection xpcConnection = [[NSXPCConnection alloc] initWithServiceName:@"com.objective-see.remoteTaskService"]; @@ -419,7 +436,7 @@ bail: //wait dispatch_semaphore_wait(waitSema, DISPATCH_TIME_FOREVER); } - + return; } diff --git a/TaskEnumerator.m b/TaskEnumerator.m index ef14dad..836eb93 100644 --- a/TaskEnumerator.m +++ b/TaskEnumerator.m @@ -6,20 +6,19 @@ // // +#import +#import +#import #import #import #import "Task.h" #import "Consts.h" -#import "AppDelegate.h" +#import "Signing.h" #import "Utilities.h" -#import "TaskEnumerator.h" #import "Connection.h" - -#import -#import -#import - +#import "AppDelegate.h" +#import "TaskEnumerator.h" @implementation TaskEnumerator @@ -81,7 +80,7 @@ newTasks = [self getAllTasks]; //build ancestries - // ->do here, and use 'new tasks' since there might be new parents too + // do here, and use 'new tasks' since there might be new parents too [self generateAncestries:newTasks]; //get all tasks that are pau @@ -91,12 +90,16 @@ // ->invoke custom method to handle kids too... for(NSNumber* key in deadTasks) { - //remove - [self removeTask:self.tasks[key]]; + //sync to remove + @synchronized(self.tasks) + { + //sync + [self removeTask:self.tasks[key]]; + } } //add all tasks that are really new to 'tasks' iVar - // ->ensures existing task and their info are reused + // ensures existing task and their info are re-used for(NSNumber* key in newTasks.allKeys) { //get task @@ -143,8 +146,8 @@ }); - //now generate signing info/encryption check/packer check - // ->for (new) tasks + //for new tasks + // now generate signing info/encryption check/packer check for(NSNumber* key in newTasks) { //get task @@ -158,10 +161,14 @@ continue; } - //generate signing info - // ->do this before macho parsing! - [newTask.binary generatedSigningInfo]; - + //generate signing info dynamically + newTask.binary.signingInfo = extractSigningInfo(newTask.pid.intValue, nil, kSecCSDefaultFlags); + if(nil == newTask.binary.signingInfo) + { + //extract signing info statically + newTask.binary.signingInfo = extractSigningInfo(0, newTask.binary.path, kSecCSCheckAllArchitectures | kSecCSCheckNestedCode | kSecCSDoNotValidateResources); + } + //parse if(YES == [newTask.binary parse]) { @@ -183,7 +190,7 @@ /* begin enumeration of dylibs/files/network connections - ->this is for global search, as otherwise, each is re-gen'd per task on each bottom-pane click + ...this is for global search, as otherwise, each is re-gen'd per task on each bottom-pane click */ //set state @@ -764,8 +771,8 @@ bail: if(YES == isDylib) { //sync - @synchronized(task.dylibs) - { + //@synchronized(task.dylibs) + //{ //check if dylib is loaded in task for(Binary* taskDylib in task.dylibs) { @@ -780,7 +787,7 @@ bail: } } - }//sync + //}//sync }//dylibs @@ -788,8 +795,8 @@ bail: else if(YES == isFile) { //sync - @synchronized(task.files) - { + //@synchronized(task.files) + //{ //check if file is loaded in task for(File* taskFile in task.files) { @@ -803,7 +810,7 @@ bail: break; } } - }//sync + //}//sync }//files @@ -811,8 +818,8 @@ bail: else if(YES == isConnection) { //sync - @synchronized(task.connections) - { + //@synchronized(task.connections) + //{ //check if connection is 'in' task for(Connection* taskConnection in task.connections) { @@ -827,9 +834,11 @@ bail: break; } } - }//sync + //}//sync }//connections + + }//all tasks diff --git a/TaskExplorer-Info.plist b/TaskExplorer-Info.plist index 7aa249c..30df5da 100755 --- a/TaskExplorer-Info.plist +++ b/TaskExplorer-Info.plist @@ -17,15 +17,15 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.6.0 + 1.7.0 CFBundleSignature ???? CFBundleVersion - 1.6.0 + 1.7.0 LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSHumanReadableCopyright - Copyright © 2017 Objective-See, LLC. All rights reserved. + Copyright © 2018 Objective-See, LLC. All rights reserved. NSMainNibFile MainMenu NSPrincipalClass diff --git a/TaskExplorer.xcodeproj/project.pbxproj b/TaskExplorer.xcodeproj/project.pbxproj index b1f2030..b5991b8 100755 --- a/TaskExplorer.xcodeproj/project.pbxproj +++ b/TaskExplorer.xcodeproj/project.pbxproj @@ -32,6 +32,7 @@ CD1508D921BA4B9D0081F1AF /* UpdateWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1508D521BA4B9C0081F1AF /* UpdateWindowController.m */; }; CD1508DA21BA4B9D0081F1AF /* Update.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1508D821BA4B9D0081F1AF /* Update.m */; }; CD1508DC21BA4BAC0081F1AF /* UpdateWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD1508DB21BA4BAC0081F1AF /* UpdateWindow.xib */; }; + CD1508DF21BB13990081F1AF /* Signing.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1508DD21BB13980081F1AF /* Signing.m */; }; CD1D14EF21B7A67600FF7F4B /* Sentry.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = CD1D14EB21B7A5DB00FF7F4B /* Sentry.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; CD1D14F121B7A69300FF7F4B /* Sentry.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = CD1D14EB21B7A5DB00FF7F4B /* Sentry.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; CD1D14F321B8F2FC00FF7F4B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CD1D14F221B8F2FC00FF7F4B /* Assets.xcassets */; }; @@ -217,6 +218,8 @@ CD1508D721BA4B9D0081F1AF /* UpdateWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UpdateWindowController.h; sourceTree = SOURCE_ROOT; }; CD1508D821BA4B9D0081F1AF /* Update.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Update.m; sourceTree = SOURCE_ROOT; }; CD1508DB21BA4BAC0081F1AF /* UpdateWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = UpdateWindow.xib; path = UI/UpdateWindow.xib; sourceTree = ""; }; + CD1508DD21BB13980081F1AF /* Signing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Signing.m; sourceTree = SOURCE_ROOT; }; + CD1508DE21BB13980081F1AF /* Signing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Signing.h; sourceTree = SOURCE_ROOT; }; CD1D14EB21B7A5DB00FF7F4B /* Sentry.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sentry.framework; path = Carthage/Build/Mac/Sentry.framework; sourceTree = ""; }; CD1D14F221B8F2FC00FF7F4B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = SOURCE_ROOT; }; CD3F4CE61AF5CF68002A2647 /* TaskEnumerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TaskEnumerator.m; sourceTree = SOURCE_ROOT; }; @@ -440,13 +443,15 @@ 1D21BC54172AF43D009D1CFD /* TaskExplorer */ = { isa = PBXGroup; children = ( + CD1508DE21BB13980081F1AF /* Signing.h */, + CD1508DD21BB13980081F1AF /* Signing.m */, CD1D14F221B8F2FC00FF7F4B /* Assets.xcassets */, - CD3F4CE61AF5CF68002A2647 /* TaskEnumerator.m */, CD1508D621BA4B9C0081F1AF /* Update.h */, CD1508D821BA4B9D0081F1AF /* Update.m */, CD1508D721BA4B9D0081F1AF /* UpdateWindowController.h */, CD1508D521BA4B9C0081F1AF /* UpdateWindowController.m */, CD3F4CE71AF5CF68002A2647 /* TaskEnumerator.h */, + CD3F4CE61AF5CF68002A2647 /* TaskEnumerator.m */, CDD248391AF5CC4D00232422 /* Task.h */, CDD2483A1AF5CC4D00232422 /* Task.m */, CDF08CC71AC4C678009B3423 /* PrefsWindowController.h */, @@ -870,6 +875,7 @@ CDA81D531A95B492009790E2 /* Utilities.m in Sources */, CD7B9FAB1AD08FA100DF3C71 /* KKRow.m in Sources */, CD3F4CFD1AF71B58002A2647 /* ItemBase.m in Sources */, + CD1508DF21BB13990081F1AF /* Signing.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/TaskExplorer.xcodeproj/project.xcworkspace/xcuserdata/patrick.xcuserdatad/UserInterfaceState.xcuserstate b/TaskExplorer.xcodeproj/project.xcworkspace/xcuserdata/patrick.xcuserdatad/UserInterfaceState.xcuserstate index 793d3ed..7f13ea2 100644 Binary files a/TaskExplorer.xcodeproj/project.xcworkspace/xcuserdata/patrick.xcuserdatad/UserInterfaceState.xcuserstate and b/TaskExplorer.xcodeproj/project.xcworkspace/xcuserdata/patrick.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/TaskExplorer.xcodeproj/xcuserdata/patrick.xcuserdatad/xcschemes/TaskExplorer.xcscheme b/TaskExplorer.xcodeproj/xcuserdata/patrick.xcuserdatad/xcschemes/TaskExplorer.xcscheme index 8389691..c177434 100644 --- a/TaskExplorer.xcodeproj/xcuserdata/patrick.xcuserdatad/xcschemes/TaskExplorer.xcscheme +++ b/TaskExplorer.xcodeproj/xcuserdata/patrick.xcuserdatad/xcschemes/TaskExplorer.xcscheme @@ -30,7 +30,7 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" debugAsWhichUser = "root" - launchStyle = "0" + launchStyle = "1" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" diff --git a/TaskTableController.m b/TaskTableController.m index 09a9ffb..a2b782d 100644 --- a/TaskTableController.m +++ b/TaskTableController.m @@ -870,11 +870,14 @@ bail: //end updates [self.itemView endUpdates]; + + //reload bottom pane + [((AppDelegate*)[[NSApplication sharedApplication] delegate]) selectBottomPaneContent:nil]; + }); //bail goto bail; - } //ignore if row selection and task didn't change diff --git a/UI/SearchWindow.xib b/UI/SearchWindow.xib index 485b1b3..545d148 100644 --- a/UI/SearchWindow.xib +++ b/UI/SearchWindow.xib @@ -1,9 +1,8 @@ - + - - + @@ -11,15 +10,15 @@ - + - + @@ -85,7 +84,7 @@