HeroCTF v7 [forensics] Operation Pensieve Breach - 1 write up

2025. 12. 11. 13:35review 및 write up

The SOC of the Ministry of Magic received multiple critical alerts from the Domain Controller.

Everything seems to be out of control.
It seems that a critical user has been compromised and is performing nasty magic using the DCsync spell.

You're mandated to investigate the Principal Domain Controller event logs to find:
- sAMAccountName (lowercase) of the compromised account performing bad stuff.
- Timestamp of the beginning of the attack, format: DD/MM/YYYY-11:22:33 SystemTime.
- Source IP address used for this attack.
- The last legitimate IP used to login before the attack.

The findings have to be separated by a ";".


Here is an example flag format:

Hero{john.stark;DD/MM/YYYY-11:22:33;127.0.0.1;127.0.0.1}

 

주어진 파일 winevt 파일은 윈도우 이벤트로그 파일들이여서 윈도우의 이벤트 뷰어로 열어보았다.

DCsync(도메인 복제 권한 악용) 공격을 한 시간과 계정을 찾아야하는데 이런 공격과 같은 경우는 주로 Security.evtx에

Event ID 4662 (Directory Service Access)와 Event ID 4624 (로그온 성공)로 찾을 수 있다.

먼저 접근 시간과 계정이름을 알기 위해 4662 이벤트 아이디를 보면

(security.evtx를 열고 현재로그 필터에서 ID를 4662로 선택)

로그 중 작업에서 다음과 같은 항목이 있는지 검사하면 된다

 

  • DS-Replication-Get-Changes
    1131f6aa-9c07-11d1-f79f-00c04fc2dcd2
  • DS-Replication-Get-Changes-All
    1131f6ad-9c07-11d1-f79f-00c04fc2dcd2
  • DS-Replication-Get-Changes-In-Filtered-Set
    89e95b76-444d-4c62-991a-0facbeda640c

 

오전 8시 13분 41초경에 albus.dumbledore라는 계정으로 1131f6aa-9c07-11d1-f79f-00c04fc2dcd2 작업이 실행된걸 확인했다

이제 공격에 쓰인 IP와 정상접근 IP는 Event ID 4624 (로그온 성공)를 보면 된다.

 

같은 시간대 로그를 확인해보면 공격에 사용된 ipAddrss를 확인할 수 있다.

 

그리고 그 로그로 부터 앞으로 조금만 이동해주면 정상접속 ipAddress도 확인해 줄 수 있는 모습

 

공격시간만 UTC로 바꿔 플래그는

Hero{albus.dumbledore;22/11/2025-23:13:41;192.168.56.200;192.168.56.230} 가 된다

'review 및 write up' 카테고리의 다른 글

0xFUN CTF 2026 write up  (0) 2026.02.23
0ctf perspective write up [rev/misc]  (0) 2025.12.31
Platypwn 2025 write up  (0) 2025.12.04
ACDC2025 write up  (0) 2025.11.07
osu!CTF2025 [Forensics]map-dealer write up  (0) 2025.10.29