arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SQL injection
#1
Star 
The most common web security risk.
When a user is able to manipulate the value given to page as username or password,  query formed can leak the info.
Example- 
[font=monospace]$con mysqli_connect("localhost""sql1""sql1""sql1");[/font]
$query "SELECT * FROM users WHERE username='$username' AND password='$password'";
$result mysqli_query($con$query); 
if (mysqli_num_rows($result) > 0)
[font=monospace]echo "<h1>Logged in!</h1>";[/font]
Here if $username = ' or '0'='0
and $password = ' or '0'='0
then query becomes "SELECT * FROM users WHERE username='' or '0'='0' AND password='' or '0'='0' "
Hence every row comes out as output.

Please share new ways for performing it.
Also post queries related to it
Thanks to Post4Vps


Messages In This Thread
SQL injection - by thispc - 06-03-2016, 09:24 PM
RE: SQL injection - by Rishabh Jain - 06-04-2016, 04:59 PM
RE: SQL injection - by thispc - 06-07-2016, 10:44 PM
RE: SQL injection - by Rishabh Jain - 06-08-2016, 04:53 AM
RE: SQL injection - by thispc - 06-08-2016, 05:50 AM
RE: SQL injection - by Rishabh Jain - 06-08-2016, 08:50 AM
RE: SQL injection - by RickB - 06-06-2016, 08:50 PM
RE: SQL injection - by Vuluts - 10-04-2016, 07:44 PM
RE: SQL injection - by xdude - 10-05-2016, 02:45 AM
RE: SQL injection - by humanpuff69 - 06-05-2017, 02:50 PM
RE: SQL injection - by bookertie - 08-04-2017, 02:06 PM
RE: SQL injection - by Vuluts - 08-04-2017, 02:15 PM
RE: SQL injection - by humanpuff69 - 08-05-2017, 09:23 AM
RE: SQL injection - by Honey - 10-30-2017, 07:21 AM

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting