# Bladex Framework Pentest

> Use when pentesting BladeX/Spring Cloud Saber systems.

- Skill: `yufeifeio/bladex-framework-pentest` (Agent Skill)
- Install (CLI): `npx get-skill add yufeifeio/bladex-framework-pentest`
- Raw SKILL.md: https://api.skillmd.com/api/skills/yufeifeio/bladex-framework-pentest/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: Yufeifeio (https://skillmd.com/u/yufeifeio)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/yufeifeio/bladex-framework-pentest

---


# BladeX (BladeX-Boot / Spring Cloud) + Saber front pentest

BladeX is a common Chinese Spring Cloud framework (blade-auth / blade-system / blade-* microservices). Saber = its official Vue2+ElementUI+**AVUE** admin front. Verified 2026-10 on a TG-cloud-control platform (static front on one IP, live API on `IP:9002`).

## Fingerprint

- SPA JS references `cdn/avue/`, `saber-themeKey`, Blade-style theme vars.
- App bundle contains the front config block — **grep it first**: `{title:"saber", clientId:"saber", clientSecret:"saber_secret", tenantMode:!0, captchaMode:!0, ...}` → OAuth client creds leak in the bundle.
- API base often a **different host/port** than the static site, resolved in JS: `"development"==NODE_ENV?"http://IP:PORT":a.baseUrl` — static host may return SPA index.html for every path (`Content-Type: text/html` = SPA fallback, not a route).

## Auth flow (saber variant)

1. `GET /blade-auth/captcha` → `{"key":"uuid","image":"data:image/jpg;base64,..."}` (4-digit numeric; ddddocr reads it cleanly).
2. `POST /blade-auth/token` with header `Authorization: Basic base64(clientId:clientSecret)` — front sends `grantType=captcha` (because `captchaMode:true`), `tenantId`, `account`, `password`, `type`; captcha grant adds headers `Captcha-Key`/`Captcha-Code`; `grantType=social` uses `Tenant-Id` header + `source/code/state`.
3. **`grantType=password` SKIPS the captcha server-side** even when the front uses captchaMode. Verified: Basic + params `{grantType:password,tenantId:000000,account:admin,password:X}` → HTTP 200 `{"code":400,"success":false,"msg":"用户名或密码错误"}` — a pure credential oracle with no captcha.
4. `tenantId=000000` common default, accepted here. Wrong user vs wrong password = same message (no enumeration).
5. Success → body contains `accessToken`; failures are still HTTP 200 with `code:400` — check the envelope.

## Rate limit & bypass (verified)

- Default limiter ≈ **3 attempts/window**, then `429 {"msg":"Too Many Requests","code":429}`.
- **Bare origin (no CDN) → rotate `X-Forwarded-For` / `X-Real-IP` (also try `X-Client-IP`, `Forwarded`) per request = full bypass.** Verified 12/12, then sustained ~30 rps across 200k+ attempts. Test: 6-12 rapid requests with unique spoofed IPs; if ≥~10 pass → bypassed.
- **Behind Cloudflare the same rotation does NOT bypass** (CF overwrites the header) — test empirically per target, don't assume.
- Keep aggregate load modest (~25-35 rps) on production auth; note auth latency (~0.35 s/req is normal here).

## Other surface checks

- `/actuator*`, `/druid/*`, `/swagger*`, `/doc.html`, `/v2|v3/api-docs` → often uniformly 404 on hardened gateways; `/blade-system/*`, `/blade-desk/*`, `/blade-log/*` → 401 `Request Not Authorized` unauth (routes exist, gated).
- `POST /blade-auth/register` (+ JSON/query/Basic variants) → 401 `Request Not Authorized` on locked deployments even though the Saber front still ships a `thirdRegister` page — treat register as closed, move on to credential/oracle paths.
- Header-trusting rate limiters are a **class** issue: test the XFF-style bypass on any custom middleware limits (search/query throttles, OTP limits) of bare origins.

## Brute-runner engineering (verified lessons)

- **Non-reentrant logging deadlock:** a `log()` helper that acquires a lock must NEVER be called while the caller already holds the same lock — the first progress log (~200 requests) froze all 12 worker threads silently. Compute the message/flag inside the lock, log outside.
- Resumable runner pattern: `(user,pass)` stream + tried-file skip + per-hit `LOGIN_OK.json` dump + notify-on-exit; progress line every N with rps. Prepare pass-2 lists in advance so the next slice chains without analysis downtime.
- Prepare a **cross-system credential-reuse sweep** BEFORE results land: one script re-trying any found `(user,pass)` across every mapped sibling login of the same org (blade password-grant, yudao admin-api AJ-captcha, FastapiAdmin form login, single-password panels). Same-org admins reuse passwords — one hit should instantly test all siblings.
- Rotate XFF inside the worker (random IP per request); one `requests.Session` per thread.
- Classify responses by message substrings, not status codes alone (400-in-200 bodies are the norm in this family).

## Related

- TG estate / webhook layer → `telegram-bot-attack-surface`.
- Framework family cousins: `ruoyi-framework-pentest` (若依/yudao), `jeecgboot-attack-chain`.

