我的网站似乎第二次成为大型自动化攻击的目标。它似乎足够复杂并且执行得非常好。我有以下系统:
- 第 3 次从 IP 登录失败的验证码
- 5 次登录尝试失败后帐户锁定 30 分钟(使用相同的电子邮件)
- 最低密码要求(8 个字符、字母、数字、大写)
- 失败的登录尝试返回非特定错误(即您的电子邮件或密码不正确)
- 速率限制请求(来自同一 IP)
在过去的半个小时左右,我的网站有 20,000 次登录请求失败。每个请求都使用不同的电子邮件(来自抽查),每个请求都以 401 失败且没有任何信息。每个请求都来自不同的公共 IP 地址(根据我的手动抽查,所有请求似乎都来自亚利桑那州凤凰城)
所有请求都来自我构建的移动应用程序,该应用程序通过 webview 加载登录网页。以下是来自一个请求的完整详细信息示例。
我想不出减轻这种攻击的方法。似乎有人在寻找电子邮件/密码匹配项。无论如何,99% 的电子邮件都不在我的系统中,所以它似乎只是一个带有电子邮件和密码列表的机器人,试图获得访问权限。
我的问题是。我应该担心这个吗?我最关心的是与系统负载有关的 DDOS 元素。为什么有人会费心去做这件事?我还可以做些什么来降低风险?
样本有效载荷:
{
"path": "/auth/login/email",
"method": "POST",
"query": "POST /auth/login/email",
"startts": 1598474644337,
"endts": 1598474644342,
"responsetime": 5,
"node": {
"name": "ip-XXX-XX-XX-XX",
"version": "",
"hostname": "ip-XXX-XX-XX-XX",
"ip": "172.31.15.58"
},
"http": {
"request": {
"url": "/email",
"headers": {
"host": "api.domain.com",
"x-forwarded-for": "XXX.XXX.XXX.XXX",
"x-forwarded-proto": "https",
"x-forwarded-port": "443",
"x-amzn-trace-id": "Root=1-5f46c994-168fa61913c6b3a2153fe9dd",
"accept-encoding": "gzip,deflate",
"content-type": "application/x-www-form-urlencoded",
"accept": "application/json, text/plain, */*",
"appsecret": "12312312312313123123",
"origin": "file://",
"user-agent": "Mozilla/5.0 (Linux; Android 5.1.1; SM-G973N Build/LYZ28N; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/XX.X.XXXX.XXX Mobile Safari/537.36",
"accept-language": "en-US,en;q=0.9",
"x-requested-with": "myapp.bundle.app",
"x-forwarded-host": "api.domain.com",
"x-forwarded-server": "ip-XXX-XX-XX-XX.us-east-1.compute.internal",
"connection": "Keep-Alive",
"content-length": "45"
},
"clength": 45,
"route_path": "/auth/login/email",
"params": {},
"query": {},
"body": {
"email": "{\"email\":\"user@domain.co.uk\",\"password\":\"realplaintextpassword\"}",
"password": "{\"email\":\"user@domain.co.uk\",\"password\":\"realplaintextpassword\"}"
}
},
"response": {
"code": 401,
"class": "client_error",
"phrase": "Unauthorized",
"headers": {
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN",
"strict-transport-security": "max-age=15552000; includeSubDomains",
"x-download-options": "noopen",
"x-content-type-options": "nosniff",
"x-xss-protection": "1; mode=block",
"vary": "X-HTTP-Method-Override, Origin",
"access-control-allow-origin": "file://",
"uuid": "1231y239hndn9u13u123",
"server": "Apache",
"x-ratelimit-limit": 10,
"x-ratelimit-remaining": 9
},
"clength": 5
}
},
"ip": "::ffff:127.0.0.1",
"real_ip": "107.178.110.130",
"port": 8081,
"@timestamp": "2020-08-26T20:44:04.337Z",
"api": {
"path": "/auth/login/email",
"query": "POST /auth/login/email"
}
}