cheiron-add-simulation-template
Cheiron에서 시뮬레이션 템플릿을 생성합니다.
cheiron-add-simulation-template [profile=값] template-json=값 details-json=값 [procedures-json=값]
- profile=값
- 선택. Cheiron 접속 프로파일 식별자
- template-json=값
- 필수. 템플릿 정의의 JSON 객체입니다(요청의 template 부분). 필드: name(생성할 때 필수), description, is_cleanup(기본 false), visibility(1 공개, 2 비공개, 기본 2), capability(문자열 배열), reference(배열), stage({idx, name, desc, os}의 배열. os는 {windows, linux, mac: true 또는 false, detail: OS 이름}). 예:
{"name": "Discovery Check", "visibility": 2, "stage": [{"idx": 1, "name": "Victim - 1", "desc": "", "os": {"windows": true, "linux": false, "mac": false, "detail": "windows"}}]} - details-json=값
- 필수. 템플릿 노드 그래프의 JSON 배열입니다(요청의 details 부분). 노드 필드: node_id, name, type(start, proc, branch, branch_end, end), proc_id(proc 노드), prev, next(node_id 배열), condition(분기 조건, 다른 노드는 []), ui_meta(화면 위치 {x, y}), stage(stage idx). cheiron-simulation-template 결과의 details와 같은 모양입니다. 예:
[{"node_id": 1, "name": "start", "type": "start", "prev": [], "next": [2], "condition": [], "ui_meta": {"x": 0, "y": 0}}, {"node_id": 2, "name": "proc2", "type": "proc", "proc_id": "00000000-0000-0000-0000-0000000000a2", "prev": [1], "next": [], "condition": [], "ui_meta": {"x": 0, "y": 160}, "stage": 1}] - procedures-json=값
- 선택. 노드가 쓰는 프로시저 정의의 JSON 배열입니다(요청의 procedures 부분). 항목은 cheiron-procedure-by-id 결과와 같은 필드이고, 필수 필드는 proc_id, proc_name, tactics(전술 idx 배열), tech_id(기법 idx), platforms, environment, dependencies, main, cleanup, is_danger, danger_desc, result, file_attach, author_idx입니다. 예:
[{"proc_id": "00000000-0000-0000-0000-0000000000a2", "proc_name": "Owner Discovery", "tactics": [7], "tech_id": 23, "platforms": {"windows": true, "linux": false, "mac": false, "detail": ["windows"]}, "environment": {}, "dependencies": [], "main": {"type": "cmd", "command": "whoami"}, "cleanup": {}, "is_danger": false, "danger_desc": "", "result": {}, "file_attach": 0, "author_idx": 2}]
출력 필드
| 필드 | 타입 | 이름 | 설명 |
|---|---|---|---|
| profile | 문자열 | 접속 프로파일 | Cheiron 접속 프로파일 식별자 |
| template_idx | 32비트 정수 | 템플릿 IDX | 예: 1182 |
| name | 문자열 | 이름 | 예: MS Exchange Server Exploit _ CVE-2022-41082 |
| result_code | 32비트 정수 | 결과 코드 | 예: 200 |
| result_msg | 문자열 | 결과 메시지 | 예: OK |