Understand How a SOC Works by Setting Up a Basic Monitoring Environment

Business Scenario

Welcome!

You are a Junior SOC Analyst at CyberSecure Solutions. Your organization wants to monitor its systems for suspicious activity.

Your task is to set up a basic monitoring environment, collect system logs, identify suspicious events, and investigate them as a SOC analyst would.

Pre-Lab Preparation

Topic : SOC Fundamentals

1) Introduction to Security Operations Center (SOC) 

2) Roles and responsibilities of a SOC analyst

3) Security monitoring fundamentals

Task 1: Download the Wazuh OVA File

Open your browser and search for “(https://wazuh.com)” on your preferred search engine.

1

Click the first result, which should direct you to the official Wazuh website

2

Navigate to the Documentation section from the homepage.

3

Now scroll down then you will find the documentation menu click on the “documentation” ,then  locate and select Installation Alternatives.

a

Then in the “installation alternatives” select Virtual machin(VM).

4

Choose the Wazuh Virtual Machine (OVA) option. By default, the documentation may display the latest version (e.g., 4.8). Use the version dropdown in the top-right corner to select Wazuh 4.14.7 

5

In the Packages List table, find the OVA file link for Wazuh 4.7 and click to download it. The file size is approximately 3-4GB, depending on the version. 

6

Launch VMware Workstation 17 Pro on your system.

7

Click File > New Virtual Machine to start the VM creation wizard.

8

Select I will install the operating system later and click Next. Choose Linux as the guest operating system. Click Browse and locate the downloaded Wazuh 4.14.7 OVA file.

9

Click Import to begin importing the OVA file into VMware. This process may take a few minutes, depending on your system’s performance.a

10

Task 2:  Power On the Virtual Machine

Select the Wazuh VM in VMware and click Power on this virtual machine. 

a

The VM will begin loading the Wazuh system. This may take a few minutes as the system initializes. 

b

Once the VM boots, you’ll be prompted with a login screen. Use the default credentials:

1

Username: wazuh-user

Password: wazuh

After logging in, the Wazuh system should be fully operational.

Access the Wazuh Web Interface

2

Check the IP address assigned to the Wazuh VM:

In the VM’s terminal, run the command ip addr or ifconfig to identify the IP address (e.g., 192.168.172.128). Note the IP address for the next step. On your host machine, open a web browser and navigate to https://<VM-IP-ADDRESS> (e.g., https://192.168.172.128).

a

Then will get this interface.

b

Task 3: Understand the SOC Environment

Identify the main components of a basic SOC

1

Steps

a

  1. Open the monitoring/SIEM platform.

  2. Identify the following components:

    • Endpoint

    • Log Source

    • SIEM

    • Alert

    • SOC Analyst

  3. Understand how logs move through the environment.

Task 4: Connect a System to the Monitoring Platform

Collect system logs for monitoring.

1

Steps

a

  1. Start the Windows/Linux test machine.

  2. Install the monitoring agent according to the instructor's instructions.

3.Register the endpoint with the SIEM.

4.Confirm that the endpoint appears as Active/Connected.

5.Verify that logs are being received.

Expected Output

b

The test endpoint is visible in the monitoring dashboard and is sending logs.

Task 5: Generate Basic Security Events

Generate controlled events and observe how they appear in the SOC.

1

Steps

a

Perform safe activities on the test machine, such as:

  • Log in and log out.

  • Use an incorrect login password several times.

  • Create and delete a test file.

  • Start or stop a test service.

  • Make a permitted configuration change.

  • Open the SIEM dashboard.

  • Search for the generated events.

  • Record:

    • Date/time

    • Event type

    • Source system

    • Username

    • Result

Expected Output

b

Students identify their generated events in the monitoring platform.

Task 6: Investigate a Security Alert

Learn how a SOC analyst investigates an alert.

1

Steps

a

  • Open the alerts/security events section.

  • Select a suspicious event.

  • Examine:

    • Source IP

    • Username

    • Timestamp

    • Event type

    • Number of attempts

    • Target system

  • Determine whether the event is:

    • Normal activity

    • Suspicious activity

    • Potential incident

  • Record your conclusion.

Expected Output

b

Students produce a basic alert investigation.

Task 7: Apply a Basic Defensive Measure

Understand how SOC analysts respond to detected threats.

1

Steps

a

  • Select a controlled suspicious event.

  • Identify the appropriate defensive action.

  • Apply the action in the lab environment, such as:

    • Disable a test account.

    • Block a test IP address.

    • Change a compromised test password.

    • Remove unnecessary access.

  • Verify that the action was successful.

  • Check the monitoring dashboard for new events.

Expected Output

b

Students demonstrate a basic detection-to-response workflow.

Task 8:  Document the Incident

Create a basic SOC incident record.

1

Record:

a

FieldExample
Incident IDSOC-001
Date/Time28-08-2026 10:30
AlertMultiple Failed Logins
SourceTest Endpoint
SeverityMedium
StatusInvestigating
Action TakenAccount Disabled
AnalystStudent Name

Example Finding

b

  • Incident:

Multiple Failed Login Attempts

  • Observation:

Multiple unsuccessful login attempts were detected

for a test account.

  • Investigation:

The events were reviewed for timestamp, username,

source and frequency.

  • Action:

The test account was temporarily disabled.

  • Status:

Resolved.

Expected Outcome

c

Task 9: Download Splunk Enterprise

1

Open your web browser (Chrome, Edge, Firefox, etc.).

2

Visit the Splunk Enterprise download page.

Now signup by entering the following credential

a

  • Enter your email address.

  • Create a password if required.

  • Fill in basic details such as:

    • First Name

    • Last Name

    • Submit the form.

3

After that you will be redirected to the download page. now click on the windows "download now".

4

After that it will redirect you to another page.

After that click on "Try this url" to start the download process.

a

5

Then accept the license agreement and then click on install.

6

Then click on next.

7

Then set up the username and password for the splunk enterprise.  

8

Then wait for download to get finished and then click on launch button

8

Then wait for download to get finished and then click on launch button.

9

If the browser does not open automatically:

Use the following url to open thes splunk http://localhost:8000

9

If the browser does not open automatically:

Use the following url to open thes splunk http://localhost:8000

10

Then enter the username and password you use to setup.

11

Now verify the installed splunk is working or not

Task 10: Understand the SOC Environment

1

The document asks students to identify:

  • Endpoint
  • Log Source
  • SIEM
  • Alert
  • SOC Analyst and understand how logs move through the environment.

2

Endpoint

Kali Linux

3

Log Sources

/var/log/auth.log
/var/log/syslog
/var/log/audit/audit.log

4

Workflow

Kali Linux

     ↓

System Logs

     ↓

Splunk Universal Forwarder

     ↓

TCP 9997

     ↓

Splunk Enterprise

     ↓

Search

     ↓

Alert

     ↓

Investigation

     ↓

Response

 

Kali Linux

     ↓

System Logs

     ↓

Splunk Universal Forwarder

     ↓

TCP 9997

     ↓

Splunk Enterprise

     ↓

Search

     ↓

Alert

     ↓

Investigation

     ↓

Response

 

Task 11: Connect Kali Linux to Splunk

1

Create Splunk Index

The original task requires the endpoint to be registered, shown as active/connected, and sending logs. SOC

In Splunk, this is done using a Universal Forwarder.

In Splunk Web:

Settings

   ↓

Indexes

   ↓

New Index

In Splunk Web:

Settings

   ↓

Indexes

   ↓

New Index

  • Create: soc_lab
  • Use: Index Name: soc_lab
  • Click: Save
  • Splunk supports creating custom event indexes through Settings → Indexes → New. 

2

Configure Receiving Port

In Splunk Web:

Settings

   ↓

Forwarding and receiving

   ↓

Configure receiving

 

In Splunk Web:

Settings

   ↓

Forwarding and receiving

   ↓

Configure receiving

 

  • Choose: New Receiving Port
  • Enter: 9997
  • Save.
  • Splunk documentation identifies 9997 as the conventional receiver port for forwarders

3

Verify 9997

On the Splunk server:

sudo ss -lntp | grep 9997

You should see something listening on:9997

4

Install Universal Forwarder on Kali

Download the Linux Universal Forwarder package from Splunk.

For a .tgz package:

cd ~/Downloads
sudo tar -xzf splunkforwarder-*.tgz -C /opt/

The standard Linux installation directory is:

/opt/splunkforwarder

``` :chatgpt-content-reference{index="18"}

5

Start Universal Forwarder

```bash
sudo /opt/splunkforwarder/bin/splunk start --accept-license

Create the local UF administrator credentials when prompted.

6

Connect UF to Splunk

sudo /opt/splunkforwarder/bin/splunk add forward-server 192.168.56.10:9997

On Kali:

Enter the UF credentials when requested.

Splunk documents this exact add forward-server <host>:9997 workflow. 

7

Verify Forwarder Connection

Run:

sudo /opt/splunkforwarder/bin/splunk list forward-server

You want to see your Splunk server as an active forward.

Splunk specifically recommends list forward-server to verify the forwarding configuration

8

Configure Log Collection

sudo nano /opt/splunkforwarder/etc/system/local/inputs.conf

Create:

Put:

[monitor:///var/log/auth.log]

disabled = false

index = soc_lab

sourcetype = linux_secure

 

[monitor:///var/log/syslog]

disabled = false

index = soc_lab

sourcetype = linux_messages_syslog

 

[monitor:///var/log/audit/audit.log]

disabled = false

index = soc_lab

sourcetype = linux_audit

These are useful Splunk source types for Linux authentication, syslog and audit data; Splunk includes pretrained source types such as linux_secure, linux_messages_syslog, and linux_audit.

 

Put:

[monitor:///var/log/auth.log]

disabled = false

index = soc_lab

sourcetype = linux_secure

 

[monitor:///var/log/syslog]

disabled = false

index = soc_lab

sourcetype = linux_messages_syslog

 

[monitor:///var/log/audit/audit.log]

disabled = false

index = soc_lab

sourcetype = linux_audit

 

These are useful Splunk source types for Linux authentication, syslog and audit data; Splunk includes pretrained source types such as linux_secure, linux_messages_syslog, and linux_audit.

 

9

Restart UF

sudo /opt/splunkforwarder/bin/splunk restart

Then:

sudo /opt/splunkforwarder/bin/splunk list monitor

You should see:

  • /var/log/auth.log
  • /var/log/syslog
  • /var/log/audit/audit.log

10

Generate a Simple Test Event

  • On Kali: logger "Splunk SOC lab connectivity test"
  • Now go to Splunk: Search & Reporting
  • Run: index=soc_lab "Splunk SOC lab connectivity test"
  • If the event appears:Kali → UF → Splunk is working.
  • On Kali: logger "Splunk SOC lab connectivity test"
  • Now go to Splunk: Search & Reporting
  • Run: index=soc_lab "Splunk SOC lab connectivity test"
  • If the event appears: Kali → UF → Splunk is working.

This is your most important checkpoint.

Task 12: Generate Basic Security Events

The original document asks you to generate controlled events such as login/logout, failed passwords, file creation/deletion, service activity and permitted configuration changes. SOC SOC

We'll reproduce all of them.

1

Login/Logout

Make sure SSH is running:

sudo systemctl enable --now ssh

Create a test account:

sudo useradd -m soclab
sudo passwd soclab

Give it a lab password.

Then:

ssh soclab@127.0.0.1

Enter the correct password.

Then:

whoami
exit

Search: index=soc_lab sourcetype=linux_secure ("Accepted password" OR "session opened" OR "session closed")

2

Failed Login Attempts

Now intentionally enter the wrong password several times:

ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no soclab@127.0.0.1
  • Enter an incorrect password about 5 times.
  • You should see: Permission denied
  • Search Splunk: index=soc_lab sourcetype=linux_secure "Failed password"
  • This should show your failed login events.

3

Create/Delete Test File

Install auditd if required:

sudo apt update
sudo apt install -y auditd

Start it:

sudo systemctl enable --now auditd
sudo mkdir -p /opt/soclab
sudo chmod 777 /opt/soclab

Create a dedicated lab directory:

sudo auditctl -a always,exit -F arch=b64 -F dir=/opt/soclab -F perm=wa -F key=siem_lab_file

Add an audit rule:

The Linux audit system supports filesystem rules using a directory/path, permissions and a key for later investigation.

Now:​

touch /opt/soclab/siem_test.txt
echo "Splunk SOC lab test" > /opt/soclab/siem_test.txt

Write to it:

rm /opt/soclab/siem_test.txt

Then:

Search:

index=soc_lab sourcetype=linux_audit "siem_lab_file"

You should find the file activity.

4

Start/Stop Test Service

Use the cron service if available:

sudo systemctl restart cron

Then search: index=soc_lab sourcetype=linux_messages_syslog ("Starting" OR "Started" OR "Stopping" OR "Stopped")

You should see service-related events.

sudo touch /opt/soclab/test.conf

5

Permitted Configuration Change

Create a temporary test configuration file:

Modify it:

echo "lab_test=1" | sudo tee /opt/soclab/test.conf

Search:

index=soc_lab sourcetype=linux_audit "siem_lab_file"

Because /opt/soclab is being audited, the change should appear.

6

Search All Generated Events

  • Now use one combined search:

index=soc_lab earliest=-30m

| eval event_type=case(

    match(_raw,"Failed password"),"Failed Login",

    match(_raw,"Accepted password"),"Successful Login",

    match(_raw,"session opened"),"Session Opened",

    match(_raw,"session closed"),"Session Closed",

    match(_raw,"siem_test.txt"),"File Activity",

    match(_raw,"Starting|Started|Stopping|Stopped"),"Service Activity",

    true(),"Other"

)

| table _time host source sourcetype event_type _raw

| sort - _time

  • This gives you the same information the document asks students to record:

Date/Time

Event Type

Source System

Username

Result

 

  • Now use one combined search:

index=soc_lab earliest=-30m

| eval event_type=case(

    match(_raw,"Failed password"),"Failed Login",

    match(_raw,"Accepted password"),"Successful Login",

    match(_raw,"session opened"),"Session Opened",

    match(_raw,"session closed"),"Session Closed",

    match(_raw,"siem_test.txt"),"File Activity",

    match(_raw,"Starting|Started|Stopping|Stopped"),"Service Activity",

    true(),"Other"

)

| table _time host source sourcetype event_type _raw

| sort - _time

This gives you the same information the document asks students to record:

  • Date/Time
  • Event Type
  • Source System
  • Username
  • Result

Task 13: Investigate a Security Alert

This is where Splunk becomes really useful.

The document asks you to examine:

  • Source IP
  • Username
  • Timestamp
  • Event Type
  • Number of Attempts
  • Target System

and decide whether the activity is:

  • Normal
  • Suspicious
  • Potential Incident
  • SOC

1

Search Failed Logins

Run:

2

Extract Username and Source IP

Run:

index=soc_lab sourcetype=linux_secure "Failed password"
index=soc_lab sourcetype=linux_secure "Failed password"
| rex field=_raw "Failed password for (?:invalid user )?(?<user>\S+)"
| rex field=_raw "from (?<src_ip>\S+)"
| table _time host user src_ip _raw
| sort - _time

rex can extract fields from raw events using named regular-expression groups. ​

3

Count Failed Attempts

This is the important investigation search:

index=soc_lab sourcetype=linux_secure "Failed password"
| rex field=_raw "Failed password for (?:invalid user )?(?<user>\S+)"
| rex field=_raw "from (?<src_ip>\S+)"
| stats count as failed_attempts earliest(_time) as 
first_seen latest(_time) as last_seen by host user src_ip
| where failed_attempts >= 5
| sort - failed_attempts

You'll get something similar to:

host

user

src_ip

failed_attempts

kali

soclab

127.0.0.1

5

This is exactly what we need for the investigation.

Splunk's stats command is designed to aggregate events and group results by fields such as host/source.

4

Correlate Failed + Successful Login

index=soc_lab sourcetype=linux_secure ("Failed password" OR "Accepted password")
| rex field=_raw "(?:Failed password for 
(?:invalid user )?|Accepted password for )(?<user>\S+)"
| rex field=_raw "from (?<src_ip>\S+)"
| eval result=if(match(_raw,"Failed password"),"Failure","Success")
| stats count(eval(result="Failure")) as failures count(eval(result="Success")) 
as successes earliest(_time) as first_seen latest(_time) as last_seen by host user src_ip
| sort - failures

Now run:

This lets you determine:

  • Who?
  • What?
  • When?
  • From where?
  • How many attempts?
  • Was there a successful login?

5

Make the SOC Decision

For this lab:

Multiple failed login attempts

        ↓

Same username

        ↓

Same source

        ↓

Repeated within short time

        ↓

Suspicious Activity

        ↓

Potential Security Incident

 

Because these are intentionally generated lab events, your report should state that the activity was controlled test activity, while demonstrating how a SOC analyst would classify the pattern.

 

For this lab:

Multiple failed login attempts

        ↓

Same username

        ↓

Same source

        ↓

Repeated within short time

        ↓

Suspicious Activity

        ↓

Potential Security Incident

 

Because these are intentionally generated lab events, your report should state that the activity was controlled test activity, while demonstrating how a SOC analyst would classify the pattern.

 

6

Create the Splunk Alert

Now we convert the investigation into an actual SOC alert.

Use:

index=soc_lab sourcetype=linux_secure "Failed password"
| rex field=_raw "Failed password for (?:invalid user )?(?<user>\S+)"
| rex field=_raw "from (?<src_ip>\S+)"
| stats count as failed_attempts earliest(_time) 
as first_seen latest(_time) as last_seen by host user src_ip
| where failed_attempts >= 5

Click:

Save As

   ↓

Alert

Configure:

Title:

SOC - Multiple Failed Logins

 

Click:

Save As

   ↓

Alert

 

Configure Title: SOC - Multiple Failed Logins

 

  • Alert type: Choose: Scheduled
  • Time range: Last 5 minutes
  • Schedule: Every 1 minute
  • Trigger condition: Number of Resultsis greater than 0
  • Severity: Medium
  • Action: For this lab: Add to Triggered Alerts

 

Task 14: Apply a Defensive Measure

The document gives four possible actions:

  • Disable a test account
  • Block a test IP
  • Change compromised test password
  • Remove unnecessary access

1

Disable the test account

First check its status:

2

Test the Defensive Action

Try logging in using the correct password:

sudo passwd -S soclab

Then disable it:

sudo usermod -L soclab
sudo passwd -S soclab

Check again:

You should see the account in a locked state.

3

Verify in Splunk

Search:

index=soc_lab sourcetype=linux_secure ("soclab" OR "locked" OR "authentication failure")

| table _time host source sourcetype _raw

| sort - _time

ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no soclab@127.0.0.1

The account should no longer allow the login.

You now have:

Detection

   ↓

Investigation

   ↓

Decision

   ↓

Account Disabled

   ↓

Verification

 

You now have:

Detection

   ↓

Investigation

   ↓

Decision

   ↓

Account Disabled

   ↓

Verification

 

Task 15: Document the Incident

The document specifically asks for an incident record containing:

  • Incident ID
  • Date/Time
  • Alert
  • Source
  • Severity
  • Status
  • Action Taken
  • Analyst

1

Incident Report

Field

Value

Incident ID

SOC-001

Date/Time

<actual time>

Alert

Multiple Failed Logins

Source

Test Endpoint

Severity

Medium

Status

Resolved

Action Taken

Account Disabled

Analyst

<Student Name>

2

Observation

Multiple unsuccessful login attempts were detected against the controlled test account.

3

Investigation

The Splunk security events were reviewed to determine the timestamp, username, source IP address, target host and frequency of the failed authentication attempts.

4

Finding

The repeated failed authentication attempts were classified as suspicious activity in the controlled lab environment.

5

Response

The test account was temporarily disabled as a defensive measure.

6

Verification

A subsequent authentication attempt was unsuccessful, confirming that the defensive action was effective.

7

Status

Resolved

This follows the same incident structure and example finding used in the original document. SOC

Task 16: Final Deliverables for the Splunk Version

The original document expects these deliverables: SOC

1

SOC Environment Diagram

Use:

Kali Endpoint

     ↓

System Logs

     ↓

Universal Forwarder

     ↓

TCP 9997

     ↓

Splunk Enterprise

     ↓

Search

     ↓

Alert

     ↓

Investigation

     ↓

Response

     ↓

Incident Report

 

Use:

Kali Endpoint

     ↓

System Logs

     ↓

Universal Forwarder

     ↓

TCP 9997

     ↓

Splunk Enterprise

     ↓

Search

     ↓

Alert

     ↓

Investigation

     ↓

Response

     ↓

Incident Report

 

2

Connected Endpoint Screenshot

Capture:

  • Kali terminal

  • splunk list forward-server

  • active forward

3

Sample Security Events

Capture Splunk Search results showing:

  • successful login

  • failed login

  • file activity

  • service activity

  • configuration activity

4

Alert Investigation

Capture:

  • failed-login search

  • source IP

  • username

  • timestamp

  • attempt count

  • target host

5

Defensive Action

Capture:

sudo passwd -S soclab

before/after the account is locked.

Also capture the failed login after the account is disabled.

6

Incident Report

Submit the SOC-001 report with your actual timestamp and student name.

7

Student Deliverables

Students should submit:

  • SOC Environment Diagram

  • Screenshot of Connected Endpoint

  • Sample Security Events

  • Alert Investigation

  • Defensive Action

  • Incident Report

 

Great job!
You have successfully completed your SOC Monitoring Environment lab.

In this lab, you have: Understood the SOC workflow, Set up a Splunk-based monitoring environment, Connected Kali Linux logs using Universal Forwarder, Generated and monitored security events, Investigated security alerts, Applied basic defensive actions and documented incidents.

You are now ready to move to the next stage of SOC monitoring and incident response.

Checkpoint

 

Great job!
You have successfully completed your SOC Monitoring Environment lab.

In this lab, you have: Understood the SOC workflow, Set up a Splunk-based monitoring environment, Connected Kali Linux logs using Universal Forwarder, Generated and monitored security events, Investigated security alerts, Applied basic defensive actions and documented incidents.

You are now ready to move to the next stage of SOC monitoring and incident response.

Checkpoint

Next-Lab Preparation

Topic : SOC Fundamentals

1) Introduction to Security Operations Center (SOC) 

2) Roles and responsibilities of a SOC analyst

3) Security monitoring fundamentals

Understand How a SOC Works by Setting Up a Basic Monitoring Environment

By Content ITV

Understand How a SOC Works by Setting Up a Basic Monitoring Environment

  • 86