fetch ssl keys
This commit is contained in:
parent
f7e291649a
commit
e627f950c1
34
README.md
34
README.md
@ -132,6 +132,40 @@ Java method hook generator using keyboard shortcut
|
|||||||
</details>
|
</details>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
|
|
||||||
|
#### Fetch SSL keys
|
||||||
|
|
||||||
|
```js
|
||||||
|
var keylog_callback = new NativeCallback(function(ssl, line) {
|
||||||
|
send(Memory.readCString(line));
|
||||||
|
}, 'void', ['pointer', 'pointer']);
|
||||||
|
|
||||||
|
if (ObjC.available) {
|
||||||
|
var CALLBACK_OFFSET = 0x2A8;
|
||||||
|
if (Memory.readDouble(Module.findExportByName('CoreFoundation', 'kCFCoreFoundationVersionNumber')) >= 1751.108) {
|
||||||
|
CALLBACK_OFFSET = 0x2B8;
|
||||||
|
}
|
||||||
|
Interceptor.attach(Module.findExportByName('libboringssl.dylib', 'SSL_CTX_set_info_callback'), {
|
||||||
|
onEnter: function (args) {
|
||||||
|
ptr(args[0]).add(CALLBACK_OFFSET).writePointer(keylog_callback);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} else if (Java.available) {
|
||||||
|
var set_keylog_callback = new NativeFunction(Module.findExportByName(Module.findBaseAddress('libssl.so'), 'SSL_CTX_set_keylog_callback'), 'void', ['pointer', 'pointer']);
|
||||||
|
|
||||||
|
Interceptor.attach(Module.findExportByName(libSSL, 'SSL_CTX_new'), {
|
||||||
|
onLeave: function(retval) {
|
||||||
|
set_keylog_callback(retval, keylog_callback);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<br>[⬆ Back to top](#table-of-contents)
|
||||||
|
|
||||||
|
|
||||||
#### Load CPP module
|
#### Load CPP module
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
|
Loading…
Reference in New Issue
Block a user