当前位置:网站首页>SQL injection bypass (IV)
SQL injection bypass (IV)
2022-06-28 02:29:00 【A τθ】
One 、 Use obscure functions to bypass
1、 Principle analysis
Use obscure functions instead of common functions , For example, in error injection polygon() Function to replace the commonly used updatexml() function .
select polygon((select * from (select * from (select @@version) f) x));
notes : The above sentence needs to be improved .
Two 、 Block transmission bypasses
1、chunked Code introduction
Block transfer coding (Chunked transfer encoding) It's just HTTP agreement 1.1 edition (HTTP/1.1) A data transmission mechanism provided in . In the past HTTP
The data in the whole response is sent together , And in the response header Content-Length The field identifies the length of the data , So that the client knows the end of the reply message .
Conventional Content-length Solution : Calculate entity length , And tell each other through the head . The browser can be accessed through Content-Length Length information of , Determine the response
Entity ended .
Content-length Problems faced : because Content-Length The field must truly reflect the entity length , But for dynamically generated content , Before the content is created ,
The length is unknowable .
At this time, we need to get the exact length , Only one big enough buffer, Wait for the content to be generated before calculating . On the one hand, this requires more memory overhead , On the other hand, it will also make
The client waits longer .
We need a new mechanism : It doesn't depend on the length information of the head , We can also know the boundary of the entity —— Block coding (Transfer-Encoding: chunked). For dynamically generated
In terms of response content , The total length of the content is unknown before the generation is completed . Therefore, you need to cache the generated content first , Then calculate the total length and fill it to Content-Length, Then send the whole
The data content . This is not very flexible , The use of block coding can be improved .
Block transfer encoding allows the server to send the header field at the end of the message . For example, add a hash signature to the header . For compressed transmission , It can be compressed and transmitted at the same time .
2、 How to use chunked code
If in http In the news header Transfer-Encoding by chunked, So it's this coding method .
Next, an unknown number of blocks will be sent , There is a hexadecimal number at the beginning of each block , Indicates the size of this block , And then CRLF("\r\n"). And then the data itself , data
After the end , There will be CRLF("\r\n") Two characters . There are some implementations , The sum of the hexadecimal numbers of the block size CRLF There can be spaces between .
The size of the last block is 0, Indicates the end of data transmission . The last block no longer contains any data , But you can send optional tails , Include header fields . The news ended with CRLF ending .
Add... To the head Transfer-Encoding: chunked after , It means that the message is block coded . At this time , The entities in the message need to be transmitted in a series of blocks .
Each block contains hexadecimal length values and data , The length value is exclusive to one line , The length does not include the CRLF(\r\n), It does not include the end of block data CRLF(\r\n).
The last block length value must be 0, The corresponding block data has no content , Indicates the end of the entity .
example :
HTTP/1.1 200 OK
Content-Type: text/plain
Transfer-Encoding: chunked
23\r\n
This is the data in the first chunk\r\n
1A\r\n
and this is the second one\r\n
3\r\n
con\r\n
8\r\n
sequence\r\n
0\r\n
\r\n
3、burp Bag grabbing demonstration
3.1 Grab the bag
use burpsuite Submit packet capture analysis , First, the native package id=1&submit=1, Query the user id by 1 Value .


3.2 Handle by hand
Use block transmission , First, in the http Head plus Transfer-Encoding: chunked, Indicates block transmission .
The first line is the length , The second line is the string ,0 Indicates the end of transmission , Followed by two spaces .


4、 plug-in unit chunked-coding-converter code
You can also use burpsuite Plug in for chunked-coding-converter Code submission .
4.1 plug-in unit

4.2 Before coding


4.3 code



3、 ... and 、 Trust whitelist bypass
There are some WAF Will bring some white lists of documents , For the white list waf Will not intercept any operations , So you can use this feature , You can try the white list to bypass .
White lists usually have directories :
/admin
/phpmyadmin
/admin.php
?a=/admin.php&name=' union select 1,user()--+&submit=1 /phpmyadmin?name=' union select 1,user()--+&submit=1


Four 、 Static files bypass
1、 Principle analysis
In addition to whitelist trust files and directories , There is another part waf Static files are not blocked .
for example , Picture file jpg 、png 、gif perhaps css 、js These files will not be detected statically waf Intercept .
?/1.jpg&name=-vince' union select 1,user()--+&submit=1 ?/1.jpg=/1.jpg&name=-vince' union select 1,user()--+&submit=1
?/1.css=/1.css&name=-vince' union select 1,user()--+&submit=1
2、 demonstration



5、 ... and 、pipline Bypass injection
1、 Principle analysis
http Agreement is made tcp Protocol encapsulation , When the browser initiates a http When asked , The browser first establishes a connection with the server tcp Connect , And then send http Data packets
( That is, we use burpsuite Intercepted data ), It contains a Connection Field , The general value is close.apache Wait for the container to decide whether to keep... According to this field
The tcp Connect or disconnect . When the content sent is too large , More than one http Package capacity , When it needs to be sent multiple times , Value will be keep-alive, That is, the http
The request established by tcp Continuous connection , Until the end of the content sent Connection by close until .
2、 demonstration
use burpsuite Packet capturing submission , Copy the entire package information and put it at the end of the first package , Put the first bag close Change become keep-alive, hold brupsuite Auto update
Content-Length Tick off .
The character of the first package parameter should be added with the length , Then submit . There are some waf Will match the parameters of the second package , It is a normal parameter , The parameters of the first package are not detected , such
You can bypass some waf Intercept .
2.1、 Grab the bag


2.2、 Parameters change



2.3、 success

边栏推荐
- 【ELT.ZIP】OpenHarmony啃论文俱乐部—数据密集型应用内存压缩
- CVPR22收录论文|基于标签关系树的层级残差多粒度分类网络
- Shardingsphere-proxy-5.0.0 establish MySQL read / write separation connection (6)
- 205. isomorphic string
- Jenkins - 访问 Jenkins 自定义参数变量,处理变量值中含有空格
- 766. toplitz matrix
- 后勤事务繁杂低效?三步骤解决企业行政管理难题
- Embedded must learn, detailed explanation of hardware resource interface -- Based on arm am335x development board (Part 1)
- JS random number (random number decimal)
- Cloud platform KVM migration local virtual machine records
猜你喜欢

Voice network VQA: make the user's subjective experience of unknown video quality in real-time interaction known

SQL 注入绕过(二)

How fiddle uses agents

Jenkins - Pipeline concept and creation method

Cesium 多边形(polygon)extrudedHeight 和 height 的区别

How to handle computer security certificate errors

Cesium 多边形增加文字标签(polygon 加 label)多边形中心点偏移问题解决

《低代码解决方案》——覆盖工单、维修和财务全流程的数字化售后服务低代码解决方案

如何以数据驱动「客户全生命周期管理」,提高线索转化率及客户满意度?

Dynamic Host Configuration Protocol
随机推荐
Jenkins - Copy Artifact 插件 Build 之间数据共享传递
Using redis bitmap to realize personnel online monitoring
CVPR22收录论文|基于标签关系树的层级残差多粒度分类网络
Intranet penetration with FRP
Locust performance test - parameterization, no repetition of concurrent cyclic data sampling
Appium automation test foundation ADB common commands (I)
【永艺XY椅】试用体验
geojson 格式说明(格式详解)
Jenkins - 邮件通知 Email Notification 插件
OS module and os Learning of path module
Numpy----np.reshape()
JS random number (random number decimal)
Numpy----np. Tile() function parsing
后勤事务繁杂低效?三步骤解决企业行政管理难题
SQL 注入绕过(四)
Prometeus 2.35.0 new features
[Yocto RM]3 - Yocto Project Releases and the Stable Release Process
共阳极数码管真值表
Introduction to hybrid apps
匿名挂载&具名挂载