August 11, 2026
Cara Saya Memahami Security Solutions dan Membaca Log dengan PowerShell
Panduan praktis untuk pemula memahami fungsi security tools dan menganalisis log tanpa sekadar menghafal field

By Dhimas Lanang Nugroho
14 min read
Panduan praktis untuk pemula memahami fungsi security tools dan menganalisis log tanpa sekadar menghafal field
Ketika pertama kali belajar menjadi SOC Analyst, salah satu hal yang terasa membingungkan adalah banyaknya security product yang digunakan di sebuah organisasi.
Ada firewall, IDS, IPS, EDR, antivirus, sandbox, WAF, proxy, DLP, sampai email security. Semuanya berkaitan dengan keamanan, tetapi masing-masing melihat aktivitas dari sudut yang berbeda.
Kesalahan yang cukup umum ketika baru belajar adalah berusaha menghafal definisi setiap produk.
Menurut saya, cara yang lebih mudah adalah memahami tiga hal:
Apa yang dilindungi?
Data apa yang bisa kita lihat dari log-nya?
Bagaimana menentukan apakah aktivitas tersebut normal atau mencurigakan?
Artikel ini membahas konsep tersebut dari sudut pandang pemula, kemudian dilanjutkan dengan cara membaca log menggunakan PowerShell.
Catatan:_ Artikel ini adalah catatan pembelajaran independen. Contoh log, domain, IP address, username, hash, filename, dan indikator lainnya dibuat khusus untuk tujuan edukasi. Artikel ini tidak mereproduksi soal, jawaban hands-on, atau materi proprietary dari platform training tertentu._
Mengapa Kita Membutuhkan Banyak Security Solutions?
Tidak ada satu security product yang dapat melihat seluruh aktivitas dalam sebuah organisasi.
Bayangkan sebuah perusahaan memiliki:
- laptop karyawan,
- server,
- aplikasi web,
- koneksi internet,
- email,
- database,
- cloud infrastructure,
- dan berbagai perangkat jaringan.
Firewall mungkin bisa melihat koneksi antar-host, tetapi belum tentu mengetahui proses Windows apa yang membuat koneksi tersebut.
EDR bisa mengetahui bahwa powershell.exe berjalan, tetapi belum tentu memiliki konteks lengkap tentang serangan terhadap aplikasi web sebelum request mencapai endpoint.
WAF dapat mendeteksi SQL Injection pada HTTP request, tetapi tidak berfungsi sebagai antivirus untuk file yang tersimpan di laptop.
Itulah mengapa pendekatan keamanan biasanya menggunakan layered security.
Secara sederhana saya membaginya menjadi empat area:
Network Security IDS, IPS, firewall, proxy, dan network monitoring.
Endpoint Security EDR dan antivirus.
Application dan Cloud Security WAF dan load balancer logs.
Data dan Content Security DLP, sandbox, dan email security.
Saat semua telemetry ini dikumpulkan, SOC Analyst dapat menghubungkan kejadian yang awalnya terlihat terpisah menjadi sebuah incident.
1. Intrusion Detection System — IDS
IDS atau Intrusion Detection System digunakan untuk mengamati aktivitas dan mencari pola yang dianggap mencurigakan.
Konsep terpentingnya adalah:
_IDS berfokus pada _detection
Jika traffic sesuai dengan rule tertentu, IDS dapat menghasilkan alert agar analyst melakukan investigasi lebih lanjut.
Pada network monitoring, sebuah IDS biasanya melihat informasi seperti:
Source IP
Destination IP
Source Port
Destination Port
Protocol
Signature
Timestamp
Payload metadataSource IP
Destination IP
Source Port
Destination Port
Protocol
Signature
Timestamp
Payload metadataSuricata, misalnya, merupakan engine yang dapat digunakan sebagai IDS, IPS, sekaligus Network Security Monitoring. (Suricata Documentation)
Contoh alert sintetis:
2026-08-11 10:21:42
SRC=192.0.2.40
DST=198.51.100.20
PROTO=TCP
DPT=443
ALERT="Possible TLS Anomaly"2026-08-11 10:21:42
SRC=192.0.2.40
DST=198.51.100.20
PROTO=TCP
DPT=443
ALERT="Possible TLS Anomaly"Cara membacanya jangan langsung:
"IP tersebut adalah attacker."
Yang lebih tepat:
"Sistem mendeteksi traffic dari
192.0.2.40ke198.51.100.20:443yang cocok dengan sebuah detection rule."
Selanjutnya baru kita mencari konteks lain.
Apakah host tersebut memang melakukan scanning?
Apakah ada koneksi berulang?
Apakah firewall memblokir traffic?
Apakah endpoint tujuan menjalankan proses baru?
Inilah alasan alert IDS sebaiknya tidak dianalisis sendirian.
2. Intrusion Prevention System — IPS
IPS memiliki konsep yang mirip dengan IDS, tetapi biasanya ditempatkan sehingga dapat mengambil tindakan terhadap traffic.
Jadi sederhananya:
IDS = detect
IPS = detect + potentially preventIDS = detect
IPS = detect + potentially preventSuricata sendiri dapat digunakan dalam kedua mode tersebut. (GitHub)
Pada IPS log, salah satu hal pertama yang perlu saya cari adalah:
alert
action
signature
source
destination
protocolalert
action
signature
source
destination
protocolMisalnya:
{
"src_ip": "192.0.2.55",
"dest_ip": "198.51.100.8",
"dest_port": 443,
"alert": {
"action": "blocked",
"signature": "Synthetic Exploit Attempt"
}
}{
"src_ip": "192.0.2.55",
"dest_ip": "198.51.100.8",
"dest_port": 443,
"alert": {
"action": "blocked",
"signature": "Synthetic Exploit Attempt"
}
}Dari sini kita mengetahui bahwa:
Activity detected : Yes
Action : BlockedActivity detected : Yes
Action : BlockedTetapi ada satu prinsip penting:
Alert mendeteksi aktivitas tidak selalu berarti serangan berhasil.
Misalnya terdapat signature:
Possible Remote Command ExecutionPossible Remote Command ExecutionItu belum otomatis berarti command berhasil dijalankan.
Kita masih perlu mencari evidence seperti:
response dari server
child process
EDR telemetry
file creation
network callback
command outputresponse dari server
child process
EDR telemetry
file creation
network callback
command outputIni pola berpikir penting dalam pekerjaan SOC:
Detection ≠ Successful Exploitation
3. Firewall
Firewall bertugas mengontrol komunikasi berdasarkan rule.
Kalau saya mendapatkan firewall log, lima field pertama yang saya cari adalah:
Action
Protocol
Source IP
Destination IP
Destination PortAction
Protocol
Source IP
Destination IP
Destination PortContoh log sintetis:
2026-08-11 10:33:18 DENY TCP 192.0.2.44 198.51.100.25 53144 4452026-08-11 10:33:18 DENY TCP 192.0.2.44 198.51.100.25 53144 445Saya akan membacanya sebagai:
Action : DENY
Protocol : TCP
Source IP : 192.0.2.44
Destination IP : 198.51.100.25
Source Port : 53144
Destination Port : 445Action : DENY
Protocol : TCP
Source IP : 192.0.2.44
Destination IP : 198.51.100.25
Source Port : 53144
Destination Port : 445Kemudian baru tanyakan:
Kenapa host tersebut mencoba mengakses port 445?
Port saja tidak cukup untuk menentukan malicious atau tidak. Tetapi port memberikan konteks mengenai service yang kemungkinan sedang dituju.
Membaca Windows Defender Firewall Log
Format Windows Firewall biasanya lebih mudah dianalisis jika kita memahami posisi field.
Microsoft menyediakan logging untuk dropped packets dan successful connections ketika opsi tersebut diaktifkan. (Microsoft Learn)
Contoh sederhana:
2026-08-11 10:40:12 DROP TCP 192.0.2.15 198.51.100.15 5421 4432026-08-11 10:40:12 DROP TCP 192.0.2.15 198.51.100.15 5421 443Kita bisa membaca:
DROP
TCP
192.0.2.15
198.51.100.15
5421
443DROP
TCP
192.0.2.15
198.51.100.15
5421
443Artinya ada TCP traffic dengan:
Source IP = 192.0.2.15
Destination IP = 198.51.100.15
Source Port = 5421
Destination Port = 443
Action = DROPSource IP = 192.0.2.15
Destination IP = 198.51.100.15
Source Port = 5421
Destination Port = 443
Action = DROPKalau pertanyaannya:
IP mana yang mengirim TCP segment dengan source port 5421?
Tidak perlu menganalisis semuanya.
Cari saja:
Select-String -Path .\pfirewall.log -Pattern '5421'Select-String -Path .\pfirewall.log -Pattern '5421'Kemudian baca field source IP.
Teknik sederhana seperti ini akan sangat menghemat waktu.
4. Endpoint Detection and Response — EDR
Kalau firewall melihat komunikasi jaringan, EDR melihat aktivitas di endpoint.
Contohnya:
Process execution
Parent process
Command line
File creation
Registry modification
Network connection
User
File hash
Detection name
Severity
MITRE technique
Response actionProcess execution
Parent process
Command line
File creation
Registry modification
Network connection
User
File hash
Detection name
Severity
MITRE technique
Response actionEDR membantu analyst mendapatkan konteks yang jauh lebih detail mengenai apa yang terjadi pada workstation atau server. Microsoft, misalnya, menjelaskan EDR sebagai kemampuan yang memberikan visibility terhadap aktivitas endpoint serta membantu investigation dan response terhadap serangan. (Microsoft Learn)
Misalnya terdapat log sintetis:
{
"Technique": "Command and Scripting Interpreter: PowerShell",
"SeverityName": "High",
"FileName": "powershell.exe",
"UserName": "LAB\\analyst",
"CommandLine": "powershell.exe -File C:\\Temp\\inventory.ps1",
"PatternDispositionDescription": "Process blocked"
}{
"Technique": "Command and Scripting Interpreter: PowerShell",
"SeverityName": "High",
"FileName": "powershell.exe",
"UserName": "LAB\\analyst",
"CommandLine": "powershell.exe -File C:\\Temp\\inventory.ps1",
"PatternDispositionDescription": "Process blocked"
}Pertama saya tidak membaca seluruh JSON dari kiri ke kanan.
Saya mencari:
Technique
SeverityName
FileName
CommandLine
UserName
PatternDispositionDescriptionTechnique
SeverityName
FileName
CommandLine
UserName
PatternDispositionDescriptionHasilnya:
Technique : Command and Scripting Interpreter: PowerShell
Severity : High
Process : powershell.exe
Script : inventory.ps1
User : LAB\analyst
Action : Process blockedTechnique : Command and Scripting Interpreter: PowerShell
Severity : High
Process : powershell.exe
Script : inventory.ps1
User : LAB\analyst
Action : Process blockedMITRE ATT&CK sendiri memetakan penyalahgunaan PowerShell sebagai sub-technique T1059.001.
Perlu diperhatikan bahwa PowerShell bukan malware.
PowerShell adalah tool administrasi yang legitimate.
Yang menentukan apakah aktivitas berbahaya adalah konteks seperti:
Siapa yang menjalankan?
Apa command-nya?
Dari process apa?
Mengunduh apa?
Mengakses credential atau tidak?
Apakah behavior cocok dengan attack technique tertentu?Siapa yang menjalankan?
Apa command-nya?
Dari process apa?
Mengunduh apa?
Mengakses credential atau tidak?
Apakah behavior cocok dengan attack technique tertentu?5. Antivirus
Antivirus biasanya lebih berorientasi kepada file dan threat detection.
Ketika membaca antivirus log, saya fokus pada:
Filename
Threat Name
Category
Severity
Detection Path
ActionFilename
Threat Name
Category
Severity
Detection Path
ActionContoh:
Filename : updater-demo.exe
Threat Name : Trojan:Win32/Sample.A
Severity : Severe
Category : Trojan
Detect Path : C:\Users\demo\Downloads\updater-demo.exe
Action : QuarantinedFilename : updater-demo.exe
Threat Name : Trojan:Win32/Sample.A
Severity : Severe
Category : Trojan
Detect Path : C:\Users\demo\Downloads\updater-demo.exe
Action : QuarantinedKalau pertanyaannya:
Apa jenis malware-nya?
Tidak perlu menebak dari nama file.
Lihat:
Category : TrojanCategory : TrojanKalau ditanya apakah file sudah ditangani:
Action : QuarantinedAction : QuarantinedMicrosoft Defender Antivirus menyimpan hasil detection yang dapat direview bersama informasi mengenai threat yang ditemukan.
6. Sandbox
Sandbox adalah salah satu tool yang menurut saya paling menarik ketika mulai belajar malware analysis.
Idenya sederhana:
Jalankan file mencurigakan di environment terisolasi, kemudian lihat apa yang dilakukan file tersebut.
Tujuannya bukan hanya menentukan:
Malicious / Not maliciousMalicious / Not maliciousTetapi memahami behavior.
Ketika membuka sandbox report, saya biasanya membaca bagian ini secara berurutan:
Process tree
Files activity
Network connections
DNS requests
HTTP requests
Registry activity
Persistence
MITRE ATT&CK
Indicators of CompromiseProcess tree
Files activity
Network connections
DNS requests
HTTP requests
Registry activity
Persistence
MITRE ATT&CK
Indicators of CompromisePlatform sandbox seperti ANY.RUN, misalnya, menampilkan process activity sekaligus informasi jaringan seperti HTTP requests, connections, DNS requests, serta detection terkait. (Any.run)
Misalnya sebuah sample:
setup-demo.exesetup-demo.exemembuat:
C:\Users\demo\AppData\Local\Temp\setup-helper.dllC:\Users\demo\AppData\Local\Temp\setup-helper.dllKemudian setup-helper.dll membuka koneksi ke:
update-check.exampleupdate-check.exampleMaka jangan hanya fokus pada file pertama.
Pertanyaannya adalah:
File mana yang sebenarnya melakukan malicious behavior?
Itu bisa saja parent process, child process, DLL yang di-drop, atau executable lain yang dibuat setelah sample pertama dijalankan.
Cara Saya Membaca Sandbox Report
Saya biasanya mulai dari Process Tree.
Contoh:
setup-demo.exe
|
+--- rundll32.exe
|
+--- setup-helper.dllsetup-demo.exe
|
+--- rundll32.exe
|
+--- setup-helper.dllKemudian cek aktivitas process terakhir.
Apakah dia:
membuat file?
mengubah registry?
membuat scheduled task?
menghubungi domain?
mengunduh payload?membuat file?
mengubah registry?
membuat scheduled task?
menghubungi domain?
mengunduh payload?Setelah itu baru cek DNS.
Misalnya:
DNS Request
update-check.exampleDNS Request
update-check.exampleLalu cek network connection.
203.0.113.50:443203.0.113.50:443Sekarang kita sudah mulai membangun cerita:
File executed
↓
Child process created
↓
DLL loaded
↓
DNS request
↓
Outbound connectionFile executed
↓
Child process created
↓
DLL loaded
↓
DNS request
↓
Outbound connectionAnalisis seperti ini jauh lebih berguna daripada sekadar menghafal nama malware.
7. Data Loss Prevention — DLP
DLP atau Data Loss Prevention berfokus pada perlindungan informasi sensitif.
Bukan hanya malware yang menjadi ancaman bagi organisasi.
Data dapat bocor karena:
Email
Cloud storage
USB/removable media
Browser upload
File sharing
Clipboard
Printing
Messaging applicationEmail
Cloud storage
USB/removable media
Browser upload
File sharing
Clipboard
Printing
Messaging applicationDLP menggunakan policy untuk mendeteksi dan menangani data sensitif berdasarkan rule yang ditentukan organisasi. Microsoft Purview DLP, misalnya, menggunakan policy untuk mengidentifikasi, memonitor, dan melindungi sensitive information pada berbagai lokasi dan aktivitas pengguna. (Microsoft Learn)
Misalkan seorang employee mencoba mengirim dokumen:
customer-database.xlsxcustomer-database.xlsxke alamat email eksternal.
DLP mungkin menghasilkan:
Policy : Customer Data Protection
Action : Block
User : employee@example.com
Destination : external-user@example
File : customer-database.xlsx
Classification: ConfidentialPolicy : Customer Data Protection
Action : Block
User : employee@example.com
Destination : external-user@example
File : customer-database.xlsx
Classification: ConfidentialAnalyst perlu menentukan:
Data apa?
Dikirim oleh siapa?
Ke mana?
Melalui channel apa?
Rule apa yang terpicu?
Apa tindakan DLP?Data apa?
Dikirim oleh siapa?
Ke mana?
Melalui channel apa?
Rule apa yang terpicu?
Apa tindakan DLP?DLP tidak selalu berarti aktivitas malicious.
Bisa juga employee melakukan kesalahan.
Karena itu konteks bisnis sangat penting.
8. Asset Management
Asset management sering terlihat kurang menarik dibanding malware analysis atau incident response.
Padahal analyst tidak bisa melindungi sesuatu yang bahkan tidak diketahui keberadaannya.
Contoh asset:
Laptop
Server
Virtual Machine
Firewall
Router
Cloud instance
Database
Application
Software
IoT deviceLaptop
Server
Virtual Machine
Firewall
Router
Cloud instance
Database
Application
Software
IoT deviceInformasi inventory biasanya meliputi:
Hostname
IP
Operating System
Owner
Department
Installed Software
Software Version
Criticality
Location
Last SeenHostname
IP
Operating System
Owner
Department
Installed Software
Software Version
Criticality
Location
Last SeenCISA juga menekankan pentingnya asset visibility dan inventory sebagai fondasi untuk mengelola cybersecurity risk. (CISA)
Misalnya muncul vulnerability baru pada:
WebServerX 4.2WebServerX 4.2Pertanyaan SOC atau vulnerability team bukan hanya:
"Apakah vulnerability ini berbahaya?"
Tetapi:
"Kita punya berapa server yang menjalankan WebServerX 4.2?"
Tanpa inventory yang baik, pertanyaan kedua jauh lebih sulit dijawab.
9. Web Application Firewall — WAF
Firewall biasa berfokus pada network traffic.
WAF lebih fokus kepada HTTP/HTTPS request yang menuju web application.
WAF dapat melihat informasi seperti:
Client IP
HTTP Method
Host
URI
Query
Headers
User-Agent
Matched Rule
ActionClient IP
HTTP Method
Host
URI
Query
Headers
User-Agent
Matched Rule
ActionContohnya:
{
"action": "BLOCK",
"terminatingRuleId": "Demo_SQLi",
"terminatingRuleMatchDetails": [
{
"conditionType": "SQL_INJECTION"
}
],
"httpRequest": {
"clientIp": "198.51.100.77",
"country": "ID",
"uri": "/products",
"httpMethod": "GET"
}
}{
"action": "BLOCK",
"terminatingRuleId": "Demo_SQLi",
"terminatingRuleMatchDetails": [
{
"conditionType": "SQL_INJECTION"
}
],
"httpRequest": {
"clientIp": "198.51.100.77",
"country": "ID",
"uri": "/products",
"httpMethod": "GET"
}
}AWS WAF logs memang memiliki informasi mengenai action, rule yang matching, dan informasi request termasuk client IP. (AWS Documentation)
Dari contoh tersebut saya bisa menyederhanakannya menjadi:
Attack Type : SQL Injection
Action : BLOCK
Source IP : 198.51.100.77
Method : GET
URI : /productsAttack Type : SQL Injection
Action : BLOCK
Source IP : 198.51.100.77
Method : GET
URI : /productsItulah tujuan parsing:
Mengubah log panjang menjadi informasi yang mudah dipahami manusia.
Cloudflare WAF
Konsep yang sama berlaku pada Cloudflare logs.
Misalnya:
{
"action": "block",
"clientIP": "203.0.113.41",
"clientRequestHTTPHost": "portal.example",
"clientRequestHTTPMethodName": "POST",
"clientRequestHTTPProtocol": "HTTP/1.1",
"clientRequestPath": "/login"
}{
"action": "block",
"clientIP": "203.0.113.41",
"clientRequestHTTPHost": "portal.example",
"clientRequestHTTPMethodName": "POST",
"clientRequestHTTPProtocol": "HTTP/1.1",
"clientRequestPath": "/login"
}Cloudflare mendokumentasikan field request seperti client IP, request method, host dan path pada HTTP request logs. (Cloudflare Docs)
Tidak perlu membaca semuanya.
Kalau hanya ingin mengetahui method:
clientRequestHTTPMethodName : POSTclientRequestHTTPMethodName : POSTJawabannya sudah ditemukan.
10. Load Balancer
Load balancer berada di antara client dan backend server untuk mendistribusikan request.
Dari sudut pandang analyst, access log load balancer menarik karena kita bisa melihat:
Client IP
Backend
Request
HTTP method
Status code
Latency
TLS information
User-AgentClient IP
Backend
Request
HTTP method
Status code
Latency
TLS information
User-AgentAWS Application Load Balancer access logs misalnya dapat menyimpan informasi request termasuk client IP, request path, latency, response, dan user-agent. (AWS Documentation)
Contoh sintetis:
https 2026-08-11T11:20:31Z
192.0.2.90:51421
198.51.100.10:443
"GET https://portal.example/ HTTP/1.1"
"curl/8.5.0"
200https 2026-08-11T11:20:31Z
192.0.2.90:51421
198.51.100.10:443
"GET https://portal.example/ HTTP/1.1"
"curl/8.5.0"
200Bagian pentingnya:
Request : GET https://portal.example/
User-Agent : curl/8.5.0
Status : 200Request : GET https://portal.example/
User-Agent : curl/8.5.0
Status : 200User-Agent dapat memberi petunjuk mengenai software yang mengirim request.
Tetapi sekali lagi:
curl ≠ attackercurl ≠ attackercurl juga digunakan oleh administrator, automation, health check, developer, dan script legitimate.
Konteks tetap menentukan.
11. Proxy Server
Proxy berada di antara client dan resource yang diakses.
Salah satu produk yang sering digunakan sebagai contoh adalah Squid.
Squid dapat menghasilkan access log untuk HTTP request yang melewati proxy. (Squid Cache)
Contoh:
1710000010.120 120 192.0.2.25 TCP_MISS/200 502 GET http://news.example/ - DIRECT/198.51.100.1 text/html
1710000012.410 88 192.0.2.25 TCP_MISS/301 402 GET http://portal.example/ - DIRECT/198.51.100.2 text/html
1710000015.850 32 192.0.2.25 TCP_TUNNEL/200 39 CONNECT secure.example:443 - DIRECT/203.0.113.5 -1710000010.120 120 192.0.2.25 TCP_MISS/200 502 GET http://news.example/ - DIRECT/198.51.100.1 text/html
1710000012.410 88 192.0.2.25 TCP_MISS/301 402 GET http://portal.example/ - DIRECT/198.51.100.2 text/html
1710000015.850 32 192.0.2.25 TCP_TUNNEL/200 39 CONNECT secure.example:443 - DIRECT/203.0.113.5 -Yang perlu diperhatikan:
GET http://news.example/
GET http://portal.example/
CONNECT secure.example:443GET http://news.example/
GET http://portal.example/
CONNECT secure.example:443Untuk HTTPS proxying sering terlihat:
CONNECT hostname:443CONNECT hostname:443Dari:
CONNECT secure.example:443CONNECT secure.example:443kita langsung tahu destination port-nya:
443443Menghitung Domain GET yang Berbeda
Misalkan file proxy sangat panjang dan kita ingin mencari berapa domain unik yang menerima HTTP GET.
Tidak perlu menghitung manual.
PowerShell bisa melakukannya.
Get-Content .\proxy.log |
Where-Object { $_ -match '\sGET\s' } |
ForEach-Object {
if ($_ -match 'GET\s+https?://([^/\s]+)') {
$matches[1]
}
} |
Sort-Object -UniqueGet-Content .\proxy.log |
Where-Object { $_ -match '\sGET\s' } |
ForEach-Object {
if ($_ -match 'GET\s+https?://([^/\s]+)') {
$matches[1]
}
} |
Sort-Object -UniqueMisalnya hasilnya:
news.example
portal.example
research.example
status.example
updates.examplenews.example
portal.example
research.example
status.example
updates.exampleUntuk menghitung:
(
Get-Content .\proxy.log |
Where-Object { $_ -match '\sGET\s' } |
ForEach-Object {
if ($_ -match 'GET\s+https?://([^/\s]+)') {
$matches[1]
}
} |
Sort-Object -Unique
).Count(
Get-Content .\proxy.log |
Where-Object { $_ -match '\sGET\s' } |
ForEach-Object {
if ($_ -match 'GET\s+https?://([^/\s]+)') {
$matches[1]
}
} |
Sort-Object -Unique
).CountOutput:
55Teknik seperti ini jauh lebih scalable daripada membaca ratusan baris satu per satu.
12. Email Security
Email masih menjadi salah satu sumber telemetry penting bagi SOC.
Email security log dapat memberi informasi seperti:
Sender
Recipient
Sender IP
Subject
Attachment
URL
Threat classification
Spam score
Malware score
ActionSender
Recipient
Sender IP
Subject
Attachment
URL
Threat classification
Spam score
Malware score
ActionMisalkan log-nya JSON:
{
"senderIP": "192.0.2.81",
"sender": "billing@sender.example",
"recipient": [
"analyst@example.com"
],
"subject": "Updated Invoice",
"eventType": "messagesBlocked",
"threatsInfoMap": [
{
"classification": "malware",
"threatType": "url",
"threatStatus": "active",
"threat": "download.example/update/"
}
]
}{
"senderIP": "192.0.2.81",
"sender": "billing@sender.example",
"recipient": [
"analyst@example.com"
],
"subject": "Updated Invoice",
"eventType": "messagesBlocked",
"threatsInfoMap": [
{
"classification": "malware",
"threatType": "url",
"threatStatus": "active",
"threat": "download.example/update/"
}
]
}Dari log sepanjang itu sebenarnya informasi pentingnya hanya:
Sender : billing@sender.example
Recipient : analyst@example.com
Subject : Updated Invoice
Action : messagesBlocked
Classification : malware
Threat Type : urlSender : billing@sender.example
Recipient : analyst@example.com
Subject : Updated Invoice
Action : messagesBlocked
Classification : malware
Threat Type : urlIni salah satu alasan mengapa kemampuan parsing log jauh lebih penting dibanding menghafal posisi setiap field.
Workflow Analisis Log yang Saya Gunakan di PowerShell
Sekarang masuk ke bagian yang paling praktis.
Misalnya saya memiliki folder:
C:\Lab\SecurityLogsC:\Lab\SecurityLogsyang berisi beberapa ZIP:
firewall.log.zip
waf.log.zip
edr.log.zip
proxy.log.zip
email.log.zipfirewall.log.zip
waf.log.zip
edr.log.zip
proxy.log.zip
email.log.zipPertama masuk ke directory:
cd C:\Lab\SecurityLogscd C:\Lab\SecurityLogsKemudian ekstrak semuanya:
Get-ChildItem *.zip | ForEach-Object {
Expand-Archive -Path $_.FullName -DestinationPath $_.BaseName -Force
}Get-ChildItem *.zip | ForEach-Object {
Expand-Archive -Path $_.FullName -DestinationPath $_.BaseName -Force
}Perlu diperhatikan bahwa ZIP seperti:
firewall.log.zipfirewall.log.zipakan menghasilkan folder:
firewall.logfirewall.logJadi jangan langsung melakukan:
Get-Content .\firewall.logGet-Content .\firewall.logkarena firewall.log mungkin sebenarnya folder, bukan file.
Cek dahulu:
Get-ChildItemGet-ChildItemKemudian:
Get-ChildItem .\firewall.log -Recurse -FileGet-ChildItem .\firewall.log -Recurse -FileMisalnya ditemukan:
C:\Lab\SecurityLogs\firewall.log\firewall.logC:\Lab\SecurityLogs\firewall.log\firewall.logBarulah:
Get-Content .\firewall.log\firewall.logGet-Content .\firewall.log\firewall.logIni sederhana tetapi penting.
Cara Menentukan Log JSON atau Plain Text
Kalau isi log terlihat seperti:
{
"action": "BLOCK",
"clientIp": "198.51.100.12"
}{
"action": "BLOCK",
"clientIp": "198.51.100.12"
}itu JSON.
Cara paling nyaman:
$log = Get-Content .\waf.log\waf.log -Raw | ConvertFrom-Json$log = Get-Content .\waf.log\waf.log -Raw | ConvertFrom-JsonKemudian:
$log | Format-List$log | Format-ListDaripada melihat:
{"action":"BLOCK","clientIp":"198.51.100.12","httpRequest":...{"action":"BLOCK","clientIp":"198.51.100.12","httpRequest":...PowerShell dapat menampilkannya:
action : BLOCK
clientIp : 198.51.100.12
httpRequest : ...action : BLOCK
clientIp : 198.51.100.12
httpRequest : ...Lebih mudah dibaca.
Mengakses Nested JSON
Misalkan:
{
"action": "BLOCK",
"httpRequest": {
"clientIp": "198.51.100.77",
"httpMethod": "POST",
"uri": "/login"
}
}{
"action": "BLOCK",
"httpRequest": {
"clientIp": "198.51.100.77",
"httpMethod": "POST",
"uri": "/login"
}
}Kita bisa:
$log.action$log.actionOutput:
BLOCKBLOCKKemudian:
$log.httpRequest.clientIp$log.httpRequest.clientIpOutput:
198.51.100.77198.51.100.77Dan:
$log.httpRequest.httpMethod$log.httpRequest.httpMethodOutput:
POSTPOSTInilah salah satu teknik paling berguna ketika mengerjakan log berbentuk JSON.
Pilih Field yang Kita Perlukan Saja
Daripada:
$log | Format-List$log | Format-Listkita bisa memilih field tertentu:
$log | Select-Object action, terminatingRuleId$log | Select-Object action, terminatingRuleIdNested object:
$log.httpRequest |
Select-Object clientIp, country, uri, httpMethod$log.httpRequest |
Select-Object clientIp, country, uri, httpMethodOutput menjadi seperti:
clientIp : 198.51.100.77
country : ID
uri : /login
httpMethod : POSTclientIp : 198.51.100.77
country : ID
uri : /login
httpMethod : POSTJauh lebih rapi.
Untuk Plain Text Gunakan Select-String
Misalnya firewall log:
DENY TCP SRC=192.0.2.44 DST=198.51.100.15 SPT=53122 DPT=445DENY TCP SRC=192.0.2.44 DST=198.51.100.15 SPT=53122 DPT=445Cari source IP:
Select-String -Path .\firewall.log -Pattern 'SRC='Select-String -Path .\firewall.log -Pattern 'SRC='Cari port:
Select-String -Path .\firewall.log -Pattern 'DPT='Select-String -Path .\firewall.log -Pattern 'DPT='Cari alamat tertentu:
Select-String -Path .\firewall.log -Pattern '192\.0\.2\.44'Select-String -Path .\firewall.log -Pattern '192\.0\.2\.44'Kenapa titik menggunakan:
\.\.Karena Select-String menggunakan regular expression dan karakter . memiliki arti khusus di regex.
Gunakan Context Kalau Informasi Ada di Baris Berikutnya
Contoh antivirus log:
Filename : updater-demo.exe
Threat Name : Trojan:Win32/Sample.A
Severity : Severe
Category : Trojan
Action : QuarantinedFilename : updater-demo.exe
Threat Name : Trojan:Win32/Sample.A
Severity : Severe
Category : Trojan
Action : QuarantinedKita ingin mencari filename tetapi juga ingin melihat field setelahnya.
Gunakan:
Select-String `
-Path .\antivirus.log `
-Pattern 'updater-demo\.exe' `
-Context 0,10Select-String `
-Path .\antivirus.log `
-Pattern 'updater-demo\.exe' `
-Context 0,10Artinya:
0 baris sebelum match
10 baris setelah match0 baris sebelum match
10 baris setelah matchIni sangat efektif untuk structured text log.
Jangan Membaca Semua Log dari Atas ke Bawah
Menurut saya ini adalah kebiasaan yang paling penting ketika mulai belajar log analysis.
Misalnya ada 50.000 baris log.
Pertanyaan:
HTTP request dari
203.0.113.41menggunakan method apa?
Jangan baca 50.000 baris.
Cari:
Select-String -Path .\waf.log -Pattern '203\.0\.113\.41'Select-String -Path .\waf.log -Pattern '203\.0\.113\.41'Kemudian cari method pada event tersebut.
Atau jika JSON sudah diparse:
$log |
Where-Object {
$_.clientIP -eq "203.0.113.41"
} |
Select-Object clientIP, clientRequestHTTPMethodName$log |
Where-Object {
$_.clientIP -eq "203.0.113.41"
} |
Select-Object clientIP, clientRequestHTTPMethodNameCara berpikirnya:
Question
↓
Indicator
↓
Filter
↓
Relevant Event
↓
Field
↓
ConclusionQuestion
↓
Indicator
↓
Filter
↓
Relevant Event
↓
Field
↓
ConclusionBukan:
Open log
↓
Read everything
↓
ConfusedOpen log
↓
Read everything
↓
ConfusedWorkflow Investigasi yang Lebih Terstruktur
Ketika mendapatkan sebuah log, saya menggunakan pola:
1. Identify
Cari apa yang menjadi fokus pertanyaan.
Contoh:
IP?
Port?
Domain?
Filename?
User-Agent?
Threat type?
Action?
MITRE technique?IP?
Port?
Domain?
Filename?
User-Agent?
Threat type?
Action?
MITRE technique?2. Filter
Gunakan identifier paling spesifik.
Misalnya:
Select-String -Pattern '203\.0\.113\.41'Select-String -Pattern '203\.0\.113\.41'3. Extract
Ambil field yang dibutuhkan.
Contoh:
clientRequestHTTPMethodNameclientRequestHTTPMethodName4. Validate
Pastikan field tersebut memang berasal dari event yang sama.
Jangan mengambil IP dari event A dan HTTP method dari event B.
5. Correlate
Kalau sedang melakukan incident investigation sungguhan, lanjutkan ke telemetry lain.
Contoh:
WAF
↓
Firewall
↓
Proxy
↓
EDR
↓
Antivirus
↓
SandboxWAF
↓
Firewall
↓
Proxy
↓
EDR
↓
Antivirus
↓
SandboxContoh Korelasi Sebuah Incident
Misalkan WAF menemukan:
Source IP : 198.51.100.77
Action : BLOCK
Rule : SQL InjectionSource IP : 198.51.100.77
Action : BLOCK
Rule : SQL InjectionFirewall kemudian menunjukkan:
198.51.100.77 → Web Server198.51.100.77 → Web ServerTidak ada koneksi yang berhasil melewati rule tertentu.
Tetapi EDR pada web server menunjukkan:
No suspicious child process
No new executable
No unusual PowerShellNo suspicious child process
No new executable
No unusual PowerShellKesimpulan awal yang lebih masuk akal adalah:
Terjadi attempt yang terdeteksi dan diblokir, tetapi sejauh telemetry yang tersedia belum terdapat evidence bahwa exploitation berhasil.
Bandingkan jika EDR menunjukkan:
webserver.exe
↓
cmd.exe
↓
powershell.exewebserver.exe
↓
cmd.exe
↓
powershell.exekemudian:
powershell.exe → external IPpowershell.exe → external IPSekarang tingkat kekhawatirannya jauh lebih tinggi.
Inilah manfaat correlation.
Belajar MITRE ATT&CK Tanpa Menghafal Semuanya
MITRE ATT&CK cukup besar sehingga menghafalkan seluruh technique tidak realistis untuk pemula.
Lebih baik belajar berdasarkan aktivitas yang ditemui.
Misalnya EDR menunjukkan credential dumping.
Kita cari:
Credential DumpingCredential DumpingMITRE ATT&CK memetakannya sebagai OS Credential Dumping, technique T1003. (MITRE ATT&CK)
Jika menemukan penggunaan PowerShell:
PowerShellPowerShellkita dapat menghubungkannya dengan:
Command and Scripting Interpreter: PowerShell
T1059.001Command and Scripting Interpreter: PowerShell
T1059.001Dengan pendekatan ini, MITRE menjadi alat untuk memberikan konteks behavior, bukan sekadar daftar kode yang harus dihafal.
Hal yang Sering Membuat Pemula Salah Membaca Log
Ada beberapa pola yang menurut saya harus dihindari.
Pertama, menganggap setiap alert berarti compromised.
Alert adalah titik awal investigasi.
Kedua, melihat IP dan langsung menyebut attacker.
IP merupakan indicator, bukan identitas seseorang.
Ketiga, menganggap tool tertentu selalu malicious.
Contoh:
PowerShell
curl
rundll32
cmd.exePowerShell
curl
rundll32
cmd.exesemuanya memiliki penggunaan legitimate.
Keempat, hanya membaca severity.
High tidak otomatis berarti incident benar-benar terjadi.
Severity membantu prioritization, bukan menggantikan investigasi.
Kelima, tidak memperhatikan action.
Bandingkan:
Detected
Blocked
Allowed
Quarantined
Prevented
DroppedDetected
Blocked
Allowed
Quarantined
Prevented
DroppedSemua memiliki arti investigasi yang berbeda.
Keenam, tidak memeriksa timeline.
Urutan event sangat penting.
09:01 email received
09:03 user opens attachment
09:03 child process starts
09:04 DNS request
09:04 outbound connection
09:05 EDR alert09:01 email received
09:03 user opens attachment
09:03 child process starts
09:04 DNS request
09:04 outbound connection
09:05 EDR alertTimeline seperti itu jauh lebih bermakna dibanding melihat event secara terpisah.
Cheat Sheet: Field yang Pertama Kali Saya Cari
Untuk Firewall:
Action
Protocol
Source IP
Destination IP
Source Port
Destination PortAction
Protocol
Source IP
Destination IP
Source Port
Destination PortUntuk IDS/IPS:
Timestamp
Source
Destination
Signature
Category
Action
ProtocolTimestamp
Source
Destination
Signature
Category
Action
ProtocolUntuk EDR:
Hostname
Username
Process
Parent Process
CommandLine
Hash
Technique
Severity
ActionHostname
Username
Process
Parent Process
CommandLine
Hash
Technique
Severity
ActionUntuk Antivirus:
Filename
Threat Name
Category
Severity
Path
ActionFilename
Threat Name
Category
Severity
Path
ActionUntuk WAF:
Client IP
HTTP Method
Host
URI
User-Agent
Matched Rule
ActionClient IP
HTTP Method
Host
URI
User-Agent
Matched Rule
ActionUntuk Load Balancer:
Client
Backend
Request
Status
User-Agent
TLS
LatencyClient
Backend
Request
Status
User-Agent
TLS
LatencyUntuk Proxy:
Client IP
Method
Domain
Port
Status
Destination IPClient IP
Method
Domain
Port
Status
Destination IPUntuk Email Security:
Sender
Recipient
Sender IP
Subject
URL
Attachment
Classification
ActionSender
Recipient
Sender IP
Subject
URL
Attachment
Classification
ActionUntuk Sandbox:
Process Tree
Dropped Files
DNS
Connections
HTTP
Registry
Persistence
MITRE
IOCProcess Tree
Dropped Files
DNS
Connections
HTTP
Registry
Persistence
MITRE
IOCBonus: Melihat Semua File Hasil Ekstrak
Kalau folder lab berantakan, saya biasanya memakai:
Get-ChildItem -Recurse -File |
Select-Object FullNameGet-ChildItem -Recurse -File |
Select-Object FullNameUntuk mencari semua .log:
Get-ChildItem -Recurse -File -Filter *.logGet-ChildItem -Recurse -File -Filter *.logUntuk mencari kata malware di seluruh log:
Get-ChildItem -Recurse -File |
Select-String -Pattern 'malware' -CaseSensitive:$falseGet-ChildItem -Recurse -File |
Select-String -Pattern 'malware' -CaseSensitive:$falseUntuk mencari IP tertentu:
Get-ChildItem -Recurse -File |
Select-String -Pattern '198\.51\.100\.77'Get-ChildItem -Recurse -File |
Select-String -Pattern '198\.51\.100\.77'Ini sangat berguna ketika kita bahkan belum tahu event tersebut berasal dari security product mana.
JSON Pretty Print di PowerShell
Kalau JSON terlalu panjang:
Get-Content .\sample.log -Raw |
ConvertFrom-Json |
ConvertTo-Json -Depth 20Get-Content .\sample.log -Raw |
ConvertFrom-Json |
ConvertTo-Json -Depth 20Misalnya sebelumnya:
{"action":"BLOCK","httpRequest":{"clientIp":"198.51.100.77","httpMethod":"GET"}}{"action":"BLOCK","httpRequest":{"clientIp":"198.51.100.77","httpMethod":"GET"}}akan terlihat seperti:
{
"action": "BLOCK",
"httpRequest": {
"clientIp": "198.51.100.77",
"httpMethod": "GET"
}
}{
"action": "BLOCK",
"httpRequest": {
"clientIp": "198.51.100.77",
"httpMethod": "GET"
}
}Perbedaannya sangat terasa ketika object memiliki banyak nested field.
Network Monitoring Tidak Selalu Berarti Alert
Selain IDS/IPS, ada juga tools yang sangat berguna untuk menghasilkan telemetry jaringan.
Zeek adalah contoh yang bagus.
Zeek dapat membuat berbagai log mengenai aktivitas jaringan, termasuk connection, HTTP, DNS, TLS/certificate, dan berbagai protocol lain.
Misalnya:
conn.log
dns.log
http.log
ssl.log
files.logconn.log
dns.log
http.log
ssl.log
files.logIni berbeda dengan cara berpikir:
“Apakah ada alert?”“Apakah ada alert?”Zeek membantu kita menjawab:
“Apa yang sebenarnya terjadi di network?”“Apa yang sebenarnya terjadi di network?”Keduanya saling melengkapi.
Suricata dapat memberikan:
Possible malicious activity detectedPossible malicious activity detectedZeek dapat membantu memberi konteks:
Host mana terhubung?
Ke mana?
Berapa lama?
Protocol apa?
DNS apa yang diminta?
HTTP request apa yang dilakukan?Host mana terhubung?
Ke mana?
Berapa lama?
Protocol apa?
DNS apa yang diminta?
HTTP request apa yang dilakukan?Tools Bukan Pengganti Analyst
Semakin lama belajar SOC, saya semakin melihat bahwa security tools sebenarnya adalah sumber evidence.
Tool dapat mengatakan:
Malicious
High
Blocked
Trojan
SQL Injection
SuspiciousMalicious
High
Blocked
Trojan
SQL Injection
SuspiciousTetapi analyst harus menjawab:
Apa yang terjadi?
Kapan?
Dari mana?
Ke mana?
Bagaimana?
Apakah berhasil?
Apa dampaknya?
Apa yang harus dilakukan berikutnya?Apa yang terjadi?
Kapan?
Dari mana?
Ke mana?
Bagaimana?
Apakah berhasil?
Apa dampaknya?
Apa yang harus dilakukan berikutnya?Sebuah alert hanyalah satu bagian dari cerita.
Kesimpulan
Belajar security solutions tidak harus dimulai dari menghafal definisi panjang.
Saya lebih suka mengingat fungsi utamanya:
IDS
→ mendeteksi aktivitas mencurigakan
IPS
→ mendeteksi dan dapat mencegah traffic
Firewall
→ mengontrol komunikasi jaringan
EDR
→ melihat dan merespons aktivitas endpoint
Antivirus
→ mendeteksi malicious file dan malware
Sandbox
→ mengamati behavior file dalam environment terisolasi
DLP
→ melindungi sensitive data
Asset Management
→ mengetahui aset apa yang dimiliki dan harus dilindungi
WAF
→ melindungi web application dari malicious HTTP request
Load Balancer
→ mendistribusikan request dan memberikan access telemetry
Proxy
→ menjadi perantara client dengan destination dan mencatat aktivitas web
Email Security
→ mendeteksi ancaman yang masuk atau keluar melalui emailIDS
→ mendeteksi aktivitas mencurigakan
IPS
→ mendeteksi dan dapat mencegah traffic
Firewall
→ mengontrol komunikasi jaringan
EDR
→ melihat dan merespons aktivitas endpoint
Antivirus
→ mendeteksi malicious file dan malware
Sandbox
→ mengamati behavior file dalam environment terisolasi
DLP
→ melindungi sensitive data
Asset Management
→ mengetahui aset apa yang dimiliki dan harus dilindungi
WAF
→ melindungi web application dari malicious HTTP request
Load Balancer
→ mendistribusikan request dan memberikan access telemetry
Proxy
→ menjadi perantara client dengan destination dan mencatat aktivitas web
Email Security
→ mendeteksi ancaman yang masuk atau keluar melalui emailKemudian ketika membaca log gunakan pola:
Identify
↓
Filter
↓
Extract
↓
Validate
↓
Correlate
↓
ConcludeIdentify
↓
Filter
↓
Extract
↓
Validate
↓
Correlate
↓
ConcludeJangan mencoba memahami seluruh log sekaligus.
Cari indicator yang relevan terlebih dahulu.
Jika log berbentuk JSON, gunakan:
ConvertFrom-JsonConvertFrom-JsonJika plain text, gunakan:
Select-StringSelect-StringJika perlu melihat file:
Get-ContentGet-ContentJika ingin mencari file hasil ekstrak:
Get-ChildItem -Recurse -FileGet-ChildItem -Recurse -FileDan yang paling penting:
Jangan hanya mencari jawaban. Cari evidence yang membuat kita bisa menjelaskan kenapa jawaban tersebut benar.
Skill SOC Analyst bukan kemampuan menghafal field.
Skill-nya adalah kemampuan mengubah log yang terlihat berantakan menjadi cerita yang masuk akal.
Penutup
Artikel ini saya tulis sebagai catatan pembelajaran untuk memahami security solutions dari perspektif seorang analyst pemula.
Tujuannya bukan menggantikan dokumentasi resmi atau training platform, tetapi membantu membangun pola pikir ketika berhadapan dengan log.
Kalau harus diringkas menjadi satu kalimat:
Kenali sumber log, tentukan indicator yang dicari, filter event yang relevan, baca field yang tepat, kemudian validasi dengan telemetry lain.
Setelah terbiasa dengan pola tersebut, log seperti JSON yang awalnya terlihat sangat panjang mulai terasa jauh lebih sederhana.
Dan pada akhirnya, itulah pekerjaan analyst:
bukan membaca semua data, tetapi menemukan data yang penting.
Referensi dan Catatan
Artikel ini sengaja menggunakan contoh sintetis dan bahasa orisinal. Terms of Use LetsDefend menyatakan bahwa konten situs merupakan proprietary content dan memberikan limited license untuk personal/non-commercial use; ketentuan mereka juga membatasi penyalinan atau republication konten tanpa izin sebagaimana diatur dalam Terms tersebut. (LetsDefend)