Guest User

whowantstoknow

a guest
Oct 18th, 2018
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.92 KB | None | 0 0
  1. #made by the real rusty shackleford!
  2. #automatic login on <inet-gateway>:8000/index.php
  3. #tested the exploit on a webserver runnin' lighttpd v1.4.32 webserver
  4. #when exploiting this vulnerability, an attacker could manipulate user logins (i.e. through ARP spoofing) and obtain user credentials.
  5. import requests, sys
  6. try:
  7.    user = str(sys.argv[1])
  8.    password = str(sys.argv[2])
  9. except:
  10.    print("Usage: %s <user> <password" %str(sys.argv[0])
  11.    exit()
  12. print("Performing HTTP GET...")
  13. rget = requests.get("http://172.26.167.254:8000/index.php")
  14. print("Performing HTTP POST...")
  15. post_pass = requests.post("http://172.26.167.254:8000/", data={'auth_user': user, 'auth_pass': passwd, "auth_voucher": "", "redirurl": "/", "accept": "Verzenden"})
  16. if("Server: lighttpd/1.4.32" in post_pass.content.decode()): #header server sends us when auth is succesfull
  17.    print("Authentication failed.")
  18. else:
  19.    print("Authenticated :)")
Add Comment
Please, Sign In to add comment