<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by ADT on Medium]]></title>
        <description><![CDATA[Stories by ADT on Medium]]></description>
        <link>https://medium.com/@notweeb.justlover?source=rss-14a46b66b88f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*5xu0vbg-gY_Kby0l</url>
            <title>Stories by ADT on Medium</title>
            <link>https://medium.com/@notweeb.justlover?source=rss-14a46b66b88f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 18:32:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@notweeb.justlover/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Security Event Analysis Using Wazuh]]></title>
            <link>https://medium.com/@notweeb.justlover/security-event-analysis-using-wazuh-b982af533cd4?source=rss-14a46b66b88f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b982af533cd4</guid>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[wazuh]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[bruteforce-attack]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[ADT]]></dc:creator>
            <pubDate>Sat, 08 Jun 2024 07:04:10 GMT</pubDate>
            <atom:updated>2024-06-08T07:11:08.256Z</atom:updated>
            <content:encoded><![CDATA[<p>First Thing we need to know is what is Wazuh and what is used for? Wazuh is a free and open-source platform designed for threat prevention, detection, and response. It can safeguard workloads in on-premises, virtualized, containerized, and cloud-based environments. The Wazuh solution includes an endpoint security agent that is installed on the monitored systems, and a management server that collects and analyzes the data from these agents. Additionally, Wazuh is fully integrated with the Elastic Stack, offering a search engine and data visualization tool that enables users to explore their security alerts.</p><p>The preparations that we need to are Wazuh Server and Wazuh Agent. The Wazuh Server will be receive the data of potential attack to our Wazuh Agent and the Wazuh Agent will act as the device that already attacked or that we want to analize the attack inside of it.</p><p>So how to download Wazuh? To download it, first thing is we must have a server that will act as our Wazuh server. We can see the requirements that we neet to make it from the Wazuh documentation or this link: <a href="https://documentation.wazuh.com/current/quickstart.html">Quickstart · Wazuh documentation</a>.</p><p>From the documentation we know that there was specification we need and the OS that we use. Like this picture below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*t4HwuZPg__9myAk__zuZYg.png" /><figcaption>Specification of our Server</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mwZaj6D4FAwNsa6Nbyp_2Q.png" /><figcaption>Operating System of our Server</figcaption></figure><p>So we need the server that using that OS and the minimum CPU and RAM or higher to maximizing our server. We can make our server on a virtual machine or we can make it on a virtual private server.</p><p>On my case, i’m using VPS as my Wazuh Server, my localhost as the Windows Agent, and my VM as my Linux Agent.</p><p>After make a the server, the next thing we need to do is the installation of Wazuh server to our server. We can just go back to the Wazuh documentation or this link: <a href="https://documentation.wazuh.com/current/quickstart.html">Quickstart · Wazuh documentation</a> and there will be a bash comand to download and run Wazuh installation. The command is link this: “curl -sO <a href="https://packages.wazuh.com/4.7/wazuh-install.sh">https://packages.wazuh.com/4.7/wazuh-install.sh</a> &amp;&amp; sudo bash ./wazuh-install.sh -a”. Just copy the text inside the quotation mark and paste it to the server terminal. In my case it will run like the picture below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OXPTCKDVC9sD7RtQt2947g.png" /><figcaption>Installation of Wazuh Server</figcaption></figure><p>We will got our Username and the Password to log in to the Wazuh Dashboard and we can access the Dashboard using &lt;wazuh-dashboard-ip&gt; on port 443 on browser and it will ask us to log in like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gq0lpRwFRM5i9fAxKQ8zxQ.png" /></figure><p>After the server installation, we need to add agent to our server. To add or deploy new agent, we can just click Deploy New Agent from agent tabs, and it will show us like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v5g9CcVlSWaD5uqivJBTWA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5jiRpSytzFVlU9MNUHdPFw.png" /></figure><p>We can just fill the question like chose our agent OS, then paste our Wazuh Server address (ip), the agent name that we will see in the dashboard, and it will give us the comand that we need to run on our Agent it will install and connect our Agent to Server and we need to Start the Agent to connect it. On my case, i will using my Linux agent to be analize but i can also connect my Windows Agent. After connect my linux agent it will like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KjwywsYs0RV3KDvZ-BQrEA.png" /><figcaption>Connecting the Linux Agent to the Server</figcaption></figure><p>After that we can check if the agent successfully connected to the server in the Wazuh Dashboard like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*siBdfQgf8fZ42ZJz_nS47g.png" /><figcaption>Wazuh Dasboard after Connecting the Agent</figcaption></figure><p>So in my case, there will be 2 Agent 1 is Linux and 1 is Windows. My Windows Agent is disconected because I am not using it or not conecting it yet, but my Linux Agent successfully connected to the Server. After it successfully connected it will start to check if there is problem or attack to our agent.</p><p>Now i want to simulate attack to my Linux-Agent. I will using Hydra to do bruteforce on my Linux Agent SSH. The first thing to simulate this is to install hydra, we can download it using bash command “sudo apt-get install hydra-gtk” so after that we can check if the hydra already installed or not,, by checking the version of Hydra using this bash command “hydra — version”. This is the picture about installing the hydra.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g5bWSipTtbzC921pz2Xq4Q.png" /><figcaption>Hydra Installation</figcaption></figure><p>After that, to brute force we need a word list that we will check one-by-one to bruteforce. On my case, first i am using rockyou.txt that I installed from website. This is one of famous wordlist that have so much wordlist. After that we need. We can use wordlist as users list and wordlist as passwords list and also we need the server ip that we want to attack and the service. Like this bash command “hydra -L users.txt -P password.txt &lt;server&gt; ssh&quot;I am using ssh service bacause i want to attack my ssh service of my Linux Agent. So when i run the bash command it will like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KNV_K0QtEUQ-IzPHU-2ZxQ.png" /><figcaption>Brute Force Attack to my Linux Agent</figcaption></figure><p>I cut the process because it will take long time, but when i run this code i wait likely 5 minutes and check the Wazuh Dasboard of my Linux Agent in security event will have like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lr249ZWRAX7ZR4Y23hKvOQ.png" /><figcaption>Security Event Linux-Agent After Brute Force Attack</figcaption></figure><p>That show us the total of security event that happen when the Agent connected to the server. On my case it shows 2206 case and there is 1096 Authentication Failure. Authentication failure occurs when the process of verifying a user’s identity for accessing an online account or application encounters an issue. That means someone want to coneect to my server it can be a brute force attack if the authentication failure rate is too high like my case there will be much higher if i don’t stop the brute force attack.</p><p>So when we know it is an attack or not, we can see if the Authentication Failure rate is high or not, if the rate is high there is high chance that our agent was attacked by bruteforce, but if the rate is low like under 5 or under 10, it mostly like humans error but we need to check again if it really made by humans error or not. If we go to under the security events dashboard, we can see the Security Alert and we can check the log. In my case it will like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TF-9pPGmXRfcnb17mTdO-A.png" /><figcaption>Security Alerts Log</figcaption></figure><p>We can see the timestamp of the attack, the technique if there was, the tactic, description, level, and rule ID.</p><p>Techniques refers to a specific method or approach used by attackers to achieve their objectives. On my case there are T1110 technique thats means the attacker using brute force to attack my Linux Agent. We can also check more from this website: <a href="https://attack.mitre.org/">https://attack.mitre.org/</a>.</p><p>Tactics refers to high-level categories that describe the objectives or goals of an attacker. On my case there are “Credential Access” that’s means the attacker trying to steal my account name or password of my Linux Agent.</p><p>Description refers to the description of the error that occurs. Like in my case there are will so much description like “Maximum authentication attempts exceeded.” that means the the authentication have reach the maximum attempts, or “syslog: User missed the password more than one time” that means inputing the wrong password multiple time and other description.</p><p>Then level that are classified into different severity levels based on their importance. About the level it will be like this:</p><ol><li>Ignored (Level 0): No action is taken for these alerts. They help avoid false positives and include events with no security relevance.</li><li>System Low Priority Notification (Level 2): These are system notifications or status messages without security relevance.</li><li>Successful/Authorized Events (Level 3): Includes successful login attempts, firewall allow events, etc.</li><li>System Low Priority Error (Level 4): Errors related to bad configurations or unused devices/applications. No security relevance.</li><li>User-Generated Error (Level 5): Includes missed passwords, denied actions, etc. By themselves, these have no security relevance.</li><li>Low Relevance Attack (Level 6): Indicates worms or viruses with no system impact. Also includes frequent IDS events and errors.</li><li>“Bad Word” Matching (Level 7): Includes unclassified events with some security relevance.</li><li>First Time Seen (Level 8): Captures first-time IDS events or user logins. Also includes security-relevant actions.</li><li>Error from Invalid Source (Level 9): Attempts to log in as an unknown user or from an invalid source. May have security relevance.</li><li>Multiple User-Generated Errors (Level 10): Includes multiple bad passwords, failed logins, etc. May indicate an attack or user forgetfulness.</li><li>Integrity Checking Warning (Level 11): Messages about binary modification or rootkits. May indicate successful attacks.</li><li>High Importance Event (Level 12): Error or warning messages from the system, kernel, etc. May indicate attacks against specific applications.</li><li>Unusual Error (High Importance) (Level 13): Often matches common attack patterns.</li><li>High Importance Security Event (Level 14): Correlated events indicating an attack.</li><li>Severe Attack (Level 15): Immediate attention required; no false positives.</li></ol><p>The last is Rule ID that uniquely identifies the specific rule triggering the alert. These rule IDs play a crucial role in understanding and managing alerts.</p><p>Next i’m also trying to attack once more, but with the wordlist i make have the correct user and password but using another server to attack from before. It will be like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HMDWA90mWxxWydQfrqgbqw.png" /><figcaption>Successfull attack</figcaption></figure><p>It shows that there is correct user and password that can log in to the ssh and then i check the wazuh dashboard, the security event gonna increase and there is failure and success authentication, we can check the failure or the success authentication, but first i am gonna check the failure first. It will be like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FQw68Bk-6NSGbWH6iSvHyA.png" /><figcaption>Authentication Failure After Succes Attack</figcaption></figure><p>After seeing this, we know that the Technique a bit different from before, maybe it because the different attacker and device or server that i used. The first attack i am using Virtual Machine but the next attack i am using a Kali-linux WSL in my localhost, but the thing that we know it is also a sub technique of bruteforce that T1110 are bruteforce so the T1110.001 is the sub technique. The T1021 refers to Remote Services in the context of cybersecurity. It encompasses various techniques adversaries use to exploit remote services for malicious activities. So when i know what attacker used to attack my Agent, like i say before i used WSL to attack that is include the technique in the T1021 Technique.</p><p>Beside the failure authentication, we can see or analyses from Success Autentication. So when i see my success authentication, it will be like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BKpgc1UomPGY8v8eU4pmEw.png" /><figcaption>Succes Authentication After Success Attack</figcaption></figure><p>The success authentication also provide the Technique, Tactics, description, level, dan Rule ID. So we can analize when the attacker already or can access our server. We can see the method or technique that attacker used, like i say before it used T1021 technique that include WSL in it, so when we know we dont connect using T1021 technique, we need to see more about that authentication, maybe it an attacker that can access our system or server.</p><p>So to conclude the Analysis from Linux Agent, Wazuh will provide us some specified data that we need to analize some attack. Like before it will say that method or technique that attacker used to trying to attack us. Also we can see the attack technique description from website that provide more description or explanation about the technique that has been used. We also not just checking the authentication failure but also the success authentication where if the attacker has been success to access our agent. If there is an attack we can have much data that we need to counter the attack and keep our agent to be safe again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b982af533cd4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>