Zum Inhalt springen
Skillpedia
Datenbanken35k · #8305

performing-service-account-credential-rotation

Was er macht

Dieses Tool automatisiert das Austauschen von Passwörtern und Zugriffsschlüsseln für Konten, die von Programmen genutzt werden (Dienstkonten). So verhinderst du, dass alte Zugangsdaten von Angreifern ausgenutzt werden.

Wann du ihn nutzt

  • ✓Wenn du Passwörter von Dienstkonten austauschst.
  • ✓Wenn du einen automatischen Passwortwechsel einrichtest.
  • ✓Wenn du die Sicherheit deiner Dienstkonten überprüfst.

Link zum Skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-service-account-credential-rotation/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-service-account-credential-rotation/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Tausche die Zugangsdaten der Dienstkonten für unsere Datenbank und unsere Webanwendung aus.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Das Tool verbindet sich mit Systemen wie Active Directory, Cloud-Plattformen (AWS, Azure, GCP) und Datenbanken. Es erzeugt neue Zugangsdaten, aktualisiert sie überall, wo sie verwendet werden, und prüft, ob alles weiterhin funktioniert.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Performing Service Account Credential Rotation

Overview

Service accounts are non-human identities used by applications, daemons, CI/CD pipelines, and automated processes to authenticate to systems and APIs. These accounts often have elevated privileges and their credentials (passwords, API keys, certificates, tokens) are frequently long-lived and shared across teams, making them prime targets for attackers. Credential rotation is the systematic process of replacing these secrets on a scheduled basis, propagating new credentials to all dependent systems, and verifying service continuity after rotation.

When to Use

  • When conducting security assessments that involve performing service account credential rotation
  • When following incident response procedures for related security events
  • When performing scheduled security testing or auditing activities
  • When validating security controls through hands-on testing

Prerequisites

  • Inventory of all service accounts across AD, cloud, and applications
  • Secrets management platform (HashiCorp Vault, AWS Secrets Manager, Azure Key Vault, or CyberArk)
  • Service dependency mapping (which services use which credentials)
  • Change management process for rotation windows
  • Monitoring for service health post-rotation

Core Concepts

Service Account Types

Type Platform Credential Rotation Method
Active Directory Service Account Windows/AD Password gMSA (automatic) or PAM-managed
AWS IAM User AWS Access Key/Secret Key AWS Secrets Manager rotation Lambda
GCP Service Account GCP JSON key file Key rotation via IAM API
Azure Service Principal Azure Client secret/certificate Key Vault + rotation policy
Database Service Account SQL/Oracle/Postgres Password Vault dynamic secrets
API Key SaaS applications API token Application-specific API

Group Managed Service Accounts (gMSA)

Windows gMSAs provide automatic password management by Active Directory:

  • AD automatically rotates the password every 30 days
  • Password is 240 bytes, cryptographically random
  • Multiple servers can use the same gMSA simultaneously
  • No administrator knows or manages the password
  • Eliminates manual rotation for Windows services

Rotation Architecture

Secrets Manager / Vault
        │
        ├── Rotation Trigger (schedule or on-demand)
        │
        ├── Generate new credential
        │
        ├── Update credential at source (AD, cloud IAM, database)
        │
        ├── Update credential in all consumers:
        │   ├── Application configuration
        │   ├── CI/CD pipeline secrets
        │   ├── Kubernetes secrets
        │   └── Other dependent services
        │
        ├── Verify service health
        │   ├── Health check endpoints
        │   ├── Authentication test
        │   └── Functional smoke test
        │
        └── Revoke old credential (after grace period)

Workflow

Step 1: Discover and Inventory Service Accounts

Enumerate all service accounts and their dependencies:

# Active Directory: Find all service accounts
Get-ADServiceAccount -Filter * -Properties *
Get-ADUser -Filter {ServicePrincipalName -ne "$null"} -Properties ServicePrincipalName,PasswordLastSet,LastLogonDate

# Find accounts with passwords older than 90 days
$threshold = (Get-Date).AddDays(-90)
Get-ADUser -Filter {PasswordLastSet -lt $threshold -and Enabled -eq $true} -Properties PasswordLastSet,ServicePrincipalName |
    Where-Object {$_.ServicePrincipalName} |
    Select-Object Name, PasswordLastSet, ServicePrincipalName

Step 2: Implement gMSA for Windows Services

# Create KDS Root Key (one-time, domain-wide)
Add-KdsRootKey -EffectiveImmediately

# Create the gMSA account
New-ADServiceAccount -Name "svc-webapp-gmsa" `
    -DNSHostName "svc-webapp-gmsa.corp.example.com" `
    -PrincipalsAllowedToRetrieveManagedPassword "WebServerGroup" `
    -KerberosEncryptionType AES128,AES256

# Install on target server
Install-ADServiceAccount -Identity "svc-webapp-gmsa"

# Test the account
Test-ADServiceAccount -Identity "svc-webapp-gmsa"

# Configure IIS Application Pool to use gMSA
# Set identity to: CORP\svc-webapp-gmsa$

Step 3: AWS Access Key Rotation with Secrets Manager

import boto3
import json

def rotate_iam_access_key(secret_arn, iam_username):

…
Häufige Fragen

Was sind Dienstkonten?

Das sind Konten, mit denen sich Programme und Systeme untereinander verbinden. Dafür muss kein Mensch ein Passwort eingeben.

Warum sollte man Zugangsdaten austauschen?

Alte Passwörter und Schlüssel können von Hackern entdeckt werden. Wenn du sie regelmäßig austauschst, sinkt das Risiko von Angriffen.

Was brauche ich, um dieses Tool zu nutzen?

Du brauchst eine Liste aller Dienstkonten, einen sicheren Ort für die Zugangsdaten (etwa einen digitalen Tresor) und Wissen darüber, welche Programme welche Zugangsdaten verwenden.

Details

Originalbeschreibung des Autors

Automates credential rotation for service accounts across Active Directory, cloud platforms, and application databases to eliminate stale secrets and reduce compromise risk. Use when rotating or automating rotation of service account passwords, API keys, or secrets stored in a vault.

repo: mukul975/Anthropic-Cybersecurity-Skills

Beliebtheit

GitHub-Sterne
35k
Platz im Ranking
#8305
Lizenz
Apache-2.0
Aktualisiert
31.8.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills