Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
frag — Generates CSS-only payloads that exfiltrate secret tokens from web pages via attribute selectors and background-image requests, then reconstructs them with De Bruijn graph stitching. | Kitploit
Tools/GitHubGitHub/hackvertor/frag
Web Vulnerability ScannersPayload GenerationExploitationWeb Application ExploitationData ExfiltrationInformation GatheringWeb SecurityRed Teaming
GitHubhackvertor/frag

frag

Generates CSS-only payloads that exfiltrate secret tokens from web pages via attribute selectors and background-image requests, then reconstructs them with De Bruijn graph stitching.

View Repository
554Nov 17, 2026Reviewed by Kitploit

Related Tools

  • zaproxy

    Open-source web application security scanner for automated vulnerability detection, manual penetration testing, and API security testing with a proxy-based interception engine.

  • nuclei

    Fast YAML-based vulnerability scanner with template-driven detection engine for automated security testing across web apps, APIs, networks, DNS, and cloud infrastructure.

  • wapiti

    Web vulnerability scanner written in Python3

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    Callisto

    jetp1ane/callisto

    Automated binary vulnerability analysis tool that decompiles executables via Ghidra, scans pseudo-C code with Semgrep, and validates findings using GPT-3.5-Turbo to reduce false positives.

    2.2k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    One-tap Android kernel exploit app for CVE-2026-43499, providing privilege escalation via kernel module loading, with offset extraction and on-device analysis tools.

    841
  • 3

    DFRoot

    a2333c/dfroot

    Android root tool for Samsung Galaxy S25 Ultra (SM-S938B) that chains DirtyFrag CVE-2026-43284 and CVE-2026-43499 to gain root automatically at boot via KernelSU.

    451
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    377
  • 5

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    351
  • 6

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    336

Explore all tools

Browse our collection of tools

View all tools →
Share

frag

CSS token exfiltration tool

What is Frag?

Frag is a tool for extracting secret tokens from web pages using only CSS — no JavaScript required. It generates CSS payloads that use attribute selectors and background-image URLs to exfiltrate overlapping token fragments to an attacker-controlled server, then reconstructs the full token using De Bruijn graph traversal and Eulerian path algorithms.

This is useful in contexts where CSS injection is possible but JavaScript is blocked — such as webmail clients, HTML email rendering, or pages with strict Content Security Policies.

Frag extracts lowercase hex tokens (0-9a-f), and also mixed-case alphanumeric (A-Za-z0-9), base64 (A-Za-z0-9+/=) and base64url (A-Za-z0-9-_) tokens. See Charsets.

How it works

  1. Fragment exfiltration — For every possible window of 3 or 4 characters in the token's charset, a CSS attribute selector (*=) fires a background-image request to your server if the token's attribute contains it. Two small rule sets (^=/$=, or *= with the known surrounding text) leak the token's first and last two characters.

  2. Reconstruction — Frag builds the token one character at a time, keeping only tokens of the configured length that match the leaked start and end and contain nothing but leaked windows.

  3. Noise handling — Charset characters from the rest of the attribute (e.g. bac in callback, or junk query parameters) also leaks and can link into the token. Candidates are ranked by how cheaply the windows they leave unused can be explained as one contiguous run of junk, so junk is left over rather than spliced into the token.

  4. Ambiguity reporting — Only the set of windows leaks, not their order or count, so different tokens can leak identical data. When that happens every equally plausible token is listed as a candidate rather than one being picked at random.

Window size

The window size trades CSS size against accuracy. Measured on random hex tokens in an anchor href followed by random hex junk:

WindowCSSSingle correct guess, 12 chars24 chars40 chars64 chars
4 chars (default)~4.03 MB100%100%99.5%~97%
3 chars~260 KB~97%~72%~28%~1%

With 3-char windows the real token is still in the candidate list ~98% of the time at 40 chars; it just isn't the only answer. CSS size also grows with the length of your server's origin, since it appears in every rule.

Unmatched probes contribute no background layer: each matched custom property contains url(...),, and the background joins empty fallbacks such as var(--a,)var(--b,)none. Frag conservatively retains its limit of 25,000 probe references per box, introduced after large background lists crashed Chrome. The 4-char hex payload and every non-hex payload still spread references across the element and its ::before/::after. Any existing pseudo-element content is replaced, and if the page's styles override their backgrounds, those windows won't leak. The 3-char hex payload uses only the element itself.

CSS sizes above are UTF-8 bytes (decimal KB/MB) for the anchor preset with an HTTP 127.0.0.1:3000 collector. Compact property names, short attribute-value escapes, empty fallbacks and the abbreviated IPv4 collector reduce the four-character payload from 4.67 MB to 4.03 MB without removing probes. Blind extraction additionally nests repeated field selectors and combines equivalent URL-start probes: a four-character csrf input on a form drops from 7.12 MB to 5.09 MB, and an anchor's token parameter from 6.68 MB to 4.35 MB. With localhost:3000, which must keep its hostname, the targeted payload is ~4.30 MB (four characters) or ~278 KB (three characters).

Charsets

Probing every mixed-case window doesn't scale: 3-char alphanumeric windows alone would be 62³ = 238,328 rules (~15 MB), and would need about ten 25,000-layer boxes when an element only has three. Non-hex charsets therefore leak two smaller sets in one payload:

  • Case-insensitive 3-char windows ([href*=abc i]) over the lowercased alphabet: 36 characters for alphanumeric, 39 for base64, 38 for base64url. They reconstruct the token in lowercase exactly as hex does. 36³ windows are about as sparse as hex's 16⁴, so accuracy is close to 4-char hex.
  • Case-sensitive 2-char windows that contain a letter ([href*=aB], sent as /c/aB), about 3,700–4,100 rules. Each letter's case is chosen so that every pair in the cased token leaked. A casing that leaves the token's own leaked pairs unexplained ranks lower. Pairs from the known surrounding text are expected leftovers.

A / in a leaked chunk is sent as %2F so it stays in one path segment. Non-hex charsets only offer 3-char windows: 4-char ones would need 1.7M+ rules. The start and end rules match up to 8 characters of the known text around the token rather than 2, because a bigger alphabet would also match elsewhere in the URL, e.g. n=lo in &operation=login.

Measured on random tokens in the anchor preset (with and without random junk in the same charset after the href) and in a hidden input (test/stitch.test.js):

CharsetCSS (anchor / hidden)Single correct guess, 6–40 chars64 charsToken listed, 6–40 chars
alphanumeric~3.17 / 3.31 MB~98%~77–85%100%
base64~3.99 / 4.17 MB~99%~75–85%100%
base64url~3.69 / 3.85 MB~99%~75–85%100%

Case ties (e.g. a lowercase copy of part of the token elsewhere in the attribute) come back as candidates. If no casing fits at all, e.g. because a pair request was lost, the token is returned in lowercase and flagged as such. Base64 inside URLs is often percent-encoded (%2B, %2F, %3D), which these windows won't match, so use base64url or another field there.

When testing in the UI, inject each payload into a fresh page: a browser won't re-request an image URL it already loaded in the same page, and alphanumeric, base64 and base64url share most window URLs.

The targeted mode and blind recon mode treat a quiet gap of one second as the boundary between extractions: the server waits for that gap before stitching, and the first request after it starts a fresh extraction. One-shot mode also waits for a quiet gap before stitching, but keeps hits across gaps so a delayed lane cannot erase an earlier one. Reset or reconfigure one-shot mode before a separate injection.

Accuracy by token length

The rates above average over a range of lengths, but accuracy depends strongly on how long the token is — and for 3-char hex it falls off sharply past ~24 characters. The table below breaks it out. Each cell is single% (listed%): single is how often Frag returns exactly one answer and it is the real token; listed is how often the real token is among the returned candidates (so the gap between them is how often it comes back as one of several equally plausible answers). Measured over 200 random tokens per cell in the anchor preset (with and without random same-charset junk after the href) and in a hidden input; non-hex charsets use 3-char windows plus case pairs. Regenerate from the same leak/stitch pipeline as test/stitch.test.js (seed 0xabcd).

Download Tool