Skip to content

Instantly share code, notes, and snippets.

@blluv
Created February 1, 2023 06:43
Show Gist options
  • Select an option

  • Save blluv/256533360b90b5fa22ee524780fdf4f0 to your computer and use it in GitHub Desktop.

Select an option

Save blluv/256533360b90b5fa22ee524780fdf4f0 to your computer and use it in GitHub Desktop.
frida ssl_read hook
const LIB_NAME = "";
const timer = setInterval(() => {
const addr = Module.findBaseAddress(LIB_NAME);
if (addr) {
console.log("FIND");
Interceptor.attach(Module.getExportByName(LIB_NAME, "SSL_read"), {
onEnter: function (args) {
this.buf = args[1];
this.len = args[2] & 0xffffffff;
},
onLeave: function (ret) {
console.log(
hexdump(this.buf, {
offset: 0,
length: this.len,
header: false,
})
);
},
});
clearInterval(timer);
}
}, 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment