码迷,mamicode.com
首页 > 其他好文 > 详细

CSRF|About csrf attack and how to defense think deeply

时间:2019-02-21 15:35:56      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:BMI   can   divide   epo   div   you   nbsp   head   OLE   

About csrf attack and how to defense think deeply

 

About CSRF:

  CSRF(Cross-site request forgery),Maybe most secrity pepole konw crsf what it look like XSS,but it is considered more dangerous than xss.

Developer Eyes:

  As a developer,you must to konw csrf request methods,so csrf request methods is roughly divided into POST and GET types.

About POST request types:

  scenario: pay money for buy computer

  so,you can look URL:xxx.xxx.xxx/buy.php?id=xxx,if attack find csrf debug and sonstructor HTML POC submit Post request types.

  

<form method="POST" action="xxx.xxx.xxx/buy.php?id=xxx" enctype="multipart/form-data"> 

    <input type="hidden" name="money" value="xxx"/> 
    .....
</form> 
<script> 
    document.forms[0].submit();
</script>

 

About GET request types:

  scenario: pay money for buy computer

  shop return URL:xxx.xxx.xxx/buy.php?id=xxx&submit_id=1&money=199&user=test

Develop environment how to defense csrf?

  In general,3 methods for example validation token and referce and return Code,but like PayPal will validation cookie or session.someone will stop no Origin.

Attacker how to find csrf and using?

  Under certain conditions,testing we can find exposed value and test some URL request ,try use different user name into test CSRF effectiveness.

 

End

  this is  defense think deeply head,so will write about CSRF using or about exposed debug.

CSRF|About csrf attack and how to defense think deeply

标签:BMI   can   divide   epo   div   you   nbsp   head   OLE   

原文地址:https://www.cnblogs.com/l0cm/p/10412717.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!