OSX Plugins
Support for OSX/Darwin analysis.
address_resolver
View SourceA Darwin specific address resolver plugin.
Plugin Arguments
symbol | List of symbols to lookup (type: ArrayString)
|
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
arp
View SourceShow information about arp tables.
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
boot_cmdline
View SourcePrints the kernel command line.
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
check_syscalls
View SourceChecks the syscall table.
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
check_trap_table
View SourceChecks the traps table for hooks.
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
dmesg
View SourcePrint the kernel debug messages.
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
dump_zone
View SourceDumps an allocation zone’s contents.
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
zone |
|
dumpcompressedmemory
View SourceDumps all compressed pages.
Plugin Arguments
dump_dir | Path suitable for dumping files. (type: String) |
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
find_dtb
View SourceTries to find the DTB address for the Darwin/XNU kernel.
As the XNU kernel developed over the years, the best way of deriving this information changed. This class now offers multiple methods of finding the DTB. Calling find_dtb should automatically select the best method for the job, based on the profile. It will also attempt to fall back on less ideal ways of getting the DTB if the best way fails.
Plugin Arguments
vm_kernel_slide | OS X 10.8 and later: kernel ASLR slide. (type: IntParser) |
find_kaslr
View SourceA scanner for KASLR slide values in the Darwin kernel.
The scanner works by looking up a known data structure and comparing its actual location to its expected location. Verification is a similar process, using a second constant. This takes advantage of the fact that both data structures are in a region of kernel memory that maps to the physical memory in a predictable way (see ID_MAP_VTOP).
Human-readable output includes values of the kernel version string (which is used for validation) for manual review, in case there are false positives.
ip_filters
View SourceCheck IP Filters for hooks.
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
lsmod
View SourceLists all kernel modules.
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
lsof
View SourceWalks open files of each proc in order and prints PID, FD and the handle.
Each process has an array of pointers to fileproc structs - the offset into the array is the file descriptor and each fileproc struct represents a handle on some resource. A type field in the fileproc determines the type of the resource pointed to from the fileproc (e.g. vnode, socket, pipe…).
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
machine_info
View SourceShow information about this machine.
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
maps
View SourceDisplay the process maps.
Plugin Arguments
pids | One or more pids of processes to select. (type: ArrayIntParser) |
proc | Kernel addresses of proc structs. (type: ArrayIntParser) |
proc_regex | A regex to select a process by name. (type: RegEx) |
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
mount
View SourceShow mount points.
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
netstat
View SourcePrints all open sockets we know about, from any source.
Netstat will display even connections that lsof doesn’t know about, because they were either recovered from an allocation zone, or found through a secondary mechanism (like system call handler cache).
On the other hand, netstat doesn’t know the file descriptor or, really, the process that owns the connection (although it does know the PID of the last process to access the socket.)
Netstat will also tell you, in the style of psxview, if a socket was only found using some of the methods available.
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
notifiers
View SourceDetects hooks in I/O Kit IONotify objects.
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
phys_map
View SourcePrints the EFI boot physical memory map.
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
psaux
View SourceList processes with their commandline.
Plugin Arguments
pids | One or more pids of processes to select. (type: ArrayIntParser) |
proc | Kernel addresses of proc structs. (type: ArrayIntParser) |
proc_regex | A regex to select a process by name. (type: RegEx) |
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
psxview
View SourceA mixin for plugins which require a valid kernel address space.
Args: dtb: A potential dtb to be used.
Plugin Arguments
pids | One or more pids of processes to select. (type: ArrayIntParser) |
proc | Kernel addresses of proc structs. (type: ArrayIntParser) |
proc_regex | A regex to select a process by name. (type: RegEx) |
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
route
View SourceShow routing table.
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
sysctl
View SourceDumps the sysctl database.
On OSX the kernel is configured through the sysctl mechanism. This is analogous to /proc or /sysfs on Linux. The configuration space is broken into MIBs - or hierarchical namespace.
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/sysctl.8.html
For example:
net.inet.ip.subnets_are_local net.inet.ip.ttl net.inet.ip.use_route_genid
This is implemented via a singly linked list of sysctl_oid structs. The structs can be on the following types:
- CTLTYPE_INT means this MIB will handle an int.
- CTLTYPE_STRING means this MIB will handle a string.
- CTLTYPE_QUAD means this MIB will handle a long long int.
- CTLTYPE_NODE means this is a node which handles a sublevel of MIBs. It is actually a pointer to a new sysctl_oid_list which handles the sublevel.
Plugin Arguments
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
vaddump
View SourceDump the VMA memory for a process.
Plugin Arguments
dump_dir | Path suitable for dumping files. (type: String) |
pids | One or more pids of processes to select. (type: ArrayIntParser) |
proc | Kernel addresses of proc structs. (type: ArrayIntParser) |
proc_regex | A regex to select a process by name. (type: RegEx) |
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
yarascan
View SourceScan using yara signatures.
Plugin Arguments
binary_string | A binary string (encoded as hex) to search for. e.g. 000102[1-200]0506 (type: String) |
context | Context to print after the hit. (type: IntParser)
|
hits | Quit after finding this many hits. (type: IntParser)
|
pids | One or more pids of processes to select. (type: ArrayIntParser) |
pre_context | Context to print before the hit. (type: IntParser)
|
proc | Kernel addresses of proc structs. (type: ArrayIntParser) |
proc_regex | A regex to select a process by name. (type: RegEx) |
scan_kernel | Scan the entire kernel address space. (type: Boolean)
|
scan_physical | Scan the physical address space only. (type: Boolean)
|
scan_process_memory | Scan all of process memory. Uses process selectors to narrow down selections. (type: Boolean)
|
string | A verbatim string to search for. (type: String) |
verbosity | An integer reflecting the amount of desired output: 0 = quiet, 10 = noisy. (type: IntParser)
|
yara_expression | If provided we scan for this yara expression. (type: String) |
yara_file | The yara signature file to read. (type: String) |