فريق الأحمر الذري هي مكتبة اختبارات مرتبطة بإطار MITRE ATT&CK يمكن لفرق الأمن استخدامها بسرعة وبشكل قابل للنقل وقابل للتكرار لاختبار بيئاتهم.
التثبيت والإعداد
| أمر | وصف |
|---|
git clone https://github.com/redcanaryco/atomic-red-team.git | استنساخ مستودع Atomic Red Team |
cd atomic-red-team | انتقل إلى المستودع |
Install-Module -Name invoke-atomicredteam,powershell-yaml -Scope CurrentUser | قم بتثبيت وحدات PowerShell |
Import-Module "C:\AtomicRedTeam\invoke-atomicredteam\Invoke-AtomicRedTeam.psd1" -Force | استيراد وحدة PowerShell |
Invoke-AtomicTest T1003.001 -ShowDetails | عرض تفاصيل الاختبار |
الاستخدام الأساسي
| أمر | وصف |
|---|
Invoke-AtomicTest T1003.001 | نفّذ اختبار ذري محدد |
Invoke-AtomicTest T1003.001 -TestNumbers 1 | نفّذ رقم الاختبار المحدد |
Invoke-AtomicTest T1003.001 -ShowDetails | عرض تفاصيل الاختبار دون تنفيذه |
Invoke-AtomicTest T1003.001 -CheckPrereqs | تحقق من المتطلبات المسبقة |
Invoke-AtomicTest T1003.001 -GetPrereqs | قم بتثبيت المتطلبات الأساسية |
Invoke-AtomicTest T1003.001 -Cleanup | قم بإجراء التنظيف للاختبار |
اكتشاف الاختبارات
| أمر | وصف |
|---|
Get-AtomicTechnique | قائمة بجميع التقنيات المتاحة |
Get-AtomicTechnique -Path "C:\AtomicRedTeam\atomics" | قائمة تقنيات من المسار المحدد |
| `Get-AtomicTechnique \ | Where-Object {$_.DisplayName -match “credential”}` |
Get-AtomicTechnique T1003 | احصل على تفاصيل تقنية محددة |
تقنيات MITRE ATT&CK
الوصول الأولي
| أمر | وصف |
|---|
Invoke-AtomicTest T1566.001 | مرفق التصيد الاستهدافي |
Invoke-AtomicTest T1566.002 | رابط التصيد الاستهدافي |
Invoke-AtomicTest T1190 | استغلال التطبيق المواجه للعامة |
Invoke-AtomicTest T1133 | الخدمات البعيدة الخارجية |
Invoke-AtomicTest T1200 | الإضافات المادية |
التنفيذ
| أمر | وصف |
|---|
Invoke-AtomicTest T1059.001 | تنفيذ PowerShell |
Invoke-AtomicTest T1059.003 | Windows Command Shell |
Invoke-AtomicTest T1059.004 | Unix Shell |
Invoke-AtomicTest T1059.006 | تنفيذ Python |
Invoke-AtomicTest T1053.005 | مهمة/وظيفة مجدولة |
الاستمرارية
| أمر | وصف |
|---|
Invoke-AtomicTest T1547.001 | مفاتيح التشغيل في السجل |
Invoke-AtomicTest T1053.005 | مهمة مجدولة |
Invoke-AtomicTest T1543.003 | خدمة Windows |
Invoke-AtomicTest T1136.001 | إنشاء حساب محلي |
Invoke-AtomicTest T1098 | التلاعب بالحساب |
ترقية الامتيازات
| أمر | وصف |
|---|
Invoke-AtomicTest T1548.002 | تجاوز التحكم في حساب المستخدم |
Invoke-AtomicTest T1055 | حقن العملية |
Invoke-AtomicTest T1134 | التلاعب بـ Access Token |
Invoke-AtomicTest T1068 | استغلال للترقية الصلاحيات |
التحايل على الدفاع
| أمر | وصف |
|---|
Invoke-AtomicTest T1027 | الملفات أو المعلومات المموهة |
Invoke-AtomicTest T1070.004 | حذف الملف |
Invoke-AtomicTest T1562.001 | تعطيل أو تعديل الأدوات |
Invoke-AtomicTest T1218.010 | رجسفر32 |
Invoke-AtomicTest T1036 | التنكر |
الوصول إلى الاعتمادات
| أمر | وصف |
|---|
Invoke-AtomicTest T1003.001 | تفريغ ذاكرة LSASS |
Invoke-AtomicTest T1003.002 | مدير حساب الأمن |
Invoke-AtomicTest T1003.003 | NTDS.dit |
Invoke-AtomicTest T1110.001 | رش كلمات المرور |
Invoke-AtomicTest T1555.003 | بيانات الاعتماد من متصفحات الويب |
الاستكشاف
| أمر | وصف |
|---|
Invoke-AtomicTest T1087.001 | اكتشاف الحساب المحلي |
Invoke-AtomicTest T1087.002 | اكتشاف حساب النطاق |
Invoke-AtomicTest T1018 | اكتشاف النظام عن بُعد |
Invoke-AtomicTest T1083 | اكتشاف الملفات والدلائل |
Invoke-AtomicTest T1057 | اكتشاف العملية |
الحركة الجانبية
| أمر | وصف |
|---|
Invoke-AtomicTest T1021.001 | بروتوكول سطح المكتب البعيد (Remote Desktop Protocol) |
Invoke-AtomicTest T1021.002 | مشاركات المسؤول لـ SMB/Windows |
Invoke-AtomicTest T1021.003 | نموذج الكائن المكون الموزع (Distributed Component Object Model) |
Invoke-AtomicTest T1021.006 | إدارة التحكم عن بعد لـ Windows |
Invoke-AtomicTest T1550.002 | تمرير التجزئة (Pass the Hash) |
التجميع
| أمر | وصف |
|---|
Invoke-AtomicTest T1005 | بيانات من النظام المحلي |
Invoke-AtomicTest T1039 | بيانات من محرك أقراص الشبكة المشترك |
Invoke-AtomicTest T1113 | لقطة الشاشة |
Invoke-AtomicTest T1123 | التقاط الصوت |
Invoke-AtomicTest T1115 | بيانات الحافظة |
التحكم والأوامر
| أمر | وصف |
|---|
Invoke-AtomicTest T1071.001 | بروتوكولات الويب |
Invoke-AtomicTest T1071.004 | نظام أسماء النطاقات (DNS) |
Invoke-AtomicTest T1090.003 | وكيل متعدد القفزات |
Invoke-AtomicTest T1573.002 | التشفير غير المتماثل |
الإخراج
| أمر | وصف |
|---|
Invoke-AtomicTest T1041 | التسلل عبر قناة التحكم والسيطرة (C2) |
Invoke-AtomicTest T1048.003 | التسلل عبر بروتوكول غير مشفر/مموه غير C2 |
Invoke-AtomicTest T1567.002 | التسريب إلى التخزين السحابي |
التأثير
| أمر | وصف |
|---|
Invoke-AtomicTest T1485 | تدمير البيانات |
Invoke-AtomicTest T1486 | بيانات مشفرة للتأثير |
Invoke-AtomicTest T1490 | منع استعادة النظام |
Invoke-AtomicTest T1498 | حرمان الشبكة من الخدمة |
الاستخدام المتقدم
المعاملات المخصصة
| أمر | وصف |
|---|
Invoke-AtomicTest T1003.001 -InputArgs @{"output_file"="C:\temp\lsass.dmp"} | تمرير معاملات مخصصة |
Invoke-AtomicTest T1087.001 -InputArgs @{"username"="testuser"} | حدد معلمة اسم المستخدم |
التنفيذ الدفعي
| أمر | وصف |
|---|
Invoke-AtomicTest T1003.001,T1003.002,T1003.003 | تنفيذ اختبارات متعددة |
| `Get-AtomicTechnique \ | ForEach-Object {Invoke-AtomicTest $_.Technique}` |
التسجيل والإخراج
| أمر | وصف |
|---|
Invoke-AtomicTest T1003.001 -LoggingModule "Attire-ExecutionLogger" | تمكين التسجيل |
Invoke-AtomicTest T1003.001 -ExecutionLogPath "C:\logs\atomic.log" | حدد مسار السجل |
Invoke-AtomicTest T1003.001 -TimeoutSeconds 60 | تعيين مهلة التنفيذ |
التكوين
ملف التكوين (config.yaml)```yaml
Atomic Red Team Configuration
atomics_folder: “C:\AtomicRedTeam\atomics”
log_folder: “C:\AtomicRedTeam\logs”
default_timeout: 120
check_prereqs: true
get_prereqs: false
cleanup: true
### Environment Variables
| متغير | وصف |
|---------|-------------|
| `$env:ATOMIC_RED_TEAM_PATH` | المسار إلى دليل Atomic Red Team |
| `$env:ATOMIC_LOG_PATH` | مسار سجلات التنفيذ |
| `$env:ATOMIC_TIMEOUT` | المهلة الافتراضية للاختبارات |
## Linux/macOS Usage
### Installation
| أمر | وصف |
|---------|-------------|
| `git clone https://github.com/redcanaryco/atomic-red-team.git` | استنساخ المستودع |
| `cd atomic-red-team` | انتقل إلى المجلد |
| `chmod +x atomics/*/src/*` | اجعل البرامج النصية قابلة للتنفيذ |
### Execution
| أمر | وصف |
|---------|-------------|
| `bash atomics/T1059.004/src/T1059.004.sh` | نفّذ اختبار bash |
| `python3 atomics/T1059.006/src/T1059.006.py` | قم بتنفيذ اختبار يعتمد على Python |
| `./atomics/T1083/src/T1083-1.sh` | نفّذ المتغير الاختباري المحدد |
## Integration with SIEM
### Splunk Integration
| أمر | وصف |
|---------|-------------|
| `Invoke-AtomicTest T1003.001 -LoggingModule "Splunk"` | سجل في Splunk |
| `index=atomic_red_team technique=T1003.001` | ابحث في Splunk عن نتائج الاختبار |
### ELK Stack Integration
| أمر | وصف |
|---------|-------------|
| `Invoke-AtomicTest T1003.001 -LoggingModule "Elasticsearch"` | سجل إلى Elasticsearch |
## Custom Test Development
### Test Structure
```yaml
attack_technique: T1003.001
display_name: "LSASS Memory"
atomic_tests:
- name: Dump LSASS.exe Memory using ProcDump
auto_generated_guid: 0be2230c-9ab3-4ac2-8826-3199b9a0ebf8
description: |
The memory of lsass.exe is often dumped for offline credential theft attacks.
supported_platforms:
- windows
input_arguments:
output_file:
description: Path where resulting dump should be placed
type: Path
default: C:\Windows\Temp\lsass_dump.dmp
executor:
command: |
procdump.exe -accepteula -ma lsass.exe #{output_file}
name: command_prompt
Custom Test Execution
| أمر | وصف |
|---|
Invoke-AtomicTest -AtomicsFolder "C:\CustomAtomics" T9999.001 | تنفيذ اختبار مخصص |
Reporting and Analysis
| أمر | وصف |
|---|
Get-AtomicTestResults | احصل على نتائج التنفيذ |
Export-AtomicTestResults -Format CSV -Path "results.csv" | تصدير النتائج إلى CSV |
Get-AtomicCoverage | اعرض تغطية MITRE ATT&CK |
Show-AtomicTestMatrix | عرض مصفوفة الاختبار |
Automation and Scheduling
PowerShell Scheduled Jobs
$trigger = New-JobTrigger -Daily -At "2:00 AM"
Register-ScheduledJob -Name "AtomicRedTeam" -Trigger $trigger -ScriptBlock {
Import-Module Invoke-AtomicRedTeam
Invoke-AtomicTest T1003.001 -Cleanup
}
Continuous Testing
| أمر | وصف |
|---|
Start-AtomicContinuousTesting -Techniques @("T1003.001","T1087.001") -Interval 3600 | قم بتشغيل الاختبارات كل ساعة |
Security Considerations
- Run tests in isolated environments only
- Ensure proper cleanup after test execution
- Monitor for false positives in security tools
- Document all test executions for compliance
- Use least privilege principles
- Implement proper access controls
- Regular backup before testing
- Coordinate with security operations center
Best Practices
- Start with low-impact techniques
- Always run prerequisite checks first
- Use cleanup functions after testing
- Document test results and observations
- Coordinate with blue team activities
- Test in non-production environments first
- Implement proper logging and monitoring
- Regular updates to test library
- Validate detection capabilities
- Create custom tests for specific environments
Troubleshooting
| أمر | وصف |
|---|
Get-Help Invoke-AtomicTest -Full | احصل على مساعدة مفصّلة |
Test-AtomicTestInputArgs T1003.001 | تحقق من معاييّر الإدخال |
Get-AtomicTestPrerequisites T1003.001 | تحقق من المتطلبات المسبقة |
Repair-AtomicTest T1003.001 | محاولة إصلاح مشاكل الاختبار |
Common Issues
- Antivirus interference with test execution
- Missing prerequisites or dependencies
- Insufficient privileges for test execution
- Network connectivity issues for external resources
- Path-related issues on different operating systems