
PowerShell 기반 위협 헌팅 도구로, Windows 이벤트 로그를 분석하여 자격 증명 공격, 난독화된 명령, 서비스 조작, Mimikatz 사용 등 악성 활동을 탐지합니다.
DeepBlueCLI – 위협 헌팅을 위한 Windows 이벤트 로그 기반 PowerShell 모듈
Eric Conrad, Backshore Communications, LLC
deepblue at backshore dot net
트위터: @eric_conrad
샘플 EVTX 파일은 .\evtx 디렉터리에 있습니다.
참고 다운로드 후 바이러스 백신이 DeepBlueCLI에 반응하는 경우, 이는 .\evtx 디렉터리에 포함된 EVTX 파일(악성 공격의 명령줄 로그 등 아티팩트 포함) 때문일 가능성이 높습니다. EVTX 파일은 유해하지 않습니다. DeepBlueCLI 디렉터리를 바이러스 백신에서 무시하도록 설정해야 할 수 있습니다.
.\DeepBlue.ps1 <이벤트 로그 이름> <evtx 파일 이름>
'시스템에서 스크립트 실행이 비활성화되었습니다' 오류가 발생하면 Set-ExecutionPolicy Readme를 참조하세요.
.\DeepBlue.ps1
또는:
.\DeepBlue.ps1 -log security
.\DeepBlue.ps1 -log system
.\DeepBlue.ps1 .\evtx\new-user-security.evtx
이 로그를 구성하는 방법은 아래 로깅 설정 섹션을 참조하세요.
lsadump::sam...그 외 여러
DeepBlueCLI는 PowerShell 객체를 출력하므로 JSON, HTML, CSV 등 다양한 출력 방법과 형식을 사용할 수 있습니다.
예:
Windows 명령줄 감사 활성화: https://support.microsoft.com/en-us/kb/3004375
로그온 실패 감사 필요: https://technet.microsoft.com/en-us/library/cc976395.aspx
DeepBlueCLI는 모듈 로깅(PowerShell 이벤트 4103) 및 스크립트 블록 로깅(4104)을 사용합니다. 전사(transcription)는 사용하지 않습니다.
참조: https://www.fireeye.com/blog/threat-research/2016/02/greater_visibilityt.html
Windows 7부터 Windows 8.1까지 PowerShell 명령줄(스크립트 블록뿐만 아니라)을 가져오려면 다음을 \Windows\System32\WindowsPowerShell\v1.0\profile.ps1에 추가하세요.
$LogCommandHealthEvent = $true
$LogCommandLifecycleEvent = $true
자세한 내용은 다음을 참조하세요.
감사합니다: @heinzarelli 및 @HackerHurricane
Sysinternals에서 Sysmon 설치: https://docs.microsoft.com/en-us/sysinternals/downloads/sysmon
DeepBlue와 DeepBlueHash는 현재 Sysmon 이벤트 1, 6, 7을 사용합니다.
SHA256 해시를 로깅하세요. 다른 해시도 괜찮지만 DeepBlueHash는 SHA256을 사용합니다.
| 이벤트 | 명령 |
|---|
| 이벤트 로그 조작 | .\DeepBlue.ps1 .\evtx\disablestop-eventlog.evtx |
| Metasploit 네이티브 타겟 (보안) | .\DeepBlue.ps1 .\evtx\metasploit-psexec-native-target-security.evtx |
| Metasploit 네이티브 타겟 (시스템) | .\DeepBlue.ps1 .\evtx\metasploit-psexec-native-target-system.evtx |
| Metasploit PowerShell 타겟 (보안) | .\DeepBlue.ps1 .\evtx\metasploit-psexec-powershell-target-security.evtx |
| Metasploit PowerShell 타겟 (시스템) | .\DeepBlue.ps1 .\evtx\metasploit-psexec-powershell-target-system.evtx |
Mimikatz lsadump::sam | .\DeepBlue.ps1 .\evtx\mimikatz-privesc-hashdump.evtx |
| 새 사용자 생성 | .\DeepBlue.ps1 .\evtx\new-user-security.evtx |
| 난독화 (인코딩) | .\DeepBlue.ps1 .\evtx\Powershell-Invoke-Obfuscation-encoding-menu.evtx |
| 난독화 (문자열) | .\DeepBlue.ps1 .\evtx\Powershell-Invoke-Obfuscation-string-menu.evtx |
| 비밀번호 추측 | .\DeepBlue.ps1 .\evtx\smb-password-guessing-security.evtx |
| 비밀번호 스프레잉 | .\DeepBlue.ps1 .\evtx\password-spray.evtx |
| PowerSploit (보안) | .\DeepBlue.ps1 .\evtx\powersploit-security.evtx |
| PowerSploit (시스템) | .\DeepBlue.ps1 .\evtx\powersploit-system.evtx |
| PSAttack | .\DeepBlue.ps1 .\evtx\psattack-security.evtx |
| 사용자가 관리자 그룹에 추가됨 | .\DeepBlue.ps1 .\evtx\new-user-security.evtx |
| 출력 형식 | 구문 |
|---|
| CSV | .\DeepBlue.ps1 .\evtx\psattack-security.evtx | ConvertTo-Csv |
| Format list (기본값) | .\DeepBlue.ps1 .\evtx\psattack-security.evtx | Format-List |
| Format table | .\DeepBlue.ps1 .\evtx\psattack-security.evtx | Format-Table |
| GridView | .\DeepBlue.ps1 .\evtx\psattack-security.evtx | Out-GridView |
| HTML | .\DeepBlue.ps1 .\evtx\psattack-security.evtx | ConvertTo-Html |
| JSON | .\DeepBlue.ps1 .\evtx\psattack-security.evtx | ConvertTo-Json |
| XML | .\DeepBlue.ps1 .\evtx\psattack-security.evtx | ConvertTo-Xml |