专家-暴力破解防护-一个请求多个凭据
# 实验室:摧毁暴力破解防护,每个请求都带有多个凭据
# 题目
由于暴力破解保护中的逻辑缺陷,此实验室容易受到暴力破解攻击。要解决实验室问题,请暴力破解受害者的密码,然后登录并访问他的帐户页面。
- 受害者的用户名:
carlos
- 密码候选列表 (opens new window)
- name: 实验室-专家
desc: 暴力破解防护-一个请求多个凭据 >>
avatar: https://fastly.statically.io/gh/clincat/blog-imgs@main/vuepress/static/imgs/docs/burpsuite-learn/public/lab-logo.png
link: https://portswigger.net/web-security/authentication/password-based/lab-broken-brute-force-protection-multiple-credentials-per-request
bgColor: '#001350'
textColor: '#d112fe'
1
2
3
4
5
6
2
3
4
5
6
# 实操
根据题意,可得实验目标:
- 该实验室存在暴力攻击防护策略,但是该策略存在逻辑缺陷。
- 利用保护策略中的缺陷,对受害用户名
carlos
进行密码暴力破解,然后以该用户身份进行登录。
点击 “Access the lab” 进入实验室。

点击 “My account” 进入登录页面。

先进行一次失败的登录,查看响应信息。

响应信息为 “Invalid username or password”(错误的用户名或密码)。

进行多次失败的登录,被锁定,需要等待 1 分钟。
使用其它用户名进行登录,也是被锁定,说明是 IP 锁定策略。
使用 X-Forwarded-For 等 HTTP 标头进行绕过,失败。

抓取登录请求数据包,看一眼。
发现不再是传统的 POST 传参格式,而是以 json 格式传输数据。
而 json 是可以传递数组的,也许...

对 实验室提供的密码列表 进行处理,将其转换为 json 格式:

密码列表(json数组形式):
点击查看
[
"123456",
"password",
"12345678",
"qwerty",
"123456789",
"12345",
"1234",
"111111",
"1234567",
"dragon",
"123123",
"baseball",
"abc123",
"football",
"monkey",
"letmein",
"shadow",
"master",
"666666",
"qwertyuiop",
"123321",
"mustang",
"1234567890",
"michael",
"654321",
"superman",
"1qaz2wsx",
"7777777",
"121212",
"000000",
"qazwsx",
"123qwe",
"killer",
"trustno1",
"jordan",
"jennifer",
"zxcvbnm",
"asdfgh",
"hunter",
"buster",
"soccer",
"harley",
"batman",
"andrew",
"tigger",
"sunshine",
"iloveyou",
"2000",
"charlie",
"robert",
"thomas",
"hockey",
"ranger",
"daniel",
"starwars",
"klaster",
"112233",
"george",
"computer",
"michelle",
"jessica",
"pepper",
"1111",
"zxcvbn",
"555555",
"11111111",
"131313",
"freedom",
"777777",
"pass",
"maggie",
"159753",
"aaaaaa",
"ginger",
"princess",
"joshua",
"cheese",
"amanda",
"summer",
"love",
"ashley",
"nicole",
"chelsea",
"biteme",
"matthew",
"access",
"yankees",
"987654321",
"dallas",
"austin",
"thunder",
"taylor",
"matrix",
"mobilemail",
"mom",
"monitor",
"monitoring",
"montana",
"moon",
"moscow"
]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
将 username 字段的值替换为正确的carlos
。
使用转换后的 json 密码列表,替换原来的 password 字段值,然后发送数据包:
响应状态码为 302 跳转,说明登录成功(还真的能这样玩???)。

虽然这种方式能够登录,但是无法找出正确的密码。但是......为什么要找呢?能登录不就行了。
输入正确的用户名carlos
,密码随意输入,然后开启浏览器代理,使用 BurpSuite 抓取登录请求数据包:

拦截数据包之后,先别急着放行。

用处理后的 json 密码列表,替换原来的 password 字段值,然后放行数据包。

通过修改登录请求中的 password 字段值为数组,进行批量密码登录。
登录成功,实验完成。

编辑 (opens new window)