当前位置:网站首页>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
边栏推荐
猜你喜欢

埋点开发流程

敏捷、DevOps和嵌入式系统测试

LeetCode 2360. 图中的最长环

你认同这个观点吗?大多数企业的数字化都只是为了缓解焦虑

21 days learning challenge 】 【 sequential search

电商库存系统的防超卖和高并发扣减方案

Splunk Filed extraction field interception
![MySQL报错1055解决办法:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains](/img/aa/ab58ec47bb96df803dbc6a8ff6dde3.png)
MySQL报错1055解决办法:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains
![WebGPU 导入[2] - 核心概念与重要机制解读](/img/8f/195a3b04912d8872d025df58ab5960.png)
WebGPU 导入[2] - 核心概念与重要机制解读

Analysis of GCC compiler technology
随机推荐
飞桨paddle技术点整理
Compact格式下MySQL的数据如何存储到磁盘
MySQL-锁机制
Data reveal that the average cost is as high as $4.35 million in 2022, a record!
【红队】ATT&CK - 创建或修改系统进程实现持久化(更新ing)
【图像隐藏】基于matlab混合DWT-HD-SVD数字图像水印方法技术【含Matlab源码 2007期】
Please tell me, how to write Flink SQL and JDBC sink into mysql library and want to create an auto-incrementing primary key
59:第五章:开发admin管理服务:12:MongoDB的使用场景;(非核心数据,数据量比较大的非核心数据,人脸照片等隐私的小文件;)
修改apt-get源为国内镜像源
反射课后习题及做题记录
如何设计静态资源缓存方案
Splunk Filed Alias field name
埋点开发流程
【机器学习】实验3布置:贝叶斯垃圾邮件识别
MySQL-数据库事务详解
Find the largest n files
Metasploit(MSF)基础超级详细版
敏捷、DevOps和嵌入式系统测试
根据一个字段的内容去更新另一个字段的数据,这样的sql语句该怎么样书写
【故障诊断分析】基于matlab FFT轴承故障诊断【含Matlab源码 2001期】