-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate to new build system; fixes in the way Pattern and Offsets are…
… supplied
- Loading branch information
1 parent
3c5ee27
commit b3c1736
Showing
23 changed files
with
938 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
|
||
import {Cronet } from "../ssl_lib/cronet.js"; | ||
import { socket_library } from "./ios_agent.js"; | ||
import {PatternBasedHooking } from "../shared/pattern_based_hooking.js"; | ||
import { patterns, isPatternReplaced } from "../ssl_log.js" | ||
import { devlog } from "../util/log.js"; | ||
|
||
export class Cronet_Android extends Cronet { | ||
|
||
constructor(public moduleName:string, public socket_library:String, is_base_hook: boolean){ | ||
super(moduleName,socket_library,is_base_hook); | ||
} | ||
|
||
install_key_extraction_hook(){ | ||
const cronetModule = Process.findModuleByName(this.module_name); | ||
const hooker = new PatternBasedHooking(cronetModule); | ||
|
||
if (isPatternReplaced()){ | ||
devlog("Hooking libcronet functions by pattern"); | ||
hooker.hook_DumpKeys(this.module_name,"libcronet.so",patterns,(args: any[]) => { | ||
this.dumpKeys(args[1], args[0], args[2]); // Unpack args into dumpKeys | ||
}); | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
} | ||
|
||
execute_hooks(){ | ||
this.install_key_extraction_hook(); | ||
} | ||
|
||
} | ||
|
||
|
||
export function cronet_execute(moduleName:string, is_base_hook: boolean){ | ||
var cronet = new Cronet_Android(moduleName,socket_library,is_base_hook); | ||
cronet.execute_hooks(); | ||
|
||
if (is_base_hook) { | ||
const init_addresses = cronet.addresses[moduleName]; | ||
// ensure that we only add it to global when we are not | ||
if (Object.keys(init_addresses).length > 0) { | ||
(global as any).init_addresses[moduleName] = init_addresses; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.