Full BAS Source Events
run.id:"SB07-FULL-BAS-20260528-111840" / Hanguel AD Agent / 48 documents
본 문서는 OZZY PMS Chain 침해 흐름에 대한 Detection Evidence 기록이다. 분석 목적은 차단 여부를 주장하는 것이 아니라, 사후 분석 단계에서 ELK 쿼리와 Windows 원본 아티팩트를 통해 동일한 흐름을 재구성할 수 있음을 입증하는 데 있다. 각 항목은 원본 이벤트, 수집 경로, 재현 가능한 KQL, 해석 한계를 함께 기록한다.
| Campaign | SB-07 / OZZY PMS Chain |
|---|---|
| Primary Data Views | Hanguel AD Agent, Hanguel Alerts |
| Endpoint Scope | hanguel-win01, hanguel-dc01 |
| Evidence Timeframe | 2026-05-22 to 2026-05-31 lab evidence window |
| Evidence Goal | PMS patch chain, AWS control-plane local admin bridge, DC access, loader artifact, correlation alert reconstruction, and BAS validation |
| Evidence | What It Proves | Limit |
|---|---|---|
| HAD-005~HAD-009 loader artifact events | DC에서 loader chain 관련 Windows artifact를 ELK에서 다시 조회할 수 있다. | 이 자체가 manual mapping 내부 동작을 직접 기록한 것은 아니다. |
| HAD-009 USN Journal summary | hgl_loader.exe, hgl_payload.enc, hgl_run.cmd 파일 lifecycle이 남았다. |
USN은 파일 변경 증거이며 process memory behavior 증거는 아니다. |
| HAD-005 Application Error / WER | hgl_loader.exe가 실제 프로세스로 실행됐고 crash event가 남았다. |
crash만으로 LSASS access를 증명하지는 못한다. |
| HAC-001 correlation alerts | 단일 이벤트가 아니라 loader artifact와 Windows artifact를 시간창 내 incident 후보로 묶었다. | alert는 원본 이벤트를 해석한 2차 산출물이다. |
| HAC-002 AWS control-plane local admin bridge | GetPasswordData로 win01 local Administrator 컨텍스트를 확보하고, 그 컨텍스트에서 dc_cred.xml Import-Clixml 및 DC WinRM/C$ 접근이 성공했음을 비밀 출력 없이 확인했다. |
이 증거는 DPAPI 우회가 아니라, AWS control-plane을 통해 올바른 사용자 컨텍스트를 확보한 경로를 증명한다. |
| HAD-003 Sysmon ProcessAccess | 2026-05-29 재확인 기준 hgl_loader.exe -> lsass.exe Sysmon Event ID 10 직접 증거가 존재한다. |
ProcessAccess 직접 증거는 LSASS 접근을 증명하지만, manual mapping 내부 구현 전체를 단독으로 증명하지는 않는다. |
| Full BAS validation run | run:SB07-FULL-BAS-20260528-111840 기준 48개 emulation event가 수집되고, 개선 후 21개 custom correlation rule이 alert를 생성했다. |
실제 공격 재실행이 아니라 안전한 event.action emulation 기반 검증이다. |
| No-Defender branch validation | sb07-lsass-no-defender-006 룰은 Defender 이벤트가 없는 별도 run에서 alert 발생을 확인했다. |
full run에는 Defender block/action 이벤트가 포함되어 있어 별도 검증이 필요하다. |
SB-07에서는 실제 loader artifact 증거와 별도로, 전체 Technique Used에 대응하는 안전한 BAS emulation event를 ELK에 투입했다. 이 검증은 source event 수집, custom correlator 처리, alert index 적재까지 이어지는 탐지 파이프라인의 재현성을 확인하기 위한 것이다.
| Validation Item | Observed Result | Evidence Query / Pivot |
|---|---|---|
| Full BAS source ingestion | 48 events indexed | run.id:"SB07-FULL-BAS-20260528-111840" in Hanguel AD Agent |
| Technique representation | 21 ATT&CK techniques represented | run.id:"SB07-FULL-BAS-20260528-111840" + threat.technique.id aggregation |
| Full run alert output | 20 alerts in hanguel-alerts-* |
correlation.key:"run:SB07-FULL-BAS-20260528-111840" |
| No-Defender variant | 2 alerts, including sb07-lsass-no-defender-006 |
correlation.key:"run:SB07-NO-DEFENDER-BAS-20260528-112012" |
| Custom rule coverage | 21/21 SB-07 custom rules fired | rule.id: sb07-* with the two BAS run IDs |
| Elastic native alert engine | .internal.alerts-* docs count 0 at check time |
_cat/indices/.alerts-* |
아래 이미지는 2026-05-28에 Kibana Discover에서 직접 조회한 화면이다. 캡처 목적은 "탐지룰이 차단했다"가 아니라, 동일 KQL을 다시 실행했을 때 분석가가 같은 이벤트와 alert를 재현해서 찾을 수 있음을 보여주는 것이다. 각 이미지를 클릭하면 원본 크기 PNG가 새 탭에서 열린다.
run.id:"SB07-FULL-BAS-20260528-111840" / Hanguel AD Agent / 48 documents
correlation.key:"run:SB07-FULL-BAS-20260528-111840" / Hanguel Alerts / 20 documents
rule.id:"sb07-manual-mapping-inferred-014" / Hanguel Alerts / 4 documents
event.action:"dc_winrm_whoami" / Hanguel AD Agent / 3 documents
| Alert Path | Observed Result | Evidence |
|---|---|---|
| Hanguel AD custom correlator | hanguel-alerts-*에서 full BAS 20건, no-defender 2건 확인 |
correlation.key:"run:SB07-FULL-BAS-20260528-111840" |
| Elastic Security native alert engine | .internal.alerts-* count 0 |
GET .internal.alerts-*/_count?ignore_unavailable=true |
따라서 면접/보고서에서는 "Kibana native detection rule을 검증했다"가 아니라
"ELK 위에 구현한 Hanguel custom sequential correlator가 hanguel-alerts-*로 alert를 생성하는 것을 검증했다"라고 표현한다.
전체 Technique Used를 안전한 emulation event로 재현한 뒤, 원본 이벤트가 먼저 수집되었는지 확인한다.
Hanguel AD Agent
run.id:"SB07-FULL-BAS-20260528-111840"
source_event_count=48, technique_count=21
이 캡처는 BAS 이벤트가 단순 JSON 파일에만 남은 것이 아니라, 실제 ELK 수집 경로를 통과해 hanguel-ad-agent-* 인덱스에 저장되었음을 보여준다.
수집된 source event를 Hanguel AD custom correlator가 시간창 안에서 묶어 alert로 생성했는지 확인한다.
Hanguel Alerts
correlation.key:"run:SB07-FULL-BAS-20260528-111840"
full_run_alert_count=20
rule.id: "sb07-pms-patch-discovery-001"
rule.id: "sb07-credential-dc-access-002"
rule.id: "sb07-dc-access-lsass-004"
rule.id: "sb07-loader-forensic-triad-012"
rule.id: "sb07-manual-mapping-inferred-014"
rule.id: "sb07-pass-the-hash-simulated-021"
전체 run에서는 PMS patch, credential artifact, DC access, loader/LSASS artifact, Defender 관련 sequence alert가 함께 발생했다.
단, sb07-lsass-no-defender-006은 Defender block/action 이벤트가 없는 조건을 요구하므로 별도 run에서 검증한다.
Defender 차단 이벤트가 없는데 LSASS 관련 activity가 관측되는 분기를 별도로 검증한다.
Hanguel Alerts
correlation.key:"run:SB07-NO-DEFENDER-BAS-20260528-112012"
sb07-loader-lsass-005, sb07-lsass-no-defender-006
이 분기는 full run과 일부러 분리했다.
full run에는 defender_lsass_block, defender_action_taken이 포함되어 있어 no-defender 조건이 성립하지 않기 때문이다.
| Rule Range | Coverage Purpose | Observed Rules |
|---|---|---|
| 001~003 | PMS patch, credential artifact, DC access chain | sb07-pms-patch-discovery-001, sb07-credential-dc-access-002, sb07-pms-credential-chain-003 |
| 022 | AWS control-plane GetPasswordData bridge into win01 local Administrator context | sb07-aws-control-plane-local-admin-022 |
| 004~008 | Authenticated DC access, loader, LSASS, Defender, scheduled task chain | sb07-dc-access-lsass-004 through sb07-dc-loader-task-008 |
| 009~014 | Defender bypass inference, loader forensic triad, USN lifecycle, manual mapping inference | sb07-defender-bypass-inferred-009 through sb07-manual-mapping-inferred-014 |
| 015~021 | Early-stage bastion/JBoss/PMS masquerading and simulated pass-the-hash coverage | sb07-bastion-ssh-entry-015 through sb07-pass-the-hash-simulated-021 |
이 표는 "어떤 emulation event를 넣었고, 어떤 sequential rule이 발화했는지"를 면접 답변용으로 정리한 것이다. 전부 안전한 emulation event 기반이며 실제 credential dumping 재실행을 의미하지 않는다.
| Rule ID | Alert Action | Severity | Run |
|---|---|---|---|
sb07-pms-patch-discovery-001 | sb07_pms_patch_to_ad_discovery_sequence | high | full |
sb07-credential-dc-access-002 | sb07_credential_artifact_to_dc_access_sequence | critical | full |
sb07-pms-credential-chain-003 | sb07_pms_to_credential_chain_sequence | critical | full |
sb07-aws-control-plane-local-admin-022 | sb07_aws_control_plane_to_local_admin_bridge_sequence | critical | HAC-002 collector run |
sb07-dc-access-lsass-004 | sb07_authenticated_dc_access_to_lsass_activity_sequence | critical | full |
sb07-loader-lsass-005 | sb07_manual_mapping_loader_to_lsass_sequence | critical | full/no-defender |
sb07-lsass-no-defender-006 | sb07_lsass_activity_without_defender_sequence | high | no-defender |
sb07-defender-lsass-block-007 | sb07_defender_lsass_blocked_sequence | critical | full |
sb07-dc-loader-task-008 | sb07_dc_loader_task_observed_sequence | high | full |
sb07-defender-bypass-inferred-009 | sb07_defender_bypass_inferred_sequence | high | full |
sb07-dump-bypass-inference-010 | sb07_dump_artifact_and_bypass_inference_sequence | critical | full |
sb07-dump-after-defender-block-011 | sb07_dump_artifact_after_defender_block_sequence | critical | full |
sb07-loader-forensic-triad-012 | sb07_loader_forensic_triad_sequence | critical | full |
sb07-loader-file-lifecycle-013 | sb07_loader_file_lifecycle_sequence | high | full |
sb07-manual-mapping-inferred-014 | sb07_manual_mapping_inferred_from_artifacts_sequence | critical | full |
sb07-bastion-ssh-entry-015 ~ sb07-pass-the-hash-simulated-021 | 초기 접근/JBoss/PMS/PTA simulation 보강 룰 | low~medium | full |
| Metric | Before Rule Upgrade | After Rule Upgrade | Interpretation |
|---|---|---|---|
| Source event ingestion | 48 / 48 | 48 / 48 | 수집 파이프라인은 처음부터 정상 동작했다. |
| Technique representation | 21 techniques | 21 techniques | 전체 Technique Used가 event.action 형태로 표현되었다. |
| Technique alert coverage | 13/21 | 21/21 | 초기 접근/JBoss/PMS masquerading/Pass-the-Hash simulation 쪽 룰을 보강했다. |
| Unique custom rule fired | 14/14 | 21/21 | SB-07 custom correlation rule set 기준 전부 발화 확인. |
| Native Elastic Security alert | Not observed | Out of scope | 이번 검증 범위는 Hanguel custom correlator이다. |
이 섹션은 Hanguel AD Agent와 custom correlator가 기업형 환경에 배치될 때 운영 가능한지 판단하기 위한 성능 근거를 분리해 기록한다.
현재 값은 SB-07 BAS 검증 결과, Elasticsearch 조회 결과, AWS CloudWatch 지표에서 확인된 항목만 Measured로 표기한다.
CloudWatch host CPU처럼 agent 프로세스 단위로 분리되지 않은 값은 Partial로 분리한다.
48 / 48 BAS source events indexed4,800 / 4,800 replay events indexedCoverage는 SB-07 Technique Used가 custom correlation rule과 연결되었는지를 의미한다.
이 그래프는 volume 비교이며, alert 수가 많을수록 좋다는 의미는 아니다.
Measured: ingestion, coverage, custom alert output, latency, replay EPS, storage. Partial: endpoint host CPU context.
Replay는 안전한 performance_replay_probe event로 수행했으며, 공격 행위 재실행이 아니다.
지연 시간에는 Logstash/Elasticsearch visible time과 custom correlator polling/write 시간이 포함된다.
| Category | Metric | Observed Result | Status | Evidence Source | Operational Meaning |
|---|---|---|---|---|---|
| Ingestion | Source events indexed | 48 / 48 |
Measured | hanguel-ad-agent-*, improved BAS result JSON |
BAS source event가 수집 파이프라인을 통과해 Elasticsearch에 누락 없이 저장되었다. |
| Detection Coverage | Technique alert coverage | 21 / 21 |
Measured | full_bas_verification_improved_SB07-FULL-BAS-20260528-111840.json |
SB-07 Technique Used 전체가 custom correlation rule과 연결되었다. |
| Correlation | Custom alert output | 20 full run + 2 no-defender branch |
Measured | hanguel-alerts-*, correlation.key pivots |
Hanguel custom correlator가 source event를 시간창 안에서 묶어 alert index에 기록했다. |
| Elastic Native Rule | Native alert docs | 0 |
Out of scope | .internal.alerts-* count check |
이번 검증은 Elastic Security native rule이 아니라 Hanguel custom correlator 성능 검증이다. |
| Latency | Event-to-alert elapsed time | source visible 0.616s, first alert 9.858s, full alert set 10.885s |
Measured | SB07-PERF-FULL-20260529-021618, hanguel-alerts-* |
custom correlator polling interval과 alert index write까지 포함한 분석가 도달 지연 시간을 판단한다. |
| Endpoint Overhead | Host CPU context | dc01 avg 1.68% max 21.24%; win01 avg 1.80% max 30.94% |
Partial | AWS CloudWatch CPUUtilization, 5-minute EC2 datapoints |
호스트 수준 CPU 참고값이다. agent 프로세스 단위 CPU/메모리/I/O overhead는 Windows performance counter 또는 EDR telemetry로 별도 측정해야 한다. |
| Scale | BAS replay EPS | 480/480 at 56.95 EPS; 4800/4800 at 130.11 EPS |
Measured | SB07-PERF-REPLAY-480*, SB07-PERF-REPLAY-4800* |
대량 로그 replay에서도 Logstash HTTP input과 Elasticsearch indexing이 누락 없이 처리되는지 판단한다. |
| Storage | Index size growth | +530,377 bytes for 4,800 replay events, about 110.5 B/event |
Measured | Elasticsearch _stats docs/store before-after delta |
보관 주기와 저장 비용 산정에 필요한 1차 추정값이다. Lucene compression과 segment merge 영향으로 장기 평균은 별도 측정해야 한다. |
DC collector 실행 이후 loader 관련 Windows artifact가 ELK에 들어왔는지 확인하는 1차 쿼리다.
Hanguel AD Agent
campaign.id:"SB-07" and log.id:("HAD-005" or "HAD-006" or "HAD-007" or "HAD-008" or "HAD-009")
@timestamp, host.name, log.id, event.action, hanguel.classification
| Log ID | Observed Count | Evidence Meaning |
|---|---|---|
| HAD-005 | 384 | Application Error / WER에서 hgl_loader.exe crash가 반복 관측됨 |
| HAD-006 | 2 | Amcache 계열 loader artifact 요약 이벤트 확인 |
| HAD-007 | 2 | ShimCache/AppCompatCache에서 loader path context 확인 |
| HAD-008 | 4 | TaskCache Registry 및 Task XML에서 loader task 확인 |
| HAD-009 | 1 | NTFS USN Journal에서 loader chain file lifecycle 확인 |
event.action 기준으로 어떤 loader artifact가 들어왔는지 좁혀 보는 쿼리다.
campaign.id:"SB-07" and event.action:(
"amcache_loader_artifact_found" or
"shimcache_loader_artifact_found" or
"application_loader_crash_observed" or
"taskcache_loader_task_found" or
"task_xml_loader_action_found" or
"usn_loader_file_lifecycle_observed" or
"loader_execution_log_found"
)
이 쿼리 결과는 DC에서 loader 실행 경로를 재구성하는 증거다.
loader_execution_log_found는 custom execution artifact이고, application_loader_crash_observed, task_xml_loader_action_found, usn_loader_file_lifecycle_observed는 Windows 원본 로그/아티팩트 기반 요약 이벤트다.
단일 로그가 아니라 여러 증거를 시간창 안에서 묶어 incident 후보로 만든 결과를 확인한다.
Hanguel Alerts
campaign.id:"SB-07" and rule.id:("sb07-loader-forensic-triad-012" or "sb07-loader-file-lifecycle-013" or "sb07-manual-mapping-inferred-014")
sb07-loader-forensic-triad-012, sb07-loader-file-lifecycle-013, sb07-manual-mapping-inferred-014
| Rule ID | Interpretation |
|---|---|
| sb07-loader-forensic-triad-012 | Task/Task XML 증거와 loader artifact evidence를 묶어 loader 실행 정황을 강화한다. |
| sb07-loader-file-lifecycle-013 | USN lifecycle 이벤트와 loader/dump artifact 조합을 묶어 파일 staging 흐름을 보강한다. |
| sb07-manual-mapping-inferred-014 | loader-side log/crash와 Windows artifact 조합으로 manual mapping 가능성을 추론한다. |
2026-05-29 재확인 기준으로 hanguel.test_runner:true가 없는 실제 endpoint Sysmon Event ID 10이 존재한다.
원본 이벤트와 ELK 문서 모두에서 hgl_loader.exe -> lsass.exe ProcessAccess가 확인되므로, LSASS 접근 직접 증거는 확보된 상태로 본다.
다만 이 직접 증거는 manual mapping 내부 단계 전체를 증명하는 것이 아니므로, manual_mapping_inferred는 loader-side log/crash와 Windows artifact를 조합한 추론으로 유지한다.
event.action:"sysmon_lsass_process_access" and data.message_excerpt:*hgl_loader.exe*
event.code:10 and process.executable:*hgl_loader.exe and winlog.event_data.TargetImage:*lsass.exe
dc_cred.xml 복호화 성공은 PMS SYSTEM 권한만으로 발생한 것이 아니라, 별도 AWS control-plane credential로 win01 EC2 local Administrator 컨텍스트를 확보한 뒤 확인된 결과다.
아래 항목은 verify_aws_control_plane_win01_admin.py의 redacted JSON 출력 기준이며, password와 IAM secret은 출력하지 않는다.
| Field | Observed Value | Interpretation |
|---|---|---|
aws_get_password_data.password_data_present | true | AWS GetPasswordData로 win01 local Administrator password material이 존재함을 확인했다. |
plaintext_printed | false | 보고/검증 산출물에는 password 평문을 남기지 않는다. |
win01_local_admin_context.whoami | ec2amaz-n2ogtl7\administrator | win01 local Administrator 컨텍스트가 확보됐다. |
import_clixml_succeeded | true | local Administrator 컨텍스트에서 dc_cred.xml Import-Clixml이 성공했다. |
credential_username | HANGUEL\Administrator | 복호화된 credential object의 계정명이 도메인 관리자임을 확인했다. |
dc_winrm_succeeded | true | 복호화된 credential object로 DC WinRM whoami가 성공했다. |
dc_c_admin_share_succeeded | true | 복호화된 credential object로 \\10.60.20.10\C$ 접근이 성공했다. |
run.id:"SB07-AWS-BRIDGE-20260531135457" and log.id:"HAC-002"
event.action:("aws_get_password_data_win01_local_admin_verified" or "win01_local_admin_context" or "dc_cred_xml_imported" or "dc_winrm_whoami" or "dc_c_admin_share_access")
rule.id:"sb07-aws-control-plane-local-admin-022"
| 2026-05-31 Final Check | Observed Result |
|---|---|
| Source index | langflow-agent-2026.05.31에 HAC-002 이벤트 5건 적재 |
| Correlation alerts | hanguel-alerts-2026.05.31에 sb07-credential-dc-access-002, sb07-aws-control-plane-local-admin-022 생성 |
| Correlator source scope | hanguel-ad-agent-*와 langflow-agent-*를 함께 조회하도록 보강 |
| Artifact | Original Location | SB-07 Log ID | Investigation Pivot |
|---|---|---|---|
| Application Error / WER | Windows Logs / Application, Event ID 1000/1001 | HAD-005 | Faulting application name: hgl_loader.exe |
| Amcache | C:\Windows\AppCompat\Programs\Amcache.hve | HAD-006 | hgl_loader.exe, pe64_amd64 context |
| ShimCache / AppCompatCache | HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\AppCompatCache | HAD-007 | C:\Windows\Temp\hgl_loader.exe |
| TaskCache Registry | HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache | HAD-008 | HanguelLoaderDiag |
| Task XML | C:\Windows\System32\Tasks\HanguelLoaderDiag | HAD-008 | cmd.exe /c C:\Windows\Temp\hgl_run.cmd |
| USN Journal | fsutil usn readjournal C: csv | HAD-009 | hgl_loader.exe, hgl_payload.enc, hgl_run.cmd |
| Loader run log | C:\Windows\Temp\hgl_loader_run.log | HAD-004 | decrypted_magic=4d 5a, entry=0x..., dump listing |
run.id:"SB07-FULL-BAS-20260528-111840" source event 캡처 완료.correlation.key:"run:SB07-FULL-BAS-20260528-111840" alert 캡처 완료.rule.id:"sb07-manual-mapping-inferred-014" 캡처 완료.event.action:"dc_winrm_whoami" 캡처 완료.HAC-002 redacted JSON에서 password_data_present:true, plaintext_printed:false, import_clixml_succeeded:true, dc_winrm_succeeded:true, dc_c_admin_share_succeeded:true를 캡처한다.correlation.key:"run:SB07-NO-DEFENDER-BAS-20260528-112012"로 재캡처 가능하다.hgl_loader.exe crash를 캡처한다.C:\Windows\Temp\hgl_loader.exe context를 캡처한다.hgl_loader.exe -> lsass.exe는 2026-05-29 재확인 결과를 기준으로 캡처한다.
LLM은 alert 판정 주체가 아니라 분석 보조 도구로 사용한다.
아래 프롬프트는 Kibana 결과를 넣었을 때 항상 Observed, Inferred, Missing Evidence를 분리하도록 강제한다.
[SB-07 Alert Triage Prompt]
You are a DF/IR analyst for the SB-07 OZZY PMS Chain lab.
Input events come from hanguel-ad-agent-*, langflow-agent-*, and hanguel-alerts-*.
Classify facts into Observed, Inferred, and Missing Evidence.
Do not claim Elastic native alert execution unless .internal.alerts-* evidence exists.
Return:
1. Attack behavior summary
2. Related Log IDs
3. ATT&CK mapping
4. Next KQL pivots
5. False-positive considerations
6. Report-ready Korean sentence
[SB-07 Timeline Reconstruction Prompt]
Given a list of event.action values and timestamps,
reconstruct the chain:
PMS patch -> win01 SYSTEM execution -> dc_cred.xml discovered ->
SYSTEM Import-Clixml failed -> AWS GetPasswordData local Administrator bridge ->
local Administrator Import-Clixml succeeded -> DC WinRM/C$ ->
loader/task/file artifact -> correlation alert.
Mark each step as confirmed, inferred, or missing.
Never convert BAS emulation into real endpoint execution.
[SB-07 KQL Pivot Prompt]
Given one SB-07 alert with rule.id, correlation.key, and related.events,
produce 5 Kibana KQL pivots:
- source event run.id
- related event.action
- Log ID pivot
- host/user pivot
- custom alert pivot
Also explain which data view to use.