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

22 lines
967 B
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.

# Ruby _json pollution
{{#include ../../banners/hacktricks-training.md}}
Bu, [https://nastystereo.com/security/rails-_json-juggling-attack.html](https://nastystereo.com/security/rails-_json-juggling-attack.html) adresinden alınan bir özet.
## Temel bilgiler
Bir gövdeye, bir dizi gibi hashlenemez bazı değerler gönderildiğinde, bunlar `_json` adlı yeni bir anahtara eklenecektir. Ancak, bir saldırganın gövdeye istediği keyfi değerlerle `_json` adlı bir değer de ayarlaması mümkündür. Ardından, örneğin arka uç bir parametrenin doğruluğunu kontrol ederse ancak `_json` parametresini bir eylem gerçekleştirmek için de kullanırsa, bir yetkilendirme atlatması gerçekleştirilebilir.
```json
{
"id": 123,
"_json": [456, 789]
}
```
## Referanslar
- [https://nastystereo.com/security/rails-_json-juggling-attack.html](https://nastystereo.com/security/rails-_json-juggling-attack.html)
{{#include ../../banners/hacktricks-training.md}}