1, what is CSRF attackCSRF is the abbreviation for cross-station request forgery (Cross-site requests forgery). On the CSRF attack principle and protection, you can view this project on GitHub: Understand CSRF, say more detailed and thorough.
2. How to avoid csrf
CSRF Attack and Defense and CSRF AttacK Defense
Overview
CSRF is short for Cross Site Request Forgery, and Chinese is Cross Site Request Forgery. Next we will share with you the principles, implementation methods, and defense methods of this
surprising principle, On the one hand, to shield the system may bring dangerous error echo information); (3) Blind note. It is also possible to prevent SQL injection attacks by using a regular expression to validate request parameters, and parameter binding is a good way to do so, so that malicious SQL is executed as a parameter to SQL rather than as a command. PreparedStatement in JDBC is a statement object that supports parameter binding, and is significantly better than statement in terms of
, but to understand what XSS attack scenarios, to understand the cause of the vulnerability, to think about why this bug was created, How to fix this bug. If you want to design a better XSS filter, you have to know what attack methods are needed to think more comprehensively.Note: The above example, running in the browser does not necessarily succeed, the browser
also possible to prevent SQL injection attacks by using a regular expression to validate request parameters, and parameter binding is a good way to do so, so that malicious SQL is executed as a parameter to SQL rather than as a command. PreparedStatement in JDBC is a statement object that supports parameter binding, and is significantly better than statement in terms of performance and security.-Csrf Attack
request pass parameters, This creates conditions for attackers to use CSRF attacks. A typical attacker would be forced to initiate these requests by placing the expected request parameters in the image link of a post or message within the station, where the victim browses to such a page.CSRF Attack ExampleThe following is an example of axous 1.1.1
hao123 of those popular sites: 7,709.found that 18% of the sites have this crossdomain.xml, of which 61% have flash csrf vulnerabilities.Note that the Crossdomain.xml configuration is not secure and can cause any domain to obtain the privacy data of this domain across domains. Note that if you want to send a POST request across domains, you also have to see if the target form is token defensive or Authenticode defensive, and whether the source of the
see from the diagram above, to complete a csrf attack, the victim must complete two steps in turn:
Log on to the trusted Web site A and generate cookies locally.Visit dangerous website B without logging out a.See here, you may say: "If I do not meet one of the above two conditions, I will not be csrf attack." Yes, it
Gmail, at the end of 2007, there are CSRF loopholes, so that hackers to attack the users of Gmail caused huge losses.CSRF Attack instancesThe CSRF attack can be sent to the compromised site in the name of the victim without the knowledge of the victim, thereby performing an
property security.CSRF Attack principleAs you can see, to complete a csrf attack, the victim must complete two steps in turn:1. Log on to trusted Web site A and generate cookies locally.2. If you do not log out a, visit the dangerous website B.See here, you may say: "If I do not meet one of the above two conditions, I will not be attacked by
, the victim must complete two steps in turn: 1. Log on to trusted Web site A and generate cookies locally. 2. If you do not log out a, visit the dangerous website B. See here, you may say: "If I do not meet one of the above two conditions, I will not be attacked by CSRF". Yes, it does, but you cannot guarantee that the following will not happen: 1. You cannot guarantee that once you have logged into a website, you will no longer open a tab page and v
victim must complete two steps in turn:1. Log on to trusted Web site A and generate cookies locally.2. If you do not log out a, visit the dangerous website B.See here, you may say: "If I do not meet one of the above two conditions, I will not be attacked by CSRF". Yes, it does, but you cannot guarantee that the following will not happen:1. You cannot guarantee that once you have logged into a website, you will no longer open a tab page and visit anot
victim must complete two steps in turn:1. Log on to trusted Web site A and generate cookies locally.2. If you do not log out a, visit the dangerous website B.See here, you may say: "If I do not meet one of the above two conditions, I will not be attacked by CSRF". Yes, it does, but you cannot guarantee that the following will not happen:1. You cannot guarantee that once you have logged into a website, you will no longer open a tab page and visit anot
you can see, to complete a csrf attack, the victim must complete two steps in turn:1. Log on to trusted Web site A and generate cookies locally.2. If you do not log out a, visit the dangerous website B.See here, you may say: "If I do not meet one of the above two conditions, I will not be attacked by CSRF". Yes, it does, but you cannot guarantee that the followi
victim must complete two steps in turn:1. Log on to trusted Web site A and generate cookies locally.2. If you do not log out a, visit the dangerous website B.See here, you may say: "If I do not meet one of the above two conditions, I will not be attacked by CSRF". Yes, it does, but you cannot guarantee that the following will not happen:1. You cannot guarantee that once you have logged into a website, you will no longer open a tab page and visit anot
trusted Web site A and generate cookies locally.
2. If you do not log out a, visit the dangerous website B.
See here, you may say: "If I do not meet one of the above two conditions, I will not be attacked by CSRF". Yes, it does, but you cannot guarantee that the following will not happen:
1. You cannot guarantee that once you have logged into a website, you will no longer open a tab page and visit another site.
2. You cannot guarantee that your local
check the log, he can only find that there is a legitimate request from his own transfer of funds, without any traces of attack. And Mallory can get the money and go unpunished.
CSRF Vulnerability Detection:Detection of CSRF vulnerability is a tedious task, the simplest way is to crawl a normal request packet, remove the Referer field and then resubmit, if the
What is CSRF?CSRF (Cross site request forgery), Chinese is requesting forgery across sites. Csrf an attacker who, after the user has logged into the target site, convinces the user to visit an attack page, using the target site's trust to the user to initiate a request for a forged user action on the target site on the
Tags: blog HTTP Io OS ar use Java for SP
Csrf-Attack and Defense
Author: lake2
0x01 what is a csrf attack
Csrf is the abbreviation of Cross Site Request Forgery (xsrf, that is, perform get/post operations on a CGI in a user session. Users may not know and want to do t
need to login password verification, direct implementation of these need to login to execute after the script. simulate CSRF attack
It is difficult to understand the csrf attack by speaking or not practicing.Now we implement a Web site login module, and support the function of saving passwords, that is, in this store
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.