当前位置:网站首页>CSRF-Cross-site request forgery-related knowledge
CSRF-Cross-site request forgery-related knowledge
2022-08-02 07:53:00 【Chang Jiazhuang】
What is CSRF?
Cross-site request forgery is referred to as "CSRF". In the CSRF attack scenario, the attacker will forge a request (this request is usually a link), and then trick the target user into clicking. Once the user clicks this request, the entireThe attack is complete.So CSRF attack also becomes "one click" attack.Many people do not understand the concept of CSRF, and sometimes even confuse it with XSS, and even confuse it with the issue of ultra vires, which is caused by the lack of understanding of the principle
CSRF is a common vulnerability in web applications. Its attack characteristics are very harmful but very hidden. Especially in the context of a large number of Web 2.0 technologies, attackers can launch attacks without users noticingCSRF attack.This article will make a systematic exposition of its basic characteristics, attack principles, attack classification, detection methods and prevention methods, and list attack examples
The CSRF attack method is not well known to everyone. In fact, many websites have CSRF security vulnerabilities.As early as 2000, the CSRF attack method has been proposed by foreign security personnel, but in China, it did not begin to receive attention until 2006.In 2008, CSRF loopholes were discovered in many large communities and interactive websites at home and abroad, such as: Baidu HI, NYTimes.com (New York Times), Metafilter (a large BLOG website) and YouTube.But until now, many sites on the Internet are still unprepared for this, so that the security industry calls CSRF a "sleeping giant", and its threat level is evident from this "reputation"
CSRF attack principle
It is to use the session state generated by the attacker to log in to the website, that is, click the malicious link or malicious code constructed by the attacker during the login state. Directly or indirectly, the victim accesses the malicious link or code, thereby reaching the attackerpurpose
A cookie will be generated when a user logs in to the website. This cookie is stored in the browser. When you close the website and reopen the website, you will find that you are still logged in. This means that the cookie authentication has not expired. If it expires, you must log in again., the attacker sends a connection in any form to tempt you, just the user accesses with the browser that stores the cookie for logging in to the website. At this time, since the cookie has not expired and this authentication is obtained, the server will think that the attacker's malicious link is reasonable, that is, the userAt this time, since this link is sent by the user, a CSRF attack is completed.
CSRF Prevention
Check the Referer field and check the token
There is a Referer field in the HTTP header. This field is used to indicate which address the request comes from. According to the source of the Referer field, it is judged whether it is legal to access the page, but adding the Referer field is easy to be tampered with, so adding a token to verify that the token value must beIf it is unpredictable, that is, there is no pattern and a special salt is added, so that if the attacker fills in the token blindly, access is denied
Where to try to exploit CSRF vulnerabilities
- Where to add users
- Data transaction, payment place
- Change password place
- Where to delete data
边栏推荐
- 有关 sql中的 concat()函数问题,如何拼接
- OC-NSString
- Splunk Filed Alias 字段改名
- MySQL - Index Optimization and Query Optimization
- LeetCode Algorithm 1374. 生成每种字符都是奇数个的字符串
- LeetCode 2312. Sell Wood Blocks
- 自然语言处理 文本预处理(上)(分词、词性标注、命名实体识别等)
- LeetCode SQL 197. 上升的温度
- gdalinfo: error while loading shared libraries: libgdal.so.30: cannot open shared object file: No su
- 跨阻放大器
猜你喜欢
海缆探测仪TSS350(二)
A Preliminary Study on the Basic Principles of Formal Methods
Xilinx约束学习笔记—— 时序约束
Agile, DevOps and Embedded Systems Testing
MySQL - slow query log
OC-error prompt
A full review of mainstream timed task solutions
【心电信号】基于matlab心率检测【含Matlab源码 1993期】
论文阅读 (64):Weakly-supervised Video Anomaly Detection with Robust Temporal Feature Magnitude Learning
Mysql报错2003 解决办法 Can‘t connect to MySQL server on ‘localhost‘ (10061)
随机推荐
Splunk Filed extraction 字段截取
Enterprise training and reproduction guidebook - training and reasoning of the OpenPose model based on Huawei ModelArts platform, realizing the recognition of two behaviors of climbing and climbing ov
【请教】SQL语句按列1去重来计算列2之和
FormData upload binary file, object, object array
OC-NSString
从云计算到函数计算
apt & apt-get命令
Splunk Filed Alias field name
spark架构
电商库存系统的防超卖和高并发扣减方案
MySQL-锁机制
LeetCode brush questions (7)
Link with Game Glitch
【ROS基础】map、odom、base_link、laser 的理解 及其 tf 树的理解
自然语言处理 文本预处理(上)(分词、词性标注、命名实体识别等)
【图像隐藏】基于matlab混合DWT-HD-SVD数字图像水印方法技术【含Matlab源码 2007期】
jvm 二之 栈帧内部结构
apt & apt-get commands
(2022 Nioke Duo School 5) C-Bit Transmission (Thinking)
【机器学习】实验6布置:基于集成学习的Amazon用户评论质量预测