【发布时间】:2011-01-16 02:47:59
【问题描述】:
好的,重新开始>
对于我们在系统安全课程中的第一个作业,我们必须侵入教授们“组织得很便宜”的 sql 数据库。我知道唯一的用户是“admin”并选择一个随机密码,在 php 中生成的 select 语句是:
select user_id from user where user_username = 'admin' AND user_password = md5('noob')
现在,我开始尝试使用“admin'--”破解蹩脚的登录名
select user_id from user where user_username = 'admin'--' AND user_password = md5('noob')
但是被推送到数据库的实际值是
select user_id from user where user_username = 'admin\'--' AND user_password = md5('noob')
这没有帮助。服务器使用 POST 从表单中获取值。我已经通过禁用 javascript 绕过了发送端的任何值处理。
php 中似乎没有任何东西可以以任何方式修改输入。
【问题讨论】:
-
Debian 与它无关...
-
我没有时间研究完整的答案,但他们可能打开了魔术引号 (stackoverflow.com/questions/2735749/…)
-
操作系统与这些无关。
-
您是否尝试过使用双引号,如果唯一的用途是管理员,您需要专注于利用密码
标签: php sql code-injection