/fritap:fritap-telegramfrom fritap
Captures and decrypts Telegram MTProto traffic on rooted Android arm64 using friTap. Covers live tgnet hooking, heap memory-scan key extraction, and offline pcap decryption with keylog sidecars.
Ships in fritap. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Extract Telegram's MTProto keys from the Android client and decrypt captured
traffic offline. tshark cannot decrypt MTProto; friTap ships its own
decryptor. Two layers exist: cloud chats (client-server transport, key
line MTPROTO_AUTH_KEY, not end-to-end) and secret chats (device-device
end-to-end, key line MTPROTO_E2E_KEY).
degraded streams.undecryptable records (key missing or wrong).fritap-android first; for the heap scanner in general use
fritap-memory-scan.fritap-android). The tgnet byte pattern and the memory-scan profile
(tgnet-android-arm64-2026) exist for arm64 only; arm32 and x86_64 are TODO.org.telegram.messenger, native tgnet library
libtmessages.*.so). Device-validated on 12.8.1; other builds may need new
patterns.cryptography package (base install).
tgcrypto is an optional AES-IGE speed-up.fritap q list_supported_protocols lists mtproto and
telegram with platform android.Pick the protocol. --protocol telegram captures cloud and secret-chat
keys into one combined keylog. --protocol mtproto covers cloud
transport only. --protocol telegram refuses to run without a capture
intent (-k, -p or -f -p).
Live capture with the getAuthKey hook (spawn). tgnet's
Datacenter::getAuthKey is a stripped local symbol, so friTap finds it by
an arm64 byte pattern (friTap/patterns/default_mtproto.json) and logs
[TGNET_Telegram] Hooked Datacenter::getAuthKey at ... (byte pattern).
Spawn so every connection is captured from its first byte:
fritap -m -s --protocol telegram -f -p tg.pcapng -k keys.log org.telegram.messenger
fritap -m -s --protocol mtproto -f -p tg.pcapng -k keys.log --duration 180 org.telegram.messenger
-f records the real encrypted traffic and requires -p. Open a few
chats and send messages while it runs. For secret chats, send several
messages so their keys are in use.
Attach plus memory scan (already-running app). Without -s, friTap
warns that connections opened before the capture cannot be decrypted (their
64-byte obfuscation init is missed). Add -ms mtproto (alias
-ms telegram): the hook-free heap scanner recovers cloud keys, secret-chat
keys and, via Tier E, the live obfuscated-transport CTR state of open
connections:
fritap -m -ms mtproto org.telegram.messenger
fritap -m -ms telegram -f -p tg.pcapng org.telegram.messenger
fritap -m --protocol telegram -f -p tg.pcapng -k keys.log -ms mtproto org.telegram.messenger
fritap -m -ms mtproto --memory-scan-interval 1.0 -f -p tg.pcapng org.telegram.messenger
-ms takes an optional value, so put the target after the engine name.
Keep Telegram in the foreground and exchange messages during the scan.
--ms-emit-unconfirmed also writes MTProto candidates the SHA1 oracle could
not verify (harmless offline, more noise).
Find the keylog. Key lines (full format in references/keylog-and-recovery.md):
-k keys.log): MTPROTO_AUTH_KEY (+ MTPROTO_E2E_KEY with
--protocol telegram) in keys.log.<stem>.mtproto.keylog holding MTPROTO_AUTH_KEY,
MTPROTO_E2E_KEY and MTPROTO_OBF_KEY lines. With -k keys.log the stem
is keys.memscan (keys.memscan.mtproto.keylog); without -k it is
<target>_memscan in the current directory.Check counts without printing keys:
cut -d' ' -f1 keys.memscan.mtproto.keylog | sort | uniq -c
Decrypt offline. Both flags feed friTap's own decryptor (not tshark), decrypt cloud chats and the secret-chat blobs inside them, and can be given the hook keylog or the memory-scan sidecar:
fritap --from-pcap tg.pcapng --telegram-keylog keys.log --tap tg.tap
fritap --from-pcap tg.pcapng --mtproto-keylog keys.memscan.mtproto.keylog --tap tg.tap
fritap --from-pcap tg.pcapng --mtproto-keylog keys.memscan.mtproto.keylog --resync-search-depth 16384 --tap tg.tap
--resync-search-depth (default 4096 blocks, about 64 KB) bounds how far
behind the live CTR counter mid-stream recovery searches; raise it when the
scan ran long after the traffic.
Verify. Read the offline summary counters (meanings in the reference):
mtproto messages > 0, recovered streams for mid-stream recovery,
degraded streams / undecryptable records ideally 0. Then inspect:
fritap --analyze tg.tap
fritap -r tg.tap
Agent API: fritap q list_protocols --tap tg.tap should list mtproto
(and telegram_e2e for secret chats); fritap q get_digest --tap tg.tap --protocol mtproto --budget 800. Live capture through the agent API:
fritap q start_capture --target org.telegram.messenger --device usb --protocols telegram --capture full --duration-s 180 (no memory-scan option
there; use the CLI for -ms).
MTPROTO_OBF_KEY aligned.
Fix: spawn (-s), or force-stop and relaunch before attaching, or add
-ms mtproto while the connection is alive and send fresh traffic.[Tier E] 0 live Connection objects matched the vtable anchor. No connection was alive during
the scan, or the build needs recalibration. Short streams and
unsupported-framing streams (padded-intermediate, Fake-TLS) are separate
counters, not mid-stream problems.tgnet.dat perm key or an older run does not match.MTPROTO_AUTH_KEY is required too.-p with --protocol telegram
gives secret-chat plaintext only (Java hooks). Use keylog + pcap for cloud chats.--mtproto-keylog is not --keylog: --keylog is the NSS/TLS keylog
for tshark. Both can be combined on one capture..tap holds TL-serialized message payloads; friTap does not
parse the full Telegram TL schema.MTPROTO_* line and keylog file as top-secret:
never paste key lines into chat, tickets or reports, quote only counts or
auth_key_id prefixes, store files with restricted permissions and delete
them after the analysis. Agent servers return key material only with
--allow-secrets.fritap-android (device setup, spawn crashes), fritap-memory-scan (the
-ms heap scanner), fritap-decrypt (offline --from-pcap workflow)docs/protocols/telegram.md, docs/platforms/android.mddocs/advanced/offline-pcap-to-tap.md (MTProto section, degradation
counters), USAGE.md ("Capturing Telegram / MTProto keys")friTap/protocols/mtproto_keylog_spec.py (keylog format)What SKILL.md sets; muted values are Claude Code's defaults
10 skills in this plugin
/fritap-androidCaptures TLS session keys and decrypted traffic from Android apps with friTap on a rooted device or emulator. Covers frida-server setup and version matching over adb, finding the package name (fritap devices / fritap apps or the list_devices / list_apps agent tools), spawn versus attach, keylog (-k), plaintext pcap (-p) and full capture (-f), anti-root hooks (-ar), PairIP-protected apps (--pairip-safe), stripped Flutter / Cronet / BoringSSL libraries, verifying the keylog and pcap, and the common failures (frida-server not running, version mismatch, SELinux, script-load timeouts, app crashes, empty keylogs). Use when asked to "intercept TLS on Android", "capture traffic of an Android app", "get TLS keys from an APK", "bypass certificate pinning to see app traffic", "run friTap on the emulator", "friTap over adb", or "frida-server is not working with friTap"./fritap-captureRuns a live friTap capture of an app or process (Android, iOS, Linux, Windows, macOS) through the friTap agent API and reads the decrypted traffic in token-budgeted pieces. Covers device and app discovery, protocol selection, start/status/phase/stop of a capture session, the digest, endpoints, findings, single flows and HAR/Markdown/keylog export, plus the server permission flags, token budgets and error model of fritap q, fritap mcp and fritap serve. Use when asked to "capture app traffic", "what does this app send", "sniff/decrypt the TLS traffic of an app", "hook the TLS library", "which hosts does this app contact", "summarize a .tap capture", or "export the capture as HAR"./fritap-custom-hooksRecovers TLS keys with friTap when the default hooks find nothing. Covers diagnosing the run (debug output -do / --debug-log, --list-libraries, --probe, --library-scan), byte-pattern hooking of stripped or statically linked TLS libraries (Flutter libflutter.so, Cronet, statically linked BoringSSL) with --patterns, the pattern JSON schemas, generating patterns with BoringSecretHunter, --force-scan, custom offsets (--offsets), custom Frida scripts (-c / --custom_script), friTap plugins (FriTapPlugin / ScriptPlugin), custom ciphers (--protocol custom, the custom_cipher category), the standalone fritap_agent.js, and verifying the resulting keylog. Use when the user reports "no keys captured", "empty keylog", "friTap finds no SSL library", "Flutter app", "byte pattern", "stripped library", "statically linked BoringSSL", "custom offsets", "custom Frida script", "custom encryption", "friTap plugin", or wants to hook a TLS function friTap does not resolve by symbol./fritap-decryptTurns friTap output into readable traffic and analysis without a live device. Covers decrypting a pcap with a friTap NSS keylog (-k) in tshark or Wireshark and proving that decryption worked, the -p plaintext pcap versus the -f full capture, pcapng with embedded keys, the live Wireshark named pipe, converting pcap plus keylog into a .tap with fritap --from-pcap, fritap analyze and fritap report (digest, --flow drill-down), TUI replay, and the agent read tools (get_digest, get_flow, list_endpoints, export) on an existing .tap. Explains why decryption fails (missing TLS 1.3 secrets, QUIC, keys from connections that started before the capture, mismatched pcap and keylog). Use when asked to "decrypt pcap", "use the keylog", "load the SSLKEYLOGFILE", "open it in Wireshark", "decrypt with tshark", "why is my pcap still encrypted", "offline analysis", "convert pcap to .tap" or "analyze this .tap"./fritap-leak-proofProves with friTap captures that a known value (email, phone, advertising id, Android id, IMEI, IP, GPS coordinate or any string) leaves the device, including URL, base64, hex and md5/sha1/sha256 encoded forms, using the find_values agent tool; and compares two phases of one capture or two separate captures with the diff tool to show which endpoints appeared, disappeared or changed. Use when asked to "prove this app leaks my email", "is the advertising id sent to third parties", "does the app send my location", "what starts being sent after consent", "compare before and after login", "diff two app versions", or "what changed between these captures"./fritap-memory-scanRecovers TLS, Schannel, RC4 and Telegram MTProto session secrets by scanning a target process's heap with friTap's memory scanner (-ms / --memory-scan) instead of hooking its TLS library. Covers when to prefer a memory scan over hooks (stripped binary, unknown or statically linked TLS library, hooks that crash the app, no keys captured), how the scan engine is chosen from --protocol and the platform or forced with -ms boringssl / schannel / rc4 / mtproto (alias telegram) or a custom profile JSON, the scan interval and RC4 oracles, where the keylog and sidecar files land, verifying recovered keys with tshark or fritap --from-pcap, RC4 standalone and nested inside TLS, the read-only Schannel scan of lsass on Windows, and the caveats (per-architecture calibration, false positives, CPU cost). Use when asked to "run a memory scan", "find heap secrets", "friTap finds no keys captured", "get keys from a stripped binary", "recover Schannel keys from lsass", "capture RC4 keys", or "scan memory for TLS secrets".npx claudepluginhub fkie-cad/fritap --plugin fritapOther plugins' skills for the same job