Frida Javascript api #ApiResolve

2020-02-15  本文已影响0人  邓超_码农加点中

原文链接: https://frida.re/docs/javascript-api/#apiresolver
欢迎加入 Frida 交流群: 1049977261

ApiResolver

var resolver = new ApiResolver('module');
var matches = resolver.enumerateMatches('exports:*!open*');
var first = matches[0];
/*
 * Where `first` is an object similar to:
 *
 * {
 *   name: '/usr/lib/libSystem.B.dylib!opendir$INODE64',
 *   address: ptr('0x7fff870135c9')
 * }
 */
var resolver = new ApiResolver('objc');
var matches = resolver.enumerateMatches('-[NSURL* *HTTP*]');
var first = matches[0];
/*
 * Where `first` contains an object like this one:
 *
 * {
 *   name: '-[NSURLRequest valueForHTTPHeaderField:]',
 *   address: ptr('0x7fff94183e22')
 * }
 */

DebugSymbol

var f = Module.getExportByName('libcommonCrypto.dylib',
    'CCCryptorCreate');
Interceptor.attach(f, {
  onEnter: function (args) {
    console.log('CCCryptorCreate called from:\n' +
        Thread.backtrace(this.context, Backtracer.ACCURATE)
        .map(DebugSymbol.fromAddress).join('\n') + '\n');
  }
});
上一篇下一篇

猜你喜欢

热点阅读