[英]SQL Injection Attack through form input
Hi I want to show sql injection vulnerability through form input using PHP and MYSQL. 嗨,我想通过使用PHP和MYSQL的表单输入显示sql注入漏洞。 Any suggestion how to go about. 任何建议如何进行。
Thanks 谢谢
mysql_query("INSERT INTO `table` (`column`) VALUES ('$inject_variable')");
If you have query like this you can insert something like value'); DROP TABLE table;--
如果您有这样的查询,则可以插入类似value'); DROP TABLE table;--
value'); DROP TABLE table;--
to the $inject_variable
to test the injection. value'); DROP TABLE table;--
到$inject_variable
来测试注入。
Hence, your SQL query will became this: 因此,您的SQL查询将变为:
INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')
This will allow other users to drop the table. 这将允许其他用户删除表。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.