text stringlengths 0 1.99k |
|---|
| .[] |
| select(. != null) |
' | sort -u |
```````````````````````````````````````````````````````````````````````````` |
However, not all services declared in the Info.plist are instantiated at |
runtime. Matching only occurs if the system satisfies the personality's |
conditions — such as the presence of specific hardware. Conversely, not all |
instantiated services are declared in the Info.plist. Some are created |
programmatically within the KEXT via calls like registerService[29], or by |
overriding probe or start methods to instantiate custom service classes |
without corresponding plist entries. |
============== |
--[ 2.1.3 - NewUserClients |
============================================================================ |
Another way to identify driver service names is by analyzing |
IOService::newUserClient overrides in the KEXT binary. This method creates |
IOUserClient instances, which handle communication with user space via |
IOServiceOpen. To find them, use ipsw[30]: |
```````````````````````````````````````````````````````````````````````````` |
ipsw macho info --symbols KEXT_NAME | grep -i "NewUserClient" |
```````````````````````````````````````````````````````````````````````````` |
Alternatively, nm may work, but it can fail on some KEXTs: |
```````````````````````````````````````````````````````````````````````````` |
nm -m KEXT_NAME | grep -i "NewUserClient" |
```````````````````````````````````````````````````````````````````````````` |
The results are mangled symbols, for example: |
```````````````````````````````````````````````````````````````````````````` |
__ZN14ANEClientHints13newUserClientEP4taskPvjPP12IOUserClient |
__ZN21ANEPrivilegedVMAccess13newUserClientEP4taskPvjPP12IOUserClient |
__ZN8H11ANEIn13newUserClientEP4taskPvjPP12IOUserClient |
```````````````````````````````````````````````````````````````````````````` |
Use c++filt[31] to demangle: |
```````````````````````````````````````````````````````````````````````````` |
c++filt "__ZN14ANEClientHints13newUserClientEP4taskPvjPP12IOUserClient" |
ANEClientHints::newUserClient(task*, void*, unsigned int, IOUserClient**) |
```````````````````````````````````````````````````````````````````````````` |
This reveals possible driver service names: ANEClientHints, |
ANEPrivilegedVMAccess, and H11ANEIn. Each name maps to a different |
IOService class, which may implement unique newUserClient logic. The name |
used during IOServiceOpen determines which logic and IOUserClient subclass |
gets instantiated, so instance behavior depends directly on the selected |
service. |
======== |
--[ 2.1.4 - UC Types |
============================================================================ |
In addition to the service name, the type argument passed to |
IOServiceOpen further influences which IOUserClient subclass is |
instantiated. It allows a single-driver service to expose multiple client |
interfaces with different logic. |
Consider the decompiled H11ANEIn::newUserClient implementation, which shows |
that when opening the H11ANEIn service, passing type == 1 results in the |
creation of H11ANEInDirectPathClient, while any other value defaults to |
H11ANEInUserClient. These are distinct IOUserClient subclasses, each with |
its own set of external methods and privilege checks. |
```````````````````````````````````````````````````````````````````````````` |
__int64 __fastcall H11ANEIn::newUserClient( |
H11ANEIn *this, task *clientTask, |
void *securityToken, |
__int64 type, |
IOUserClient **userClientOut) |
{ |
*userClientOut = nullptr; |
if (type == 1) { |
// Logs: Creating direct evaluate client |
auto client = new H11ANEInDirectPathClient; |
if (client && client->initWithTask(clientTask, 0) && |
client->attach(this) && |
client->start(this)) { |
*userClientOut = client; |
return 0; |
} |
if (client) { |
client->detach(this); |
client->release(); |
} |
} else { |
// Logs: Creating default full-entitlement client |
auto client = new H11ANEInUserClient; |
if (client && client->initWithTask(clientTask, 0) && |
client->attach(this) && |
client->start(this)) { |
*userClientOut = client; |
return 0; |
} |
if (client) { |
client->detach(this); |
client->release(); |
} |
} |
return 0xE00002C9; // kIOReturnUnsupported |
} |
```````````````````````````````````````````````````````````````````````````` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.