Corporate SSO Admin Panel Pentest
Class of work: internal admin panels (Django admin, backoffices) protected by "Login with Google" / corporate SSO. Techniques verified on a live engagement where the production admin used Google SSO with auto-provisioning (full case detail: references/case-torrero-google-sso.md).
1. Fingerprint the SSO entry (2 min)
- Django + social-auth: login page contains
href="/admin/social-auth/begin/" (the "Login with Google" button). curl -D - it: the 302 reveals the OAuth client (client_id=...apps.googleusercontent.com), redirect_uri (/admin/social-auth/complete/), scopes.
- Search the org's ticket/doc corpus for the auth design writeup. Teams document their own SSO ("whitelist domains X/Y + auto-create is_staff + self-service TOTP + session timeouts"). That writeup = the blueprint: auto-provisioning means a fresh valid account = full staff AND first-login 2FA is self-enrolled (you bind your own TOTP) — no OTP wall for NEW accounts.
- Two tracks usually coexist: "Login with Google" and "Login with password" (uuid/email + password + TOTP). Test both.
- Cloudflare Access 形态(
*.pages.dev 类内部工具、SaaS 旁的旁站):GET 受保护 app → 302 <org>.cloudflareaccess.com/cdn-cgi/access/login/<app>?kid=…;表单 action = /cdn-cgi/access/verify-code/<app>?kid=…。POST email 后 A code has been emailed to … = 该邮箱在允许列表内(否则拒绝文案)= 免费的白名单神谕。若 loot 里有该邮箱的收件能力(ops Gmail 等)→ 接码直接登录;读不了(Google 设备验证挡)→ 记下“该邮箱已被放行” + 挂低频恢复看板(邮件侧一旦可达即可完成)。
2. Google account existence probing (cheap, quiet, no lockout)
- Drive the real OAuth identifier step in a browser (CDP): reach
accounts.google.com/.../signin/identifier via the app's /admin/social-auth/begin/, type a candidate email, read the result:
- "Couldn't find this account" → not a Google account.
- "Enter your password" → ACCOUNT EXISTS.
- Identifier probing costs nothing on the target side (do keep it human-paced).
- Probe every plausible domain AND format: firstname@, firstname.lastinitial@, nickname@. Don't assume the main brand domain is the Google domain — live case: brand.com emails were NOT Google accounts while the sister corporate domain (torrero.com) held the whole staff workspace. Probe ops mailboxes too — some are created specifically to register a Google account.
- Build the candidate list from the org itself: ticketing systems leak staff rosters three ways — comment mentions (
shortcutapp://members/<uuid>), CRM staff tables, and best of all a members API that dumps the entire company in one call (live case: Shortcut GET /backend/api/private/members → 441 members with name + email_address + role + 2FA flags; full mining recipe: references/ticket-system-mining-shortcut.md). Any known staff email reveals the format.
3. SSO password hunting — and the reuse trap
- Best source = support-ticket corpora: grep every story/comment for
[\w.+-]+@domain within ~150 chars of pass/pwd/пароль/логин/cred keywords → dozens of live credential pairs per engagement.
- Recognize IT-generated styles and collect every variant: diceware triads (
guwjid-8fikti-vypcuF), leet defaults (Pl3aseDoNotCh4ngeMe!), company+digits (CorpLTD123!!), bare numerics.
- Verified trap: staff keep SEPARATE passwords for Google than for apps. 14+ attempts with valid app passwords across 10+ confirmed staff Google accounts ALL failed — including a bare-company-name weak tool password (
Torrero) that the same employee demonstrably uses on a partner portal. Do not burn attempts assuming reuse; hunt Google-specific sources (mailbox creds, browser-synced stores, breach corpora) and cap at 1–2 attempts per account — lockouts and security-alert emails cost more than the attempt is worth.
- Onboarding docs document the FLOW, not the secrets: "your account + a secrets-manager (Vault) invite were created; the SSL certificate and the passwords are there". Treat phrases like "standard onboarding set = everything in the Vault" as pointers to the real key store — map that layer early; the corpus yields mechanics, not the Google/admin passwords. The store can migrate mid-life: this org moved Vault → Infisical; the successor's SSO door (Google login +
defaultAuthOrgId auto-join) then replaces the Vault as the keystone — see infisical-pentest.
4. Reading the failures correctly
- A CORRECT Google password on a new device/IP can still hit "Verify it's you" (code to a masked recovery phone like "•••• ••36", call, or device pairing). This is NOT a wrong password — the credential is VALID but needs the physical factor. Note the masked phone; revisit if reachable via other loot.
- Uniform Django errors ("Please enter the correct uuid and password") = no user-vs-password oracle; keep attempts minimal (deployments often lock by host+IP for ~5 min after ~5 failures).
- Google throttles GLOBALLY per egress IP across accounts — space everything, stop after ~2 attempts per account.
- When driving this via CDP: verify the page shows the intended account (
Welcome / <email>) before submitting a password — a stale page silently submits attempts against the wrong account. The Google flow runs in a popup: a JS-evaluate el.click() is not a user gesture — the first popup may open, later ones get popup-blocked; drive it with Playwright page.expect_popup() + a real locator.click(), close stale google popups from prior attempts first, and use :visible locators (Google pages carry hidden decoy input[type=password]/hiddenPassword fields that break naive selectors).
5. The full chain (label proven vs inferred in reports)
Proven stages: SSO entry mapping, auto-provisioning design, workspace account enumeration, credential hunting. NOT yet proven end-to-end: valid workspace password → SSO callback → auto-created is_staff → self-enrolled TOTP → admin session. Report each stage as a separate claim; never present the chain as "opened" until the callback actually returns an authenticated admin session.
Pitfalls
- One email format ≠ domain verdict; enumerate formats AND domains (14 probes across 2 domains flipped the conclusion).
- Alias addresses (
name+admin@, name+staff@, name+trigger1@…) are usually usernames on OTHER systems (Django admins, ticket bots, test accounts), not Google identities — name+trigger1@ probed NO-ACCT while the alias map stayed valuable. Probe base addresses first.
- Domain renames: after staff-account migration (@old→@new) the old address probes NO-ACCT (same person, renamed) and the SSO email-change breaks the login binding (their design docs mark it "manual re-link"). Read migration stories before writing an account off.
- The production admin host may be unreachable by design (split-horizon DNS, cloud global-accelerator + IP allowlist) with the portal itself mTLS-gated, client certs distributed via the secrets manager. When every external path converges on the identity plane, stop re-probing hosts — extend the ticket-system + secrets-manager picture instead.
- The OTP wall applies to EXISTING accounts; auto-created accounts self-enroll — this is why a fresh valid account is worth more than cracking an old one.
- If the only known-password account is device-blocked, pivot to more staff emails / more password sources; don't replay the same password.
1---2name: corporate-sso-admin-pentest3description: Use when admin panels sit behind Google/SSO login.4metadata:5 source: https://skillmd.com/skills/yufeifeio/corporate-sso-admin-pentest6---78# Corporate SSO Admin Panel Pentest910Class of work: internal admin panels (Django admin, backoffices) protected by "Login with Google" / corporate SSO. Techniques verified on a live engagement where the production admin used Google SSO with auto-provisioning (full case detail: `references/case-torrero-google-sso.md`).1112## 1. Fingerprint the SSO entry (2 min)13- Django + social-auth: login page contains `href="/admin/social-auth/begin/"` (the "Login with Google" button). `curl -D -` it: the 302 reveals the OAuth client (`client_id=...apps.googleusercontent.com`), `redirect_uri` (`/admin/social-auth/complete/`), scopes.14- Search the org's ticket/doc corpus for the **auth design writeup**. Teams document their own SSO ("whitelist domains X/Y + auto-create is_staff + self-service TOTP + session timeouts"). That writeup = the blueprint: auto-provisioning means a fresh valid account = full staff AND first-login 2FA is self-enrolled (you bind your own TOTP) — no OTP wall for NEW accounts.15- Two tracks usually coexist: "Login with Google" and "Login with password" (uuid/email + password + TOTP). Test both.16- **Cloudflare Access 形态**(`*.pages.dev` 类内部工具、SaaS 旁的旁站):`GET` 受保护 app → 302 `<org>.cloudflareaccess.com/cdn-cgi/access/login/<app>?kid=…`;表单 action = `/cdn-cgi/access/verify-code/<app>?kid=…`。`POST email` 后 `A code has been emailed to …` = **该邮箱在允许列表内**(否则拒绝文案)= 免费的白名单神谕。若 loot 里有该邮箱的收件能力(ops Gmail 等)→ 接码直接登录;读不了(Google 设备验证挡)→ 记下“该邮箱已被放行” + 挂低频恢复看板(邮件侧一旦可达即可完成)。1718## 2. Google account existence probing (cheap, quiet, no lockout)19- Drive the real OAuth identifier step in a browser (CDP): reach `accounts.google.com/.../signin/identifier` via the app's `/admin/social-auth/begin/`, type a candidate email, read the result:20 - "Couldn't find this account" → not a Google account.21 - "Enter your password" → ACCOUNT EXISTS.22- Identifier probing costs nothing on the target side (do keep it human-paced).23- Probe every plausible domain AND format: firstname@, firstname.lastinitial@, nickname@. **Don't assume the main brand domain is the Google domain** — live case: brand.com emails were NOT Google accounts while the sister corporate domain (torrero.com) held the whole staff workspace. Probe ops mailboxes too — some are created *specifically* to register a Google account.24- Build the candidate list from the org itself: ticketing systems leak staff rosters three ways — comment mentions (`shortcutapp://members/<uuid>`), CRM staff tables, and best of all a **members API that dumps the entire company in one call** (live case: Shortcut `GET /backend/api/private/members` → 441 members with name + email_address + role + 2FA flags; full mining recipe: `references/ticket-system-mining-shortcut.md`). Any known staff email reveals the format.2526## 3. SSO password hunting — and the reuse trap27- Best source = support-ticket corpora: grep every story/comment for `[\w.+-]+@domain` within ~150 chars of pass/pwd/пароль/логин/cred keywords → dozens of live credential pairs per engagement.28- Recognize IT-generated styles and collect every variant: diceware triads (`guwjid-8fikti-vypcuF`), leet defaults (`Pl3aseDoNotCh4ngeMe!`), company+digits (`CorpLTD123!!`), bare numerics.29- **Verified trap: staff keep SEPARATE passwords for Google than for apps.** 14+ attempts with valid app passwords across 10+ confirmed staff Google accounts ALL failed — including a bare-company-name weak tool password (`Torrero`) that the same employee demonstrably uses on a partner portal. Do not burn attempts assuming reuse; hunt Google-specific sources (mailbox creds, browser-synced stores, breach corpora) and cap at 1–2 attempts per account — lockouts and security-alert emails cost more than the attempt is worth.30- Onboarding docs document the FLOW, not the secrets: "your account + a secrets-manager (Vault) invite were created; the SSL certificate and the passwords are there". Treat phrases like "standard onboarding set = everything in the Vault" as pointers to the real key store — map that layer early; the corpus yields mechanics, not the Google/admin passwords. **The store can migrate mid-life**: this org moved Vault → Infisical; the successor's SSO door (Google login + `defaultAuthOrgId` auto-join) then replaces the Vault as the keystone — see `infisical-pentest`.3132## 4. Reading the failures correctly33- A CORRECT Google password on a new device/IP can still hit "Verify it's you" (code to a masked recovery phone like "•••• ••36", call, or device pairing). This is NOT a wrong password — the credential is VALID but needs the physical factor. Note the masked phone; revisit if reachable via other loot.34- Uniform Django errors ("Please enter the correct uuid and password") = no user-vs-password oracle; keep attempts minimal (deployments often lock by host+IP for ~5 min after ~5 failures).35- Google throttles GLOBALLY per egress IP across accounts — space everything, stop after ~2 attempts per account.36- When driving this via CDP: verify the page shows the intended account (`Welcome / <email>`) before submitting a password — a stale page silently submits attempts against the wrong account. The Google flow runs in a **popup**: a JS-evaluate `el.click()` is not a user gesture — the first popup may open, later ones get popup-blocked; drive it with Playwright `page.expect_popup()` + a real `locator.click()`, close stale google popups from prior attempts first, and use `:visible` locators (Google pages carry hidden decoy `input[type=password]`/`hiddenPassword` fields that break naive selectors).3738## 5. The full chain (label proven vs inferred in reports)39Proven stages: SSO entry mapping, auto-provisioning design, workspace account enumeration, credential hunting. NOT yet proven end-to-end: valid workspace password → SSO callback → auto-created is_staff → self-enrolled TOTP → admin session. Report each stage as a separate claim; never present the chain as "opened" until the callback actually returns an authenticated admin session.4041## Pitfalls42- One email format ≠ domain verdict; enumerate formats AND domains (14 probes across 2 domains flipped the conclusion).43- Alias addresses (`name+admin@`, `name+staff@`, `name+trigger1@`…) are usually usernames on OTHER systems (Django admins, ticket bots, test accounts), not Google identities — `name+trigger1@` probed NO-ACCT while the alias map stayed valuable. Probe base addresses first.44- Domain renames: after staff-account migration (@old→@new) the old address probes NO-ACCT (same person, renamed) and the SSO email-change breaks the login binding (their design docs mark it "manual re-link"). Read migration stories before writing an account off.45- The production admin host may be unreachable by design (split-horizon DNS, cloud global-accelerator + IP allowlist) with the portal itself mTLS-gated, client certs distributed via the secrets manager. When every external path converges on the identity plane, stop re-probing hosts — extend the ticket-system + secrets-manager picture instead.46- The OTP wall applies to EXISTING accounts; auto-created accounts self-enroll — this is why a *fresh* valid account is worth more than cracking an old one.47- If the only known-password account is device-blocked, pivot to more staff emails / more password sources; don't replay the same password.