Dr. Maik Ro Profile picture
Dec 11 27 tweets 7 min read Twitter logo Read on Twitter
Day 1️⃣0️⃣ - Becoming a SOC analyst 💙

How to install SIEM agents on WIN & LINUX in your HomeLab: Image
In the last thread you installed a SIEM in your HomeLab:

But a SIEM in itself is not really useful without one magic ingredient 🪄

Log files 🗃️
Whats a log file? 🪵

What does wood have to do with CyberSecurity? 🤔

Why do we need logs inside containers 📦?

Let us answer these questions now 👀

dive into 🤿 logging & monitoring
Organizations have a looooot of services

Be it web applications, databases or HR tools

Those typically run on servers and sometimes (😅🤣 “sometimes”, sure) these services break 💔

But how do you know if a service is not working 🚧?!
Great question! 🚀🤓

You would need something 🤖 that collects:

system information
meta data
potential errors

and alerts you if something is wrong 🚨‼️
This whole process is called monitoring

the collected information (e.g. ▶️ started, ⏹️ stopped, 🤬 error) is usually stored in text files (also called log files / logs)

they are forwarded to your SIEM by programs that we call “agents”
Enough theory let’s get some of those beautiful agents shall we?!

Prerequisites:
1x SIEM VM/container (@wazuh)
1x Windows VM
1x Linux VM/container
@wazuh You will now install a wazuh agent on the windows machine first

Start the Windows VM and open the following url in your browser
documentation.wazuh.com/current/instal…
Image
@wazuh We will use the Graphical User Interface (GUI) of the wazuh agent to set everything up

You can get the installer here:


You need administrative privileges to set everything up - keep that in mindpackages.wazuh.com/4.x/windows/wa…
@wazuh Download & Double click that bad boy as if there is no tomorrow

and then do the following… Image
@wazuh You can change the location of the install via the “advanced” button

but generally the “Install” button should be your best friend, so click that one
@wazuh When the install is finished there is a checkbox that you can try to click on

“Run Agent configuration interface”

For me that sometimes work and sometimes does not

Here is a trick that always works: Image
@wazuh open C:\Program Files\ossec-agent

and double click on win32ui.exe

That will spawn a management window where you enter the IP of your SIEM server, click on Save and pray that you get an Authentication Key back

IF not… Image
@wazuh You need to make sure that the wazuh-server is running

that the machines are on the same subnet / have a working connection

You should see the agent in your wazuh dashboard if all went well 🥳🎊 Image
@wazuh 🥳 1 down, 1 to go for today.

Next up is linux

go to

and click on the cute little 🐧 penguin 🐧 documentation.wazuh.com/current/instal…
Image
@wazuh You should be forwarded to this url:

Here you need to select your package manager

Hint:
Amazon Linux / CentOS → Yum
Debian-based (e.g. ubuntu/kali) → APT
Container (Alpine) → APK documentation.wazuh.com/current/instal…
Image
@wazuh Now we need to follow the steps for APT in my case (ubuntu/debian)

copy the first command and paste it into your terminal inside the linux VM

then the 2nd

and so on

Don’t forget to press Enter in between 🤓 Image
@wazuh But what do the commands do?!

First you add the public encryption key to your linux key store (keyring)

Then you add 2 new repositories to your linux source list

The 3rd step updates your local package cache so that you can now use

apt-get install wazuh-agent

to install it
@wazuh There is a teeny-tiny BUT though…

In order to properly connect your SIEM and the agent you need to feed a variable called WAZUH_MANAGER with the SIEM IP into the command
@wazuh EXCUSE ME - WHAT ARE YOU TALKING ABOUT MR MAIKRO?!

There is some black magic going on behind the scenes that automagically connects your wazuh agent with the SIEM server 🪄

BUT only if you provide the IP address of the server

WAZUH_MANAGER= apt-get install wazuh-agent Image
@wazuh You can however also register the agent after installing by editing

/var/ossec/etc/ossec.conf

& adding the Manager_IP between the address tags:

<client> <server> <address>MANAGER_IP</address> ...
Source: documentation.wazuh.com/current/user-m…
@wazuh If all went well you can now add the agent service to the auto start services by running three commands:

systemctl daemon-reload
systemctl enable wazuh-agent
systemctl start wazuh-agent
@wazuh Once that is done you should see the agent appear in your wazuh dashboard

🔥 CONGRATULATIONS 💙

You installed two @wazuh agents in your HomeLab 🎉

In the next thread 🧵 we will write custom detections for the malware IOCs we found earlier

Stay tuned & curious 🤓 Image
@wazuh If you liked this thread
→ follow me @maikroservice for more 30 days to SOC Analyst content

if you LOVED this thread:
@wazuh You have ONLY 20 days left to preorder my course

the Practical SOC Analyst 101

for the low price of $50

On January 1st the course is released and the price will go up to $150 for the self-paced version and $400 for the bootcamp Image
@wazuh Secret-Time: All the preorder people will get a FREE bootcamp spot plus early access to any content updates

GREAT - WHERE CAN I GET IT?

Glad you asked -
academy.maikroservice.com/l/soc101
@wazuh @threadreaderapp unroll

• • •

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

Keep Current with Dr. Maik Ro

Dr. 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

Dec 13
Day 1️⃣1️⃣ of Your SOC Analyst Journey

How to use File Integrity Monitoring to detect hacker: Image
Since we want to talk about File Integrity Monitoring we need to talk about Indicators of Compromise

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

We will look at 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 38 tweets
Dec 10
Day 9️⃣ of Your SOC Analyst Journey

How to build your own SIEM for your HomeLab: Image
What on Earth is a SIEM anyway?

A SIEM is a Monitoring System that collects/aggregates Logs - the abbreviation means:

Security Information and Event Management System

It is a critical component in the security infrastructure of any company.

Ok got it...
But why should you care about SIEM for your HomeLab at all?
That is a very good question and it has 1 simple answer.
In your (current or next) job you will need monitoring for your companies' infrastructure.
How do you learn that?
By building a SIEM for your HomeLab.
Read 20 tweets
Dec 10
Day 8️⃣ of Your SOC Analyst Journey

How to start with Reverse Engineering Malware: Image
Disclaimer - be careful today, we are handling real malware, stuff can go wrong and you are doing this of your own free will, no one forced you, I cannot not be held responsible.

🔒 stay safe!
Setup:

You need one Windows Virtual Machine without internet access and ideally in host-only mode which protects your computer from being infected.

If you don’t know what any of that means - check out yesterdays 🧵:
Read 31 tweets
Dec 9
Day 7️⃣ of Your SOC Analyst Journey

How to find IOCs through Malware analysis for Beginners:
Disclaimer - be careful today, we are handling real malware, stuff can go wrong and you are doing this of your own free will, no one forced you, I cannot not be held responsible.
Setup:

You need one linux VM and one Windows VM - isolated in their own little network (VirtualBox - Host Only) and ideally their own VLAN.

If you don’t know what any of that means - you came to the right place at the right time
Read 40 tweets
Dec 7
Day 6️⃣ of Your SOC Analyst Journey

Static Malware Analysis for Beginners: Image
Disclaimer - be careful today, we are handling live malware, stuff can go wrong and you are doing this on your own, no one forced you, I cannot not be held responsible.
Sanity check and preparation:

Create a dedicated linux Virtual Machine for Malware handling either directly by using a REMnux box () or a linux distribution of your choiceremnux.org
Read 32 tweets
Dec 6
Day 5️⃣ of Your SOC Analyst Journey

How the internet works - Part II (TCP/UDP):
When you open your browser, type and press enter a lot of things happen almost instantly:

ARP Traffic (yesterday)
DNS Traffic (yesterday)
TCP/UDP Traffic (today)mail.google.com
Hands-on Exercise
🔥 Fire up Wireshark and select the appropriate network interface like we did in the last section
⏳ Wait a couple of seconds and watch the packets come in, fly around and get send away
🧳 Which patterns can you spot?
Read 32 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!

:(