Skillpedia
قواعد البيانات35k · #8305

performing-service-account-credential-rotation

ما الذي تفعله

تؤتمت هذه المهارة تغيير كلمات المرور ومفاتيح الوصول للحسابات التي تستخدمها البرامج (حسابات الخدمة). وهذا يساعد على منع استغلال بيانات الاعتماد القديمة من قبل المهاجمين.

متى تستخدمها

  • ✓عندما تدوّر كلمات مرور حسابات الخدمة.
  • ✓عندما تعد تدوير كلمات المرور تلقائيًا.
  • ✓عندما تتحقق من أمان حسابات الخدمة.

رابط المهارة

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

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-service-account-credential-rotation/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“غيّر بيانات اعتماد حسابات الخدمة لقاعدة البيانات وتطبيق الويب لدينا.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تتصل المهارة بأنظمة مثل Active Directory ومنصات السحابة (AWS وAzure وGCP) وقواعد البيانات. تُنشئ بيانات اعتماد جديدة، وتحدّثها حيث تُستخدم، وتتحقق من أن كل شيء ما زال يعمل.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من 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):

…
الأسئلة الشائعة

ما هي حسابات الخدمة؟

هي حسابات تستخدمها البرامج والأنظمة للتواصل مع بعضها، دون الحاجة إلى أن يُدخل شخص كلمة المرور.

لماذا نغيّر بيانات الاعتماد بانتظام؟

كلمات المرور ومفاتيح الوصول القديمة قد يكتشفها المتسللون. وتغييرها بانتظام يقلل خطر الهجمات.

ما المطلوب لاستخدام هذه المهارة؟

تحتاج إلى قائمة بكل حسابات الخدمة، ومكان آمن لتخزين بيانات الاعتماد (مثل خزنة رقمية)، ومعرفة البرامج التي تستخدم كل بيانات اعتماد.

التفاصيل

الوصف الأصلي من المؤلف

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

الشعبية

نجوم GitHub
35k
الترتيب
#8305
الترخيص
Apache-2.0
آخر تحديث
31‏/8‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة