v1.1.0 commit

finalized a global search window (tasks, dylibs, files)
 finalized a flagged items window for any flagged tasks or dylibs
 finalized XPC-helper's security improved by allowing only Objective-See binary to connect
 several UI fixes/improvements
This commit is contained in:
Patrick Wardle
2015-08-23 21:46:34 -10:00
parent 8790a0fd59
commit aea2ce3b40
32 changed files with 516 additions and 400 deletions
+10 -4
View File
@@ -32,6 +32,9 @@
}
//start time
@property NSTimeInterval startTime;
//connection flag
@property BOOL isConnected;
@@ -80,7 +83,7 @@
@property (weak) IBOutlet NSButton *logoButton;
@property (weak) IBOutlet NSButton *showPreferencesButton;
//@property (weak) IBOutlet NSButton *showPreferencesButton;
//spinner
@property (weak) IBOutlet NSProgressIndicator *progressIndicator;
@@ -127,11 +130,14 @@
//'no items' found label for bottom pane
@property (weak) IBOutlet NSTextField *noItemsLabel;
//refresh button
@property (weak) IBOutlet NSButton *refreshButton;
//search button
@property (weak) IBOutlet NSButton *searchButton;
//refresh button
@property (weak) IBOutlet NSButton *refreshButton;
//save button
@property (weak) IBOutlet NSButton *saveButton;
//flagged items button
@property (weak) IBOutlet NSButton *flaggedButton;
@@ -182,7 +188,7 @@
//-(void)applyPreferences;
//button handler for when settings icon (gear) is clicked
-(IBAction)showPreferences:(id)sender;
//-(IBAction)showPreferences:(id)sender;
//button handler for logo
-(IBAction)logoButtonHandler:(id)sender;
+41 -54
View File
@@ -16,13 +16,9 @@
#import "Task.h"
//TODO: path truncated in 'info' window (1password mini) - but weird when selected :/
// resize text manually? http://stackoverflow.com/questions/6519995/modifying-an-nstextfields-font-size-according-to-content-length
//TODO: filter out dup'd networks (airportd 0:0..) -not sure want to do this
//TODO: 'flagged' items button?
//TODO: add 'am i on main thread' guard and test
//TODO: filter dylibs, no first responder!
//TODO: autolayout vertically
//TODO: filter VT results
@@ -31,24 +27,24 @@
// see: https://mail.google.com/mail/u/0/#inbox/14eeb163d4dd2852
//TODO: show 'from where' via quarantine attrz
//TODO: show user (after pid): -> (pid, user)?
//TODO: when filtering, and then refresh, doesn't go to row #0 :/
//TODO: check if VT can be reached! if not, error? or don't show '0 VT results detected' etc...
//TODO: JavaW (iWorm) dylibs...
//TODO: remove task, remove from taskEnum's global list for executables, and dylibs, etc
//TODO: also refresh!....
@implementation AppDelegate
@synthesize filterObj;
@synthesize startTime;
@synthesize vtThreads;
@synthesize saveButton;
@synthesize isConnected;
@synthesize virusTotalObj;
@synthesize taskTableController;
@synthesize aboutWindowController;
@synthesize prefsWindowController;
@synthesize showPreferencesButton;
@synthesize resultsWindowController;
@synthesize bottomPane;
@synthesize bottomViewController;
@@ -89,10 +85,9 @@
// ->main entry point
-(void)applicationDidFinishLaunching:(NSNotification *)notification
{
//TODO: re-enable for release!
//first thing...
// ->install exception handlers!
//installExceptionHandlers();
installExceptionHandlers();
//init virus total object
virusTotalObj = [[VirusTotal alloc] init];
@@ -103,6 +98,12 @@
//alloc flagged items
flaggedItems = [NSMutableArray array];
//set start time
self.startTime = [NSDate timeIntervalSinceReferenceDate];
//center
[self.window center];
//no need to have a first responder
[self.window makeFirstResponder:nil];
@@ -328,9 +329,8 @@ bail:
// ->waits until window is non-nil
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
//TODO: re-enable
//make modal
//makeModal(self.requestRootWindowController);
makeModal(self.requestRootWindowController);
});
@@ -748,14 +748,6 @@ bail:
//add tracking area to pref button
[self.refreshButton addTrackingArea:trackingArea];
//init tracking area
// ->for preference button
trackingArea = [[NSTrackingArea alloc] initWithRect:[self.showPreferencesButton bounds] options:(NSTrackingInVisibleRect|NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways) owner:self userInfo:@{@"tag":[NSNumber numberWithUnsignedInteger:self.showPreferencesButton.tag]}];
//add tracking area to pref button
[self.showPreferencesButton addTrackingArea:trackingArea];
//init tracking area
// ->for search button
@@ -764,6 +756,13 @@ bail:
//add tracking area to search button
[self.searchButton addTrackingArea:trackingArea];
//init tracking area
// ->for save button
trackingArea = [[NSTrackingArea alloc] initWithRect:[self.saveButton bounds] options:(NSTrackingInVisibleRect|NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways) owner:self userInfo:@{@"tag":[NSNumber numberWithUnsignedInteger:self.saveButton.tag]}];
//add tracking area to search button
[self.saveButton addTrackingArea:trackingArea];
//init tracking area
// ->for logo button
trackingArea = [[NSTrackingArea alloc] initWithRect:[self.logoButton bounds] options:(NSTrackingInVisibleRect|NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways) owner:self userInfo:@{@"tag":[NSNumber numberWithUnsignedInteger:self.logoButton.tag]}];
@@ -781,26 +780,6 @@ bail:
return;
}
//TODO: don't need, and scannerThread can be removed!! and progressIndicator too!
//automatically invoked when window is un-minimized
// since the progress indicator is stopped (bug?), restart it
-(void)windowDidDeminiaturize:(NSNotification *)notification
{
//make sure scan is going on
// ->and then restart spinner
if(YES == [self.scannerThread isExecuting])
{
//show
[self.progressIndicator setHidden:NO];
//start spinner
[self.progressIndicator startAnimation:nil];
}
return;
}
//automatically invoked when user clicks logo
// ->load objective-see's html page
-(IBAction)logoButtonHandler:(id)sender
@@ -1145,7 +1124,6 @@ bail:
bail:
return;
}
//automatically invoked when user clicks 'search' button
@@ -1165,17 +1143,6 @@ bail:
//show it
[self.searchWindowController showWindow:self];
/*
//invoke function in background that will make window modal
// ->waits until window is non-nil
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
//make modal
//makeModal(self.searchWindowController);
});
*/
return;
}
@@ -1201,6 +1168,7 @@ bail:
return;
}
/*
//automatically invoked when user clicks gear icon
// ->show preferences
@@ -1227,7 +1195,10 @@ bail:
return;
}
*/
/*
//automatically invoked when menu is clicked
// ->tell menu to disable 'Preferences' when scan is running
-(BOOL)validateMenuItem:(NSMenuItem *)item
@@ -1238,19 +1209,20 @@ bail:
//check if item is 'Preferences'
if(PREF_MENU_ITEM_TAG == item.tag)
{
/*
//unset enabled flag if scan is running
if(YES != [[self.scanButtonLabel stringValue] isEqualToString:START_SCAN])
{
//disable
bEnabled = NO;
}
*/
}
return bEnabled;
}
*/
//automatically invoked when user clicks on Flat/Tree view
// ->invoke helper function to change view
@@ -1641,6 +1613,10 @@ bail:
//scroll to top
[self.taskTableController scrollToTop];
//reload
// ->ensure that top row/task is correctly selected
//[self.taskTableController.itemView reloadData];
//select top row
[self.taskTableController.itemView selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
@@ -1714,6 +1690,14 @@ bail:
// ->also set text flagged items button label to red
-(void)saveFlaggedBinary:(Binary*)binary
{
//first check if item is already flagged
if(YES == [self.flaggedItems containsObject:binary])
{
//no need to add
// ->so bail
goto bail;
}
//sync to save
@synchronized(self.flaggedItems)
{
@@ -1729,6 +1713,9 @@ bail:
self.flaggedLabel.textColor = [NSColor redColor];
}
//bail
bail:
return;
}
+5 -1
View File
@@ -305,10 +305,14 @@
//sort by name
#define SORT_BY_NAME 0x1
//delta for pid tag
#define PID_TAG_DELTA 1000
//search wait time (from app's launch)
#define SEARCH_WAIT_TIME 30
//pls wait (search) message
#define PLS_WAIT_MESSAGE @"completing (intial) task/dylib/file enumeration please wait"
-2
View File
@@ -61,8 +61,6 @@ void showAlert()
return;
}
//exception handler
// will be invoked for Obj-C exceptions
void exceptionHandler(NSException *exception)
+41 -11
View File
@@ -25,14 +25,14 @@
@synthesize infoWindowController;
//automatically called when nib is loaded
// ->center window
// ->first time (when outlets aren't nil), init UI
-(void)awakeFromNib
{
//single time init
if(YES != self.didInit)
{
//center
[self.window center];
//init UI
[self initUI];
//set flag
self.didInit = YES;
@@ -51,9 +51,17 @@
//init array for flagged items
flaggedItems = [NSMutableArray array];
//table reload w/ blank array
// ->make sure all is reset
[self.flaggedItemTable reloadData];
//first time outlets are nil
// ->thus 'initUI' method called in 'awakeFromNib'
if(nil != self.window)
{
//can init UI
// ->center window, etc
[self initUI];
//set flag
self.didInit = YES;
}
//populate flagged items array
for(Binary* flaggedItem in ((AppDelegate*)[[NSApplication sharedApplication] delegate]).flaggedItems)
@@ -65,16 +73,23 @@
//get all tasks instances
flaggedTasks = [((AppDelegate*)[[NSApplication sharedApplication] delegate]).taskEnumerator tasksForBinary:flaggedItem];
//save all tasks
[self.flaggedItems addObjectsFromArray:flaggedTasks];
//sync to save
@synchronized(self.flaggedItems)
{
//save all tasks
[self.flaggedItems addObjectsFromArray:flaggedTasks];
}
}
//when binary is dylib
// ->just add, since will be processed as single item
else
{
//add
[self.flaggedItems addObject:flaggedItem];
//sync to save
@synchronized(self.flaggedItems)
{
//add
[self.flaggedItems addObject:flaggedItem];
}
}
}
@@ -85,6 +100,21 @@
}
//init the UI
// ->each time window is shown, reset, show spinner if needed, etc
-(void)initUI
{
//center
[self.window center];
//table reload
// ->make sure all is reset
[self.flaggedItemTable reloadData];
return;
}
//table delegate
// ->return number of rows, which is just number of items in the currently selected plugin
-(NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
+1 -1
View File
@@ -3,7 +3,7 @@
// TaskExplorer
//
// Created by Patrick Wardle on 5/23/15.
// Copyright (c) 2015 Lucas Derraugh. All rights reserved.
// Copyright (c) 2015 Objective-See, LLC. All rights reserved.
//
#import "File.h"
+39 -8
View File
@@ -3,7 +3,7 @@
// TaskExplorer
//
// Created by Patrick Wardle on 5/23/15.
// Copyright (c) 2015 Lucas Derraugh. All rights reserved.
// Copyright (c) 2015 Objective-See, LLC. All rights reserved.
//
#import "Consts.h"
@@ -38,7 +38,7 @@ NSTableCellView* createItemView(NSTableView* tableView, id owner, id item)
//handle logic for search results
// ->dylibs and files have the special global 'loaded in' views
else if( (YES == [owner isKindOfClass:[SearchWindowController class]]) &&
( (YES == [item isKindOfClass:[Binary class]]) || (YES == [item isKindOfClass:[File class]]) ) )
( (YES == [item isKindOfClass:[Binary class]]) || (YES == [item isKindOfClass:[File class]]) ) )
{
//create & config view
itemCell = createLoadedItemView(tableView, owner, item);
@@ -163,12 +163,25 @@ NSTableCellView* createLoadedItemView(NSTableView* tableView, id owner, id item)
CGRect nameFrame = {0};
//get host tasks
// TODO: make this work for files too!
// ->works with dylibs or files
//TODO: make work w/ network connections
tasks = [((AppDelegate*)[[NSApplication sharedApplication] delegate]).taskEnumerator loadedIn:item];
//start 'loaded in: ...' str
loadedIn = [NSMutableString stringWithFormat:@"(loaded in:"];
//add dylib indicator
//-> '(dylib, loaded in: ... '
if(YES == [item isKindOfClass:[Binary class]])
{
//init
loadedIn = [NSMutableString stringWithFormat:@"(dylib, loaded in:"];
}
//add file indicator
//-> '(file, loaded in: ... '
else if(YES == [item isKindOfClass:[File class]])
{
//init
loadedIn = [NSMutableString stringWithFormat:@"(file, loaded in:"];
}
//add all tasks
for(Task* task in tasks)
{
@@ -289,6 +302,9 @@ NSTableCellView* createTaskView(NSTableView* tableView, id owner, Task* task)
//task's name frame
CGRect nameFrame = {0};
//string for pid
NSString* pidString = nil;
//sanity check
if(nil == task.binary)
{
@@ -349,9 +365,24 @@ NSTableCellView* createTaskView(NSTableView* tableView, id owner, Task* task)
// ->should now be exact size of text
taskCell.textField.frame = nameFrame;
//init pid string
// ->search mode, show 'task,' to differential between files, etc
if(YES ==[owner isKindOfClass:[SearchWindowController class]])
{
//init
pidString = [NSString stringWithFormat:@"(task: %@)", task.pid];
}
//otherwise
// ->just set pid
else
{
//init
pidString = [NSString stringWithFormat:@"(%@)", task.pid];
}
//set pid
// ->immediately follows name
[((NSTextField*)[taskCell viewWithTag:TABLE_ROW_PID_LABEL]) setStringValue:[NSString stringWithFormat:@"(%@)", task.pid]];
[((NSTextField*)[taskCell viewWithTag:TABLE_ROW_PID_LABEL]) setStringValue:pidString];
//set path
[[taskCell viewWithTag:TABLE_ROW_SUB_TEXT_TAG] setStringValue:task.binary.path];
+1 -1
View File
@@ -29,7 +29,7 @@
if(YES != [[NSFileManager defaultManager] fileExistsAtPath:params[KEY_RESULT_PATH]])
{
//err msg
syslog(LOG_ERR, "OBJECTIVE-SEE ERROR: %s not found", [params[KEY_RESULT_PATH] UTF8String]);
//syslog(LOG_ERR, "OBJECTIVE-SEE ERROR: %s not found", [params[KEY_RESULT_PATH] UTF8String]);
//set self to nil
self = nil;
+1 -1
View File
@@ -3,7 +3,7 @@
// KnockKnock
//
// Created by Patrick Wardle on 7/11/15.
// Copyright (c) 2015 Lucas Derraugh. All rights reserved.
// Copyright (c) 2015 Objective-See, LLC. All rights reserved.
//
#import <Cocoa/Cocoa.h>
+2 -1
View File
@@ -154,8 +154,9 @@
//2nd arg: permissions
// ->4 at front is setuid
//TODO: CHANGE B4 RELEASE!!
//TODO: make 4755 before deploy (for testing, 777 makes XCOde be able to del it during build!)
installArgs[1] = "4777";
installArgs[1] = "4755";
//3rd arg: XPC service
installArgs[2] = [xpcService UTF8String];
+7 -13
View File
@@ -46,21 +46,15 @@
@property (nonatomic, retain)VTInfoWindowController* vtWindowController;
//info window controller
@property(retain, nonatomic)InfoWindowController* infoWindowController;
@property(nonatomic, retain)InfoWindowController* infoWindowController;
//'pls wait' label
@property(nonatomic, retain)NSString* plsWaitMessage;
//overlay view
@property (weak) IBOutlet NSView *overlayView;
//TODO: remove!
//tasks
@property(nonatomic, retain)NSMutableDictionary* tasks;
//dylibs
@property(nonatomic, retain)NSMutableDictionary* dylibs;
//files
@property(nonatomic, retain)NSMutableDictionary* files;
//connections
@property(nonatomic, retain)NSMutableDictionary* connections;
/* METHODS */
+130 -147
View File
@@ -16,31 +16,29 @@
#import "KKRow.h"
#import "Filter.h"
#import "Utilities.h"
#import "Consts.h"
@implementation SearchWindowController
@synthesize tasks;
@synthesize dylibs;
@synthesize files;
@synthesize connections;
@synthesize didInit;
@synthesize searchTable;
@synthesize filterObj;
@synthesize searchResults;
@synthesize searchBox;
@synthesize overlayView;
@synthesize searchTable;
@synthesize searchResults;
@synthesize plsWaitMessage;
@synthesize vtWindowController;
@synthesize infoWindowController;
/*
//automatically called when nib is loaded
// ->center window
// ->first time (when outlets aren't nil), init UI
-(void)awakeFromNib
{
//single time init
if(YES != self.didInit)
{
//TODO: Flaggged Item window, use same logic!
//init UI
[self initUI];
@@ -50,42 +48,6 @@
return;
}
*/
//TODO: center window each time?
/*
//automatically invoked when window is loaded
// ->set to white
-(void)windowDidLoad
{
//super
//[super windowDidLoad];
//TODO: reset searchResults when user clears search box~!
//init search data
// ->loads all current tasks, dylibs, files, network conns
//[self initSearchData];
//TODO: disable search box till done generating search dicts?
return;
}
*/
//TODO: delete/remove
//automatically invoked when window is closing
// ->make ourselves unmodal
-(void)windowWillClose:(NSNotification *)notification
{
//make un-modal
//[[NSApplication sharedApplication] stopModal];
return;
}
//init/prepare
// ->make sure everything is cleanly init'd before displaying
@@ -103,6 +65,38 @@
{
//can init UI
[self initUI];
//set flag
self.didInit = YES;
}
return;
}
//automatically invoked when window is un-minimized
// since the progress indicator is stopped/hidden (bug?), restart it
-(void)windowDidDeminiaturize:(NSNotification *)notification
{
//current time
NSTimeInterval currentTime = 0.0f;
//grab current time
currentTime = [NSDate timeIntervalSinceReferenceDate];
//make sure search is still waiting...
// ->and then restart spinner
if((currentTime - ((AppDelegate*)[[NSApplication sharedApplication] delegate]).startTime) < SEARCH_WAIT_TIME)
{
//update UI on main thread
dispatch_async(dispatch_get_main_queue(), ^{
//show
self.activityIndicator.hidden = NO;
//start spinner
[self.activityIndicator startAnimation:nil];
});
}
return;
@@ -112,6 +106,12 @@
// ->each time window is shown, reset, show spinner if needed, etc
-(void)initUI
{
//current time
NSTimeInterval currentTime = 0.0f;
//time left
NSTimeInterval timeRemaining = 0.0f;
//center
[self.window center];
@@ -122,9 +122,40 @@
//reset search string
[self.searchBox setStringValue:@""];
//show activity indicator while tasks are still being enumerated
if(YES == ((AppDelegate*)[[NSApplication sharedApplication] delegate]).taskEnumerator.isEnumerating)
//grab current time
currentTime = [NSDate timeIntervalSinceReferenceDate];
//check if search timeout has been hit
// ->when this occur, no need to show activity indicator, etc
if((currentTime - ((AppDelegate*)[[NSApplication sharedApplication] delegate]).startTime) > SEARCH_WAIT_TIME)
{
//make search box first responder
[self.window makeFirstResponder:self.searchBox];
}
//show activity indicator while tasks are still being enumerated
else
{
//calc time remaining
timeRemaining = SEARCH_WAIT_TIME - (currentTime - ((AppDelegate*)[[NSApplication sharedApplication] delegate]).startTime);
//pre-req
[self.overlayView setWantsLayer:YES];
//rounded corners
self.overlayView.layer.cornerRadius = 20.0;
//maks
self.overlayView.layer.masksToBounds = YES;
//set overlay's view color to black
self.overlayView.layer.backgroundColor = [NSColor blackColor].CGColor;
//make it semi-transparent
self.overlayView.alphaValue = 0.20;
//show overlay
self.overlayView.hidden = NO;
//disable search box
self.searchBox.enabled = NO;
@@ -137,18 +168,13 @@
//start spinner
[self.activityIndicator startAnimation:nil];
//update w/ time
self.activityIndicatorLabel.stringValue = [NSString stringWithFormat:@"%@ (%d)", PLS_WAIT_MESSAGE, (int)timeRemaining];
//spin up thread to watch/wait until task enumeration is pau
[NSThread detachNewThreadSelector:@selector(waitTillPau) toTarget:self withObject:nil];
}
//can search right now!
else
{
//make search box first responder
[self.window makeFirstResponder:self.searchBox];
}
return;
}
@@ -156,104 +182,54 @@
// ->wait until task enumeration is done, then allow user to search
-(void)waitTillPau
{
//time left
NSTimeInterval timeRemaining = 0.0f;
//calc time remaining
timeRemaining = SEARCH_WAIT_TIME - ([NSDate timeIntervalSinceReferenceDate] - ((AppDelegate*)[[NSApplication sharedApplication] delegate]).startTime);
//nap/check/etc
while(YES == ((AppDelegate*)[[NSApplication sharedApplication] delegate]).taskEnumerator.isEnumerating)
while(timeRemaining > 0.0f)
{
//nap
[NSThread sleepForTimeInterval:1.0f];
}
//ughh, don't know exactly how long q-processing will take
// ->so just nap a little longer
[NSThread sleepForTimeInterval:15.0f];
//yay all done
// ->hide activity indicator
self.activityIndicator.hidden = YES;
//hide activity indicator label
self.activityIndicatorLabel.hidden = YES;
//enable search box
self.searchBox.enabled = YES;
//make search box first responder
[self.window makeFirstResponder:self.searchBox];
return;
}
/*
//init search data
// ->load all tasks/dylibs/files/connections into dictionaries for easy/quick searching
-(void)initSearchData:(NSString*)searchString
{
//alloc task dictionary
tasks = ((AppDelegate*)[[NSApplication sharedApplication] delegate]).taskEnumerator.tasks;
//alloc dylibs dictionary
dylibs = [NSMutableDictionary dictionary];
//alloc files dictionary
files = [NSMutableDictionary dictionary];
//alloc connections dictionary
connections = [NSMutableDictionary dictionary];
/*
//'#' indicates a keyword search
// ->check for keyword match, then filter by keyword
if(YES == [search.string hasPrefix:@"#"])
{
//ignore #search strings that don't match a keyword
if(YES != [filterObj isKeyword:search.string])
{
//ignore
goto bail;
}
}
//filter
[self.filterObj filterTasks:search.string items:self.taskEnumerator.tasks results:self.taskTableController.filteredItems];
*/
//process each
// ->add files, tasks, network connections
/*
for(NSNumber* taskPid in tasks)
{
//extract task
task = tasks[taskPid];
//
//calc time remaining
timeRemaining = SEARCH_WAIT_TIME - ([NSDate timeIntervalSinceReferenceDate] - ((AppDelegate*)[[NSApplication sharedApplication] delegate]).startTime);
}
*/
/*
return;
}
*/
/*
-(void)search:(NSString*)searchString
{
//filter object
Filter* filterObj = nil;
//task
Task* task = nil;
//init filter obj
filterObj = [[Filter alloc] init];
return;
}
*/
//update UI on main thread
dispatch_async(dispatch_get_main_queue(), ^{
//update w/ time
self.activityIndicatorLabel.stringValue = [NSString stringWithFormat:@"%@ (%d)", PLS_WAIT_MESSAGE, (int)timeRemaining];
});
}
//update UI on main thread
dispatch_async(dispatch_get_main_queue(), ^{
//hide overlay
self.overlayView.hidden = YES;
//yay all done
// ->hide activity indicator
self.activityIndicator.hidden = YES;
//hide activity indicator label
self.activityIndicatorLabel.hidden = YES;
//enable search box
self.searchBox.enabled = YES;
//make search box first responder
[self.window makeFirstResponder:self.searchBox];
});
return;
}
//table delegate
// ->return number of rows
@@ -399,10 +375,17 @@ bail:
goto bail;
}
}
//1st: search for all matching tasks
//sync
@synchronized(allTasks)
{
//search for all matching tasks
[self.filterObj filterTasks:searchString items:allTasks results:matchingTasks];
}//sync
//add all tasks
[self.searchResults addObjectsFromArray:matchingTasks];
+1 -1
View File
@@ -3,7 +3,7 @@
// TaskExplorer
//
// Created by Patrick Wardle on 5/2/15.
// Copyright (c) 2015 Lucas Derraugh. All rights reserved.
// Copyright (c) 2015 Objective-See, LLC. All rights reserved.
//
#import "Binary.h"
+44 -48
View File
@@ -3,7 +3,7 @@
// TaskExplorer
//
// Created by Patrick Wardle on 5/2/15.
// Copyright (c) 2015 Lucas Derraugh. All rights reserved.
// Copyright (c) 2015 Objective-See, LLC. All rights reserved.
//
#import "Task.h"
@@ -317,17 +317,17 @@ bail:
//alloc array for new dylibs
newDylibs = [NSMutableArray array];
//sync
@synchronized(self.dylibs)
{
//reset existing dylibs
[self.dylibs removeAllObjects];
}
//invoke XPC service (running as r00t)
// ->will enumerate dylibs, then invoke reply block to save into iVar
[[xpcConnection remoteObjectProxy] enumerateDylibs:self.pid withReply:^(NSMutableArray* dylibPaths) {
//sync
@synchronized(self.dylibs)
{
//reset existing dylibs
[self.dylibs removeAllObjects];
//add all dylibs
for(NSString* dylibPath in dylibPaths)
{
@@ -381,30 +381,24 @@ bail:
}
}
//sync
@synchronized(self.dylibs)
{
//add to task's dylibs
[self.dylibs addObject:dylib];
}
//add to task's dylibs
[self.dylibs addObject:dylib];
} //all dylibs
//sync to sort
@synchronized(self.dylibs)
//sort by name
self.dylibs = [[self.dylibs sortedArrayUsingComparator:^NSComparisonResult(id a, id b)
{
//sort by name
self.dylibs = [[self.dylibs sortedArrayUsingComparator:^NSComparisonResult(id a, id b)
{
//sort
return [[(Binary*)a name] compare:[(Binary*)b name] options:NSCaseInsensitiveSearch];
}] mutableCopy];
}
//sort
return [[(Binary*)a name] compare:[(Binary*)b name] options:NSCaseInsensitiveSearch];
}] mutableCopy];
//reload bottom pane now
// ->this will only reload if new task is the currently selected one, etc
[((AppDelegate*)[[NSApplication sharedApplication] delegate]) reloadBottomPane:self itemView:DYLIBS_VIEW];
}//sync
//complete dylib processing for new dylib
// ->get signing info, hash, etc, & save into global list
@@ -445,17 +439,17 @@ bail:
//alloc array for new files
newFiles = [NSMutableArray array];
//sync
@synchronized(self.files)
{
//reset existing files
[self.files removeAllObjects];
}
//invoke XPC service (running as r00t)
// ->will enumerate files, then invoke reply block so can save into iVar
[[xpcConnection remoteObjectProxy] enumerateFiles:self.pid withReply:^(NSMutableArray* fileDescriptors) {
//sync
@synchronized(self.files)
{
//reset existing files
[self.files removeAllObjects];
//create/add all files
for(NSMutableDictionary* fileDescriptor in fileDescriptors)
{
@@ -489,20 +483,18 @@ bail:
}
}
//sync to sort
@synchronized(self.files)
//sort by name
self.files = [[self.files sortedArrayUsingComparator:^NSComparisonResult(id a, id b)
{
//sort by name
self.files = [[self.files sortedArrayUsingComparator:^NSComparisonResult(id a, id b)
{
//sort
return [[(File*)a name] compare:[(File*)b name] options:NSCaseInsensitiveSearch];
}] mutableCopy];
}
//sort
return [[(File*)a name] compare:[(File*)b name] options:NSCaseInsensitiveSearch];
}] mutableCopy];
//reload bottom pane
[((AppDelegate*)[[NSApplication sharedApplication] delegate]) reloadBottomPane:self itemView:FILES_VIEW];
}//sync
//process all new files
// ->calculate hash, etc & save into global list
@@ -529,15 +521,16 @@ bail:
//File object
__block Connection* connection = nil;
//remove any existing enum'd networking sockets/connections
[self.connections removeAllObjects];
//dbg msg
//NSLog(@"invoking XPC to enumer networking");
//invoke XPC service (running as r00t)
// ->will enumerate network sockets/connections, then invoke reply block so can save into iVar
[[xpcConnection remoteObjectProxy] enumerateNetwork:self.pid withReply:^(NSMutableArray* networkItems) {
//sync
@synchronized(self.connections)
{
//remove any existing enum'd networking sockets/connections
[self.connections removeAllObjects];
//
//NSLog(@"found %d connections", networkItems.count);
@@ -558,6 +551,9 @@ bail:
//reload bottom pane
[((AppDelegate*)[[NSApplication sharedApplication] delegate]) reloadBottomPane:self itemView:NETWORKING_VIEW];
}//sync
}];
return;
-4
View File
@@ -35,10 +35,6 @@
// ->contains binaries that should be processed
@property (nonatomic, retain) Queue* binaryQueue;
//flag indicating tasks (and thus files/dylibs/etc) are being queried
@property BOOL isEnumerating;
/* METHODS */
//enumerate all tasks
+1 -10
View File
@@ -22,14 +22,11 @@
@implementation TaskEnumerator
@synthesize files;
@synthesize tasks;
@synthesize dylibs;
@synthesize binaryQueue;
@synthesize executables;
@synthesize isEnumerating;
//init
-(id)init
@@ -73,10 +70,7 @@
//xpc connection
NSXPCConnection* xpcConnection = nil;
//set flag
self.isEnumerating = YES;
//determine if network is connected
// ->sets 'isConnected' flag
((AppDelegate*)[[NSApplication sharedApplication] delegate]).isConnected = isNetworkConnected();
@@ -203,9 +197,6 @@
//TODO: add network connection filtering
//all done!
self.isEnumerating = NO;
return;
}
+2 -2
View File
@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.1</string>
<string>1.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.1</string>
<string>1.1.0</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
@@ -6,7 +6,7 @@
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "RequestRootWindowController.m"
@@ -26,11 +26,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "SearchWindowController.m"
timestampString = "461837143.894597"
timestampString = "462088083.337679"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "343"
endingLineNumber = "343"
startingLineNumber = "319"
endingLineNumber = "319"
landmarkName = "-search:"
landmarkType = "5">
</BreakpointContent>
@@ -74,11 +74,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ItemView.m"
timestampString = "461741382.460449"
timestampString = "462061810.500141"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "191"
endingLineNumber = "191"
startingLineNumber = "267"
endingLineNumber = "267"
landmarkName = "createLoadedItemView()"
landmarkType = "7">
</BreakpointContent>
@@ -89,14 +89,14 @@
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ItemView.m"
timestampString = "461741382.460449"
filePath = "AppDelegate.m"
timestampString = "462091427.171131"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "213"
endingLineNumber = "213"
landmarkName = "createLoadedItemView()"
landmarkType = "7">
startingLineNumber = "1593"
endingLineNumber = "1593"
landmarkName = "-refreshTasks:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
@@ -105,14 +105,14 @@
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ItemView.m"
timestampString = "461833177.728674"
filePath = "TaskTableController.m"
timestampString = "462060397.604232"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "254"
endingLineNumber = "254"
landmarkName = "createLoadedItemView()"
landmarkType = "7">
startingLineNumber = "323"
endingLineNumber = "323"
landmarkName = "-refresh"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
@@ -122,14 +122,94 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "SearchWindowController.m"
timestampString = "461835940.972573"
timestampString = "462088083.337679"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "113"
endingLineNumber = "113"
landmarkName = "-initUI"
startingLineNumber = "183"
endingLineNumber = "183"
landmarkName = "-waitTillPau"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "VirusTotal.m"
timestampString = "462084588.682321"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "385"
endingLineNumber = "385"
landmarkName = "-getInfoForItem:scanID:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "AppDelegate.m"
timestampString = "462091427.171131"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1371"
endingLineNumber = "1371"
landmarkName = "-selectBottomPaneContent:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Task.m"
timestampString = "462090370.850888"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "400"
endingLineNumber = "400"
landmarkName = "-enumerateDylibs:allDylibs:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Task.m"
timestampString = "462089496.268699"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "332"
endingLineNumber = "332"
landmarkName = "-enumerateDylibs:allDylibs:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Exception.m"
timestampString = "462091293.990081"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "118"
endingLineNumber = "118"
landmarkName = "signalHandler()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
@@ -59,6 +59,26 @@
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
<AdditionalOption
key = "DYLD_INSERT_LIBRARIES"
value = "/usr/lib/libgmalloc.dylib"
isEnabled = "YES">
</AdditionalOption>
<AdditionalOption
key = "NSZombieEnabled"
value = "YES"
isEnabled = "YES">
</AdditionalOption>
<AdditionalOption
key = "MallocGuardEdges"
value = ""
isEnabled = "YES">
</AdditionalOption>
<AdditionalOption
key = "MallocScribble"
value = ""
isEnabled = "YES">
</AdditionalOption>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
+2
View File
@@ -378,6 +378,7 @@ bail:
[self.itemView endUpdates];
}
}
/*
//otherwise select first row
else
@@ -410,6 +411,7 @@ bail:
}
*/
//bail
bail:
+1 -1
View File
@@ -16,7 +16,7 @@
<window allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" animationBehavior="default" id="F0z-JX-Cv5">
<windowStyleMask key="styleMask" titled="YES" closable="YES" texturedBackground="YES" unifiedTitleAndToolbar="YES"/>
<rect key="contentRect" x="196" y="240" width="422" height="123"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1057"/>
<view key="contentView" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="422" height="123"/>
<autoresizingMask key="autoresizingMask"/>
+1 -1
View File
@@ -17,7 +17,7 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="95" y="481" width="1304" height="322"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1080"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1057"/>
<value key="minSize" type="size" width="800" height="250"/>
<view key="contentView" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="1304" height="322"/>
+13 -6
View File
@@ -9,6 +9,7 @@
<connections>
<outlet property="activityIndicator" destination="RXw-FP-B7l" id="Z0i-nT-27e"/>
<outlet property="activityIndicatorLabel" destination="Q88-hM-E3W" id="QgQ-R6-PSJ"/>
<outlet property="overlayView" destination="YtR-V5-2Zi" id="8Mb-j4-vuh"/>
<outlet property="searchBox" destination="BB9-Xc-q8T" id="8cj-MF-5Nv"/>
<outlet property="searchTable" destination="w0h-ih-Ej7" id="d9e-Dk-k2K"/>
<outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
@@ -241,7 +242,7 @@
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" ambiguous="YES" misplaced="YES" tag="101" translatesAutoresizingMaskIntoConstraints="NO" id="4c4-WA-4rL">
<rect key="frame" x="31" y="2" width="1118" height="21"/>
<rect key="frame" x="31" y="2" width="1185" height="21"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" selectable="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" title="file" id="1An-1Z-a3L">
<font key="font" size="11" name="Menlo-Regular"/>
<color key="textColor" white="0.5" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
@@ -292,6 +293,7 @@
<constraint firstAttribute="trailing" secondItem="Xsx-qZ-Zpb" secondAttribute="trailing" constant="20" id="Nyw-Bs-k6x"/>
<constraint firstItem="vr7-eK-3Bt" firstAttribute="leading" secondItem="UgY-KO-I4K" secondAttribute="trailing" constant="22" id="PkR-9T-0we"/>
<constraint firstAttribute="trailing" secondItem="fnp-rh-Inz" secondAttribute="trailing" constant="171" id="V3B-Vz-Pzp"/>
<constraint firstItem="5kn-qs-yNV" firstAttribute="leading" secondItem="4c4-WA-4rL" secondAttribute="trailing" constant="8" id="VCf-sQ-iGi"/>
<constraint firstItem="4c4-WA-4rL" firstAttribute="leading" secondItem="IIS-fl-0Bl" secondAttribute="trailing" constant="2" id="bEr-bp-efR"/>
<constraint firstItem="IIS-fl-0Bl" firstAttribute="leading" secondItem="62p-Yk-Jl3" secondAttribute="leading" constant="4" id="dM0-v7-57a"/>
<constraint firstItem="Xsx-qZ-Zpb" firstAttribute="leading" secondItem="5kn-qs-yNV" secondAttribute="trailing" constant="17" id="icg-9v-1Px"/>
@@ -401,13 +403,16 @@
<outlet property="delegate" destination="-2" id="X2H-Xx-qgK"/>
</connections>
</textField>
<customView ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="YtR-V5-2Zi">
<rect key="frame" x="428" y="105" width="458" height="165"/>
</customView>
<progressIndicator horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="RXw-FP-B7l">
<rect key="frame" x="636" y="196" width="32" height="32"/>
</progressIndicator>
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Q88-hM-E3W" userLabel="loading data">
<rect key="frame" x="517" y="178" width="271" height="19"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="center" title="completing task/dylib/file enumeration - please wait..." id="ZXa-lS-7Ph">
<font key="font" size="13" name="Menlo-Regular"/>
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" misplaced="YES" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Q88-hM-E3W" userLabel="loading data">
<rect key="frame" x="456" y="159" width="408" height="38"/>
<textFieldCell key="cell" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="center" title="completing (initial) task/dylib/file enumeration please wait" id="ZXa-lS-7Ph">
<font key="font" size="13" name="Menlo-Bold"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
@@ -416,9 +421,11 @@
<constraints>
<constraint firstAttribute="centerY" secondItem="RXw-FP-B7l" secondAttribute="centerY" id="1SP-Qz-QYP"/>
<constraint firstItem="8GA-gp-lIa" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="70" id="IAH-UM-GVX"/>
<constraint firstAttribute="centerY" secondItem="Q88-hM-E3W" secondAttribute="centerY" constant="-25" id="MUC-Ia-Hfk"/>
<constraint firstItem="8GA-gp-lIa" firstAttribute="centerY" secondItem="YtR-V5-2Zi" secondAttribute="centerY" constant="15" id="Isw-Rb-q2f"/>
<constraint firstAttribute="centerY" secondItem="Q88-hM-E3W" secondAttribute="centerY" constant="-50" id="MUC-Ia-Hfk"/>
<constraint firstItem="RXw-FP-B7l" firstAttribute="centerX" secondItem="8GA-gp-lIa" secondAttribute="centerX" id="P0U-b3-RUp"/>
<constraint firstAttribute="bottom" secondItem="8GA-gp-lIa" secondAttribute="bottom" constant="-1" id="RJ1-AT-aVI"/>
<constraint firstItem="8GA-gp-lIa" firstAttribute="centerX" secondItem="YtR-V5-2Zi" secondAttribute="centerX" constant="-5" id="SVA-mY-KJ6"/>
<constraint firstAttribute="trailing" secondItem="BB9-Xc-q8T" secondAttribute="trailing" constant="20" id="aKm-xj-RF5"/>
<constraint firstItem="8GA-gp-lIa" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="-1" id="bVx-kV-QU1"/>
<constraint firstAttribute="centerX" secondItem="Q88-hM-E3W" secondAttribute="centerX" id="dxs-NA-iEU"/>
+1 -1
View File
@@ -415,7 +415,7 @@ NSDictionary* hashFile(NSString* filePath)
if(nil == (fileContents = [NSData dataWithContentsOfFile:filePath]))
{
//err msg
syslog(LOG_ERR, "OBJECTIVE-SEE ERROR: couldn't load %s to hash", [filePath UTF8String]);
//syslog(LOG_ERR, "OBJECTIVE-SEE ERROR: couldn't load %s to hash", [filePath UTF8String]);
//bail
goto bail;
-20
View File
@@ -273,26 +273,6 @@
// ->need this for (re)queries
scanID = result[VT_RESULTS_SCANID];
//TODO: do something w/ prev flagged files!?
// ...i don't think we'll keep a list~
/*
//if file was flagged
// ->remove it from list of plugin's flagged
if(0 != [self.fileObj.vtInfo[VT_RESULTS_POSITIVES] unsignedIntegerValue])
{
//sync
// ->since array will be reset if user clicks 'stop' scan
@synchronized(self.fileObj.plugin.flaggedItems)
{
//remove
[self.fileObj.plugin.flaggedItems removeObject:self.fileObj];
}
}
*/
//with a scan id can re-query VT
// ->will update VT button in UI once results are retrieved
if(nil != scanID)
+16
View File
@@ -376,6 +376,22 @@
//save
[((AppDelegate*)[[NSApplication sharedApplication] delegate]) saveFlaggedBinary:item];
}
//for non-flagged items
// ->remove from list, if they were previously flagged
else
{
//check if previously flagged
// ->then remove
if(YES == [((AppDelegate*)[[NSApplication sharedApplication] delegate]).flaggedItems containsObject:item])
{
//sync to remove
@synchronized(((AppDelegate*)[[NSApplication sharedApplication] delegate]).flaggedItems)
{
//remove
[((AppDelegate*)[[NSApplication sharedApplication] delegate]).flaggedItems removeObject:item];
}
}
}
//call up into app delegate to smartly reload
[((AppDelegate*)[[NSApplication sharedApplication] delegate]) reloadBinary:item];
+24 -30
View File
@@ -16,8 +16,8 @@
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<menu title="AMainMenu" systemMenu="main" id="29">
<items>
<menuItem title="KnockKnock" id="56">
<menu key="submenu" title="KnockKnock" systemMenu="apple" id="57">
<menuItem title="TaskExplorer" id="56" userLabel="TaskExplorer">
<menu key="submenu" title="TaskExplorer" systemMenu="apple" id="57">
<items>
<menuItem title="About" id="134">
<modifierMask key="keyEquivalentModifierMask"/>
@@ -25,12 +25,6 @@
<action selector="about:" target="494" id="1Av-a0-4RW"/>
</connections>
</menuItem>
<menuItem title="Preferences" tag="1" hidden="YES" id="Cd7-Xq-jnw">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="showPreferences:" target="494" id="h1a-NR-0PY"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="149">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
@@ -66,7 +60,7 @@
</textFieldCell>
</textField>
<button ambiguous="YES" misplaced="YES" tag="10003" translatesAutoresizingMaskIntoConstraints="NO" id="gSG-Nq-plb">
<rect key="frame" x="108" y="20" width="32" height="25"/>
<rect key="frame" x="103" y="20" width="32" height="25"/>
<constraints>
<constraint firstAttribute="width" constant="32" id="XGt-s5-weq"/>
<constraint firstAttribute="height" constant="25" id="wlR-bC-Msz"/>
@@ -80,29 +74,15 @@
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FRk-Fk-n4f">
<rect key="frame" x="106" y="0.0" width="38" height="17"/>
<rect key="frame" x="100" y="5" width="38" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="save" id="qeM-6t-Rz6">
<font key="font" size="9" name="Menlo-Regular"/>
<color key="textColor" white="0.52269995629999999" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button ambiguous="YES" misplaced="YES" tag="10002" translatesAutoresizingMaskIntoConstraints="NO" id="UiZ-UI-inM">
<rect key="frame" x="62" y="20" width="32" height="25"/>
<constraints>
<constraint firstAttribute="width" constant="32" id="OtG-JF-PVX"/>
<constraint firstAttribute="height" constant="25" id="Suo-pl-wcf"/>
</constraints>
<buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="search" imagePosition="overlaps" alignment="center" alternateImage="searchBG" imageScaling="proportionallyDown" inset="2" id="d77-J8-SjG">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="search:" target="494" id="YU7-xU-gB7"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="MHi-Fa-fbk">
<rect key="frame" x="59" y="0.0" width="38" height="17"/>
<rect key="frame" x="56" y="5" width="38" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="search" id="tF8-E0-l1A">
<font key="font" size="9" name="Menlo-Regular"/>
<color key="textColor" white="0.52269995629999999" alpha="1" colorSpace="calibratedWhite"/>
@@ -110,7 +90,7 @@
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="msk-iH-gVd">
<rect key="frame" x="8" y="0.0" width="46" height="17"/>
<rect key="frame" x="8" y="5" width="46" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="refresh" id="C2m-Hn-7EE">
<font key="font" size="9" name="Menlo-Regular"/>
<color key="textColor" white="0.52269995629999999" alpha="1" colorSpace="calibratedWhite"/>
@@ -169,7 +149,7 @@
</connections>
</button>
<button ambiguous="YES" misplaced="YES" tag="10001" translatesAutoresizingMaskIntoConstraints="NO" id="hum-Mj-cDd">
<rect key="frame" x="20" y="20" width="32" height="25"/>
<rect key="frame" x="15" y="20" width="32" height="25"/>
<constraints>
<constraint firstAttribute="width" constant="32" id="ZaY-KC-vcE"/>
<constraint firstAttribute="height" constant="25" id="dEM-O0-dda"/>
@@ -211,13 +191,27 @@
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Qdr-Tq-Fw0">
<rect key="frame" x="1297" y="2" width="46" height="17"/>
<rect key="frame" x="1297" y="5" width="46" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="flagged" id="BYb-4w-hk5">
<font key="font" size="9" name="Menlo-Regular"/>
<color key="textColor" white="0.52269995629999999" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button ambiguous="YES" misplaced="YES" tag="10002" translatesAutoresizingMaskIntoConstraints="NO" id="UiZ-UI-inM">
<rect key="frame" x="59" y="20" width="32" height="25"/>
<constraints>
<constraint firstAttribute="width" constant="32" id="OtG-JF-PVX"/>
<constraint firstAttribute="height" constant="25" id="Suo-pl-wcf"/>
</constraints>
<buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="search" imagePosition="overlaps" alignment="center" alternateImage="searchBG" imageScaling="proportionallyDown" inset="2" id="d77-J8-SjG">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="search:" target="494" id="YU7-xU-gB7"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="E4M-PF-VD0" secondAttribute="trailing" constant="-1" id="7em-dD-W3w"/>
@@ -313,8 +307,8 @@
<outlet property="noItemsLabel" destination="kIC-ZZ-ldy" id="nOm-8E-tZA"/>
<outlet property="progressIndicator" destination="839" id="870"/>
<outlet property="refreshButton" destination="hum-Mj-cDd" id="SBd-mB-EWI"/>
<outlet property="searchButton" destination="UiZ-UI-inM" id="neL-LX-ZHh"/>
<outlet property="showPreferencesButton" destination="gSG-Nq-plb" id="AQZ-wC-I5a"/>
<outlet property="saveButton" destination="gSG-Nq-plb" id="Bwu-rh-nko"/>
<outlet property="searchButton" destination="UiZ-UI-inM" id="szu-AU-TGX"/>
<outlet property="statusText" destination="745" id="871"/>
<outlet property="topPane" destination="TNF-7q-Loy" id="KZl-fO-P4O"/>
<outlet property="viewSelector" destination="nRz-eH-T6D" id="1YT-Nb-K3a"/>
+3 -3
View File
@@ -17,13 +17,13 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>1.1.0</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 Lucas Derraugh. All rights reserved.</string>
<string>Copyright © 2015 Objective-See, LLC. All rights reserved.</string>
<key>XPCService</key>
<dict>
<key>ServiceType</key>
+4 -4
View File
@@ -3,7 +3,7 @@
// remoteTaskService
//
// Created by Patrick Wardle on 5/27/15.
// Copyright (c) 2015 Lucas Derraugh. All rights reserved.
// Copyright (c) 2015 Objective-See, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -15,8 +15,8 @@
#import <syslog.h>
//TODO: CHANGE B4 RELEASE!!
#define SIGNING_AUTH @"Mac Developer: patrick wardle (5SKKU32KLJ)"//@"Developer ID Application: Objective-See, LLC (VBG97UB4TA)"
//-> for testing: @"Mac Developer: patrick wardle (5SKKU32KLJ)"
#define SIGNING_AUTH @"Developer ID Application: Objective-See, LLC (VBG97UB4TA)"
//skeleton interface
@interface ServiceDelegate : NSObject <NSXPCListenerDelegate>
@@ -84,7 +84,7 @@
if(0 != SecStaticCodeCheckValidity(staticCode, kSecCSDefaultFlags, requirementRef))
{
//err msg
syslog(LOG_ERR, "OBJECTIVE-SEE ERROR: SecStaticCodeCheckValidity() failed");
syslog(LOG_ERR, "OBJECTIVE-SEE ERROR: SecStaticCodeCheckValidity() failed on %s", pathBuffer);
//bail
goto bail;
+1 -1
View File
@@ -3,7 +3,7 @@
// remoteTaskService
//
// Created by Patrick Wardle on 5/27/15.
// Copyright (c) 2015 Lucas Derraugh. All rights reserved.
// Copyright (c) 2015 Objective-See, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
+1 -1
View File
@@ -3,7 +3,7 @@
// TaskExplorer
//
// Created by Patrick Wardle on 5/27/15.
// Copyright (c) 2015 Lucas Derraugh. All rights reserved.
// Copyright (c) 2015 Objective-See, LLC. All rights reserved.
//
#ifndef TaskExplorer_serviceInterface_h