GitHub / GitLab Dorking
Search public repos for org email, internal hostnames, JWT secrets, AWS keys, private keys.
§ Where this technique fits
W-RECON-GITHUB-DORK is catalogued under the Reconnaissance tactic of the offensive-security kill-chain. It appears in 14 approved dossiers in the registry, typically at step 1.1 on average.
§ Dossiers chaining this technique
- step 1 / 7
Dev workstation → cloud backup keys → encrypted vault store (LastPass 2022)
Attacker compromised a single LastPass DevOps engineer's home machine via outdated Plex Media Server, harvested AWS keys for the encrypted-vault backup bucket, exfiltrated production vault data.
- step 1 / 7
Vish helpdesk → Okta MFA reset → admin → ransomware (MGM-class)
Identify an Okta admin via LinkedIn. Vish the helpdesk pretending to be that admin, get MFA reset. Sign in, plant attacker MFA factor, then push policy changes that disable MFA for chosen apps before mass-deploying ransomware.
- step 1 / 5
Insider admin panel coercion → mass account takeover (Twitter 2020)
Identify employees with access to an internal admin panel. SE / coerce one to use the panel to change target accounts' email + 2FA, then take them over.
- step 1 / 7
Build-system implant → signed supply-chain backdoor (SolarWinds-class)
Compromise the target vendor's build server. A small implant rewrites a single source file at compile time — every official signed release downstream now ships the backdoor.
- step 1 / 6
Leaked GitHub PAT → org takeover → supply-chain push
A maintainer's PAT lands in a public Gist (or a Docker image layer). The token has repo + workflow scopes — push a malicious commit to a popular package, fire the auto-publish workflow.
- step 1 / 6
Slack token in CI log → DM history → vendor mailbox compromise
A CI run echoed a Slack xoxb-/xoxp- token. Use it to read DMs, harvest password-reset links and vendor invitations, pivot into the corporate mailbox.
- step 1 / 5
Compromised extension auto-update → fleet compromise
Take over a popular extension's developer account (credential stuffing on the store, abandoned email domain). Push a malicious version — every existing install runs attacker code on next launch.
- step 1 / 6
Vishing → helpdesk MFA reset → account takeover
Pose as a panicked employee locked out before a meeting. Helpdesk resets MFA based on partial PII (employee ID + date of birth from LinkedIn). Attacker registers their own factor.
- step 1 / 4
SharePoint / OneDrive public link enumeration → data dump
Bing / Grayhat Warfare reveals corporate SharePoint files shared 'with anyone' — financial docs, contracts, credentials in plaintext, etc.
- step 1 / 6
Self-hosted runner takeover → persistent CI compromise
A public repo with self-hosted GitHub runners accepts external PRs. First malicious PR runs on the runner; the workflow drops a runner-hook that fires before every future job.
- step 1 / 6
Secret echoed to public build log → cloud takeover
A workflow accidentally runs `env` or `set -x` during debugging — the AWS access key is now in public CI logs and indexed by Google Cache / GitHub search.
- step 1 / 7
pull_request_target injection → secrets → cloud takeover
A GitHub Actions workflow runs on pull_request_target and checks out the PR's head SHA. The attacker's PR injects code that runs with the base repo's secrets, including a cloud deploy role.
- step 2 / 6
Mass SMS phish → Okta-style portal → SaaS sprawl (0ktapus)
Wide SMS phishing campaign targeting employees of ~130 organisations with a single phishlet that captures Okta credentials + push approval. Mass automated logins to Twilio, MailChimp, DoorDash et al.
- step 2 / 6
Stolen credentials → no-MFA Snowflake → mass tenant exfil (2024)
Infostealer logs from third-party machines yielded credentials for many Snowflake tenants. Tenants without enforced MFA / IP allow-lists were directly queried; dozens of customer data sets exfiltrated.
§ What commonly comes next
- 01Valid Accountsseen 2×T1078 · Initial Access
- 020ktapus SMS-Phish Sweepseen 1×APT-OKTASS-0KTAPUS · Initial Access
- 03Exploit Public-Facing Applicationseen 1×T1190 · Initial Access
- 04GitHub Personal Access Token Leakseen 1×SAAS-GH-PAT-LEAK · Credential Access
- 05Insider Admin-Panel Coercion (Twitter 2020)seen 1×APT-INSIDER-PANEL · Initial Access
- 06Package Maintainer Takeoverseen 1×SUP-PACKAGE-TAKEOVER · Initial Access
- 07Pretextingseen 1×SE-PRETEXT · Initial Access
- 08Secret Echo to Build Logseen 1×CI-SECRET-IN-LOG · Credential Access