Skip to content
KitploitKITPLOIT
أدواتعمليات الاستغلالالمدونة
Log in
إرسال
أدواتعمليات الاستغلالالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

الخلاصاتاتصالالخصوصية© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
CVE-2013-2251 — Scanner and proof-of-concept exploit for Apache Struts 2 CVE-2013-2251 (S2-016) OGNL injection, detecting and exploiting unauthenticated remote code execution via action/redirect prefixes. | Kitploit
أدوات/GitHubGitHub/jonathan1010/cve-2013-2251
ReconnaissanceVulnerability ScannersWeb Vulnerability ScannersExploitationWeb Application ExploitationPenetration TestingRemote Access Tool
GitHub
مشاركة
jonathan1010/cve-2013-2251

CVE-2013-2251

Scanner and proof-of-concept exploit for Apache Struts 2 CVE-2013-2251 (S2-016) OGNL injection, detecting and exploiting unauthenticated remote code execution via action/redirect prefixes.

عرض المستودع
4 ديسمبر 2026لم تتم المراجعة بعد
المحتوى غير متوفر باللغة المطلوبة. عرض النسخة الإنجليزية.

CVE-2013-2251

Apache Struts 2 - DefaultActionMapper Prefixes OGNL Code Execution (S2-016)

Metadata

fieldvalue
CVECVE-2013-2251
severitycritical
CVSS9.3 (record; CVSS:2.0 AV:N/AC:M/Au:N/C:C/I:C/A:C); NVD also lists CVSS:3.1 9.8
fixed inStruts 2.3.15.1 (affected: 2.0.0 through 2.3.15)
classOGNL injection leading to RCE (CWE-20 per template, CWE-74 per NVD)
scanner version1.0.0
python3.8+ stdlib only, no third-party deps

Exploit

If you want the exploit, find it here: https://satoshidisk.com/pay/CT5RSZ

Summary

In Struts 2.0.0 through 2.3.15 the text following the action:, redirect: or redirectAction: parameter prefixes of com.opensymphony.xwork2.DefaultActionMapper is not sanitized and is evaluated as an OGNL expression against the value stack. One request therefore gives unauthenticated code execution: the template payload builds a ProcessBuilder for sh -c id, reads its stdout and prints it through the HttpServletResponse writer, so the body of /index.action or /login.action comes back carrying the uid=... gid=... groups=... line. The 2.3.15.1 patch (visible in the vendor source diff) drops the redirect: and redirectAction: prefix registrations from the mapper's prefix trie, leaving only method: and action:.

Full description

DefaultActionMapper.getMapping() walks the request parameter names through a prefix trie in handleSpecialParameters(). In 2.3.15 the trie holds four parameter actions: method: sets the method, action: sets the action name, and redirect: / redirectAction: build a ServletRedirectResult whose location string is later parsed with OgnlUtil (conditionalParse), i.e. the raw value after the prefix is handed to the OGNL engine and evaluated against the value stack. That evaluation is the injection point: the whole expression after : is attacker controlled, and OGNL in this line has unrestricted access to #context, so new java.lang.ProcessBuilder(...).start() plus the response writer yields direct, in-band RCE with no auth and no CSRF token dependency. NVD records it as CWE-74 (template classification CWE-20), CVSS v2 9.3 with NVD's v3.1 restated at 9.8, and CISA KEV since 2022-03-25. Remediation per the vendor: upgrade to Struts 2.3.15.1 or later, where only the method: and action: prefixes remain and their values go through cleanupActionName().

Detection model

  • Mirrors the nuclei template http/cves/2013/CVE-2013-2251.yaml exactly: max-request: 9 = 3 raw request shapes x 3 prefix payloads.
  • Raw shapes: GET /index.action?{prefix}=${...id...}, GET /login.action?{prefix}=${...id...} and GET /index.action?{prefix}%3A%24%7B...%7D (the denyMethodExecution=false + allowStaticMethodAccess variant).
  • Prefix payloads: redirect, action, redirectAction.
  • Matchers, ANDed per the template DSL: body regex ((u|g)id|groups)=[0-9]{1,4}\([a-z0-9]+\) and status code in {200, 400} (or). check(url) is True when any of the 9 combinations satisfies both.
  • Every helper retries (2 attempts, linear backoff); HTTPError bodies are read because 400 is an accepted matcher status.
  • Scheme-less hosts in urls.txt (tagger output such as host:8080/path) are auto-prefixed with http://.
  • Details dict keeps per-request status, hit, matched (the regex group) and a 200-char snippet, plus request_count (9), so a row is auditable offline from result_b64.

Usage

# scanner: streamed CSV + optional JSON sidecar
python scanner/CVE-2013-2251/scanner.py urls.txt 8 CVE-2013-2251.csv --json CVE-2013-2251.json

# exploit: result dict + optional CSV/JSON dumps
python exploit/CVE-2013-2251/exploit.py http://target:8080 --csv CVE-2013-2251.csv --json CVE-2013-2251.json --verbose

urls.txt is a plain file, one target per line, # for comments.

Example scanner output

[*] Apache Struts 2 CVE-2013-2251 scanner (S2-016 action:/redirect:/redirectAction: OGNL)
 scanner : CVE-2013-2251 v1.0.0
 threads : 8 | csv: CVE-2013-2251.csv | json: CVE-2013-2251.json
[*] Apache Struts 2 CVE-2013-2251 scanner (S2-016 action:/redirect:/redirectAction: OGNL)
[2026-12-03 11:37:11] loaded 2 target(s) from urls.txt
[2026-12-03 11:37:12] [1/2] http://struts-host:8080 -> VULNERABLE
[2026-12-03 11:37:12] [2/2] http://other-host:8080 -> not-vuln
[2026-12-03 11:37:12] summary: total=2 vulnerable=1 not-vuln=1 errors=0
[2026-12-03 11:37:12] timing : avg=640ms max=910ms wall=1.28s
[2026-12-03 11:37:12] report saved: CVE-2013-2251.csv

Scanner report columns

columnmeaning
n1-based row number
urltarget as provided
statusok / error
vulnerableverdict
elapsed_msper-target timing
token12-char md5 over the row details
result_b64base64(JSON) full details

Files

  • scanner.py - detection only, stdlib, streamed CSV + JSON sidecar.
  • README.md - this file.
  • DESCRIPTION.md - deeper technical notes.
  • ../../exploit/CVE-2013-2251/exploit.py - two-stage POC.

Exit codes

codemeaning
0at least one target answered
2every target errored

References

  • Nuclei template: http/cves/2013/CVE-2013-2251.yaml
  • NVD: https://nvd.nist.gov/vuln/detail/CVE-2013-2251
  • Vendor bulletin (S2-016): http://struts.apache.org/release/2.3.x/docs/s2-016.html
  • Wiki: https://cwiki.apache.org/confluence/display/WW/S2-016
تنزيل الأداة

أدوات ذات صلة

  • amass

    رسم خرائط سطح الهجوم المتعمق واكتشاف الأصول

  • subfinder

    أداة سريعة لتعداد النطاقات الفرعية بشكل سلبي.

  • reconftw

    reconFTW هي أداة مصممة لإجراء استطلاع آلي على نطاق مستهدف عن طريق تشغيل أفضل مجموعة من الأدوات لإجراء المسح واكتشاف الثغرات.

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

  • 1

    Callisto

    jetp1ane/callisto

    أداة تحليل ثغرات ثنائية آلية تقوم بفك ترجمة الملفات التنفيذية عبر Ghidra، ومسح كود شبه-C باستخدام Semgrep، والتحقق من النتائج باستخدام GPT-3.5-Turbo لتقليل الإيجابيات الكاذبة.

    796
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    # تطبيق GhostLock للتنفيذ بنقرة واحدة (CVE-2026-43499)

    735
  • 3

    IMSIcatcher

    28zaaky/imsicatcher

    منصة IMSI Catcher تنشر خلية GSM مارقة لاعتراض الرسائل النصية القصيرة وحقن الرسائل وتتبع الأجهزة المحمولة

    721
  • 4

    opencti

    opencti-platform/opencti

    منصة مفتوحة لاستخبارات التهديدات السيبرانية

    535
  • 5

    ARTEX

    baarai/artex

    منصة اختبار اختراق مستقلة متعددة الوكلاء تعتمد على LLM، مع وكلاء تخطيط وتنفيذ، ومخططات للأصول والاستكشاف، وتسجيل حركة مرور MITM، وإعادة اختبار الثغرات.

    424
  • 6

    DFRoot

    a2333c/dfroot

    أداة root لنظام Android لهاتف Samsung Galaxy S25 Ultra (SM-S938B) تقوم بتسلسل DirtyFrag CVE-2026-43284 وCVE-2026-43499 للحصول على صلاحيات root تلقائيًا عند الإقلاع عبر KernelSU.

    419

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →