Maik Ro Profile picture
Sep 11 30 tweets 7 min read Twitter logo Read on Twitter
Road to SOC Analyst - How the Windows Event Log System works:
Now that you have your local SIEM solution (Wazuh or ELK Stack) for our HomeLab
🧵



Why did we do that?
Because you wanted to progress in your career by focussing on two things:

1.  Setup Logging and Monitoring in a small and clearly defined environment
2.  Understand the different components & technologies involved:
docker
docker compose
elastic search
logstash
kibana
winlogbeat/logbeat
virtualbox/vmware

WOW!
That is a lot of technologies that you touched recently.

Do you feel comfortable using them now?

a strong... MAYBE
How do you get better at using them?

Use them.

as often as possible - ideally, every day (with breaks, e.g. Weekend)
NICE - Today, we will look into Windows Event Logs - an exciting and scary topic.

But fear not!

We will do it together and AS USUAL - step by step!
Good - now in case of Windows 🪟 - the Logs consist of Windows Events, sometimes also called Event Logs.

You can also see those with the Windows Event Viewer. Image
The Windows Events have IDs - they are numerical & between 1 and 5 digits

Security relevant are mostly: 4608 - 6424

Interesting... can I find what they mean somewhere?
Windows Logs in the Event Viewer are separated into 5 categories:

🎁 Application
🦺 Security
🛫 Setup
🧑‍🏭 System
⏩ Forwarded Events Image
Lets go through them 1 by 1
Application Logs 🎁

These consist of Interactions with Applications e.g. the Windows Software Protection Service (C:\Windows\system32\sppsvc.exe)

As the name suggests, this one protects software - e.g. checks if your Windows was activated ;)
Skimming through the Application Logs - we can for example see Events with an ID of 902 - Software Protection Service started

followed by #1003 - The Software Protection service has completed licensing status check

& finally #930 - Software Protection Service has stopped Image
NEXT -
Security Events 🦺
These Logs can be used to track successful / failed logon attempts (4624 /  4625)

New User creations  (4720)

Attempts to change/reset User Passwords (4723 /  4724)

and more - These are your Bread🍞 & Butter🧈 for hunting & finding malicious actions. Image
Do the following to see how they work:

1.  Clear the Logs - On the right side click "Clear Log..."
1.1  notice how this will generate a 1102 Event (Logs Cleared) Image
2.  perform "malicious" powershell / cmd line actions
2.1  e.g. you can add a new user and make this user part of the local admin group

net user <username> <password> /add

net localgroup administrators <username> /add
2.2  or add a new AD service account

SPN = Service Principal Name - it is set when accounts are Service Accounts

setspn -s http/elevateme <hostname> Image
Which Event IDs do you find now?

Pause and check the Security Event Logs - we need 3 Event IDs

reply with the correct Event IDs, you might win something if you have the correct answer 🎁🎁🎁
🛫 Setup EventsT

he Setup Event Log has Windows Setup events in it,
e.g. when you install the Active Directory Services via Server Manager
or when you add a new Forest
or when you promote a Server to Domain Controller

These information are gathered in the Setup Event Logs
🧑‍🏭 System Logs

Your System Logs contain Actions around

⏲️Network Time Server Sync (NTP)
💾Storage
🧑‍💼Windows Management Instrumentation Service (WMI)

and more.

Two Event IDs are interesting for us:
Service Started (7036) & Service Stopped  (7040)

Why?
Attackers might enable uncommon services for persistence (Service-based persistence)

or

restart services after they manipulated/created a local dll - (dll Hijacking)

Watch out for those if you assume you have been breached.
Last but not least
⏩ Forwarded Events

These are typically empty, if you have no idea what they can be used for

Something that might come in handy:
Use a single machine to collect and forward logs from all machines on the network to the logger

Why would you want this?
Imagine you have lots of computers and want to keep track of the events on a single machine, similar to our SIEM.

How do you do that?

You use Forwarded Events -

You have Source Machines (the Senders)and Collectors (Receiver)They interact via Subscriptions. Image
A Subscription is a Receiver asking to be notified for updates on the Sender Machine Event Logs

This has to be setup for all machines that you want to receive Logs from!

The easiest way is via winrm

run:
winrm quickconfig

from an admin shell on all the machines involved
It is followed by

wecutil qc

on the Collector and the last step is to setup the Subscriptions

click on "Create Subscription" on the right in the Actions menu Image
Give your Subscription a descriptive name and select

"destination log: forwarded events"

Collector initiated and click on "Select Computers" Image
You will see this screen but without the computers in it - click "Add Domain Computers..."

and in the next popup type your hostname (Sender!) in the bottom field

and once the Computer appears click on "OK" Image
Now the only thing left to do is click on "Select Events"

At the top select Critical, Error & Information

Logs you want Windows logs and Application, Security, Setup + System

Thats it. Your Events should flow in any second now.

WELL DONE! Image
I hope you learned something today.

If you liked the thread feel free to:

follow me @maikroservice for more content like this 💙👋💜
@threadreaderapp unroll

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Maik Ro

Maik Ro Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @maikroservice

Aug 9
Road to becoming a (better) SOC Analyst 💙

Windows Authentication for smarties - How Kerberos works: Image
I asked you which parts of Kerberos you wanted to understand better and you wanted to know and you said

What happens with Kerberos when you RDP to another machine.
Over the last 3 weeks I thought about how to properly share this from an educational perspective 🤔 with the usual hands-on tutorial style 😎

We need TWO threads for that - this FIRST one is about kerberos in general - today.
Read 35 tweets
Aug 1
IT Concepts - Network (Ethernet) Cables explained for beginners:
The smallest possible network is directly peer to peer (P2P)

computer1 ←→ computer2

You need a cable and one network interface controller (NIC) each, sometimes also called a network card.
These network cards have a specific cable that attaches to them - they are called ethernet cables or RJ45 cables.

You have probably seen them around your house if you were alive in the late 90s before Wifi was cool and reliable.
Read 9 tweets
Aug 1
IT Concepts - Network (Ethernet) Cables explained for beginners:
The smallest possible network is directly peer to peer (P2P)

computer1 ←→ computer2

You need a cable and one network interface controller (NIC) each, sometimes also called a network card.
These network cards have a specific cable that attaches to them - they are called ethernet cables or RJ45 cables.

You have probably seen them around your house if you were alive in the late 90s before Wifi was cool and reliable.
Read 9 tweets
Jul 18
Everyone is talking about Microsoft Defender signatures

What's all the fuss about?!

Lets dive in: Image
Once again, my @cyvisory team mate @pfiatde published a video on how to do delete the signatures:



But what if you have no idea whats going on?

I might be able to help with that - LETS GO! 🤓
Hackers do NOT like anti malware software like Endpoint Detection and Response - aka Microsoft Defender.

Besides the Anti Malware Scan Interface (AMSI)

Microsoft Defender is another tool to protect computers from bad actors (and their actions)

How does that work?
Read 12 tweets
Jul 13
Did someone say Microsoft Teams can be used for phishing? 😵

Wanna see how its done? 😈 Lets go:
Full disclosure - this was published yesterday by one of my team mates at @cyvisory

Mr @pfiatde :

But lets walk through this slowly, what can you do in the default configuration of Microsoft Teams.

Well... someone outside of your organization can send you messages.

WHAT????

Thats what I thought as well. Image
Read 16 tweets
Jun 25
Day 1️⃣6️⃣  - Becoming a (better) SOC analyst 💙

How you can find Indicators that you have been hacked:
Since we want to talk about Indicators of Compromise

Lets break down what “compromise” actually means shall we?

Take these two scenarios:
Someone has your Personal Identifiable Information - PII (name/social security number/address/username/password) 📇🔑

or even worse

Someone has access to / can execute code on your device 💻🏴‍☠️😈

A compromise would be either of those cases
Read 37 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(