hacktricks/src/pentesting-web/deserialization/ruby-_json-pollution.md

21 lines
1016 B
Markdown

# Ruby _json pollution
{{#include ../../banners/hacktricks-training.md}}
これは投稿の要約です [https://nastystereo.com/security/rails-_json-juggling-attack.html](https://nastystereo.com/security/rails-_json-juggling-attack.html)
## 基本情報
ボディに配列のようなハッシュ化できない値を送信すると、それらは `_json` という新しいキーに追加されます。しかし、攻撃者がボディに任意の値を持つ `_json` という値を設定することも可能です。例えば、バックエンドがパラメータの真偽をチェックし、その後 `_json` パラメータを使用して何らかのアクションを実行する場合、認証バイパスが行われる可能性があります。
```json
{
"id": 123,
"_json": [456, 789]
}
```
## 参考文献
- [https://nastystereo.com/security/rails-_json-juggling-attack.html](https://nastystereo.com/security/rails-_json-juggling-attack.html)
{{#include ../../banners/hacktricks-training.md}}