BOOK THIS SPACE FOR AD
ARTICLE AD
Exposed Kubernetes configuration secrets can fuel supply chain attacks
Pierluigi Paganini November 24, 2023
Researchers warn of publicly exposed Kubernetes configuration secrets that could pose a threat of supply chain attack for organizations.
Aqua Nautilus researchers warn of publicly exposed Kubernetes configuration secrets that put organizations at risk of supply chain attacks.
The experts noticed that these misconfigurations impact hundreds of organizations and open-source projects. Impacted entities include SAP’s Artifacts management system, two top blockchain companies, and multiple other Fortune-500 companies.
These encoded Kubernetes configuration secrets were uploaded to public repositories, experts warn.
The experts used the GitHub API to fetch all entries containing .dockerconfigjson and .dockercfg, which store credentials for accessing a container image registry.
“Although all Secrets types inherently contain sensitive information, the potential for exploitation varies. Secrets such as basic-auth,tls,and ssh-auth may pertain to external services linked to the cluster. However, exploiting these requires discovering the IP address or URL associated with the cluster, which can be challenging and resource-intensive.” reads the analysis published by Aqua. “The service-account-token is more relevant to internal services and can be a valuable asset for post-exploitation and lateral movement within a network, yet it is more challenging to exploit from an external standpoint.”
The initial query produced more than 8,000 results, and then refining it the experts discovered 438 records potentially holding valid credentials for registries. 203 records contained valid credentials that grant access to the respective registries. The researchers pointed out that most of these credentials provided both pulling and pushing privileges.
The analysis of 438 passwords revealed that 21.2% (93 passwords) seemed to be manually set by individuals, while the remaining ones were generated by computers. The researchers used the PESrank model to calculate password strength per each password. They discovered that 43 manually set passwords could be easily compromised by attackers.
“Alarmingly, we identified commonly known weak passwords such as password, test123456,windows12,ChangeMe,dockerhub, and others in active use.” continues the report. “This underscores the critical need for organizational password policies that enforce strict password creation rules to prevent the use of such vulnerable passwords.”
# | Registry | Counter | Valid Creds (#) | Valid Creds (%) |
1 | Private registry | 135 | 45 | 33% |
2 | Docker Hub | 94 | 64 | 68% |
3 | Quay | 54 | 44 | 81% |
4 | Azure ECR | 24 | 5 | 21% |
5 | GitHub registry | 21 | 10 | 48% |
6 | Jfrog | 19 | 4 | 21% |
7 | Red hat | 17 | 15 | 88% |
8 | Gitlab registry | 17 | 9 | 53% |
9 | Aliyun CS | 13 | 3 | 23% |
10 | Openshift | 10 | 0 | 0% |
11 | GCR | 9 | 0 | 0% |
12 | IBM ICR | 8 | 4 | 50% |
13 | Harbor | 7 | 0 | 0% |
14 | DigitalOcean | 4 | 0 | 0% |
15 | Tencent | 3 | 0 | 0% |
16 | AWS | 1 | 0 | 0% |
17 | OVH | 1 | 0 | 0% |
18 | Pivotal | 1 | 0 | 0% |
— | Sum | 438 | 203 | 46.3% |
Table 2: Exposed registries analysis
In some cases, the secrets remained exposed online for up to five years.
Moreover, the research revealed that all the scanners tested by the researchers were unable to detect these leaks, suggesting that they primarily focused on searching for plaintext passwords and tokens, overlooking encoded secrets.
The researchers highlighted the findings related to AWS (row 16) and GCR (Google Container Registry, row 11) were only related to temporary credentials that had already expired.
But on a positive note, all the credentials associated with AWS and Google Container Registry (GCR) were found to be temporary and expired, making access impossible. In a similar vein, the GitHub Container Registry required two-factor authentication (2FA) as an added layer against unauthorized access.
“The implications of these findings are profound, affecting not only individual developers but also large organizations, as evidenced by our discovery of valid credentials for a Fortune 500 company’s container images registries and artifact repositories.” concludes the report. “The potential for data breaches, loss of proprietary code, and supply chain attacks is a stark reminder of the need for stringent security practices.”
Follow me on Twitter: @securityaffairs and Facebook and Mastodon
(SecurityAffairs – hacking, Kubernetes configuration)