Soc Analyst Intermidate
Soc Analyst Intermidate
Powershell events
Lab Setup
Requirements:
Systems: Windows 10/11 or Windows Server 2019/2022, Linux
(Ubuntu or CentOS)
Tools:
o Windows Event Viewer
o PowerShell (Pre-installed on Windows)
Preparation:
For this lab, you will need to set up log collection on both Windows and
Linux systems. Follow these steps to ensure everything is ready:
On Windows:
1. Open Group Policy Editor (gpedit.msc):
o Navigate to Computer Configuration > Administrative Templates
> Windows Components > Windows PowerShell.
o Ensure that Module Logging, Script Block Logging,
and Script Execution are enabled.
This command lists all local user accounts on the system, which could be
used by attackers to enumerate users post-exploitation.
3. Click Filter Current Log, and filter for Event ID 4104 (which logs
PowerShell script execution).
Objective:
The objective of this lab is to introduce students to Windows Security
Logs and help them understand how to analyze logs for security-related
events. Students will learn how to explore and analyze various security
logs such as login attempts, user account changes, and other critical
system events that could indicate potential security threats.
▶️Video Tutorial
Lab Setup
Requirements:
System: Windows 10/11 or Windows Server 2019/2022
Tools:
o Windows Event Viewer (pre-installed)
o Notepad (to create custom events, if needed)
o Administrative Privileges (to access certain security logs)
Successful and Failed Login Attempts: Track users who log in or fail to
log in.
Account Lockouts: Occurs when a user exceeds the maximum allowed
number of incorrect login attempts.
Audit Policies: Logs related to changes in system audit settings and
configurations.
Group Membership Changes: Tracks changes in group memberships
and user privileges.
Privilege Escalation: Logs events when a user gains elevated privileges.
Or Else you can sign out with your existing account and sign in
with haxuser1 account with an invalid password
Conclusion:
Understanding Windows Security Logs: Windows Security Logs are
essential for identifying suspicious behavior such as unauthorized login
attempts, privilege escalation, and system configuration changes.
SOC Analyst Role: As a SOC Analyst, reviewing and analyzing these logs
regularly is critical to detecting and responding to security incidents in
real-time.
Threat Detection: By monitoring for multiple failed logins, account
lockouts, and privilege escalations, SOC Analysts can quickly detect
malicious activities on a network.
Submission:
Event ID 4624 (Successful Login): Submit a screenshot showing a
successful login event from the Security logs.
Event ID 4625 (Failed Login): Submit a screenshot showing a failed login
attempt event from the Security logs.
Objective:
The objective of this lab is to introduce students to Windows PowerShell
Logs and help them understand how to analyze PowerShell-related
events. Students will learn how to explore and analyze PowerShell logs to
detect suspicious or malicious PowerShell commands that could indicate
an attack or compromise.
▶️Video Tutorial
Lab Setup
Requirements:
System: Windows 10/11 or Windows Server 2019/2022
Tools:
o Windows Event Viewer (pre-installed)
o PowerShell (Pre-installed on Windows)
o Administrative Privileges (required for enabling logs)
Preparation:
Before proceeding, make sure PowerShell script block logging is enabled
on your system:
1. Press Win + R, type gpedit.msc, and press Enter to open the Group Policy
Editor.
2. Navigate to: Computer Configuration > Administrative Templates >
Windows Components > Windows PowerShell
3. Turn on Module Logging, Script Block Logging, and Script
Execution.
4. Apply the settings and close the Group Policy Editor.
4. Look for Event ID 4103 in the logs (this will show script block logging for
the PowerShell command you executed).
5. Take a screenshot of the event details, including:
LOLBAS (Living Off The Land Binaries) like using Start-Process or Invoke-
WebRequest
Loading payloads or obfuscated PowerShell commands
Persistence via PowerShell commands in startup or tasks
🚩 Abuse
🛠️Tool 📌 Path
Technique
malware,
bypass AV
Download
files
certutil.exe C:\Windows\System32\certutil.exe using: certut
il -
urlcache -
f
Execute
malicious
mshta.exe C:\Windows\System32\mshta.exe
HTML apps or
remote scripts
Load and
regsvr32.ex execute
C:\Windows\System32\regsvr32.exe
e remote/local
DLLs
Execute DLLs
rundll32.ex or scripts to
C:\Windows\System32\rundll32.exe
e evade
detection
Execute
commands,
wmic.exe C:\Windows\System32\wbem\wmic.exe
gather system
info
Download/
bitsadmin.e
C:\Windows\System32\bitsadmin.exe upload files
xe
silently
Execute
C:\Windows\Microsoft.NET\Framework\ malicious C#
msbuild.exe
v4.0.30319\msbuild.exe code in
project files
install
Create
schtasks.ex scheduled
C:\Windows\System32\schtasks.exe
e tasks for
persistence
Conclusion:
PowerShell Logs: Key to spotting malicious command usage.
SOC Analyst Role: Review logs to detect post-exploitation actions.
Threat Detection: Flags abnormal activity for faster response.
Submission:
Event ID 4103 (PowerShell Script Execution): Submit a screenshot showing
a PowerShell script execution event from the logs.
🎯 Objective
The objective of this lab is to simulate a network-based port scan
attack and demonstrate how to detect it using ufw.log logs on a Linux
system. Students will learn how to launch the HTTP scan prob from Kali
Linux(attacker) machine and detect these scan ataempt on Victim
machine using UFW.
▶️Video Tutorial
🛠️Lab Setup
System Requirements
Attacker Machine:: Kali Linux
Target Machine: Ubuntu Linux
Tools Needed
nmap (on attacker machine)
ufw or iptables (on target machine)
Log Files
/var/log/ufw.log on Ubuntu Server– Captures system and network-related
messages
What is Nmap?
Nmap (Network Mapper) is an open-source network scanning tool.
Used to discover hosts and services on a network.
Helps in identifying open ports, running services, and OS detection.
Commonly used for network inventory and vulnerability scanning.
🔐 What is UFW?
UFW stands for Uncomplicated Firewall, a frontend for iptables.
Simplifies firewall management for Linux users.
Used to allow, deny, and manage traffic rules easily.
Logs are stored in /var/log/ufw.log.
Rule file /etc/ufw/before.rules
To check ufw status ufw status
To check the rule number ufw status numbered
✅ Conclusion
ufw.log, combined with firewall logs, is powerful for detecting early-stage
reconnaissance
Port scanning is often the first indicator of an attacker mapping your
system
Detecting and blocking IPs performing scans is a crucial step in proactive
defense
📸 Submission
Submit a screenshot of a syslog entry showing blocked network traffic due
to a port scan. Include:
Source IP of scan
Targeted port
Timestamp
🎯 Objective
The objective of this lab is to simulate an SSH brute force attack and
demonstrate how to detect it using Linux authentication logs. Students
will learn how to identify multiple failed login attempts and analyze
patterns to uncover brute force activity.
▶️Video Tutorial
🛠️Lab Setup
System Requirements
Attacker Machine: Kali Linux (or any Linux with hydra)
Target Machine: Ubuntu Linux Server
Tools Needed
hydra (on attacker machine)
openssh-server (on target machine)
rsyslog (default logging service)
Log Files
/var/log/auth.log – Authentication logs (Ubuntu/Debian)
/var/log/secure – (CentOS/RHEL)
📘 Preparation
Linux systems log every authentication event, including successful and
failed SSH login attempts. Brute force attacks can be identified by
analyzing patterns such as:
✅ Conclusion
Auth logs are vital for detecting brute force login attempts
Multiple failures from a single IP is a strong signal of attack
Combine log analysis with tools like fail2ban to block repeat offenders
automatically
📸 Submission
Submit a screenshot showing:
1. Introduction to PowerShell
PowerShell is a powerful command-line shell and scripting language
developed by Microsoft, designed specifically for system administration. It
is built on the .NET framework and is widely used for automating tasks,
managing configurations, and performing administrative tasks on both
Windows and Linux systems.
2.1 Cmdlets
Cmdlets (pronounced "command-lets") are the building blocks of
PowerShell. They are lightweight commands that perform specific
operations.
Syntax: Verb-Noun (e.g., Get-Process, Set-Item, New-User)
Example:
Get-Process # Lists all running processes
Get-Service # Displays all services on the system
Get-EventLog -LogName Security # Retrieves security event logs
2.2 Scripts
Scripts are text files containing a series of PowerShell commands saved
with the .ps1 extension.
They allow automation of complex tasks by executing multiple cmdlets in
sequence.
Example Script (Get-SystemInfo.ps1):
# Get System Information
Get-ComputerInfo
Get-Process | Where-Object {$_.CPU -gt 100} # High CPU usage
processes
Get-EventLog -LogName Security -Newest 10
Get-LocalUser
Get-LocalGroupMember -Group "Administrators"
5. PowerShell Basics
# ForEach Loop
$Processes = Get-Process
ForEach ($Process in $Processes) {
Write-Host $Process.ProcessName
}
5.4 Functions
Function Get-HighCPU {
Param($Threshold = 50)
Get-Process | Where-Object { $_.CPU -gt $Threshold }
}
Get-HighCPU -Threshold 80
7. Summary
PowerShell is a versatile and powerful tool for Security Analysts.
Use cmdlets to perform system audits, incident response, and threat
hunting.
Leverage scripts for automation of repetitive security tasks.
Set execution policies securely (preferably RemoteSigned).
Always review and understand scripts before execution to prevent
malicious activities.
Continuously learn and update your PowerShell skills to stay ahead of
attackers.
🎯 Objective
The objective of this lab is to help students analyze TLS (Transport
Layer Security) traffic using Wireshark. Students will explore how TLS
secures data over the network, understand handshake messages, and
identify metadata like server names and certificate details.
🛠️Lab Setup
System Requirements
Operating System: Windows 10/11 (or Linux/macOS)
Software: Wireshark (latest version)
Files Needed
Download Sample PCAP file
Message
Description
Type
Filter Description
tls.record.version ==
TLS 1.2 traffic
0x0303
tls.record.version ==
TLS 1.3 traffic
0x0304
✅ Conclusion
📸 Submission
Submit a screenshot showing:
🎯 Objective
The objective of this lab is to introduce students to Wireshark, a powerful
packet analysis tool used by SOC analysts to investigate network traffic.
Students will learn the interface, how to capture packets, apply filters, and
identify suspicious communication patterns.
▶️Video Tutorial
🛠️Lab Setup
System Requirements
Operating System: Windows, Linux, or macOS
Network Adapter: Required for packet capture
Software Required
Wireshark (latest stable version)
Download Sample PCAP file
📘 What is Wireshark?
Wireshark is an open-source network protocol analyzer that lets you
capture and interactively browse network traffic. It allows analysts to view
data packets flowing in and out of a system in real time or from saved
PCAP files.
📸 Submission
Submit screenshots showing:
Create a New Profile Name "SOC Analyst" and share the snapshot
Create a display filter to capture ICMP traffic and share the snapshot
Create a capture filter to capture ICMP traffic and share the snapshot
Wireshark Basics – ICMP Protocol
Analysis
🎯 Objective
The objective of this lab is to help students understand and analyze ICMP
(Internet Control Message Protocol) packets using Wireshark.
Students will learn to identify echo requests/replies, interpret ICMP packet
fields, and apply relevant filters for investigation.
▶️Video Tutorial
🛠️Lab Setup
System Requirements
Operating System: Windows 10/11 (or Linux/macOS)
Software: Wireshark (latest version)
Files Needed
Download Sample PCAP file
Filter Description
📸 Submission
Submit a screenshot showing:
🎯 Objective
The objective of this lab is to introduce students to analyzing TCP
(Transmission Control Protocol) traffic using Wireshark. Students will
learn how TCP establishes connections, the 3-way handshake process, and
how to interpret common TCP fields and flags.
▶️Video Tutorial
🛠️Lab Setup
System Requirements
Operating System: Windows 10/11 (or Linux/macOS)
Software: Wireshark (latest version)
Files Needed
Download Sample PCAP file
Filter Description
Submission
Submit a screenshot showing:
🎯 Objective
The objective of this lab is to help students analyze HTTP (Hypertext
Transfer Protocol) packets using Wireshark. Students will explore
HTTP request/response headers, understand how web communication
works, and learn how to detect common HTTP-based attacks or data
leaks.
▶️Video Tutorial
🛠️Lab Setup
System Requirements
Operating System: Windows 10/11 (or Linux/macOS)
Software: Wireshark (latest version)
Files Needed
Download Sample PCAP file
Filter Description
"GET"
✅ Conclusion
HTTP traffic is readable and easy to analyze in Wireshark.
Analyzing HTTP helps detect:
Sensitive data exposure in URLs or headers
Malware beaconing to C2 servers
Suspicious file downloads or unauthorized access
📸 Submission
Submit a screenshot showing:
Objective:
The objective of this lab is to introduce students to the core concepts of
incident response, familiarize them with the incident response
lifecycle, and help them understand how basic threats on Windows
systems are detected, analyzed, and responded to by SOC Analysts.
▶️Video Tutorial
What is Incident Response?
Incident Response (IR) is the structured approach to handle and
manage the aftermath of a security breach or cyberattack, also known
as an incident. It includes steps to:
Phase Description
EC2 Abuse for Command and EC2 instances being used as a staging point or
Control C2 server.
🖥️Machines Required:
Windows Server 2019 or 2022
o RDP enabled
o Event Viewer access
o One local user account with known username
Kali Linux VM
o Hydra pre-installed
o Connected to same LAN or Virtual Network
📶Network:
Ensure both machines are on the same network
Verify RDP (TCP/3389) is open on Windows Server
⚙️Preparation Steps
On Windows Server:
1. Enable RDP:
System Properties → Remote → Enable Remote Desktop
2. Allow RDP in Firewall:
Windows Defender Firewall → Advanced Settings → Inbound Rules →
Remote Desktop (TCP-In) → Enable
3. Create Test User:
2. Correlate IP Address:
5. Collect Evidence:
6. Report Incident:
📩Submission Requirements
Submit the following:
✅Conclusion
This lab demonstrated how to:
🎯 Objective:
The objective of this lab is to help students understand the core steps of
incident response by investigating a suspicious bash script
execution on a Linux system. Students will learn how to detect, analyze,
and respond to a basic script-based intrusion.
3. Containment, Eradication, and Isolate the threat, remove the script, and secure the
Recovery system.
🛠️Lab Setup
System Requirements:
Ubuntu 20.04/22.04 or Kali Linux
Terminal access with sudo privileges
nano fakebackup.sh
#!/bin/bash
echo "[*] Simulating backup operation..."
sleep 60
chmod +x fakebackup.sh
5. Simulate the Attack / Execution Run the script in the background:
./fakebackup.sh &
🧪 Step-by-Step Investigation
1. Preparation
Install curl, lsof, ps, and grep (usually pre-installed).
pkill curl
rm -f /tmp/payload.sh
crontab -e
4. Post-Incident Activity
Document:
What triggered the alert?
What was the script doing?
Which user executed it?
Recommendations:
Enable file integrity monitoring (e.g., AIDE).
Restrict /tmp execution using mount options (noexec).
Educate users about unknown script execution.
Lab Checklist
✅ Simulate Script Create and execute a suspicious bash script
✅ Investigate Logs Use commands to analyze the event
✅ Kill and Delete Contain and remove the malicious file
✅ Document Findings Note IPs, users, and recommendations
📸 Submission
Submit screenshots of:
🎯 Objective:
The objective of this lab is to investigate and respond to a malicious
cron job used by an attacker to maintain persistence on a Linux system.
Students will simulate the attack, detect the malicious scheduled task,
analyze the script, and remove the threat — applying the full incident
response lifecycle.
▶️Video Tutorial
📘 What is a Cron Job?
A cron job is a scheduled task that runs automatically at defined intervals
on Unix/Linux systems. Attackers often use cron to re-execute
payloads, reconnect to command-and-control servers, or maintain access
to a compromised system.
🛠️Key Features:
Run commands automatically (e.g., every minute, daily, weekly)
Useful for backups, updates, monitoring scripts, etc.
Works in the background via the cron service
3. Containment, Eradication, Stop the malicious cron activity, remove the script, and
and Recovery restore system configuration.
Document the incident, and set alerts for future cron job
4. Post-Incident Activity
changes.
System Requirements:
Ubuntu 20.04/22.04 or Kali Linux
Terminal with sudo access
🧪 Step-by-Step Investigation
Step 1. Preparation
Make sure cron is installed and running:
crontab -l
cat /tmp/.cron.log
cat /tmp/malicious.sh
rm -f /tmp/malicious.sh /tmp/.cron.log
Lab Checklist
✅ Simulate Cron Job Create a malicious script and schedule it via cron ✅
Investigate Detect the cron job and examine the script behavior ✅
Respond Remove the script and the cron entry ✅ Document Record all
findings and suggest prevention steps
📸 Submission
Submit screenshots showing:
🎯 Objective:
The objective of this lab is to simulate and investigate a suspicious
PowerShell command on a Windows system. Students will learn how to
detect PowerShell-based threats using built-in logs, analyze activity using
Event Viewer, and perform basic incident response actions.
3. Containment, Eradication, and Kill malicious processes, remove scripts, and secure
Recovery PowerShell usage.
Lab Setup
Requirements:
System: Windows 10/11 or Windows Server 2019/2022
Tools:
o Windows Event Viewer (pre-installed)
o PowerShell (Pre-installed on Windows)
o Administrative Privileges (required for enabling logs)
Preparation:
Before proceeding, make sure PowerShell script block logging is enabled
on your system:
1. Press Win + R, type gpedit.msc, and press Enter to open the Group Policy
Editor.
2. Navigate to: Computer Configuration > Administrative Templates >
Windows Components > Windows PowerShell
3. Turn on Module Logging, Script Block Logging, and Script
Execution.
4. Apply the settings and close the Group Policy Editor.
4. Look for Event ID 4103 in the logs (this will show script block logging for
the PowerShell command you executed).
5. Take a screenshot of the event details, including:
2. Containment: Isolate the system: If you suspect malicious activity, you can
block network connections: Note: Usually this is doen from EDR tool.
3. Eradication: Restore the Hosts File: If modifications to the hosts file were
made without authorization, restore it from a backup:
5. Reporting
Submission
Submit screenshots showing: ✅ Enable Logging Ensure PowerShell
operational logs are active ✅ Simulate Suspicious Powershell Command ✅
Analyze Logs Investigate the command via Event ID 4103 ✅ Remove File
Delete the generated log file
🎯 Objective
Investigate and respond to a suspicious outbound network
connection from a Linux machine. This simulates beaconing behavior or
data exfiltration. Students will learn to inspect open connections, trace
source processes, and mitigate threats.
▶️Video Tutorial
📘 Why It Matters
Attackers often use hidden outbound connections to communicate with
command-and-control (C2) servers. Detecting and cutting off these
connections is essential for SOC and IR teams.
🔁 Incident Response Process (NIST SP 800-
61 Rev. 2)
Phase Description
🛠️Lab Setup
System Requirements
Ubuntu/Kali Linux system
Internet access
Tools: curl, netstat or ss, lsof
Here -p Show the PID and program name of the connection -l Show only
listening sockets -a Show all connections and listening ports -n Show
numeric addresses (don’t resolve hostnames or port names) -t Show only
TCP connections
Investigate:
kill <PID>
# or
pkill curl
Recommendations:
📸Submission
Submit screenshots showing:
Output of netstat or ss with suspicious connection
ps and lsof output with PID
Process termination (kill or pkill)
IP block using UFW or iptables
Written summary of incident