display device id func

This commit is contained in:
hyugogirubato 2024-10-28 21:29:08 +01:00
parent 228d2840c7
commit 9f51b3911b
1 changed files with 9 additions and 7 deletions

View File

@ -240,22 +240,24 @@ const getKeyLength = (key) => {
return pos + lengthValue; return pos + lengthValue;
} }
const GetDeviceID = (address) => { const GetDeviceID = (address, name) => {
// wvdash::OEMCrypto::GetDeviceID // wvdash::OEMCrypto::GetDeviceID
Interceptor.attach(address, { Interceptor.attach(address, {
onEnter: function (args) { onEnter: function (args) {
print(Level.DEBUG, '[+] onEnter: GetDeviceID'); // print(Level.DEBUG, '[+] onEnter: GetDeviceID');
this.data = args[0]; this.data = args[0];
this.size = args[1]; this.size = args[1];
}, },
onLeave: function (retval) { onLeave: function (retval) {
print(Level.DEBUG, '[-] onLeave: GetDeviceID'); // print(Level.DEBUG, '[-] onLeave: GetDeviceID');
try { try {
const size = Memory.readPointer(this.size).toInt32(); const size = Memory.readPointer(this.size).toInt32();
const data = Memory.readByteArray(this.data, size); const data = Memory.readByteArray(this.data, size);
data && send('device_id', data);
print(Level.DEBUG, `[*] GetDeviceID: ${name}`);
send('device_id', data);
} catch (e) { } catch (e) {
print(Level.ERROR, `Failed to dump device ID.`); // print(Level.ERROR, `Failed to dump device ID.`);
} }
} }
}); });
@ -334,8 +336,8 @@ const hookLibrary = (name) => {
GetCdmClientPropertySet(funcAddr); GetCdmClientPropertySet(funcAddr);
} else if (funcName.includes('PrepareKeyRequest')) { } else if (funcName.includes('PrepareKeyRequest')) {
PrepareKeyRequest(funcAddr); PrepareKeyRequest(funcAddr);
} else if (funcName.includes('_lcc07') || funcName.includes('_oecc07') || funcName.includes('getOemcryptoDeviceId')) { } else if (funcName.includes('lcc07') || funcName.includes('oecc07') || funcName.includes('getOemcryptoDeviceId')) {
GetDeviceID(funcAddr); GetDeviceID(funcAddr, funcName);
} else if (targets.includes(funcName) || (!targets.length && funcName.match(/^[a-z]+$/))) { } else if (targets.includes(funcName) || (!targets.length && funcName.match(/^[a-z]+$/))) {
LoadDeviceRSAKey(funcAddr, funcName); LoadDeviceRSAKey(funcAddr, funcName);
} else { } else {