/fritap:fritap-wine-schannelfrom fritap
Extracts TLS session keys from Windows applications running under Wine on Linux using friTap's GDB-based key extractor. Covers Schannel/secur32, WinHTTP, bundled OpenSSL/LibreSSL, sudo privilege model, and common failure modes.
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 TLS keys from a Windows .exe running under Wine on a Linux host.
On Linux friTap routes a Wine target to a GDB-based key extractor
(agent_gdb/wine) instead of Frida; gdb and Frida both need ptrace, so only
one can drive the process. Wine's Schannel (secur32) delegates to the host's
libgnutls, so Schannel, WinHTTP and WinINet apps are covered through GnuTLS
hooks. Apps that bundle BoringSSL/OpenSSL or LibreSSL are matched by
byte signatures.
wine on Linux (Schannel / secur32, WinHTTP, bundled OpenSSL,
LibreSSL such as curl-for-win).sudo fails, keeps gdb as root, or writes an empty keylog.--live or payload modification you
need the experimental Frida Wine agent (--wine off --experimental), not
this path.docs/platforms/wine.md
("Chromium / CEF / Electron launchers").-m, -H and
non-Linux hosts). wine installed; classic and wow64 (Wine 9.x) loader
layouts are both handled.gdb on PATH built with Python: gdb -batch -ex "python print(1)".
gdb 10.2 or newer is tested.kernel.yama.ptrace_scope=0. Under sudo it is
optional (see Workflow step 2).sudo (which launches
Wine as you). A real root shell with a user-owned prefix fails.gdb -batch -ex "python print(1)"
wine --version
cat /proc/sys/kernel/yama/ptrace_scope
sudo sysctl -w kernel.yama.ptrace_scope=0
ptrace_scope=0 is a system-wide relaxation (any process may attach to other
processes of the same user). friTap never changes it; ask before setting it.
Pick the route. Route selection is --wine, not --backend:
--wine auto (default, also a bare --wine): a wine … command or a
Windows .exe/PE given directly is a Wine target; wine is prepended
for a bare .exe.--wine on: force the GDB route on a local Linux target.--wine off: never use it (normal Frida flow). An explicit
--backend frida also keeps the Frida path in auto mode.--backend gdb is the separate, experimental generic backend
(friTap/backends/gdb_backend.py); the docs say the config layer rejects
it. Do not use it to select the Wine extractor.Decide on privileges. Keys only (-k) need no root, just
ptrace_scope=0 and your own user. Full packet capture (-f) needs root
or CAP_NET_RAW for the sniffer. Under sudo friTap keeps root only
where needed:
| Component | Runs as |
|---|---|
Packet sniffer (-f) | root |
/proc scan, SIGSTOP/SIGCONT, teardown | root |
| Wine (spawn mode) | SUDO_UID/SUDO_GID with that user's HOME |
| gdb (key extractor) | your user if the checks pass, else root |
gdb drops to your user only if ptrace_scope is 0 (or Yama is absent),
the target belongs to you, you can read friTap's gdb scripts and you can
write the keylog. friTap logs Running gdb as <user> (uid N); ... or
Keeping gdb as root: <reason>. Keys are extracted either way. Details
and the setcap non-root alternative:
references/privilege-model.md.
Capture keys. -s spawns (launch, freeze the process when the exe
maps, attach gdb, resume), which catches startup handshakes. Without -s
friTap attaches to a running process by exe name or PID (positional; -p
is --pcap, not a PID). Put target arguments after --.
fritap -s -k keys.log wine /path/to/app.exe
fritap -s -k keys.log /path/to/app.exe
fritap -s -k keys.log -- /path/to/curl.exe -sk https://example.com
fritap -k keys.log app.exe
fritap -k keys.log "$(pgrep -f app.exe | head -1)"
Without -k the GDB route writes wine_sslkeys.log in the current
directory and warns. Attach only sees handshakes made after attaching;
drive the app so it opens fresh connections.
Add full packet capture when needed.
sudo fritap -s -k keys.log -p cap.pcapng -f wine /path/to/app.exe
With a .pcapng name friTap embeds the extracted keys as a Decryption
Secrets Block (DSB) at finalize, so the file decrypts on its own. With a
.pcap name give Wireshark keys.log yourself. The capture is finalized
on Ctrl-C and when the app exits. -p without -f, --live and payload
modification are not served on the GDB path; friTap logs a notice and
continues with keys only.
Verify.
wc -l keys.log
head -c 120 keys.log
fritap -r cap.pcapng
fritap --from-pcap cap.pcapng --keylog keys.log --tap out.tap
CLIENT_RANDOM ...,
CLIENT_TRAFFIC_SECRET_0 ...).fritap -r prove the keys
match the traffic (see fritap-decrypt).Running gdb as ... / Keeping gdb as root: ... in the log to
confirm the privilege decision.Native Windows instead of Wine. On a real Windows host regular friTap
(Frida) hooks Schannel through lsass.exe by default (Administrator
required; --no-lsass / -nl turns it off). If hooking finds nothing,
-ms schannel scans lsass memory for TLS 1.2 masters and TLS 1.3 secrets
and pairs them offline with --schannel-unpaired; see the
fritap-memory-scan skill.
fritap -k keys.log app.exe
fritap -ms schannel -- app.exe
su with a user-owned prefix: no SUDO_UID, so Wine runs
as root and modern Wine refuses /home/<you>/.wine. friTap's pre-flight
check aborts naming the prefix and owner. Use sudo, your own user, or
WINEPREFIX=/root/.wine.sudo WINEPREFIX=… -E fritap is broken; options go first:
sudo -E WINEPREFIX=… fritap ….sudo run keeps gdb as root;
delete or chown it.-s means attach. With no matching running process friTap prints a
hint to add -s.--experimental alone does not select the Frida agent; without
--wine off a Wine target still goes to the GDB extractor.--patterns reaches the GDB extractor. A friTap v2 pattern file is
translated to the GDB format (only x64 entries without ?? wildcards;
others are skipped with a warning), and a flat GDB-format file (as
wine_hunter.py emits) is passed through. New GnuTLS / OpenSSL / Wine
builds still need regenerated signatures.keys.log,
wine_sslkeys.log and any .pcapng with a DSB as secrets. Do not paste key
lines into chat or tickets.sudo, prefer
keys-only runs as your own user, do not lower ptrace_scope or setcap an
interpreter without the user's consent, and revert those changes after.fritap-decrypt (decrypt a pcap with the keylog), fritap-memory-scan
(-ms, Schannel lsass scanning), fritap-capture (agent API loop)docs/platforms/wine.md, docs/platforms/windows.md, docs/api/cli.md
(--wine, --backend), agent_gdb/wine/README.mdWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
fritap, tls-key-extraction, wine-debugging, schannel, gnutls
npx claudepluginhub fkie-cad/fritap --plugin fritap10 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".Other plugins' skills for the same job