diff --git a/INTEGRATION.md b/INTEGRATION.md new file mode 100644 index 0000000..2263814 --- /dev/null +++ b/INTEGRATION.md @@ -0,0 +1,144 @@ +# friTap Integration Guide + +This guide explains how to use the `friTap` as a Python library to hook into applications, log SSL/TLS data, and manage its integration with the `AndroidFridaManager`. The only required argument to initialize `friTap` is the app package name to be hooked. + +--- + +## Basic Usage: Hooking an App and Logging SSL/TLS Data + +The following example demonstrates how to use `friTap` to hook into an application and log its SSL/TLS traffic. + +### **Code Example** + +```python +from friTap import SSL_Logger +import sys + +try: + print("Start logging") + print("Press Ctrl+C to stop logging") + + # Specify the app package to hook + app_package = "YouTube" + + # Initialize SSL_Logger with optional arguments + ssl_log = SSL_Logger( + app_package, + verbose=True, # Enable verbose output + mobile=True, # Indicate that the target app is running on a mobile device + keylog="keylogtest3.log", # Path to save SSL key log + debug_output=True # Enable debug output + ) + + # Start friTap session + process = ssl_log.start_fritap_session() + + # Wait for user input to stop + sys.stdin.read() + +except KeyboardInterrupt: + # Detach process on interruption + process.detach() + print("Logging stopped.") +``` + +--- + +## Arguments for `SSL_Logger` + +| Argument | Type | Default | Description | +|-------------------------|---------|--------------|-----------------------------------------------------------------------------| +| `app` | `str` | **Required** | The package name of the app to be hooked. | +| `pcap_name` | `str` | `None` | Name of the PCAP file to save captured traffic. | +| `verbose` | `bool` | `False` | Enable verbose output for debugging purposes. | +| `spawn` | `bool` | `False` | Spawn the app automatically if not running. | +| `keylog` | `str` | `None` | Path to save the SSL/TLS key log file. | +| `enable_spawn_gating` | `bool` | `False` | Enable gating for app spawning. | +| `mobile` | `bool` | `False` | Indicate whether the target app is on a mobile device. | +| `live` | `bool` | `False` | Enable live monitoring of the app's traffic. | +| `environment_file` | `str` | `None` | Path to the environment configuration file. | +| `debug_mode` | `bool` | `False` | Enable debugging mode for more detailed information. | +| `full_capture` | `bool` | `False` | Enable full capture of traffic. | +| `socket_trace` | `bool` | `False` | Enable tracing of socket connections. | +| `host` | `bool` | `False` | Indicate whether the app is running on a host machine. | +| `offsets` | `str` | `None` | Specify custom offsets for hooking. | +| `debug_output` | `bool` | `False` | Enable debug output for detailed logging. | +| `experimental` | `bool` | `False` | Enable experimental features. | +| `anti_root` | `bool` | `False` | Enable anti-root detection mechanisms. | +| `payload_modification` | `bool` | `False` | Enable payload modification during traffic capture. | +| `enable_default_fd` | `bool` | `False` | Enable default file descriptor handling. | +| `patterns` | `list` | `None` | List of patterns to match during traffic capture. | +| `custom_hook_script` | `str` | `None` | Path to a custom Frida hook script to be executed during the session. | + +--- + +## Advanced Usage: Using friTap as a Job in AndroidFridaManager + +friTap can also be used as a job within the `AndroidFridaManager` framework. This allows you to manage friTap sessions as part of a larger job workflow. + +### **Code Example** + +```python +from friTap import SSL_Logger +from AndroidFridaManager import JobManager +import sys + +try: + print("Start logging") + print("Press Ctrl+C to stop logging") + + # Initialize JobManager + job_manager = JobManager() + + # Specify app package + app_package = "YouTube" + + # Initialize SSL_Logger with optional arguments + ssl_log = SSL_Logger( + app_package, + verbose=True, # Enable verbose output + keylog="keylogtest3.log", # Path to save SSL key log + debug_output=True # Enable debug output + ) + + # Get the Frida script path from SSL_Logger + frida_script_path = ssl_log.get_fritap_frida_script_path() + + # Set up the Frida session in the JobManager + job_manager.setup_frida_session( + app_package, + ssl_log.on_fritap_message, + should_spawn=False # Do not spawn the process + ) + + # Start the job with a custom hooking handler + job_manager.start_job( + frida_script_path, + custom_hooking_handler_name=ssl_log.on_fritap_message + ) + + print("[*] Running jobs:", job_manager.running_jobs()) + + # Wait for user input to stop + sys.stdin.read() + +except KeyboardInterrupt: + # Stop all running jobs + job_manager.stop_jobs() + print("Jobs stopped.") +``` + +--- + +## Key Notes + +1. **App Package Name**: + - The app package name is the only required argument to initialize `SSL_Logger`. All other arguments are optional but provide additional functionality like saving key logs or enabling debug output. + +2. **Custom Hooks**: + - If you want to execute custom Frida scripts, specify the path using the `custom_hook_script` argument in `SSL_Logger`. + +3. **Integration with AndroidFridaManager**: + - Using friTap as part of `AndroidFridaManager` allows you to manage friTap hooks alongside other Frida jobs seamlessly. + +--- diff --git a/README.md b/README.md index ef2a1bc..7db62ae 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

# friTap -![version](https://img.shields.io/badge/version-1.2.3.6-blue) [![PyPI version](https://d25lcipzij17d.cloudfront.net/badge.svg?id=py&r=r&ts=1683906897&type=6e&v=1.2.3.6&x2=0)](https://badge.fury.io/py/friTap) +![version](https://img.shields.io/badge/version-1.2.4.0-blue) [![PyPI version](https://d25lcipzij17d.cloudfront.net/badge.svg?id=py&r=r&ts=1683906897&type=6e&v=1.2.4.0&x2=0)](https://badge.fury.io/py/friTap) The goal of this project is to help researchers to analyze traffic encapsulated in SSL or TLS. For details have a view into the [OSDFCon webinar slides](assets/friTapOSDFConwebinar.pdf) or in [this blog post](https://lolcads.github.io/posts/2022/08/fritap/). @@ -47,8 +47,13 @@ $ which friTap $ sudo -E /home/daniel/.local/bin/friTap ``` +friTap can also be used as a Python library within your project: +```python +from friTap import SSL_Logger +``` +For more details on integrating friTap into your Python project, check out the [INTEGRATION.md](./INTEGRATION.md) guide. - +friTap allows you to enhance its functionality by providing a custom Frida script during your session. To do so, use the `-c` parameter ([more](./USAGE.md#Using-friTap-with-a-custom-Frida-scripts)). More examples on using friTap can be found in the [USAGE.md](./USAGE.md). A detailed introduction using friTap on Android is under [EXAMPLE.md](./EXAMPLE.md) as well. ## Hooking Libraries Without Symbols diff --git a/USAGE.md b/USAGE.md index 6f3add2..204be78 100644 --- a/USAGE.md +++ b/USAGE.md @@ -201,4 +201,64 @@ This category hooks the SSL_Write function, which is responsible for writing enc } ``` Primary Pattern: Hook the SSL_Write function. - Fallback Pattern: If the primary pattern fails, the fallback pattern is tried. \ No newline at end of file + Fallback Pattern: If the primary pattern fails, the fallback pattern is tried. + + + +## Using friTap with a custom Frida scripts + +This guide explains how to use friTap with a custom Frida script to enhance its functionality. Using the `-c` parameter, you can specify a custom script to be executed during the friTap session. + +--- + +### Example Command + +To invoke friTap with a custom script, use the following command: + +```bash +fritap -m -k cronet18.keys -do -c "/path/to/custom.js" -v YouTube +``` + +### **Explanation of Parameters** +- `-m`: Indicates that the app is running on a mobile device. +- `-k`: Specifies the output file for the SSL key log. +- `-do`: Enables debug output for detailed logging. +- `-c`: Specifies the path to the custom Frida script to be executed. +- `-v`: Enables verbose logging. +- `YouTube`: The name of the app package to be hooked. + +--- + +### Custom Script Example + +The following is an example of a custom Frida script (`custom.js`) that iterates over all loaded modules, checks for exports containing `ssl` or `tls`, and sends relevant information to friTap. + +```javascript +/* + * Example code for using custom hooks in friTap. + * To ensure friTap prints content, include a "custom" field in your message payload. + * The value of this "custom" field will be displayed by friTap. + */ + +// Iterate over all loaded modules +Process.enumerateModules().forEach(module => { + // Enumerate exports for each module + module.enumerateExports().forEach(exp => { + // Check if the export name contains "ssl" or "tls" + if (exp.name.toLowerCase().includes("ssl") || exp.name.toLowerCase().includes("tls")) { + // Send the result to Python + send({ + custom: `Found export: ${exp.name} in module: ${module.name} at address: ${exp.address}` + }); + } + }); +}); +``` +friTap will print any messages sent with a `custom` field during execution. +You can download the above example code as `custom.js` file using the link below: + +**[Download custom.js](./custom.js)** + +Place this file in the same directory as your friTap installation or provide the absolute path to the `-c` parameter. + + diff --git a/agent/shared/shared_functions.ts b/agent/shared/shared_functions.ts index 625ffdc..b4f73d2 100644 --- a/agent/shared/shared_functions.ts +++ b/agent/shared/shared_functions.ts @@ -71,6 +71,26 @@ export function getModuleNames(){ return moduleNames; } +export function checkNumberOfExports(moduleName: string): number { + try { + // Get the module by name + const module = Process.getModuleByName(moduleName); + + // Enumerate exports of the module + const exports = module.enumerateExports(); + + // Get the number of exports + const numberOfExports = exports.length; + + // Log the result + devlog(`The module "${moduleName}" has ${numberOfExports} exports.`); + return numberOfExports; + } catch (error) { + devlog(`Error checking exports for module "${moduleName}": ${error}`); + return -1; + } +} + export function readAddresses(moduleName: string, library_method_mapping: { [key: string]: Array }): { [library_name: string]: { [functionName: string]: NativePointer } } { const resolver = new ApiResolver("module"); const addresses: { [library_name: string]: { [functionName: string]: NativePointer } } = {}; diff --git a/agent/ssl_lib/openssl_boringssl.ts b/agent/ssl_lib/openssl_boringssl.ts index 64f9380..45cf1dc 100644 --- a/agent/ssl_lib/openssl_boringssl.ts +++ b/agent/ssl_lib/openssl_boringssl.ts @@ -1,4 +1,4 @@ -import { readAddresses, getPortsAndAddresses, getBaseAddress, isSymbolAvailable } from "../shared/shared_functions.js"; +import { readAddresses, getPortsAndAddresses, getBaseAddress, isSymbolAvailable, checkNumberOfExports } from "../shared/shared_functions.js"; import { getOffsets, offsets, enable_default_fd } from "../ssl_log.js"; import { devlog, log } from "../util/log.js"; @@ -94,7 +94,9 @@ export class OpenSSL_BoringSSL { if(typeof passed_library_method_mapping !== 'undefined'){ this.library_method_mapping = passed_library_method_mapping; }else{ - this.library_method_mapping[`*${moduleName}*`] = ["SSL_read", "SSL_write", "SSL_get_fd", "SSL_get_session", "SSL_SESSION_get_id", "SSL_new", "SSL_CTX_set_keylog_callback"] + if(checkNumberOfExports(moduleName) > 2 ){ + this.library_method_mapping[`*${moduleName}*`] = ["SSL_read", "SSL_write", "SSL_get_fd", "SSL_get_session", "SSL_SESSION_get_id", "SSL_new", "SSL_CTX_set_keylog_callback"] + } this.library_method_mapping[`*${socket_library}*`] = ["getpeername", "getsockname", "ntohs", "ntohl"] } diff --git a/custom.js b/custom.js new file mode 100644 index 0000000..711f38d --- /dev/null +++ b/custom.js @@ -0,0 +1,19 @@ +/* + * Example code for using custom hooks in friTap. + * To ensure friTap prints content, include a "custom" field in your message payload. + * The value of this "custom" field will be displayed by friTap. + */ + +// Iterate over all loaded modules +Process.enumerateModules().forEach(module => { + // Enumerate exports for each module + module.enumerateExports().forEach(exp => { + // Check if the export name contains "ssl" or "tls" || exp.name.toLowerCase().includes("tls") + if (exp.name.toLowerCase().includes("ssl") ) { + // Send the result to Python + send({ + custom: `Found export: ${exp.name} in module: ${module.name} at address: ${exp.address}` + }); + } + }); +}); diff --git a/friTap/__init__.py b/friTap/__init__.py index 56fafa5..ef51c0a 100755 --- a/friTap/__init__.py +++ b/friTap/__init__.py @@ -1,2 +1,5 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- + +# Expose SSL_Logger at the package level +from .friTap import SSL_Logger \ No newline at end of file diff --git a/friTap/_ssl_log.js b/friTap/_ssl_log.js index 67c6ab7..97e1f9b 100644 --- a/friTap/_ssl_log.js +++ b/friTap/_ssl_log.js @@ -61,8 +61,8 @@ 2619 /agent/macos/openssl_boringssl_macos.js 7608 /agent/shared/pattern_based_hooking.js.map 10664 /agent/shared/pattern_based_hooking.js -10234 /agent/shared/shared_functions.js.map -12861 /agent/shared/shared_functions.js +10665 /agent/shared/shared_functions.js.map +13463 /agent/shared/shared_functions.js 397 /agent/shared/shared_structures.js.map 201 /agent/shared/shared_structures.js 2864 /agent/ssl_lib/cronet.js.map @@ -81,8 +81,8 @@ 3954 /agent/ssl_lib/monobtls.js 31291 /agent/ssl_lib/nss.js.map 52013 /agent/ssl_lib/nss.js -13147 /agent/ssl_lib/openssl_boringssl.js.map -15836 /agent/ssl_lib/openssl_boringssl.js +13213 /agent/ssl_lib/openssl_boringssl.js.map +15932 /agent/ssl_lib/openssl_boringssl.js 5279 /agent/ssl_lib/s2ntls.js.map 6545 /agent/ssl_lib/s2ntls.js 4770 /agent/ssl_lib/wolfssl.js.map @@ -2115,7 +2115,7 @@ export class PatternBasedHooking { } } ✄ -{"version":3,"file":"shared_functions.js","sourceRoot":"/Users/danielbaier/research/projects/github/issues/2024 fritap issues/friTap/","sources":["agent/shared/shared_functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AAG9E,SAAS,uBAAuB,CAAC,WAAmB;IAChD,IAAI,eAAe,GAAG,CAAC,CAAC;IACxB,IAAI,aAAa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7B;SAAI;QACD,OAAO,KAAK,CAAC;KAChB;AAGL,CAAC;AAGD,qFAAqF;AACrF,MAAM,UAAU,qBAAqB,CAAC,IAAyD;IAC3F,OAAO,CAAC,UAAkB,EAAE,YAAqB,EAAE,EAAE;QACjD,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACnC,CAAC,CAAC;AACN,CAAC;AAGD,MAAM,UAAU,8BAA8B,CAAC,OAAiC;IAC5E,OAAO,KAAK;SACP,IAAI,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,qDAAqD;SACnF,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,4CAA4C;SAC1G,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,uCAAuC;AAC1D,CAAC"} +{"version":3,"file":"shared_functions.js","sourceRoot":"/Users/danielbaier/research/projects/github/issues/2024 fritap issues/friTap/","sources":["agent/shared/shared_functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AAG9E,SAAS,uBAAuB,CAAC,WAAmB;IAChD,IAAI,eAAe,GAAG,CAAC,CAAC;IACxB,IAAI,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;IACxD,IAAG,aAAa,KAAK,IAAI,IAAI,aAAa,KAAK,IAAI,EAAC;QAChD,GAAG,CAAC,cAAc,GAAC,eAAe,GAAC,mCAAmC,GAAC,WAAW,CAAC,CAAC;QACpF,UAAU,CAAC,uBAAuB,EAAC,eAAe,CAAC,CAAA;KACtD;AACL,CAAC;AAED;;;;;GAKG;AAEH,MAAM,UAAU,kBAAkB,CAAC,cAAsB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AAC;IAC3C,MAAM,OAAO,GAAG,QAAQ,CAAC,gBAAgB,CAAC,UAAU,GAAG,UAAU,GAAG,GAAG,GAAG,UAAU,CAAC,CAAC;IACtF,wCAAwC;IAExC,IAAG,OAAO,EAAC;QACP,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;KAC7B;SAAI;QACD,OAAO,KAAK,CAAC;KAChB;AAGL,CAAC;AAGD,qFAAqF;AACrF,MAAM,UAAU,qBAAqB,CAAC,IAAyD;IAC3F,OAAO,CAAC,UAAkB,EAAE,YAAqB,EAAE,EAAE;QACjD,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACnC,CAAC,CAAC;AACN,CAAC;AAGD,MAAM,UAAU,8BAA8B,CAAC,OAAiC;IAC5E,OAAO,KAAK;SACP,IAAI,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,qDAAqD;SACnF,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,4CAA4C;SAC1G,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,uCAAuC;AAC1D,CAAC"} ✄ import { log, devlog, devlog_error } from "../util/log.js"; import { AF_INET, AF_INET6 } from "./shared_structures.js"; @@ -2179,6 +2179,23 @@ export function getModuleNames() { Process.enumerateModules().forEach(item => moduleNames.push(item.name)); return moduleNames; } +export function checkNumberOfExports(moduleName) { + try { + // Get the module by name + const module = Process.getModuleByName(moduleName); + // Enumerate exports of the module + const exports = module.enumerateExports(); + // Get the number of exports + const numberOfExports = exports.length; + // Log the result + devlog(`The module "${moduleName}" has ${numberOfExports} exports.`); + return numberOfExports; + } + catch (error) { + devlog(`Error checking exports for module "${moduleName}": ${error}`); + return -1; + } +} export function readAddresses(moduleName, library_method_mapping) { const resolver = new ApiResolver("module"); const addresses = {}; @@ -4380,9 +4397,9 @@ NSS.secret_callback = new NativeCallback(function (sslSocketFD, epoch, dir, secr return; }, "void", ["pointer", "uint16", "uint16", "pointer", "pointer"]); ✄ -{"version":3,"file":"openssl_boringssl.js","sourceRoot":"/Users/danielbaier/research/projects/github/issues/2024 fritap issues/friTap/","sources":["agent/ssl_lib/openssl_boringssl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvH,OAAO,EAAc,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,cAAc;IAGhB;QAFO,qBAAgB,GAAuB,IAAI,CAAC;QAC5C,sBAAiB,GAAuB,IAAI,CAAC;QAEhD,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAEO,gBAAgB;QACpB,IAAI,CAAC,SAAS,EAAE,CAAC,MAAM,EAAC,EAAE;YACtB,YAAY;YACZ,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAE,IAAI,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC;gBACjH,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;YACxB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA;YACnB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC5B,CAAC,CAAC,CAAC;IAEP,CAAC;IAEO,iBAAiB;QACrB,IAAI,CAAC,UAAU,EAAE,CAAC,MAAM,EAAC,EAAE;YACvB,YAAY;YACZ,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC,C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CAAC,OAAO,EAAE,WAAW,CAAkB,CAAA;QACtE,IAAI,GAAG,GAAG,WAAW,CAAC,OAAO,EAAE,CAAA;QAC/B,IAAI,UAAU,GAAG,EAAE,CAAA;QACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;YAC1B,sEAAsE;YACtE,oBAAoB;YAEpB,UAAU;gBACN,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;SACtE;QACD,OAAO,UAAU,CAAA;IACrB,CAAC;;AAlVM,iCAAe,GAAG,IAAI,cAAc,CAAC,UAAU,MAAM,EAAE,OAAsB;IAChF,MAAM,CAAC,iDAAiD,CAAC,CAAC;IAC1D,IAAI,OAAO,GAA8C,EAAE,CAAA;IAC3D,OAAO,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAA;IACjC,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,CAAA;IACzC,IAAI,CAAC,OAAO,CAAC,CAAA;AACjB,CAAC,EAAE,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,AANZ,CAMY"} +{"version":3,"file":"openssl_boringssl.js","sourceRoot":"/Users/danielbaier/research/projects/github/issues/2024 fritap issues/friTap/","sources":["agent/ssl_lib/openssl_boringssl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC7I,OAAO,EAAc,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,cAAc;IAGhB;QA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C,CAAC,CAAC,CAAC,CAAA;SACtE;QACD,OAAO,UAAU,CAAA;IACrB,CAAC;;AApVM,iCAAe,GAAG,IAAI,cAAc,CAAC,UAAU,MAAM,EAAE,OAAsB;IAChF,MAAM,CAAC,iDAAiD,CAAC,CAAC;IAC1D,IAAI,OAAO,GAA8C,EAAE,CAAA;IAC3D,OAAO,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAA;IACjC,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,CAAA;IACzC,IAAI,CAAC,OAAO,CAAC,CAAA;AACjB,CAAC,EAAE,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,AANZ,CAMY"} ✄ -import { readAddresses, getPortsAndAddresses, getBaseAddress, isSymbolAvailable } from "../shared/shared_functions.js"; +import { readAddresses, getPortsAndAddresses, getBaseAddress, isSymbolAvailable, checkNumberOfExports } from "../shared/shared_functions.js"; import { offsets, enable_default_fd } from "../ssl_log.js"; import { devlog, log } from "../util/log.js"; class ModifyReceiver { @@ -4443,7 +4460,9 @@ export class OpenSSL_BoringSSL { this.library_method_mapping = passed_library_method_mapping; } else { - this.library_method_mapping[`*${moduleName}*`] = ["SSL_read", "SSL_write", "SSL_get_fd", "SSL_get_session", "SSL_SESSION_get_id", "SSL_new", "SSL_CTX_set_keylog_callback"]; + if (checkNumberOfExports(moduleName) > 2) { + this.library_method_mapping[`*${moduleName}*`] = ["SSL_read", "SSL_write", "SSL_get_fd", "SSL_get_session", "SSL_SESSION_get_id", "SSL_new", "SSL_CTX_set_keylog_callback"]; + } this.library_method_mapping[`*${socket_library}*`] = ["getpeername", "getsockname", "ntohs", "ntohl"]; } // Check and add SSL_read_ex if available diff --git a/friTap/about.py b/friTap/about.py index c2ad42f..51aa56d 100644 --- a/friTap/about.py +++ b/friTap/about.py @@ -2,5 +2,5 @@ # -*- coding: utf-8 -*- __author__ = "Daniel Baier, Francois Egner, Max Ufer" -__version__ = "1.2.3.6" +__version__ = "1.2.4.0" debug = False # are we running in debug mode? \ No newline at end of file diff --git a/friTap/friTap.py b/friTap/friTap.py index 2b3c376..39edd1d 100755 --- a/friTap/friTap.py +++ b/friTap/friTap.py @@ -25,15 +25,6 @@ def write_debug_frida_file(debug_script_version): -''' -def running_hooks(script="custom_hooks.js"): - run_custom_hooks(script) - start_fritap_hooks() -''' - - - - class ArgParser(argparse.ArgumentParser): def error(self, message): print("friTap v" + __version__) @@ -57,6 +48,7 @@ def main(): %(prog)s -m -p ssl.pcap com.example.app %(prog)s -m --pcap log.pcap --verbose com.example.app %(prog)s -m -k keys.log -v -s com.example.app + %(prog)s -m -k keys.log -v -c -s com.example.app %(prog)s -m --patterns pattern.json -k keys.log -s com.google.android.youtube %(prog)s --pcap log.pcap "$(which curl) https://www.google.com" %(prog)s -H --pcap log.pcap 192.168.0.1:1234 com.example.app @@ -70,6 +62,8 @@ def main(): const=True, default=False, help="Attach to a process on android or iOS") args.add_argument("-H", "--host", metavar="", required=False, help="Attach to a process on remote frida device") + args.add_argument("-c", "--custom_script", metavar="", required=False, + help="Path to the custom Frida script that will be executed prior to applying the friTap hooks.") args.add_argument("-d", "--debug", required=False, action="store_const", const=True, help="Set friTap into debug mode this include debug output as well as a listening Chrome Inspector server for remote debugging.") args.add_argument("-do", "--debugoutput", required=False, action="store_const", const=True, @@ -120,7 +114,7 @@ def main(): print("Start logging") print("Press Ctrl+C to stop logging") ssl_log = SSL_Logger(parsed.exec, parsed.pcap, parsed.verbose, - parsed.spawn, parsed.keylog, parsed.enable_spawn_gating, parsed.mobile, parsed.live, parsed.environment, parsed.debug, parsed.full_capture, parsed.socket_tracing, parsed.host, parsed.offsets, parsed.debugoutput, parsed.experimental, parsed.anti_root, parsed.payload_modification, parsed.enable_default_fd, parsed.patterns) + parsed.spawn, parsed.keylog, parsed.enable_spawn_gating, parsed.mobile, parsed.live, parsed.environment, parsed.debug, parsed.full_capture, parsed.socket_tracing, parsed.host, parsed.offsets, parsed.debugoutput, parsed.experimental, parsed.anti_root, parsed.payload_modification, parsed.enable_default_fd, parsed.patterns, parsed.custom_script) process = ssl_log.start_fritap_session() diff --git a/friTap/ssl_logger.py b/friTap/ssl_logger.py index e35318d..ac1b2b0 100644 --- a/friTap/ssl_logger.py +++ b/friTap/ssl_logger.py @@ -31,7 +31,7 @@ class SSL_Logger(): - def __init__(self, app, pcap_name=None, verbose=False, spawn=False, keylog=False, enable_spawn_gating=False, mobile=False, live=False, environment_file=None, debug_mode=False,full_capture=False, socket_trace=False, host=False, offsets=None, debug_output=False, experimental=False, anti_root=False, payload_modification=False,enable_default_fd=False, patterns=None): + def __init__(self, app, pcap_name=None, verbose=False, spawn=False, keylog=False, enable_spawn_gating=False, mobile=False, live=False, environment_file=None, debug_mode=False,full_capture=False, socket_trace=False, host=False, offsets=None, debug_output=False, experimental=False, anti_root=False, payload_modification=False,enable_default_fd=False, patterns=None, custom_hook_script=None): self.debug = debug_mode self.anti_root = anti_root self.pcap_name = pcap_name @@ -53,6 +53,7 @@ def __init__(self, app, pcap_name=None, verbose=False, spawn=False, keylog=False self.payload_modification = payload_modification self.enable_default_fd = enable_default_fd self.experimental = experimental + self.custom_hook_script = custom_hook_script self.script = None self.tmpdir = None @@ -64,20 +65,53 @@ def __init__(self, app, pcap_name=None, verbose=False, spawn=False, keylog=False self.keylog_file = None self.patterns = patterns - self.pattern_data = None + self.pattern_data = None + self.keydump_Set = {*()} + self.traced_Socket_Set = {*()} + self.traced_scapy_socket_Set = {*()} + + self.init_fritap() + + + def init_fritap(self): if frida.__version__ < "16": self.frida_agent_script = "_ssl_log_legacy.js" else: self.frida_agent_script = "_ssl_log.js" - - if self.debug_output: - print("[***] loading frida script: " + self.frida_agent_script) - self.keydump_Set = {*()} - self.traced_Socket_Set = {*()} - self.traced_scapy_socket_Set = {*()} - + if self.pcap_name: + self.pcap_obj = PCAP(self.pcap_name,SSL_READ,SSL_WRITE,self.full_capture, self.mobile,self.debug) + + if self.offsets is not None: + if os.path.exists(self.offsets): + offset_file = open(self.offsets, "r") + self.offsets_data = offset_file.read() + offset_file.close() + else: + try: + json.load(self.offsets) + self.offsets_data = self.offsets + except ValueError as e: + print(f"Log error, defaulting to auto-detection: {e}") + + if self.patterns is not None: + self.load_patterns() + + if self.keylog: + self.keylog_file = open(self.keylog, "w") + + if self.live: + if self.pcap_name: + print("[*] YOU ARE TRYING TO WRITE A PCAP AND HAVING A LIVE VIEW\nTHIS IS NOT SUPPORTED!\nWHEN YOU DO A LIVE VIEW YOU CAN SAFE YOUR CAPUTRE WITH WIRESHARK.") + fifo_file = self.temp_fifo() + print(f'[*] friTap live view on Wireshark') + print(f'[*] Created named pipe for Wireshark live view to {fifo_file}') + print( + f'[*] Now open this named pipe with Wireshark in another terminal: sudo wireshark -k -i {fifo_file}') + print(f'[*] friTap will continue after the named pipe is ready....\n') + self.pcap_obj = PCAP(fifo_file,SSL_READ,SSL_WRITE,self.full_capture, self.mobile,self.debug) + def on_detach(self, reason): if reason != "application-requested": @@ -206,6 +240,25 @@ def on_fritap_message(self,job, message, data): self.traced_scapy_socket_Set.add(scapy_filter) + + def on_custom_hook_message(self, message, data): + """ + This handler is used to print the messages from the provided custom hooks + """ + + if message["type"] == "error": + pprint.pprint(message) + os.kill(os.getpid(), signal.SIGTERM) + return + + custom_hook_payload = message["payload"] + if not "custom" in custom_hook_payload: + return + + print("[+] custom hook: "+custom_hook_payload["custom"]) + + + def on_child_added(self, child): print(f"[*] Attached to child process with pid {child.pid}") self.instrument(self.device.attach(child.pid)) @@ -230,7 +283,14 @@ def instrument(self, process): print("[!] Open Chrome with chrome://inspect for debugging\n") runtime="v8" + if self.custom_hook_script is not None: + custom_script_string = self.get_custom_frida_script() + if self.debug_output: + print("[***] loading custom frida script: " + self.custom_hook_script) + script_string = self.get_fritap_frida_script() + if self.debug_output: + print("[***] loading friTap frida script: " + self.frida_agent_script) if self.offsets_data is not None: @@ -239,7 +299,13 @@ def instrument(self, process): if self.pattern_data is not None: print(f"[*] Using pattern provided by pattern.json for hooking") - + + + if self.custom_hook_script is not None: + self.custom_script = process.create_script(custom_script_string, runtime=runtime) + self.custom_script.on("message", self.on_custom_hook_message) + self.custom_script.load() + self.script = process.create_script(script_string, runtime=runtime) @@ -314,6 +380,7 @@ def start_fritap_session(self): else: self.device = frida.get_local_device() + """ if self.offsets is not None: if os.path.exists(self.offsets): offset_file = open(self.offsets, "r") @@ -328,6 +395,7 @@ def start_fritap_session(self): if self.patterns is not None: self.load_patterns() + """ self.device.on("child_added", self.on_child_added) @@ -337,8 +405,8 @@ def start_fritap_session(self): if self.spawn: print("spawning "+ self.target_app) - if self.pcap_name: - self.pcap_obj = PCAP(self.pcap_name,SSL_READ,SSL_WRITE,self.full_capture, self.mobile,self.debug) + #if self.pcap_name: + # self.pcap_obj = PCAP(self.pcap_name,SSL_READ,SSL_WRITE,self.full_capture, self.mobile,self.debug) if self.mobile or self.host: pid = self.device.spawn(self.target_app) @@ -352,10 +420,11 @@ def start_fritap_session(self): time.sleep(1) # without it Java.perform silently fails self.process = self.device.attach(pid) else: - if self.pcap_name: - self.pcap_obj = PCAP(self.pcap_name,SSL_READ,SSL_WRITE,self.full_capture, self.mobile,self.debug) + #if self.pcap_name: + # self.pcap_obj = PCAP(self.pcap_name,SSL_READ,SSL_WRITE,self.full_capture, self.mobile,self.debug) self.process = self.device.attach(int(self.target_app) if self.target_app.isnumeric() else self.target_app) + """ if self.live: if self.pcap_name: print("[*] YOU ARE TRYING TO WRITE A PCAP AND HAVING A LIVE VIEW\nTHIS IS NOT SUPPORTED!\nWHEN YOU DO A LIVE VIEW YOU CAN SAFE YOUR CAPUTRE WITH WIRESHARK.") @@ -370,6 +439,7 @@ def start_fritap_session(self): if self.keylog: self.keylog_file = open(self.keylog, "w") + """ self.instrument(self.process) @@ -401,6 +471,10 @@ def wrapped_handler(message, data): self.on_fritap_message(None, message, data) return wrapped_handler + + + def set_keylog_file(self, keylog_name): + self.keylog_file = open(keylog_name, "w") def pcap_cleanup(self, is_full_capture, is_mobile, pcap_name): @@ -449,6 +523,12 @@ def get_fritap_frida_script(self): return script_string + def get_custom_frida_script(self): + with open(os.path.join(here, self.custom_hook_script), encoding='utf-8', newline='\n') as f: + script_string = f.read() + return script_string + + def get_fritap_frida_script_path(self): return os.path.join(os.path.dirname(__file__), self.frida_agent_script) diff --git a/package.json b/package.json index 78f1a76..2bd37dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "friTap", - "version": "1.2.3.6", + "version": "1.2.4.0", "description": "Frida agent for logging SSL traffic as plaintext and extracting SSL keys", "private": true, "main": "agent/ssl_log.ts",