Pular para o conteúdo

Atomic Red Team

ComandoDescrição
git clone https://github.com/redcanaryco/atomic-red-team.gitClone repositório Atomic Red Team
cd atomic-red-teamNavegue até o repositório
Install-Module -Name invoke-atomicredteam,powershell-yaml -Scope CurrentUserInstalar módulos do PowerShell
Import-Module "C:\AtomicRedTeam\invoke-atomicredteam\Invoke-AtomicRedTeam.psd1" -ForceImportar módulo PowerShell
Invoke-AtomicTest T1003.001 -ShowDetailsMostrar detalhes do teste
ComandoDescrição
Invoke-AtomicTest T1003.001Executar teste atômico específico
Invoke-AtomicTest T1003.001 -TestNumbers 1Executar número de teste específico
Invoke-AtomicTest T1003.001 -ShowDetailsMostrar detalhes do teste sem executar
Invoke-AtomicTest T1003.001 -CheckPrereqsVerificar pré-requisitos
Invoke-AtomicTest T1003.001 -GetPrereqsInstalar pré-requisitos
Invoke-AtomicTest T1003.001 -CleanupExecutar limpeza para teste
ComandoDescrição
Get-AtomicTechniqueListar todas as técnicas disponíveis
Get-AtomicTechnique -Path "C:\AtomicRedTeam\atomics"Listar técnicas do caminho específico
`Get-AtomicTechnique \Where-Object {$_.DisplayName -match “credential”}`
Get-AtomicTechnique T1003Obter detalhes para técnica específica
ComandoDescrição
Invoke-AtomicTest T1566.001Anexo de Spearphishing
Invoke-AtomicTest T1566.002Link de Spearphishing
Invoke-AtomicTest T1190Explorar Aplicação Exposta Publicamente
Invoke-AtomicTest T1133Serviços Remotos Externos
Invoke-AtomicTest T1200Adições de Hardware
ComandoDescrição
Invoke-AtomicTest T1059.001Execução do PowerShell
Invoke-AtomicTest T1059.003Windows Command Shell
Invoke-AtomicTest T1059.004Unix Shell
Invoke-AtomicTest T1059.006Execução Python
Invoke-AtomicTest T1053.005Tarefa/Job Agendado
ComandoDescrição
Invoke-AtomicTest T1547.001Chaves de Execução do Registro
Invoke-AtomicTest T1053.005Tarefa Agendada
Invoke-AtomicTest T1543.003Serviço do Windows
Invoke-AtomicTest T1136.001Criação de Conta Local
Invoke-AtomicTest T1098Manipulação de Conta
ComandoDescrição
Invoke-AtomicTest T1548.002Ignorar Controle de Conta de Usuário
Invoke-AtomicTest T1055Injeção de Processo
Invoke-AtomicTest T1134Manipulação de Token de Acesso
Invoke-AtomicTest T1068Exploração para Escalação de Privilégios
ComandoDescrição
Invoke-AtomicTest T1027Arquivos ou Informações Ofuscados
Invoke-AtomicTest T1070.004Exclusão de Arquivo
Invoke-AtomicTest T1562.001Desativar ou Modificar Ferramentas
Invoke-AtomicTest T1218.010Regsvr32
Invoke-AtomicTest T1036Mascaramento
ComandoDescrição
Invoke-AtomicTest T1003.001Despejo de Memória do LSASS
Invoke-AtomicTest T1003.002Gerente de Conta de Segurança
Invoke-AtomicTest T1003.003NTDS.dit
Invoke-AtomicTest T1110.001Pulverização de Senha
Invoke-AtomicTest T1555.003Credenciais de Navegadores Web
ComandoDescrição
Invoke-AtomicTest T1087.001Descoberta de Conta Local
Invoke-AtomicTest T1087.002Descoberta de Conta de Domínio
Invoke-AtomicTest T1018Descoberta de Sistema Remoto
Invoke-AtomicTest T1083Descoberta de Arquivos e Diretórios
Invoke-AtomicTest T1057Descoberta de Processo
ComandoDescrição
Invoke-AtomicTest T1021.001Protocolo de Área de Trabalho Remota
Invoke-AtomicTest T1021.002Compartilhamentos de Administração SMB/Windows
Invoke-AtomicTest T1021.003Modelo de Objeto de Componente Distribuído
Invoke-AtomicTest T1021.006Windows Remote Management
Invoke-AtomicTest T1550.002Pass the Hash
ComandoDescrição
Invoke-AtomicTest T1005Dados do Sistema Local
Invoke-AtomicTest T1039Dados da Unidade de Rede Compartilhada
Invoke-AtomicTest T1113Captura de Tela
Invoke-AtomicTest T1123Captura de Áudio
Invoke-AtomicTest T1115Dados da Área de Transferência
ComandoDescrição
Invoke-AtomicTest T1071.001Protocolos Web
Invoke-AtomicTest T1071.004DNS
Invoke-AtomicTest T1090.003Proxy Multi-hop
Invoke-AtomicTest T1573.002Criptografia Assimétrica
ComandoDescrição
Invoke-AtomicTest T1041Exfiltração por Canal C2
Invoke-AtomicTest T1048.003Exfiltração por Protocolo Não-C2 Não Criptografado/Ofuscado
Invoke-AtomicTest T1567.002Exfiltração para Armazenamento em Nuvem
ComandoDescrição
Invoke-AtomicTest T1485Destruição de Dados
Invoke-AtomicTest T1486Dados Criptografados para Impacto
Invoke-AtomicTest T1490Inibir Recuperação do Sistema
Invoke-AtomicTest T1498Negação de Serviço de Rede
ComandoDescrição
Invoke-AtomicTest T1003.001 -InputArgs @{"output_file"="C:\temp\lsass.dmp"}Passar parâmetros personalizados
Invoke-AtomicTest T1087.001 -InputArgs @{"username"="testuser"}Especificar parâmetro de nome de usuário
ComandoDescrição
Invoke-AtomicTest T1003.001,T1003.002,T1003.003Executar múltiplos testes
`Get-AtomicTechnique \ForEach-Object {Invoke-AtomicTest $_.Technique}`
ComandoDescrição
Invoke-AtomicTest T1003.001 -LoggingModule "Attire-ExecutionLogger"Habilitar log
Invoke-AtomicTest T1003.001 -ExecutionLogPath "C:\logs\atomic.log"Especificar caminho do log
Invoke-AtomicTest T1003.001 -TimeoutSeconds 60Definir tempo limite de execução
# 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

VariávelDescrição
$env:ATOMIC_RED_TEAM_PATHCaminho para o diretório do Atomic Red Team
$env:ATOMIC_LOG_PATHCaminho para logs de execução
$env:ATOMIC_TIMEOUTTempo limite padrão para testes

Linux/macOS Usage

Installation

ComandoDescrição
git clone https://github.com/redcanaryco/atomic-red-team.gitClonar repositório
cd atomic-red-teamNavegue até o diretório
chmod +x atomics/*/src/*Tornar scripts executáveis

Execution

ComandoDescrição
bash atomics/T1059.004/src/T1059.004.shExecutar teste baseado em bash
python3 atomics/T1059.006/src/T1059.006.pyExecutar teste baseado em Python
./atomics/T1083/src/T1083-1.shExecutar variante de teste específica

Integration with SIEM

Splunk Integration

ComandoDescrição
Invoke-AtomicTest T1003.001 -LoggingModule "Splunk"Registrar no Splunk
index=atomic_red_team technique=T1003.001Pesquisar Splunk para resultados de teste

ELK Stack Integration

ComandoDescrição
Invoke-AtomicTest T1003.001 -LoggingModule "Elasticsearch"Log para Elasticsearch

Custom Test Development

Test Structure

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

ComandoDescrição
Invoke-AtomicTest -AtomicsFolder "C:\CustomAtomics" T9999.001Executar teste personalizado

Reporting and Analysis

ComandoDescrição
Get-AtomicTestResultsObter resultados de execução
Export-AtomicTestResults -Format CSV -Path "results.csv"Exportar resultados para CSV
Get-AtomicCoverageMostrar cobertura MITRE ATT&CK
Show-AtomicTestMatrixExibir matriz de teste

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

ComandoDescrição
Start-AtomicContinuousTesting -Techniques @("T1003.001","T1087.001") -Interval 3600Executar testes a cada hora

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

ComandoDescrição
Get-Help Invoke-AtomicTest -FullObtenha ajuda detalhada
Test-AtomicTestInputArgs T1003.001Validar argumentos de entrada
Get-AtomicTestPrerequisites T1003.001Verificar pré-requisitos
Repair-AtomicTest T1003.001Tentar corrigir problemas de teste

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