CyberAct
Publications/#Credential Management
Tag

Credential Management: securing secrets in depth

Understanding Credential Management

Definition

Credential Management refers to the full lifecycle of managing secrets in an information system: creation, storage, rotation, and revocation of passwords, tokens, certificates, and API keys. Securing secrets in depth means applying layered controls at every stage of this lifecycle. A credential is not simply a password. It encompasses service account tokens, SSH keys, OAuth bearer tokens, Kerberos tickets, and machine identities. From a cybersecurity standpoint, weak credential management is one of the most exploited root causes of breaches. Attackers target credential stores because a single compromised secret can provide lateral movement across an entire network. Privileged Access Management (PAM) platforms, secret vaults such as HashiCorp Vault or CyberArk, and just-in-time access provisioning are core architectural responses to this threat. The principle of least privilege governs which identities should hold which secrets. Credential sprawl, where secrets are scattered across configuration files, CI/CD pipelines, and developer workstations, dramatically increases the attack surface. Enforcing centralised credential management with automated rotation reduces exposure time for any compromised secret to near zero.

Detection (Blue Team / SOC)

Detecting credential management failures requires monitoring several event sources simultaneously. On Windows systems, Event ID 4648 logs explicit credential use, while Event ID 4624 and 4625 track successful and failed logons. Event ID 4776 records NTLM authentication attempts and is a key indicator during pass-the-hash attacks. LSASS access attempts generate Event ID 10 in Sysmon logs, flagging potential credential dumping tools such as Mimikatz or Procdump targeting lsass.exe. Monitoring for anomalous access to the Windows Credential Manager (accessed via vaultcmd or direct API calls) can reveal credential harvesting activity. On Linux, /etc/shadow access outside expected administrative windows and sudo session anomalies in auth.log are relevant signals. At the network level, unusual Kerberos TGT requests or S4U2Self abuse visible in domain controller logs indicate ticket-based credential misuse. SIEM correlation rules should alert on credential use outside business hours, from unusual source IPs, or against multiple targets within a short time window. Privileged account usage without a matching PAM session checkout is a high-fidelity indicator of credential theft. Secrets scanning tools integrated into CI/CD pipelines, such as TruffleHog or GitGuardian, detect hardcoded credentials before they reach production.

Exploitation & countermeasures (Red Team)

Red Team operators prioritise credential management weaknesses because compromised secrets shorten the path to domain dominance. LSASS memory dumping via Mimikatz sekurlsa::logonpasswords or direct MiniDumpWriteDump API calls extracts plaintext credentials and NTLM hashes. Pass-the-hash and pass-the-ticket techniques allow lateral movement without knowing plaintext passwords. Kerberoasting targets service accounts with weak passwords by requesting TGS tickets offline and cracking them with Hashcat. DCSync abuse, using replication rights granted to compromised accounts, pulls all domain hashes directly from Active Directory. On cloud infrastructure, IMDS endpoints (AWS EC2 metadata service) are frequently abused to steal short-lived IAM credentials if IMDSv2 is not enforced. Hardcoded secrets in Git repositories, Docker images, or Kubernetes ConfigMaps are harvested using automated scanners. Countermeasures include enforcing Credential Guard on Windows endpoints to protect LSASS via virtualisation-based security. PAM solutions should enforce session recording and just-in-time privilege elevation. Secrets must never be stored in environment variables without encryption. Rotating credentials immediately after any suspected exposure, enforcing MFA on all privileged accounts, and applying network segmentation to limit lateral movement are the primary hardening actions that directly reduce the impact of credential management failures.

Articles about Credential Management

MenacesFortiBleed: Why Patching Alone Won't Protect Your Fortinet Credentials

Over 86,000 Fortinet devices compromised through mass GPU cracking. Patching doesn't protect credentials already exfiltrated.

Jun 22, 20265 min read