当前位置:网站首页>Cookie injection
Cookie injection
2022-04-22 05:24:00 【A clever lamb】
The shooting range address used is Chapter 2 of fengshentai : Encounter obstacles ! Bypass WAF Filter !【 Supporting class hours :SQL Injection attack principle Practical drill 】
Experimental environment :https://hack.zkaq.cn/battle

http://kypt8004.ia.aqlab.cn/shownews.asp?id=171

Method 1
Delete id Back grab

First step : Determine whether the target website has sql Inject holes .( The core of blind Injection )
and 1=1 -> The page has content
and 1=2 -> The page has no content
==> The website has sql Inject a hole .
sql Inject holes : We're on a website , Enter the database statement , If this website performs , Then it shows that there is a database injection vulnerability in this website .
–》 Backstepping .
Suppose this website has a database injection vulnerability , So the database we entered , This website will execute .



notes : When using cookie In the process of parameter transmission , The content of parameter transfer needs to be URL Coded .

notes : Before that, you should use and 1=1 First check whether the page returns to normal , Sometimes an error is reported because the statement is filtered , If and1=1 Return to page normal , however and 1=2 Error returning to page , Then it means that there is SQL Inject .
The second step : Determine the number of columns in the table of the website
order by 1 --> The page has content , Explain that there are... In the table of the website 1 Column .
order by 2 --> The page has content , Explain that there are... In the table of the website 2 Column .
order by 3 --> The page has no content , Explain that there is no... In the table of the website 3 Column .
==> Only 2 Column .



The third step : Judge the echo point ( The core of error display )
and 1=2 union select 1,2

notes : Because the website uses access database , The grammar is very regular , So add from Table name , If it is MySQL You don't have to .
error correction : “ So I know the name of the library is admin” Should be “ So I know the table name is admin”



notes : Echo points are not always displayed on the web page , At this time, you need to go to the web page source code to have a look
Step four : Query relevant data
database() # function , effect : Check the name of the library .
and 1=2 union select 1,database()


take b9a2a2b5dffb918c Conduct MD5 decode , obtain welcome



Method 2
The steps are the same as method 1 , But method two doesn't use burp Tools ,cookie Values do not need to be url code
Just to show you
document.cookie = “id=” + escape(“171 and 1=2 union select 1,2,3,4,5,6,7,8,9,10 from admin”) # Set up cookie The way , This javascript Code .
escape() # function , effect :url code .

Last , Thank you, Mr. Jess, for your open class !
版权声明
本文为[A clever lamb]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210619528682.html
边栏推荐
- [WPF] customize combobox
- Four startup modes of activity
- Multi level cache architecture for 100 million traffic
- Command mode (3.21-3.27)
- [Qualcomm sdm660 platform] (8) -- Introduction to camera metadata
- [redis notes] data structure and object: Dictionary
- Codeforces Round #784 (Div. 4) All Problems
- Codeforces Round #781 (Div. 2) ABCD
- Dynamic programming -- lc474 One and zero
- Unity中的UGUI源码解析之事件系统(9)-输入模块(下)
猜你喜欢

idea2021. 1. When writing SQL in mapper: unable to resolve column / table

The chain of implicit trust: an analysis of the web third party resources loading

Auto.js 画布设置防锯齿paint.setAntiAlias(true);

MySQL數據庫第十一次作業-視圖的應用

Interpreter mode (3.7-3.13)

深圳-西双版纳

Event system for ugui source code analysis in unity (9) - input module (2)

Measuring the global recursive DNS infrastructure: a view from the edge

Feign calls the service, and the called service Seata transaction is not opened or XID is empty

Learning C language diary from scratch -- day27 minesweeping
随机推荐
Talk about anti reverse connection circuit in combination with practice (summary of anti reverse connection circuit)
[C #] implementation scheme of singleton mode
Codeforces Round #783 (Div. 2) ABCD
The signature of the update package is inconsistent with that of the installed app
Database 13th job transaction management
Batch resolves the IP address of the domain name and opens the web page
Feign calls the service, and the called service Seata transaction is not opened or XID is empty
13.9.1-PointersOnC-20220421
Status mode (4.4-4.10)
Go language crawler Foundation
Sourcetree version backtracking and single change version backtracking
Leetcode 1561. Maximum number of coins you can get
Acrobat Pro DC tutorial: how to create PDF using text and picture files?
Input and output of scanf and printf (format controller)
Usage of swagger and common annotation explanation
[WPF] cascaded combobox
Mongodb experiment -- data backup and recovery and database optimization
[WPF] making navigation bar with RadioButton
Parsing of thread safe classes: (2.8-3.6)
Reduce the graduation time to before the age of 20, and go to primary school for five years at the age of 5, so as to increase the population