### Windows Quick Start Source: https://fkie-cad.github.io/friTap/platforms Install friTap and run it with administrative privileges on Windows. ```bash # Install Python from python.org or Windows Store # Install friTap pip install fritap # Run as Administrator fritap -k keys.log --pcap traffic.pcap chrome.exe ``` -------------------------------- ### Quick Start friTap Commands Source: https://fkie-cad.github.io/friTap Initial installation and basic usage examples for desktop and mobile application analysis. ```bash # Install friTap pip install fritap # Basic usage - Desktop application sudo fritap --pcap capture.pcap firefox # Mobile application analysis fritap -m -k keys.log com.example.app ``` -------------------------------- ### Setup Local MkDocs Development Source: https://fkie-cad.github.io/friTap/development/documentation Commands to install dependencies and serve documentation locally. ```bash # Install MkDocs and dependencies pip install mkdocs mkdocs-material # Serve documentation locally mkdocs serve # Open browser to http://127.0.0.1:8000 ``` -------------------------------- ### Linux Quick Start Source: https://fkie-cad.github.io/friTap/platforms Install dependencies and run friTap on Linux systems. ```bash # Install dependencies sudo apt update && sudo apt install python3 python3-pip # Install friTap pip3 install fritap # Basic usage sudo fritap -k keys.log --pcap traffic.pcap firefox ``` -------------------------------- ### macOS Quick Start Source: https://fkie-cad.github.io/friTap/platforms Install dependencies and configure BPF permissions for friTap on macOS. ```bash # Install Homebrew and dependencies brew install python@3.11 # Install friTap pip3 install fritap # Configure BPF permissions sudo chmod 644 /dev/bpf* # Basic usage sudo fritap -k keys.log --pcap traffic.pcap Safari ``` -------------------------------- ### Manual Development Setup Source: https://fkie-cad.github.io/friTap/development/contributing Configures the Python virtual environment, installs dependencies, and builds the TypeScript agent manually. ```bash # Python environment python -m venv venv source venv/bin/activate # Linux/macOS # venv\Scripts\activate # Windows # Install development dependencies pip install -r requirements-dev.txt pip install -e . # Node.js dependencies (for TypeScript agent) npm install # Install frida-tools for latest frida-compile pip install --upgrade frida-tools # Verify setup python run_tests.py summary npm run build ``` -------------------------------- ### Setup Development Environment Source: https://fkie-cad.github.io/friTap/platforms/macos Commands to install Xcode Command Line Tools, Homebrew, Python, and the friTap package. ```bash # Install Xcode Command Line Tools xcode-select --install # Install Homebrew (recommended package manager) /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Install Python (if not using system Python) brew install python@3.11 # Install friTap pip3 install fritap ``` -------------------------------- ### Configure and Verify Test Environment Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Commands to check the status of the test environment, install dependencies, and perform initial setup. ```bash # Check test environment status python run_tests.py summary # Install missing test dependencies pip install -r tests/requirements.txt # Setup test environment python run_tests.py setup ``` -------------------------------- ### Install Documentation Tools Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Installs tools for generating project documentation. ```bash # Documentation generation pip install mkdocs mkdocs-material # API documentation pip install pdoc3 ``` -------------------------------- ### Install Fritap on macOS Source: https://fkie-cad.github.io/friTap/platforms Setup instructions using Homebrew-managed Python or pyenv for version management on macOS. ```bash # Homebrew-managed Python brew install python@3.11 pip3 install fritap # pyenv for version management brew install pyenv pyenv install 3.11.0 pyenv global 3.11.0 ``` -------------------------------- ### Format Code Examples Source: https://fkie-cad.github.io/friTap/CONTRIBUTING_TO_DOCS?q= Examples of how to present CLI and Python code blocks with syntax highlighting. ```bash fritap -k keys.log firefox ``` ```python from friTap import SSL_Logger logger = SSL_Logger() ``` -------------------------------- ### iOS Quick Start Source: https://fkie-cad.github.io/friTap/platforms Run friTap on a jailbroken iOS device with Frida installed. ```bash # Setup jailbroken device with frida # Install Frida via Cydia/Sileo # Basic usage fritap -m -k keys.log --pcap traffic.pcap com.example.app ``` -------------------------------- ### Build Output Example Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Expected output when running the build command. ```bash $ npm run build > friTap build > frida-compile agent/fritap_agent.ts -o friTap/fritap_agent.js Compiling main agent... ✓ Generated friTap/fritap_agent.js (450KB) ``` -------------------------------- ### Android Quick Start Source: https://fkie-cad.github.io/friTap/platforms Initialize frida-server and run friTap on a rooted Android device. ```bash # Setup device with root and frida-server adb devices adb shell su -c "/data/local/tmp/frida-server &" # Basic usage fritap -m -k keys.log --pcap traffic.pcap com.example.app ``` -------------------------------- ### Automated Development Setup Source: https://fkie-cad.github.io/friTap/development/contributing Clones the repository and executes the automated setup script to configure dependencies and hooks. ```bash # Clone repository git clone https://github.com/fkie-cad/friTap.git cd friTap # Run automated setup script python dev/setup_dev.py ``` -------------------------------- ### Fritap Help Examples Source: https://fkie-cad.github.io/friTap/api/cli Various command-line examples derived from the Fritap help menu, covering diverse capture scenarios and flags. ```bash fritap -m -p ssl.pcap com.example.app fritap -m --pcap log.pcap --verbose com.example.app fritap -m -k keys.log -v -s com.example.app fritap -m -k keys.log -v -c -s com.example.app fritap -m --patterns pattern.json -k keys.log -s com.google.android.youtube fritap --pcap log.pcap "$(which curl) https://www.google.com" fritap -H 192.168.0.1:1234 --pcap log.pcap com.example.app fritap -m -p log.pcap --enable_spawn_gating -v -do -sot --full_capture -k keys.log com.example.app fritap -m -p log.pcap --enable_spawn_gating -v -do --anti_root --full_capture -k keys.log com.example.app fritap -m -p log.pcap --enable_default_fd com.example.app ``` -------------------------------- ### Install Documentation Dependencies Source: https://fkie-cad.github.io/friTap/CONTRIBUTING_TO_DOCS?q= Commands to install required Python packages for building the documentation. ```bash pip install -r docs/requirements.txt ``` ```bash pip install mkdocs-material mkdocstrings[python] mkdocs-mermaid2-plugin ``` -------------------------------- ### Install friTap via PyPI Source: https://fkie-cad.github.io/friTap/getting-started/installation Standard installation command for the latest stable version of friTap. ```bash pip install fritap ``` ```bash pip install --upgrade fritap ``` -------------------------------- ### Advanced friTap Execution Examples Source: https://fkie-cad.github.io/friTap/platforms/wine?q= Examples demonstrating verbose output, debug mode, and handling file paths with spaces. ```bash # Analyze a Windows game sudo fritap --experimental -k game_keys.log wine ~/.wine/drive_c/Games/game.exe # Analyze with verbose output sudo fritap --experimental -v -k keys.log wine /path/to/app.exe # Debug mode for troubleshooting sudo fritap --experimental -do -v wine /path/to/app.exe # Spawn target whose path contains spaces — quote it so the shell passes one # token; friTap preserves the argv and spawns it intact (no space-splitting). sudo fritap --experimental -s -k keys.log wine "/home/u/.wine/drive_c/Program Files/App/app.exe" ``` -------------------------------- ### Key Extraction CLI Example Source: https://fkie-cad.github.io/friTap/development/documentation?q= Practical example of extracting keys from Firefox and viewing the output. ```bash # Extract keys from Firefox fritap -k firefox_keys.log firefox # View extracted keys head firefox_keys.log ``` -------------------------------- ### Install and Verify friTap Source: https://fkie-cad.github.io/friTap Standard installation via PyPI and verification of the CLI tool. ```bash # Install from PyPI pip install fritap # Verify installation fritap --help ``` -------------------------------- ### Install and Verify Frida Source: https://fkie-cad.github.io/friTap/platforms/linux?q= Install the frida-tools package and verify the installation with basic commands. ```bash # Install frida-tools pip3 install frida-tools # Verify installation frida --version # Test local device frida-ps ``` -------------------------------- ### Install Frida and Analysis Tools Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Installs the Frida framework and optional analysis dependencies. ```bash # Frida framework and tools pip install frida-tools # Optional analysis dependencies pip install scapy watchdog pip install AndroidFridaManager # For Android development ``` -------------------------------- ### Install Fritap on Windows Source: https://fkie-cad.github.io/friTap/platforms Commands for configuring a virtual environment or installing Fritap system-wide on Windows. ```bash # Virtual environment python -m venv fritap_env fritap_env\Scripts\activate pip install fritap # System-wide installation pip install fritap ``` -------------------------------- ### Install Wine on Linux Source: https://fkie-cad.github.io/friTap/platforms/wine?q= Commands to install the Wine package on various Linux distributions and verify the installation. ```bash # Ubuntu/Debian sudo apt install wine wine64 # Fedora sudo dnf install wine # Arch Linux sudo pacman -S wine # Verify installation wine --version ``` -------------------------------- ### Run friTap with protocol flags Source: https://fkie-cad.github.io/friTap/api/cli Examples of launching friTap with specific protocol configurations and key logging. ```bash fritap --protocol ssh -k keys.log sshd fritap --protocol auto -k keys.log target ``` -------------------------------- ### Install Fritap on Linux Source: https://fkie-cad.github.io/friTap/platforms Commands for setting up a virtual environment or performing a system-wide installation on Linux systems. ```bash # Virtual environment setup python3 -m venv fritap_env source fritap_env/bin/activate pip install fritap # System-wide installation sudo pip3 install fritap ``` -------------------------------- ### Test Documentation Examples and Links Source: https://fkie-cad.github.io/friTap/development/documentation Executes automated test scripts for Python and CLI examples and validates build integrity using mkdocs. ```bash # Test all code examples cd docs/examples python test_python_examples.py # Test CLI examples bash test_cli_examples.sh # Check for broken links mkdocs build --strict ``` -------------------------------- ### Install friTap via pip Source: https://fkie-cad.github.io/friTap/getting-started/installation Standard installation command for friTap on desktop platforms. ```bash pip3 install fritap ``` ```bash pip install fritap ``` -------------------------------- ### Install Development Utilities Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Installs tools for package management, distribution, and code quality. ```bash # Package management and distribution pip install setuptools wheel twine # Code quality tools pip install isort bandit safety ``` -------------------------------- ### Code Block Syntax Examples Source: https://fkie-cad.github.io/friTap/development/documentation Examples of language-specific code blocks for documentation. ```bash fritap -k keys.log target_app ``` ```python from friTap import SSL_Logger logger = SSL_Logger("target_app") ``` ```typescript import { log } from "./util/log.js"; log("TypeScript example"); ``` -------------------------------- ### Initialize Python Environment Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Sets up a virtual environment and installs the project in development mode along with dev dependencies. ```bash # Create and activate virtual environment python -m venv venv source venv/bin/activate # Linux/macOS # venv\Scripts\activate # Windows # Install friTap in development mode pip install -e . # Install development dependencies pip install -r requirements-dev.txt ``` -------------------------------- ### Install Optional Dependencies Source: https://fkie-cad.github.io/friTap/getting-started/installation Install system-level tools and development packages to enable enhanced functionality and local development. ```bash # Wireshark for live analysis sudo apt install wireshark # tcpdump for packet capture sudo apt install tcpdump # Development tools pip install pytest ruff mypy ``` -------------------------------- ### Install cryptography backend Source: https://fkie-cad.github.io/friTap/protocols/telegram Install the required cryptography library for offline decryption. ```bash pip install cryptography ``` -------------------------------- ### Install ADB Source: https://fkie-cad.github.io/friTap/getting-started/installation Commands to install Android Debug Bridge on desktop platforms. ```bash # Linux/macOS sudo apt install android-tools-adb # Ubuntu/Debian brew install android-platform-tools # macOS # Windows # Download from https://developer.android.com/studio/releases/platform-tools ``` -------------------------------- ### Install Wireshark Backend Source: https://fkie-cad.github.io/friTap/api/cli Installs the friTap extcap backend to enable friTap as a capture interface within Wireshark. ```bash fritap install-backend wireshark ``` -------------------------------- ### Install Python on macOS Source: https://fkie-cad.github.io/friTap/getting-started/installation Install Python 3 using Homebrew. ```bash brew install python3 ``` -------------------------------- ### Example usage of ReplayController Source: https://fkie-cad.github.io/friTap/api/python?q= Demonstrates the typical workflow of opening a .tap file, iterating through summaries, and loading a specific flow. ```python from friTap import ReplayController with ReplayController("capture_20260507_153933.tap") as rc: # offline / CI-runnable meta = rc.load() print("flows:", rc.flow_count) for summary in rc.get_summaries(): print(summary.flow_id, summary.protocol, summary.host) flow = rc.get_flow(rc.get_summaries()[0].flow_id) print(flow.to_dict()) ``` -------------------------------- ### Verify friTap installation Source: https://fkie-cad.github.io/friTap/getting-started/installation Use these commands to confirm the installation and view available options. ```bash # Check version fritap --version # Check help fritap --help ``` -------------------------------- ### Initialize Analysis with Simple Targets Source: https://fkie-cad.github.io/friTap/getting-started/concepts Start by testing against known endpoints to verify basic functionality and key extraction. ```bash fritap -k keys.log curl https://httpbin.org/get ``` -------------------------------- ### Keylog Format Example Source: https://fkie-cad.github.io/friTap/api/python?q= Example of the keylog format used for SSL/TLS decryption. ```text # -> key: CLIENT_RANDOM abc def ``` -------------------------------- ### Install frida-compile Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Installs frida-tools to ensure the latest version of frida-compile is available. ```bash # Install frida-tools (includes latest frida-compile) pip install --upgrade frida-tools # Verify installation frida-compile --version ``` -------------------------------- ### Install friTap for Development Source: https://fkie-cad.github.io/friTap/getting-started/installation Commands to clone the repository and install the package in editable mode with development dependencies. ```bash # Clone the repository git clone https://github.com/fkie-cad/friTap.git cd friTap # Install in development mode pip install -e . # Install with development dependencies pip install -e .[dev] ``` -------------------------------- ### Install Development Tools Source: https://fkie-cad.github.io/friTap/platforms/ios Commands to install necessary dependencies for friTap development on macOS and Linux. ```bash # Install required tools # macOS (recommended) brew install usbmuxd brew install libimobiledevice # Linux sudo apt install usbmuxd libimobiledevice-tools # Install frida-tools pip3 install frida-tools ``` -------------------------------- ### Perform a Lean Installation Source: https://fkie-cad.github.io/friTap/getting-started/installation Installs friTap without dependencies to minimize footprint, requiring a manual minimal requirements file. ```bash pip install friTap --no-deps && pip install -r requirements-minimal.txt ``` -------------------------------- ### Install frida-server on iOS Source: https://fkie-cad.github.io/friTap/getting-started/installation Commands to SSH into an iOS device and install the server package. ```bash # SSH into your device ssh root@your-device-ip # Install frida-server cydia://package/re.frida.server ``` -------------------------------- ### Install Python Core Development Tools Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Installs essential testing, linting, and type-checking tools. ```bash # Essential development tools pip install pytest pytest-cov black flake8 mypy # Testing utilities pip install pytest-mock pytest-timeout pytest-xdist # Pre-commit hooks pip install pre-commit ``` -------------------------------- ### Clone and Run Automated Setup Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Use the provided Python script to automatically configure the development environment after cloning the repository. ```bash # Clone the repository git clone https://github.com/fkie-cad/friTap.git cd friTap # Run automated setup python dev/setup_dev.py ``` -------------------------------- ### Initialize SSL Logger in Python Source: https://fkie-cad.github.io/friTap/development/documentation A complete example demonstrating how to initialize the SSL_Logger and extract keys from a target process. ```python # Complete example with imports and error handling import logging from friTap import SSL_Logger # Configure logging logging.basicConfig(level=logging.INFO) try: # Initialize SSL logger logger = SSL_Logger( target="firefox", mobile=False, verbose=True ) # Start key extraction with logger: results = logger.extract_keys("firefox_keys.log") print(f"Analysis complete:") print(f" Keys extracted: {len(results['keys'])}") print(f" Libraries detected: {results['metadata']['libraries']}") print(f" Duration: {results['metadata']['duration']:.2f}s") except Exception as e: print(f"Error: {e}") print("Try running with sudo or check if target process exists") ``` -------------------------------- ### Install Linux Dependencies Source: https://fkie-cad.github.io/friTap/development/contributing Install essential build tools and Python development headers on Linux systems. ```bash sudo apt-get install build-essential python3-dev ``` -------------------------------- ### Install macOS Dependencies Source: https://fkie-cad.github.io/friTap/development/contributing Install Node.js and Xcode command line tools on macOS. ```bash brew install node xcode-select --install ``` -------------------------------- ### Dynamic discovery output example Source: https://fkie-cad.github.io/friTap/platforms/wine?q= Example output showing resolved function addresses and generated patterns for GnuTLS. ```text [gnutls dyn] resolved _gnutls_call_keylog_func @ 0x780fa5c54e90 [gnutls dyn] version-specific pattern (32 bytes): 55 48 89 E5 41 57 41 56 … [gnutls dyn] --patterns override: { "modules": { "gnutls": { "wine": { "x64": { … } } } } } ``` -------------------------------- ### GitHub Discussion Examples Source: https://fkie-cad.github.io/friTap/development/community?q= Examples of appropriate topics for Q&A, feature ideas, and project showcases. ```text # Q&A: "How to analyze Flutter apps with custom SSL implementations?" I'm trying to analyze a Flutter app that seems to use a custom SSL library. Standard friTap hooks don't seem to work. Has anyone encountered this before? # Ideas: "Integration with YARA rules for automated analysis" Would it be useful to integrate YARA rules to automatically categorize and analyze SSL traffic patterns? This could help identify malware families or suspicious behavior. # Show and Tell: "friTap analysis of banking app reveals interesting patterns" I used friTap to analyze traffic from a banking app and found some interesting certificate pinning bypass techniques. Here's what I learned... ``` -------------------------------- ### Initialize FriTap Configuration Source: https://fkie-cad.github.io/friTap/api/python?q= Example of constructing a FriTapConfig object to define target application, device settings, and output files. ```python config = FriTapConfig( target="com.example.app", device=DeviceConfig(mobile=True, spawn=True), output=OutputConfig(pcap="capture.pcap", keylog="keys.log"), ) ``` -------------------------------- ### Ubuntu/Debian Configuration Source: https://fkie-cad.github.io/friTap/platforms/linux?q= Installation of dependencies and management of AppArmor or Snap-specific constraints. ```bash # Install dependencies sudo apt install python3-dev libssl-dev # AppArmor considerations sudo aa-disable /usr/bin/fritap # Snap package considerations fritap --help # If installed via snap ``` -------------------------------- ### Verify Development Setup Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Runs tests to verify Python imports, TypeScript compilation, and the test framework. ```bash # Test Python installation python -c "import friTap; print('friTap imported successfully')" # Test TypeScript compilation npm run build # Verify compiled agents exist ls -la friTap/fritap_agent.js friTap/fritap_agent_legacy.js # Run test framework check python run_tests.py summary ``` -------------------------------- ### Install friTap on WSL2 Source: https://fkie-cad.github.io/friTap/platforms/windows Commands to install WSL2 and the friTap package within a Linux environment. ```bash # Install WSL2 (recommended for Linux-like environment) wsl --install -d Ubuntu # In WSL2 terminal: sudo apt update sudo apt install python3 python3-pip pip3 install fritap ``` -------------------------------- ### Usage example for protobuf decoding and formatting Source: https://fkie-cad.github.io/friTap/api/python?q= Demonstrates how to decode raw bytes and print the formatted message. ```python from friTap import decode_raw, format_message msg = decode_raw(b"\x08\x96\x01") # offline / CI-runnable print(format_message(msg)) # 1: 150 ``` -------------------------------- ### Continuous Monitoring Workflow Source: https://fkie-cad.github.io/friTap/examples Starts a live capture process for real-time monitoring. ```bash # 1. Start live capture fritap -l target & # 2. Open Wireshark to live pipe # File → Open → Select named pipe ``` -------------------------------- ### Perform basic functionality tests Source: https://fkie-cad.github.io/friTap/troubleshooting/common-issues?q= Verify the installation and basic operation of the tool using standard commands. ```bash # Test with known working application fritap -k test_keys.log curl https://httpbin.org/get # Verify friTap installation fritap --version fritap --help ``` -------------------------------- ### Execute CLI Commands Source: https://fkie-cad.github.io/friTap/development/documentation Examples of checking the version and running key extraction via the command line interface. ```bash # Show command progression and expected output $ fritap --version friTap 1.3.5.0 $ fritap -k keys.log firefox [*] Starting friTap analysis [*] Target: firefox (PID: 12345) [*] Detected libraries: OpenSSL 1.1.1 [*] SSL hooks installed successfully [*] Key extraction active [*] Press Ctrl+C to stop # After user browses some HTTPS sites ^C [*] Analysis stopped [*] Extracted 5 SSL keys to keys.log $ head keys.log CLIENT_RANDOM 52345678... ABCDEF123456... CLIENT_RANDOM 87654321... FEDCBA987654... ``` -------------------------------- ### Launch Interactive TUI Source: https://fkie-cad.github.io/friTap/getting-started/quick-start?q= Starts the interactive wizard for device selection and capture configuration. ```bash # Launch the interactive terminal UI (wizard) fritap ``` -------------------------------- ### Troubleshoot Import Errors Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Commands to verify installation and check Python path configuration. ```bash # Ensure friTap is installed in development mode pip install -e . # Check Python path python -c "import sys; print(sys.path)" # Verify friTap import python -c "import friTap; print(friTap.__version__)" ``` -------------------------------- ### Implement Type Hints Source: https://fkie-cad.github.io/friTap/development/coding-standards?q= Example of using comprehensive type hints for function signatures and return values. ```python from typing import Dict, List, Optional, Union, Tuple, Any def extract_ssl_keys( target_app: str, output_file: Optional[str] = None, mobile: bool = False, timeout: int = 30 ) -> Dict[str, Any]: """Extract SSL/TLS keys from target application. Args: target_app: Name or path of target application output_file: Optional file to save extracted keys mobile: Whether to use mobile analysis mode timeout: Maximum time to wait for key extraction Returns: Dictionary containing extracted keys and metadata Raises: FridaError: If Frida injection fails PermissionError: If insufficient privileges """ results: Dict[str, Any] = { "keys": [], "metadata": {}, "errors": [] } return results ``` -------------------------------- ### Integrate with Wireshark Source: https://fkie-cad.github.io/friTap/platforms/android?q= Commands for live analysis and installing the Wireshark extcap backend. ```bash # Live analysis with Wireshark fritap -m --live com.example.app # Then in Wireshark: File → Open → /tmp/sharkfin ``` ```bash fritap install-backend wireshark ``` -------------------------------- ### Install Windows Development Tools Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Prerequisites for Windows development including build tools, Node.js, Python, and Git. ```bash # Install Visual Studio Build Tools # Download from: https://visualstudio.microsoft.com/visual-cpp-build-tools/ # Install Node.js # Download from: https://nodejs.org/ # Install Python from Microsoft Store or python.org # Install Git for Windows # Download from: https://git-scm.com/download/win ``` -------------------------------- ### Unsupported applications examples Source: https://fkie-cad.github.io/friTap/platforms/macos Examples of applications that use SecureTransport or NSS, which are not supported or have limited support. ```bash # Safari - uses SecureTransport (NOT SUPPORTED) # sudo fritap -k safari_keys.log Safari # Will not capture keys # Messages - uses SecureTransport (NOT SUPPORTED) # sudo fritap -k messages_keys.log Messages # Will not capture keys # FaceTime - uses SecureTransport (NOT SUPPORTED) # sudo fritap -k facetime_keys.log FaceTime # Will not capture keys # Firefox - uses NSS (LIMITED SUPPORT on macOS) # sudo fritap -k firefox_keys.log Firefox # May have limited functionality ``` -------------------------------- ### Prepare iOS Device for Analysis Source: https://fkie-cad.github.io/friTap/platforms/ios Ensure a clean state and stable jailbreak environment before starting analysis. ```bash # Always start with clean device state # Remove previous analysis artifacts # Ensure stable jailbreak environment ``` -------------------------------- ### Analyze Third-Party Applications Source: https://fkie-cad.github.io/friTap/platforms/ios Examples for capturing keys from social media, banking, and enterprise applications. ```bash # Social media apps fritap -m -k instagram_keys.log com.burbn.instagram fritap -m -k whatsapp_keys.log net.whatsapp.WhatsApp # Banking apps (use test accounts only) fritap -m -k banking_keys.log com.example.bankapp # Enterprise apps fritap -m -k enterprise_keys.log com.company.app ``` -------------------------------- ### Setup Isolated Analysis Environment Source: https://fkie-cad.github.io/friTap/examples/malware?q= Commands for configuring isolated virtual machines or containers to safely execute malware samples. ```bash # Create isolated VM network # Disable internet access or use honeypot network # Install friTap in VM pip install fritap # Verify isolation ping 8.8.8.8 # Should fail or route to honeypot ``` ```bash # Docker isolation docker run -it --network none --name malware-analysis ubuntu:latest docker exec -it malware-analysis bash # Install friTap and analyze malware ``` -------------------------------- ### Example friTap Console Output Source: https://fkie-cad.github.io/friTap/development/community?q= Sample output showing a scenario where no SSL libraries are detected. ```text [*] Starting friTap analysis [*] Target: com.bank.mobile (PID: 12345) [*] No SSL libraries detected [*] Analysis stopped ``` -------------------------------- ### Declare Packaged Plugin Entry Point Source: https://fkie-cad.github.io/friTap/development/plugins?q= Configuration for distributing plugins as installable packages using entry points in pyproject.toml. ```toml [project.entry-points."fritap.plugins"] myplugin = "my_package.plugin:MyPlugin" ``` -------------------------------- ### Install Linux Development Dependencies Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Commands to install essential build tools and Frida-related dependencies on Linux systems. ```bash # Install system dependencies sudo apt-get install build-essential python3-dev # For Frida development sudo apt-get install pkg-config libffi-dev # For optional dependencies sudo apt-get install libpcap-dev # For scapy ``` -------------------------------- ### Start Frida Server on iOS Source: https://fkie-cad.github.io/friTap/platforms/ios Methods to initialize the Frida server via SSH, USB, or frida-tools. ```bash # Method 1: SSH connection ssh root@ frida-server & # Method 2: USB connection with iproxy iproxy 27042 27042 & frida-server & # Method 3: Using frida-tools frida-ls-devices # Auto-starts server if needed ``` -------------------------------- ### Configure Keylog CLI Options Source: https://fkie-cad.github.io/friTap/development/documentation Usage examples for the keylog flag and the expected NSS Key Log file format. ```bash fritap -k keys.log target_app fritap --keylog session_keys.log target_app ``` ```text CLIENT_RANDOM <32-byte-hex> <48-byte-hex-master-secret> CLIENT_RANDOM <32-byte-hex> <48-byte-hex-master-secret> ... ``` ```bash # Extract keys from Firefox fritap -k firefox_keys.log firefox # View extracted keys head firefox_keys.log ``` -------------------------------- ### CLI Keylog Option Usage Source: https://fkie-cad.github.io/friTap/development/documentation?q= Usage examples for the -k/--keylog CLI option. ```bash fritap -k keys.log target_app fritap --keylog session_keys.log target_app ``` -------------------------------- ### Prepare macOS System Source: https://fkie-cad.github.io/friTap/platforms/macos Initial system configuration steps for analysis environments. ```bash # Disable SIP if necessary (not recommended for production) # Grant required permissions to Terminal # Install development tools ``` -------------------------------- ### Analyze Apps in Spawn Mode Source: https://fkie-cad.github.io/friTap/platforms/ios Starts an application fresh under friTap control to capture initialization traffic. ```bash # Start app fresh under friTap control fritap -m -s -k keys.log --pcap traffic.pcap com.example.app # This captures app initialization traffic ``` -------------------------------- ### Verify Test Environment Source: https://fkie-cad.github.io/friTap/examples/android Ensure the device is connected and the Frida server is correctly installed and versioned. ```bash # Use dedicated test device adb devices adb shell su -c "id" # Verify frida-server version adb shell /data/local/tmp/frida-server --version ``` -------------------------------- ### CentOS/RHEL/Fedora Configuration Source: https://fkie-cad.github.io/friTap/platforms/linux?q= SELinux policy adjustments, firewall port configuration, and package installation. ```bash # SELinux considerations sudo setsebool -P domain_can_mmap_files 1 # Firewalld configuration sudo firewall-cmd --add-port=27042/tcp --permanent # Package installation sudo dnf install python3-devel openssl-devel ``` -------------------------------- ### Spawn a new process Source: https://fkie-cad.github.io/friTap/getting-started/concepts Starts a new application instance under the control of friTap using the -s flag. ```bash # Spawn new Firefox instance fritap -s firefox ``` -------------------------------- ### Install Homebrew on macOS Source: https://fkie-cad.github.io/friTap/getting-started/installation Command to install the Homebrew package manager on macOS. ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -------------------------------- ### Apply Display Filters Source: https://fkie-cad.github.io/friTap/api/cli Example of using Wireshark-like syntax to filter traffic during capture. ```bash fritap --filter "http.response.code >= 400 and ip.dst == 10.0.0.1" target ``` -------------------------------- ### Analyze Traffic with Wireshark Source: https://fkie-cad.github.io/friTap/platforms/macos Install Wireshark and use it for real-time traffic analysis alongside fritap. ```bash # Install Wireshark brew install --cask wireshark # Real-time analysis sudo fritap -l application # Open Wireshark and connect to named pipe ``` -------------------------------- ### Process Spawning Source: https://fkie-cad.github.io/friTap/api/cli Launch an executable or app directly to capture startup activity. ```bash fritap -s -k keys.log firefox fritap -m -s -k keys.log com.example.app ``` -------------------------------- ### Install Node.js Dependencies Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Installs the necessary Node.js packages for TypeScript compilation. ```bash # Install Node.js dependencies for TypeScript compilation npm install # Key dependencies include: # - @types/frida-gum: TypeScript definitions for Frida # - typescript: TypeScript compiler # - Other build tools ``` -------------------------------- ### Initialize FriTapConfig Source: https://fkie-cad.github.io/friTap/api/python?q= Create a configuration instance by specifying the target application, device behavior, and output file paths. ```python config = FriTapConfig( target="com.example.app", device=DeviceConfig(mobile=True, spawn=True), output=OutputConfig(pcap="capture.pcap", keylog="keys.log"), ) ``` -------------------------------- ### Prepare Linux System for Analysis Source: https://fkie-cad.github.io/friTap/platforms/linux?q= Updates system packages, installs build tools, and configures core dump limits. ```bash # Update system packages sudo apt update && sudo apt upgrade # Install development tools sudo apt install build-essential # Configure system limits ulimit -c unlimited ``` -------------------------------- ### Basic TapReader usage Source: https://fkie-cad.github.io/friTap/api/python?q= Example of opening a tap file, iterating through flow summaries, and closing the reader. ```python from friTap import TapReader reader = TapReader("capture_20260507_153933.tap") # offline / CI-runnable meta = reader.open() for summary in reader.read_flow_summaries(): print(summary.flow_id, summary.host, summary.status_code) reader.close() ``` -------------------------------- ### Verify hook installation Source: https://fkie-cad.github.io/friTap/troubleshooting/common-issues?q= Enable debug mode to capture logs and inspect for potential hook errors. ```bash # Enable debug mode fritap -do -v target_app 2>&1 | tee debug.log # Check for hook errors grep -i "error\|fail\|exception" debug.log ``` -------------------------------- ### System Preparation Commands Source: https://fkie-cad.github.io/friTap/platforms/windows Initial configuration steps required before running analysis tools on Windows. ```bash # Run as Administrator # Disable antivirus temporarily # Configure Windows Firewall exceptions # Install required dependencies ``` -------------------------------- ### Install Node.js Dependencies via npm Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Command to install dependencies defined in package.json. ```bash npm install ``` -------------------------------- ### BoringSecretHunter Output Example Source: https://fkie-cad.github.io/friTap/advanced/patterns Sample output showing the identified function and the generated byte pattern. ```text [*] Start analyzing binary libsignal_jni.so (CPU Architecture: AARCH64)... [*] Target function identified (ssl_log_secret): Function label: FUN_00493BB0 Function offset: 00493BB0 (0X493BB0) Byte pattern for frida (friTap): 3F 23 03 D5 FF C3 01 D1 FD 7B 04 A9 F6 57 05 A9 F4 4F 06 A9 FD 03 01 91 08 34 40 F9 08 11 41 F9 C8 07 00 B4 ``` -------------------------------- ### Execute documentation build and deployment commands Source: https://fkie-cad.github.io/friTap/development/documentation Commands for building the site, deploying to GitHub Pages, and validating link integrity. ```bash # Build documentation mkdocs build # Deploy to GitHub Pages (maintainers only) mkdocs gh-deploy # Check for broken links mkdocs build --strict ``` -------------------------------- ### Define Offsets Configuration Source: https://fkie-cad.github.io/friTap/advanced/patterns Example JSON structure for defining fixed function addresses or offsets. ```json { "openssl": { "SSL_read": { "address": "0x572115b4", "absolute": true }, "SSL_write": { "address": "0x144c", "absolute": false } } } ``` -------------------------------- ### eBPF Integration for Monitoring Source: https://fkie-cad.github.io/friTap/platforms/linux?q= Commands to install BCC tools and monitor SSL connections using eBPF. ```bash # Advanced network monitoring with eBPF # Install BCC tools sudo apt install bpfcc-tools # Monitor SSL connections sudo opensnoop-bpfcc & sudo fritap -k ssl_keys.log application ``` -------------------------------- ### Install macOS Development Dependencies Source: https://fkie-cad.github.io/friTap/development/development-setup?q= Commands to set up Xcode tools and Homebrew packages for macOS development. ```bash # Install Xcode command line tools xcode-select --install # Install Homebrew dependencies brew install node python@3.9 # For optional dependencies brew install libpcap # For scapy ``` -------------------------------- ### Execute friTap with pattern files and CLI flags Source: https://fkie-cad.github.io/friTap/advanced/patterns Examples of using pattern files, debug output, and manual offset overrides via the command line. ```bash # Use a pattern file for key extraction (deep-merged on top of defaults) fritap --patterns patterns.json -k keys.log target_app # Mobile target fritap -m --patterns android_patterns.json -k keys.log com.example.app # See what matched / why it did not (debug output) fritap -do -v --patterns patterns.json target_app # Use fixed addresses instead of scanning fritap --offsets offsets.json -k keys.log target_app # Force a full library scan (do not trust cached/known module lists) fritap --force-scan --patterns patterns.json -k keys.log target_app ``` -------------------------------- ### Configure Isolated VM Environment Source: https://fkie-cad.github.io/friTap/examples/malware Setup an isolated network for malware analysis and verify connectivity restrictions. ```bash # Create isolated VM network # Disable internet access or use honeypot network # Install friTap in VM pip install fritap # Verify isolation ping 8.8.8.8 # Should fail or route to honeypot ``` -------------------------------- ### Example Pull Request Content Source: https://fkie-cad.github.io/friTap/development/pull-requests?q= A concrete example of a well-structured pull request submission. ```markdown ## Add BoringSSL Pattern-Based Hooking Support This PR adds support for BoringSSL detection and hooking using byte patterns, enabling friTap to work with statically-linked BoringSSL in applications like Flutter and Chrome. ## Type of Change - [x] New feature (non-breaking change that adds functionality) ## Changes Made - **Agent Changes**: - Added `agent/ssl_lib/boringssl_patterns.ts` with pattern-based detection - Implemented ARM64, x64, and ARMv7 pattern matching - Added fallback patterns for different BoringSSL versions - **Platform Integration**: - Updated Linux, Android, and Windows platform handlers - Added pattern file loading and validation - **Testing**: - Added unit tests for pattern matching logic - Created integration tests with mock BoringSSL modules - Added ground truth tests with Flutter applications - **Documentation**: - Updated pattern-based hooking guide - Added BoringSSL-specific examples - Created troubleshooting section ## Testing - [x] Tests pass locally (`python run_tests.py`) - [x] New tests added for pattern matching functionality - [x] Manual testing performed on: - [x] Linux (Ubuntu 20.04, Flutter app) - [x] Android (API 28, 30, 33 with Chrome and Flutter apps) - [x] Windows (Windows 10, Chrome browser) - [ ] macOS (pending access to test environment) - [ ] iOS (requires jailbroken device) ## Example Usage ```bash # Generate patterns with BoringSecretHunter mkdir -p binary results cp libflutter.so binary/ docker run --rm -v "$(pwd)/binary":/usr/local/src/binaries -v "$(pwd)/results":/host_output boringsecrethunter # Use patterns with friTap fritap --patterns results/libflutter.so_patterns.json -k keys.log com.flutter.app ``` ``` -------------------------------- ### Set Up Analysis Environment Source: https://fkie-cad.github.io/friTap/platforms/linux?q= Creates a dedicated directory and a Python virtual environment for isolated friTap execution. ```bash # Create dedicated analysis directory mkdir ~/fritap_analysis cd ~/fritap_analysis # Set up virtual environment python3 -m venv fritap_env source fritap_env/bin/activate pip install fritap ``` -------------------------------- ### Troubleshoot friTap Installation Source: https://fkie-cad.github.io/friTap/troubleshooting/common-issues?q= Commands to update environment tools and resolve dependency conflicts during installation. ```bash # Update pip and setuptools python -m pip install --upgrade pip setuptools # Install with verbose output to see error details pip install -v fritap # Try installing dependencies separately pip install frida frida-tools pip install fritap ``` -------------------------------- ### Analyze Applications in Docker Containers Source: https://fkie-cad.github.io/friTap/platforms/linux?q= Instructions for installing and running friTap within a Docker container environment. ```bash # Docker container analysis docker run -it --name test-container ubuntu:20.04 docker exec -it test-container bash # Install friTap in container pip3 install fritap # Analyze applications in container fritap -k container_keys.log application ``` -------------------------------- ### Download frida-server Source: https://fkie-cad.github.io/friTap/platforms/android?q= Steps to identify device architecture and download the corresponding frida-server binary. ```bash # Check device architecture adb shell getprop ro.product.cpu.abi # Download matching frida-server from GitHub releases # Example for ARM64: wget https://github.com/frida/frida/releases/download/17.0.0/frida-server-17.0.0-android-arm64.xz xz -d frida-server-17.0.0-android-arm64.xz ``` -------------------------------- ### Analyze Microsoft and .NET Applications Source: https://fkie-cad.github.io/friTap/libraries/others?q= Examples for targeting specific Microsoft and .NET applications for key extraction and metadata generation. ```bash # Microsoft applications fritap -k teams_keys.log Teams.exe fritap -k ie_keys.log iexplore.exe # .NET applications fritap -k dotnet_keys.log dotnet_application.exe # Windows Store applications fritap -k store_app_keys.log --json store_metadata.json Microsoft.WindowsCalculator_8wekyb3d8bbwe ``` -------------------------------- ### Install TUI Dependencies Source: https://fkie-cad.github.io/friTap/getting-started/tui?q= Commands to ensure the required Textual package is installed for TUI functionality. ```bash pip install fritap[tui] # extras form shown by friTap's error message pip install textual>=0.80.0 # or install Textual directly ``` -------------------------------- ### Configure MkDocs Admonitions Source: https://fkie-cad.github.io/friTap/development/documentation Examples of using MkDocs admonitions for platform support, security warnings, and quick usage tips. ```markdown !!! note "Platform Support" This feature is only available on Linux and Android platforms. !!! warning "Root Required" This operation requires root access on the target device. !!! tip "Performance Optimization" Use the `--fast` flag for quicker analysis when full features aren't needed. !!! danger "Security Warning" Never run friTap on production systems without proper authorization. !!! info "Version Compatibility" This feature requires friTap 2.0.0+ and Frida 17.x. !!! example "Quick Example" ```bash fritap -k keys.log firefox ``` ``` -------------------------------- ### Install missing Frida tools Source: https://fkie-cad.github.io/friTap/getting-started/installation Install frida-tools via pip if the frida command is not found. ```bash # Install frida-tools pip install frida-tools # Verify installation frida --version ``` -------------------------------- ### Configure Android Device Environment Source: https://fkie-cad.github.io/friTap/examples/android Verify device connectivity, root access, and the status of the frida-server before starting analysis. ```bash # Check device connection adb devices # Verify root access adb shell su -c "id" # Check frida-server is running adb shell ps | grep frida-server ``` -------------------------------- ### Manage Documentation Lifecycle Source: https://fkie-cad.github.io/friTap/CONTRIBUTING_TO_DOCS?q= Commands for serving, building, and deploying the documentation site. ```bash mkdocs serve ``` ```bash mkdocs build ``` ```bash mkdocs gh-deploy ``` -------------------------------- ### Migrate to FriTap builder Source: https://fkie-cad.github.io/friTap/api/python?q= Recommended approach for new code using the fluent builder pattern to configure and start a session. ```python from friTap import FriTap session = FriTap("firefox").pcap("traffic.pcap").keylog("keys.log").verbose().start() ``` -------------------------------- ### Initialize SSH capture via API Source: https://fkie-cad.github.io/friTap/protocols/ssh?q= Programmatic setup for capturing SSH traffic using the friTap API. ```python from friTap.api import FriTap ( FriTap("ssh") .protocol("ssh") .pcap("out.pcapng") .keylog("keys.log") # SSH side-car (keys.ssh.log) is auto-derived .start("ssh user@host 'echo hello'") ) ``` -------------------------------- ### Open .tap File and Build Index Source: https://fkie-cad.github.io/friTap/api/python?q= Opens the file, parses the header, and initializes the flow index either from the footer or via linear scan. ```python def open(self) -> TapMeta: """Open the .tap file, parse the header, and build the flow index. Returns the file-level TapMeta. """ self._file = open(self._path, "rb") self._opened = True try: # Read header header_raw = self._file.read(_HEADER_STRUCT.size + 4096) # read extra for ext self._header, self._data_start = decode_header(header_raw) # Try to read META record (should be the first record) self._file.seek(self._data_start) self._meta = self._try_read_meta() # Build flow index if self._header.flags & FLAG_HAS_INDEX: self._build_index_from_footer() else: logger.info("No index in .tap file, performing linear scan") self._build_index_linear_scan() except Exception: self.close() raise logger.info( "TapReader opened: %s (%d flows)", self._path, len(self._flow_offsets), ) return self._meta or TapMeta() ``` -------------------------------- ### Install ADB for Android analysis Source: https://fkie-cad.github.io/friTap/getting-started/installation Install Android Debug Bridge (ADB) if the command is not found on the system. ```bash # Linux sudo apt install android-tools-adb # macOS brew install android-platform-tools # Windows # Download Android SDK Platform Tools # Add to system PATH ``` -------------------------------- ### Language Guidelines Examples Source: https://fkie-cad.github.io/friTap/development/documentation Examples of preferred active voice versus passive voice for documentation text. ```text # Good examples "Run the following command to install friTap:" "This extracts SSL keys from the target application." "You can configure friTap using command-line options." # Avoid "It is possible to run the command below for friTap installation:" "SSL keys may be extracted by friTap from applications." "Configuration of friTap can be done through options." ``` -------------------------------- ### Download frida-server Source: https://fkie-cad.github.io/friTap/platforms/android Commands to identify device architecture and download the appropriate frida-server binary. ```bash # Check device architecture adb shell getprop ro.product.cpu.abi # Download matching frida-server from GitHub releases # Example for ARM64: wget https://github.com/frida/frida/releases/download/17.0.0/frida-server-17.0.0-android-arm64.xz xz -d frida-server-17.0.0-android-arm64.xz ``` -------------------------------- ### Verify Wine Detection and Installation Source: https://fkie-cad.github.io/friTap/platforms/wine?q= Commands to confirm if the Wine process is recognized by Fritap and to verify the installed Wine version. ```bash # Check if Wine process is recognized fritap --experimental -do -v wine /path/to/app.exe 2>&1 | grep -i wine # Verify Wine installation wine --version wine64 --version ``` -------------------------------- ### Spawn and Resume Applications Source: https://fkie-cad.github.io/friTap/advanced/standalone-agent Launch an application by PID and resume execution after loading the agent. ```python # Spawn the application pid = device.spawn("com.example.app") process = device.attach(pid) # Load agent... # Resume the process device.resume(pid) ``` -------------------------------- ### Install friTap Dependencies Source: https://fkie-cad.github.io/friTap/platforms/linux?q= Commands to install necessary system packages and the friTap library across various Linux distributions. ```bash # Ubuntu/Debian sudo apt update sudo apt install python3 python3-pip python3-dev sudo apt install build-essential libssl-dev libffi-dev # CentOS/RHEL/Fedora sudo yum install python3 python3-pip python3-devel sudo yum install gcc openssl-devel libffi-devel # Arch Linux sudo pacman -S python python-pip base-devel openssl libffi # Install friTap pip3 install fritap ``` -------------------------------- ### Building the Agent Source: https://fkie-cad.github.io/friTap/development/adding-features?q= Execute the build script to compile the agent. ```bash npm run build # runs: frida-compile agent/fritap_agent.ts -o friTap/fritap_agent.js ``` -------------------------------- ### Start a live capture session with FriTap Source: https://fkie-cad.github.io/friTap/api/python?q= Attaches to or spawns a target process via Frida. Requires a connected device and target application. ```python from friTap import FriTap session = ( FriTap("com.example.app") .mobile() # target a USB device .keylog("keys.log") # write an SSLKEYLOGFILE .pcap("cap.pcapng") # write decrypted traffic (pcapng → embedded DSB) .start() # returns a FriTapSession ) session.wait() # block until the target exits; or call session.stop() ``` -------------------------------- ### Load .tap file with load() Source: https://fkie-cad.github.io/friTap/api/python?q= Opens the specified .tap file and initializes flow summaries. Returns the file-level TapMeta object. ```python def load(self) -> TapMeta: """Open the .tap file and load flow summaries. Returns the file-level TapMeta. """ self._reader = TapReader(self._path) self._meta = self._reader.open() self._summaries = self._reader.read_flow_summaries() logger.info( "Replay loaded: %s (%d flows)", self._path, len(self._summaries) ) return self._meta ``` -------------------------------- ### Install friTap via pip Source: https://fkie-cad.github.io/friTap/development/release-process Command to upgrade the friTap package to the latest version. ```bash pip install --upgrade fritap ```