应对的攻击Threats対応する攻撃接口滥用API abuseAPI の不正利用
接口滥用API abuseAPI の不正利用
攻击者成批调用短信验证码、邮件发送与 AI 推理等按量计费的接口。国际短信费用欺诈(SMS pumping)会在短时间内产生大额账单,AI 接口的额度则被耗尽或转售。Zerda 在调用前判定请求是否来自脚本。Attackers call endpoints you pay for per use in bulk: SMS verification codes, outgoing email and AI inference. SMS pumping runs up a large bill in a short time, and AI quotas are drained or resold. Zerda judges whether a request comes from a script before the call is made.攻撃者は SMS 認証コード、メール送信、AI 推論など従量課金の API を大量に呼び出します。SMS ポンピング(国際 SMS の料金詐欺)は短時間で高額の請求を発生させ、AI の利用枠は使い切られるか転売されます。Zerda は API を呼び出す前に、リクエストがスクリプトによるものかを判定します。
查看攻击演示See the attack demo攻撃のデモを見る →接入文档 →Documentation →ドキュメント →
攻击过程How the attack works攻撃の流れ
- 定位接口Find the endpointAPI の特定
寻找无需登录或门槛较低的计费接口,例如发送验证码、找回密码与试用对话。Billed endpoints with little or no sign-in barrier are found, such as sending a verification code, password reset or a trial chat.ログイン不要、または利用条件の緩い従量課金の API を探します。認証コードの送信、パスワードの再設定、試用チャットなどです。
- 批量调用Call in bulk大量呼び出し
无头浏览器或协议脚本按号码列表或账号池循环请求,并以代理分散来源。A headless browser or protocol-level script loops through a list of numbers or a pool of accounts, spreading the source over proxies.ヘッドレスブラウザやプロトコルを直接扱うスクリプトが番号リストやアカウントの一覧を順に使ってリクエストを繰り返し、プロキシで送信元を分散させます。
- 产生费用Run up costs費用の発生
短信与邮件按条计费,AI 接口按用量计费,费用均计入您的账单。SMS and email are billed per message and AI per use, all on your bill.SMS とメールは 1 通ごと、AI は利用量に応じて課金され、いずれもサイト側の請求になります。
Zerda 的识别依据What Zerda checksZerda が確認すること
检测无头浏览器、自动化框架与非浏览器客户端。Headless browsers, automation frameworks and clients that are not browsers.ヘッドレスブラウザ、自動化フレームワーク、ブラウザ以外のクライアントを検知します。
未与页面交互即提交,或指针沿直线匀速移动。Submissions with no interaction on the page, or a pointer moving in straight lines at an even speed.ページを操作せずに送信されたリクエストや、ポインターが直線的に一定の速度で動く操作を捉えます。
机房与代理出口,以及同一 IP 下短时间内出现的大量设备。Data center and proxy exits, and many devices appearing behind one IP in a short time.データセンターやプロキシの出口、1 つの IP の背後に短時間で多数の端末が現れる状況を判定します。
核验结果附带该设备与 IP 的近期请求次数,可据此在服务端设置您自己的频次上限。The verify response includes recent counts for the device and the IP, so you can apply limits of your own on your server.検証結果には端末と IP の直近のリクエスト回数が含まれ、サーバー側で独自の回数制限を設けられます。
默认处置Default decisions既定の対応
以下为场景 send_code 的默认策略,可在后台按场景调整,或以自定义规则覆盖。The default policy for the send_code action is below. You can change it per action in the console or override it with custom rules.アクション send_code の既定のポリシーは次のとおりです。コンソールでアクションごとに変更するか、カスタムルールで上書きできます。
| 判定Verdict判定 | 默认处置Default decision既定の対応 |
|---|---|
likely_human真人Likely human人間 | allow放行Allow許可 |
suspicious可疑Suspicious疑わしい | challenge二次验证Step-up check追加認証 |
bot自动化程序Botボット | block拒绝Block拒否 |
null未取得令牌No tokenトークンなし | challenge二次验证Step-up check追加認証 |
接入Integration導入
在网页提交时取令牌,并以相同的场景名在后端核验:Request a token when the form is submitted, and verify it on your backend with the same action name:フォームの送信時にトークンを取得し、同じアクション名でバックエンドから検証します。
const token = await window.Zerda?.getToken(undefined, { action: 'send_code' });
curl -X POST https://api.zerda.dev/api/verify \
-H "Authorization: Bearer sk_your_secret_key" \
-H "Content-Type: application/json" \
-d '{"token":"<token>","userId":"u_1024","action":"send_code"}'
后端核验 →Verify on the backend →バックエンドでの検証 →规则与场景策略 →Rules and policy →ルールとアクション別ポリシー →
常见问题Questionsよくある質問
已经按 IP 限流,还不够吗?I already rate-limit by IP. Is that not enough?IP 単位のレート制限はすでにあります。それでは不十分ですか?
攻击者以住宅代理池轮换出口,单个 IP 的请求次数往往低于限流阈值。Zerda 按设备与运行环境判定,不依赖单一 IP。Attackers rotate exits through residential proxy pools, so each IP often stays under the limit. Zerda judges the device and its environment, not a single IP.攻撃者は住宅プロキシで出口を切り替えるため、IP ごとのリクエスト数は制限値を下回ることが多くあります。Zerda は単一の IP ではなく、端末と実行環境から判定します。
需要在每次调用前取令牌吗?Do I need a token before every call?呼び出しのたびにトークンが必要ですか?
需要。令牌只能核验一次,5 分钟后过期。在触发计费调用的提交动作上取令牌,由后端核验通过后再调用服务商接口。Yes. A token verifies once and expires after 5 minutes. Request one on the action that triggers the billed call, and call your provider only after your backend has verified it.はい。トークンは 1 回だけ検証でき、5 分で失効します。課金が発生する操作の送信時にトークンを取得し、バックエンドでの検証後にサービス事業者の API を呼び出してください。