# Jingfaka Platform Pentest

> Use when a jingfaka (鲸发卡) card shop is in scope.

- Skill: `yufeifeio/jingfaka-platform-pentest` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx get-skill add yufeifeio/jingfaka-platform-pentest`
- Raw SKILL.md: https://api.skillmd.com/api/skills/yufeifeio/jingfaka-platform-pentest/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Yufeifeio (https://skillmd.com/u/yufeifeio)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/yufeifeio/jingfaka-platform-pentest

---


# Jingfaka (鲸发卡) platform pentest

Load when a target fingerprints as a 鲸发卡-family card shop: page meta 自动发卡网/卡密寄售, static assets on
`res22.<domain>` / `*.cdnxxx.com`, a `聊城蓝鲸网络科技有限公司` vendor comment in scraped source, obfuscated
controllers (蓝鲸/PPK eval chains) over ThinkPHP. Nulled v9–v13 copies circulate on GitHub (search
鲸发卡/jingfaka) — grab the newest clone first: its `application/route.php` is a complete endpoint map
(`login/userlogin`, `register/checkuser`, `register/checkinfo`, `orderquery`, `dumpCards`, `pay/order` …).

Campaign priority (this user, standing): admin/DB/shell access. The daily 10-shot admin volley and
session-harvest are the sanctioned admin paths; mass user-table spraying and name-list collection are
not — skip them unless explicitly ordered.

## Layout & surfaces

- Shops: `/liebiao/<token>` (category), `/details/<token>`, order query `/orderquery`, checkout
  `POST /pay/order`, delivery oracle `/checkgoods`.
- Merchant login `/login` (POST `/login/userlogin`); platform admin `/admin` — path can be renamed via
  sysconf `admin_login_path`, so probe before concluding; the admin login exposes the same lockout
  machinery described below.
- Payments fan out to an external gateway plugin (`/pay/<plugin>/notify`); when the pay page hands off to a
  `TokenPay支付中心` page, pivot to `tokenpay-gateway-pentest`.

## Free enumeration oracles (no captcha, no counter)

- `GET /register/checkuser?newusername=X` → `1` exists / `0` free.
- `GET /register/checkinfo?newemail=…` and `?newmobile=1xxxxxxxxxx` → `1`/`0`.
- These bypass the login-error log entirely — sweep unlimited. The same pattern exists on downstream user
  sites of the same operator (e.g. `/register/valid?email=<username>` → `{"code":2}` = taken): hunt for an
  availability endpoint on every CN platform in scope — it turns username/email mapping into a free oracle. Size the sweep before committing: time the oracle first — these often answer your IP DIRECTLY at <1s/query even when other paths on the same site are proxy-walled (a text-extraction proxy ≈4-5× slower); budget = pool × latency (tens of thousands of names = an overnight chunked, resumable run), and pipe hits straight into the username-derived spray — confirmed-registered names are the high-yield spray targets.

## Login & lockout arithmetic

- Merchant side: `{__token__, username, password}`, accepts `username|mobile`, password stored as unsalted
  **md5** (v11–v13 source, consistent with live behavior). No captcha by default.
- Admin side: `{username, password, code}` + image captcha (`/admin/login/verifycode.html`, 4–5 chars,
  ddddocr-solvable; think-captcha is case-insensitive).
- Lockout: per-username, ~10 wrong passwords per **CN day** (reset = UTC 16:00). Wrong captcha does NOT
  count, a non-existent username is a free probe, and the failure reply leaks the remaining budget
  ("您还有N次机会") — parse it and schedule volleys just after the daily rollover. The LOCKED reply
  leaks an exact countdown ("将于N小时N分N秒后自动解锁") — parse it and time the next volley to the
  unlock second. Full counter modelling: `waf-evasion-and-credential-attack` §4b. Lockout is
  credential-only: live operator sessions are untouched, so a stored-XSS channel into the admin UI
  (complaint surface below) can mint a working session instead of waiting out the day.
- Multi-day volleys: slice the candidate list into per-day 10-password batches (batch N = `grep -v '^#' list | tail -n +$(( (N-1)*10 + 1 )) | head -10`), one run scheduled just after each daily rollover (~35s to burn all 10). Warm the captcha pipeline first with a GET-only dry run (`/admin/login/verifycode.html` + OCR, no POST) — proves OCR health at zero counter cost.
- 2FA (google/safecode/sms/email) gates only AFTER a correct password — expect a second page, not a
  session, on a password hit.
- Post-hit looting in ONE logged-in pass: the manage module renders full tables server-side — fetch
  `/manage/{user,order,goods,invitecode,site,log,cash,channel}/index.html` with the session and save
  each page before any other exploration.

## Order query & trust tokens

- `/orderquery`: `querytype=2` (by order number — no captcha) and `querytype=3` (by contact — lists that contact's orders WITH their per-order `l` links; captcha (`order_query_chkcode`) and window (`order_query_limitday`) are config-gated — verify live, off/wide happens). Contact-space guessing is a dead end (thousands of guessed emails/phones ≈ 0 hits, buyers use throwaway contacts): spend the budget on merchant usernames and admin.
- Captcha pipeline: `/chkcode` PNG → POST `/orderquery/checkverifycode {chkcode, token}` → `ok` →
  `GET /orderquery?orderid=X&chkcode=Y&querytype=Z`.
- Trust token `l = md5(input + seKey)`; seKey from `getOrderKey()` (factory fallback `itlanjing`, but the
  live deployment often sets a custom authkey — verify by reproducing a server-emitted `l`; if custom,
  harvest real `l` values from query results instead of forging).
- **Card export: `querytype=2` sets `session('dumpkey')`, then `GET /index/order/dumpCards?trade_no=X` in
  the same session downloads the cards file (`number\tsecret` per line).** Cards exist only for PAID
  orders — pair with the payment-chain work and export immediately after "Paid".
- Paid-state trap: the order-detail page's `付款时间` renders for UNPAID orders too (it is the order time mislabeled) — never infer "paid" from it. Authoritative checks: `/checkgoods` (`订单未付款，请重新支付…` vs a quantity>0 payload) or the status tag in a querytype=3 list. Guessed contacts that DO resolve usually return abandoned test checkouts — an all-unpaid finding is the normal shape, not a broken chain.

## Shop checkout mechanics

- `POST /pay/order` needs a live session plus the page's hidden `token` and single-use
  `paysafe_order_token` (re-parse fresh for every order). Fields: `userid cateid goodid quantity contact
  isemail email pwdforsearch1/2`. `订单正在处理或页面已过期` = stale/missing paysafe token — reload and retry.
- Order numbers: `WK + ymdH(CN) + [00/10/20/30/40/50] + 5 uppercase alnum` — treat as non-enumerable.
- Alipay channels are frequently dead (`失败`); the live rail is usually USDT via the external gateway.

## Complaint surface (stored-XSS channel + real side-effects)

- `GET /complaint` on ANY mirror, no auth: multipart form `trade_no type qq mobile select_cards
  select_text desc token`; `token` = md5+timestamp, session-bound — re-parse per submit. `trade_no`
  must reference an existing order (abandoned/unpaid qualify).
- `desc`/`qq` store RAW (`input('desc/s')` → `complaint` + `complaint_message` inserts, no purifier)
  and render in the manage-complaint panel → a stored-XSS channel into the operator console. Payload
  shapes that pass the shop WAF: `xss-session-harvest` §WAF-aware payload shaping
  (`<img/src=x/onerror=…>` passes where the canonical form 403s).
- Filing freezes the order (`is_freeze=1`, auto_unfreeze row killed) and for T0-settled orders deducts
  the seller's balance (`money-=` / `freeze_money+=`) — real financial side-effects; fire the minimum
  number of shots.
- Progress/cancel (`/complaintquery`, `complaintCancel`, `complaintPass`) key on `trade_no + pwd`,
  `pwd = rand(100000,999999)` generated at submit, SMS'd to the supplied `mobile`, stored plaintext.
  A chosen mobile = SMS to an arbitrary number (don't); the 6-digit pwd is the buyer-view brute
  oracle if ever needed.
- `buyer_qrcode` upload = sysconf-gated and extension-renamed — no webshell.

## OSINT & misc

- `/company/contact` hides emails behind Cloudflare email-protection: `data-cfemail` hex → XOR every byte
  after the first with the first byte.
- Footer/contact pages leak QQ numbers, phones and ICP filings — feed them into checkuser/checkinfo.
- Database backups live at `<app_root>/backup/` (guarded by an index.php; direct `/backup/` fetches 404 on
  hardened deployments); `/install*`, `/update*`, `.env`, `vendor/` are hardened — skip them. Controller
  error strings leak through live responses, so grep responses for message text before attempting source
  deobfuscation (php7.4 + iterative `eval(`→`print_r(` substitution does work on 蓝鲸 chains when needed).

## Family deployments & mirrors

- The shop code ships as a **family of domains on ONE database**: primary/admin host (`t.<x>.net`), payment-front mirrors (`www.<x>123.xyz`, `<x>.shop`, `<x>.site`), per-merchant storefronts (`f1.<x>.com`). Page bytes are identical; vendor comments/ICP/QQ match. A mirror's `/admin` 302s to the primary admin, and its password-reset form POSTs to the primary → shared DB. Even a per-merchant storefront's `/admin/login.html` loads its captcha from the primary host — ONE admin credential and ONE lockout counter across every domain in the family.
- Discovery: payment/upgrade/backup domains leak from API responses (user-info `pay`/`upgrade` fields) and storefront footers — probe `www.` and the bare domain. **Attack the weakest mirror** (often the one without Cloudflare).
- Verify shared DB by running one oracle (contact order query) on two domains and diffing results.
- **Deploy windows are recon windows**: when the whole stack answers 502 (app/PHP layer dead) while sibling tenants/vhosts on the same box keep serving, the operator is mid-deploy. Watch recovery fingerprints (changed error strings/versions), transiently open ports, and leftover artifacts (`.bak`/`.zip`/`.swp`) during and right after — the maintenance minutes are the cheapest look at the box of the campaign.

## Vendor layer (鲸软 supply chain)

- Instance source ships vendor fingerprints: `application/extra/cloud.php` carries `api_url`/`platform_url` → `http://www.jingfaka.com` plus a per-instance `cloudkey` (treat as a credential); the license chain in `application/admin/controller/Cloud.php` embeds literal `jingfaka1/2/3` salts and an RSA public key — authkey = base64 of 4 `#`-separated parts (sig#key#…, one being a unix expiry). Newer builds are plain (unobfuscated) PHP — grep before pivoting.
- The vendor (鲸软JingSoft) is its own attack surface with free oracles: open register (ddddocr-solvable captcha), member center (授权管理/购买授权/系统下载/演示网站/内部专用支付), and a licensed-domain check that maps the whole customer base. Routes and mechanics: `references/vendor-layer.md`.
- The instance's system admin module (`application/admin/`, login title = operating company name) is a SECOND panel separate from the merchant login (`/admin/login.html`) — probe both; route and lock mechanics in `thinkphp-exploitation` §5.

## Downstream closure: paid card → account takeover

- The cards this shop sells are the buyer site's registration **invite codes** (24 chars, `JA`/`JB` prefix — format-checked server-side). The buyer site consumes a code in three places:
  - `POST /apiFindUser {code}` → username bound to the code;
  - `POST /apiResetPsw {name, code}` → **sets a new password** (binding check name↔code);
  - register.
- So ONE paid order → card export → username lookup → password reset = **full takeover of the buying account**. That is why "one paid order" is the top-value gap on the shop side: it is not one key, it is the key to every account that ever bought.
- Report the loop as closed: paid order → `dumpCards` → `/apiFindUser` → `/apiResetPsw`.

## Deeper surface notes

- Registration is usually switched OFF (`sysconf('site_register_status')`=0): the register page shows 暂未开放 and `register/regsave` refuses — do not plan around signing up.
- `payment/notify/<channel>` verifies signatures inside the channel plugin: blind reshapes all answer `False` — skip forgery attempts, leave it to real callbacks.
- Obfuscated models/controllers (蓝鲸/PPK eval chains) read as `binary` to `file` and grey out grep ("binary file matches") → use `grep -a`; reading only fragments is normal. Switch to behavior-testing live endpoints instead of burning hours deobfuscating.
- App-API side of the family: backend search is `GET <api>/search/index` with `q` matching usernames (`type=author|91`; a POST to `/search` fails — wrong verb/route). Phone-prefix `q` values harvest phone-number usernames; user pages resolve via `id=<username>`. Auth tokens are single-session — every fresh login invalidates stored tokens, so re-login right before using one.
- Some App-API routes encrypt responses per-request while others stay plaintext: decode with the extracted client key BEFORE any A/B diff (no-token vs token, before vs after) — raw ciphertext differs on every call (IV noise) and reads as 100% false-positive "DIFF"; decoded, most diffs collapse to the same error string. A generic `请求处理失败，请稍后重试` signals wrong call SHAPE (verb/params) more often than a dead route — pull the exact call site from the decompiled bundle first (GET-vs-POST wrappers; `id=<username>` resolves, numeric/video ids come back empty). Field notes: `references/app-api-notes.md`.
- Shop ajax `selectcard` = `GoodsCardModel::where(goods_id, status)`; goods not flagged choosable answer 此商品不能选号 — enumerate `goods_id` to find choosable ones.

