Sunday, 24 March 2013

CSRF (Cross Site Request Forgery)

CSRF stands for Cross Site Request Forgery. It is a method used by an attacker to trick a user into loading a page that contains a malicious request written in the form of codes. This type of attack can be preformed to change a user’s email id, password, name or any other field or even make a purchase in some typical cases. There is no way any site can differentiate between pure request and forged request because this attack is performed when the victim is logged on and the victim clicks on some areas which have been manipulated by the attacker. The malicious script gets executed away from the user vicinity from un-trusted source, which is uploaded by the hacker. This type of attack can lead to leak of many sensitive data stored in the server like Credit Card Details or Bank Details.

These are the HTML methods that can be used for performing this type of attack:
IMG SRC
  <img src="http://www.vulnerable.com/?command">

SCRIPT SRC
  <script src="http:// www.vulnerable.com /?command">

IFRAME SRC
  <iframe src="http:// www.vulnerable.com /?command">

Javascripts can also be used in the following manner:

<script>
var fool = new Image();
fool.src = "http://www.vulnerable.com/?command";
</script>



Example:
<iframe src="https://bank.com/apps/Fund_transfer?amt=1500&DstnAcc=143554659" >

The above link is placed in the vicinity of the victim by the attacker. When the victim clicks on the particular link, a mount of 1500 is automatically transferred from the victim’s account without even his knowledge to the given destination account number. This type of attack largely occurs on sites that depend and blindly believe the web browser session if the user. So, even if a user somehow gets into the session of another user (victim), the attacker can do anything he wants from there. So, these types of attacks are very dangerous. And, if the inserted malicious code gets stored in the server, then this attack becomes even more dangerous because every time the victim somehow runs the code, the attack keeps on going.

Even, the Youtube site has been reported against this type of vulnerability.

0 comments:

Post a Comment

Pages