
탐지 규칙 검증
이 도구는 실제 프로세스의 설정을 거칠 필요 없이 악성 프로세스 이벤트를 시뮬레이션하는 과정을 자동화합니다.
w3wp.exe가 Powershell을 생성하는 상황을 테스트하려고 한다고 가정해 보세요. w3wp.exe 이벤트를 시뮬레이션하려면 iis 설정을 거쳐야 하는데, 검증해야 할 규칙이 많다면 이는 시간이 많이 걸리는 작업입니다. 탐지 엔진은 Sysmon이나 EDR과 같은 원격 분석(telemetry) 수집 도구의 단순 문자열 매칭을 기반으로 동작하므로, 동일한 부모 프로세스 이름, 자식 프로세스 이름, 명령줄 및 경로를 가진 바이너리라면 그 논리를 테스트하는 데 사용할 수 있습니다. 따라서 해당 동작을 시뮬레이션하기 위해 iis를 설정할 필요가 없습니다.

이 도구를 사용하면 사용자 지정 부모, 자식, 명령줄 및 경로로 자식 프로세스를 생성할 수 있습니다. 또한 특정 프로세스 및 경로에서의 파일 생성, DNS 쿼리, 레지스트리 및 프로세스 연결과 같은 몇 가지 다른 이벤트도 지원합니다.
NAME:
Malware Cli - A new cli application
USAGE:
main.exe [global options] command [command options] [arguments...]
DESCRIPTION:
Detection validation tool.
The objective is to generate event with specific conditions to validate detection rule.
You can execute commands such as w3wp.exe spawning shell or winword creating file or making DNS queries.
COMMANDS:
argsfree Accept any commandline
connect Connect to host
download Download file
dnsquery Resolve DNS
execute Execute command with custom commandline and parent process
encrypt encrypt all files in a folder that match a pattern
createfile Create file at a spcific path
reg Add registry key
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
winword.exe가 cscript.exe를 생성
mcli.exe execute --parent winword.exe --command cscript.exe
rundll32.exe가 DNS 요청 수행
mcli.exe dnsquery --binpath c:\temp\rundll32.exe --host malicious.com
w.exe가 C:\temp 경로에서 파일 생성
mcli.exe createfile --path f.dat --binpath c:\temp\w.exe
앱을 실행하여 사전 요구 사항을 다운로드하고 실행을 확인합니다
go run .
앱 컴파일
go build -o mcli.exe .