<?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 Aadit Nair on Medium]]></title>
        <description><![CDATA[Stories by Aadit Nair on Medium]]></description>
        <link>https://medium.com/@aaditnair2108?source=rss-d4b530769755------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*HwJA1gpgywdmS-AL</url>
            <title>Stories by Aadit Nair on Medium</title>
            <link>https://medium.com/@aaditnair2108?source=rss-d4b530769755------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 19:54:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aaditnair2108/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[Integrating Log360 with Suricata and pfsense.]]></title>
            <link>https://medium.com/@aaditnair2108/integrating-log360-with-suricata-and-pfsense-232c988e43e7?source=rss-d4b530769755------2</link>
            <guid isPermaLink="false">https://medium.com/p/232c988e43e7</guid>
            <category><![CDATA[pfsense]]></category>
            <category><![CDATA[suricata]]></category>
            <category><![CDATA[id]]></category>
            <category><![CDATA[log360]]></category>
            <dc:creator><![CDATA[Aadit Nair]]></dc:creator>
            <pubDate>Thu, 19 Mar 2026 14:00:51 GMT</pubDate>
            <atom:updated>2026-03-19T14:00:51.431Z</atom:updated>
            <content:encoded><![CDATA[<p>Integrating ManageEngine Log360 with Suricata and pfSense creates a powerful, layered security monitoring solution for modern networks. This integration combines firewall-level visibility, intrusion detection capabilities, and centralized log analysis into a single, efficient platform.</p><p><strong>pfSense</strong> acts as the network’s first line of defense, filtering traffic and generating detailed firewall and system logs. <strong>Suricata</strong>, often deployed on pfSense or as a separate IDS/IPS, analyzes network traffic in real time to detect suspicious patterns, attacks, and policy violations. Both tools generate rich security logs that are critical for identifying threats.</p><p>When integrated with <strong>Log360</strong>, these logs are collected, normalized, and analyzed in a centralized SIEM environment. Log360 enables real-time correlation of events from pfSense and Suricata, helping security teams detect complex threats that may not be visible when analyzing logs individually. It also provides dashboards, alerts, and compliance reporting, making it easier to investigate incidents and respond quickly.</p><p>Overall, this integration enhances visibility across the network, strengthens threat detection, and streamlines security operations — making it highly valuable for Security Operations Centers (SOCs) and enterprise environments.</p><p>Now let’s start by installing suricata in agent device. Go to <a href="https://suricata.io/download/">Download — Suricata</a> to download the suricata. Now I am using Windows so I will be installing windows version of the suricata. Also install npcap before installing it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CkC9ln_UZbsRzDRtHh9CHA.png" /></figure><p>Now after installation go to the suricata folder in Program Files.</p><p>Open suricata.yaml in notepad.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*1UGGq5pqVyESpytFCiwkbQ.png" /></figure><p>In that change the home_net to your ip.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8jv8HcQPRhF47GQ_IOP0qw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3VILxDuLO0ObhUC9I5X_xA.png" /></figure><p>Now go down to rules section and remove every rules folder. Add local.rules</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aBFHt8mcxYSN_wy1WU9NGw.png" /></figure><p>Save it and close. Go to rules folder and add local.rules in rules folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*RLXRt5Kgscq_ZoR5AGY6cQ.png" /></figure><p>Now try to run it. command: suricata.exe -c suricata.yaml -i &lt;ip&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pU8wQr-2sy1gzwyuzj5U2g.png" /></figure><p>Now add ping rule in local.rules. alert icmp any any -&gt; any any (msg:”ICMP Ping Detected”; itype:8; sid:1000001; rev:1;).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CGj9DstOvR8E6mOKL17i0g.png" /></figure><p>Run Suricata and ping from different host to the victim host.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lbJJAutlQRVbWRaLAu8cPQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*HRw0WQEUiNRLNledR7duJg.png" /></figure><p>Now check fast.log in the logs folder. If not found stop Suricata and run it as administrator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5yImmA-QVGGoqY_M3HUixg.png" /></figure><p>So, our alert and logging is working properly.</p><p>Now let’s integrate it with our log360.</p><p>Go to settings and in that go import logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h06Aytij1uKA7btOGzV-Eg.png" /></figure><p>In that select upload file option. Add eve.json.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k6Fb2RbpvQi_7zirGAC42A.png" /></figure><p>Select log source as the agent in which suricata is installed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lV_ge6tVl-NXIV5qgMjdlg.png" /></figure><p>Wait for some time. Click view report and search with nothing in search bar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*__9EdvoheMDXXKFU1YX1SA.png" /></figure><p>So we have successfully integrated Suricata and Log360.</p><p>Now let’s integrate pfsense and log360.</p><p>Start your pfsense and open the web gui.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NCnms4AkzahbaFqYvbuZJA.png" /></figure><p>Go to settings in Log360 and in that open admin menu. In that open Listening ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*diq2nVO5SwjYOl_2WOWneA.png" /></figure><p>Now go to devices and add a syslog device. Enable “Add as Syslog Device”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ab5rHz3Jl1bbcZvXjUAwdg.png" /></figure><p>Now let’s configure it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*zgVK25zcVUVirra3e-DPoA.png" /></figure><p>Now the credentials should be your credentials. Now let’s enable ssh in our pfsense.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VTvQq7xXNoCwGEp0C_DLzA.png" /></figure><p>Go to Advanced in system tab.</p><p>In that enable ssh and enable agent forwarding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CsR3X2DeiO2gCsmbqef8PA.png" /></figure><p>Now also add a firewall rule in our windows to allow 514 port traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*BwXroJrbuRP9BdsFDWf9jA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*aCBGi5qnBRzLgcTL_JsEnA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*5_7odR-LMoA35-inAqPaIA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*Dq_DIU2MA9OzQKNoDMNFnQ.png" /></figure><p>Add any name. Now let’s add log forwarder in our pfsense. Go to status-&gt; system logs -&gt; settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5IPphTpMjm3kT-BPOcg4_Q.png" /></figure><p>Add your agent IP and the port should be port mentioned in the configuration. Now check the logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xd1EzK_qAh84h0Y8qNEqjg.png" /></figure><p>So we have successfully integrated pfsense and suricata.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=232c988e43e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ManageEngine Log360]]></title>
            <link>https://medium.com/@aaditnair2108/manageengine-log360-0acb77220dcd?source=rss-d4b530769755------2</link>
            <guid isPermaLink="false">https://medium.com/p/0acb77220dcd</guid>
            <category><![CDATA[manageengine]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[soc]]></category>
            <dc:creator><![CDATA[Aadit Nair]]></dc:creator>
            <pubDate>Thu, 19 Mar 2026 11:03:01 GMT</pubDate>
            <atom:updated>2026-03-19T11:03:01.365Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>ManageEngine Log360</strong> is a comprehensive <strong>Security Information and Event Management (SIEM)</strong> solution developed by ManageEngine. It helps organizations <strong>collect, analyze, and monitor log data</strong> from various sources such as servers, network devices, applications, and endpoints in real time.</p><p>Log360 combines multiple security tools — like <strong>log management, file integrity monitoring, user activity monitoring, and threat detection</strong> — into a single platform. It enables security teams to <strong>detect suspicious activities, investigate incidents, and ensure compliance</strong> with standards such as GDPR, HIPAA, and PCI-DSS.</p><p>Overall, Log360 is widely used in <strong>Security Operations Centers (SOCs)</strong> to improve visibility, enhance threat detection, and streamline incident response.</p><p>Let’s start by deploying agent in our systems. Now In our case we are going to use Log360 cloud. Create an account and open the dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c2VZqOOXKsy0SP5gcWl2Xg.png" /></figure><p>Now you might get an empty dashboard but that is normal as there might not be any agent installed. Let’s install an agent.</p><p>For users first time you will see an option to install agent just install it and you will get a request to pair the agent in the dashboard. Accept it and wait for some time. It will automatically configure the agent would start. Still let’s do it again.</p><p>Go to settings -&gt; admin and select add agent. Now be carefull, open this dashboard on the device you need to install the agent in. As we cannot copy and paste the agent file in different location as it may remove its main functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GnO08QQPt4HMRDyMQuGu-Q.png" /></figure><p>After agent installation go to pending agent registrations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qye05n4rq_PCyhxdTSHkkA.png" /></figure><p>Now accept your device agent and wait for some time for syncing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*OYIIMxy58hBdQfbPX_lbFw.png" /></figure><p>You will see the agent running after some time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h2W88NgcAvKbcmudAMj-QA.png" /></figure><p>Now go to configuration and manage devices. Now change the scheduled scanning to realtime scanning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*najbtMHKn5HlU2KX445itg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*ZdIUSkZBrC5PvL6TuhNGzQ.png" /></figure><p>Click update. After some time we will see the logs coming.</p><p>After some time when we check the dashboard will see the logs incoming.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bljVrbj4UR-WPrdyWPKggQ.png" /></figure><p>So like this we can setup Log360 cloud version.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0acb77220dcd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Attacking our AD and getting its logs in splunk to create alerts.]]></title>
            <link>https://medium.com/@aaditnair2108/attacking-our-ad-and-getting-its-logs-in-splunk-to-create-alerts-f441da96c264?source=rss-d4b530769755------2</link>
            <guid isPermaLink="false">https://medium.com/p/f441da96c264</guid>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[kerberos-attack]]></category>
            <category><![CDATA[splunk]]></category>
            <dc:creator><![CDATA[Aadit Nair]]></dc:creator>
            <pubDate>Mon, 02 Mar 2026 01:09:43 GMT</pubDate>
            <atom:updated>2026-03-02T01:09:43.009Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s start by adding our splunk forwarders in our windows machine which has a domain user loginned in it and our windows server with AD.</p><p>Install splunk forwarder in both the VM. Now let’s configure it to send the data in our host splunk enterprise.</p><p>Open a windows powershell and give it admin rights. Go to</p><p>C:\Program Files\SplunkUniversalForwarder\etc\system\local\outputs.conf. If the file is not created then create it in the destination folder. Now check the ip of the host machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*br1bpHnHM7toMM0u_ZxHuA.png" /></figure><p>Now add the below data block in outputs.conf.</p><p>[tcpout]<br>defaultGroup = default-autolb-group</p><p>[tcpout:default-autolb-group]<br>server = &lt;windows_ip&gt;:&lt;recieving port&gt;</p><p>To find the recieving port go to splunk interprise and in that click settings. We will find a link name forwarders and recieving.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F0S9Vf44Axr1OLxke9wIRg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xv0DXjtHcI0onrQrIFnNMw.png" /></figure><p>The port here mentioned should be added in output.conf file. Then restart the forwarder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mibmyTGqBjkhfV0zkvR83g.png" /></figure><p>Now also run this command in your host PowerShell as the firewall may block the ip.</p><p>New-NetFirewallRule -DisplayName “Splunk 9997” -Direction Inbound -Protocol TCP -LocalPort 9997 -Action Allow</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p0kJbC7cKrevWead9DaBfA.png" /></figure><p>Now check in the log files if the connection is successful or not. path: /etc/log/splunk/splund.log</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tW8IbeXsrYKD4dTApAw39A.png" /></figure><p>This should be the log in the file.</p><p>Now let’s add our monitoring files or folders.</p><p>command: .\splunk.exe add monitor “C:\Windows\System32\winevt\Logs\Security.evtx”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XbRw8ZvmqqUh4M4EKeQyew.png" /></figure><p>Restart the forwarder then. Now check based on the hostname of the system</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KYqjpwnKiKmeOn2g20bWRA.png" /></figure><p>So we are getting the logs now let’s start the attacks.</p><p>Now for attacks let’s start with kerberoasting.</p><p>Kerberoasting is a credential access attack where:</p><ol><li>An attacker (even a low-privileged domain user) requests a service ticket for an SPN account.</li><li>The Domain Controller issues a TGS.</li><li>The TGS is encrypted using the service account’s NTLM hash.</li><li>The attacker extracts the ticket and cracks it offline.</li><li>If cracked, the attacker obtains the service account password.</li></ol><p>Now for this we need a domain registered user. This user should be login in the Windows VM. Open an administrator rights PowerShell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*4rcBctFDzcAPJI6c.png" /></figure><p>Now run the command. whoami /fdqn (Check logged-in domain user)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/0*J_wS8zWa9TM1LkKC.png" /></figure><p>Now run klist. This helps to list the no of kerberos tickets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*FG6G4InUH2oyvAIDr68Vqg.png" /></figure><p>Now I have 0 tickets so I do not need to clear any tickets but to clear tickets the command is klist purge.</p><p>Now let’s get ticket of a service in AD. You can use any valid service.</p><p>command: klist get MSSQLSvc/DC1.ghosts.com:1433</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RzxaL4kvlunfTwQUJKzGcQ.png" /></figure><p>Now let’s check the event logs in splunk. The event ID created when new kerberos ticket is requested is 4769.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j9Cn9fnhySnyF2YQGGQRXg.png" /></figure><p>Now paste this search query.</p><p>index=main EventCode=4769 NOT Account_Name=”*$”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0GVVD-iHL-RT0aUFqrUMRw.png" /></figure><p>Now let’s create alert based on this. Save the search query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*egQwhHXmZmM-K1E-0Eg0hg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*8hfg80ZG6CMVX3-LvsQHsA.png" /></figure><p>Now let’s save it. Now according to alert let’s run the ticket creating command 6–7 times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XcwO92aPdc00rMOErULUjw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rBe8PkwUj078wgxIbw4gmA.png" /></figure><p>Now let’s go for AS-REP Roasting.</p><p>Normally in Kerberos:</p><ol><li>User requests TGT</li><li>User must prove identity using pre-authentication</li></ol><p>If pre-auth is disabled:</p><ul><li>The Domain Controller sends encrypted authentication data</li><li>Attacker can request it</li><li>Attacker cracks it offline</li></ul><p>No password needed.<br>No login required.<br>Just request.</p><p>That’s AS-REP Roasting.</p><p>Let’s create a new user in AD. Command:</p><p>New-ADUser -Name “&lt;any_user&gt;” `<br>-SamAccountName &lt;any_user&gt;`<br>-AccountPassword (ConvertTo-SecureString “Password123!” -AsPlainText -Force) `<br>-Enabled $true</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/0*9EcAt1ueJyHSdRNl.png" /></figure><p>Command to disable kerberos preauth:Set-ADAccountControl -Identity &lt;any_user&gt; -DoesNotRequirePreAuth $true</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/0*8XEQfH2SRD96z0zF.png" /></figure><p>Now our goal is to create events of 4768 and 4769. In that if we check preauth field it would be 0. Normally it would be 2 or 15. But now as we have removed preAuth then it would be 0. Here I would be using my account. Let’s delete every ticket in our system.</p><p>command:klist purge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/0*TeeH3fMVGwxnRwAf.png" /></figure><p>Now run this command:runas /user:ghosts\tomh cmd. This would then prompt to enter password. When password is added a new cmd would open under the name of the username we gave it. Now this would prompt kereberos to create a new ticket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*Xq3fHxzhq1PKHHKT.png" /></figure><p>Now let’s get the 4768 log before preAuth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5PkNw-qVBi5KBM6r8Z1AWA.png" /></figure><p>An old ticket generation command used. Here the preAuth is 2.</p><p>Now let’s check the latest alert.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yniHB9cHgspLZgEiL4R80A.png" /></figure><p>If we check here the Pre authentication type value is 0.</p><p>Now let’s check splunk logs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HK4A2jc6_l12JRjyoGBfkQ.png" /></figure><p>Now let’s add the preauth condition. index=main EventCode=4768 Pre-Authentication Pre_Authentication_Type=0</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lWh9PwUDNcrYes3wthkxjg.png" /></figure><p>So let’s create an alert based on that. Save this search query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*xdr4mca_paJqbsw4oZx2kA.png" /></figure><p>Now let’s save it.</p><p>Now delete the tickets and create new tickets. After that if we check then the alerts would be generated. (If not then try to close the current window of splunk and login through a new window).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ISoKHbnaYm5Ld4UTOoxoZw.png" /></figure><h3>DCSync (Domain Replication Abuse)</h3><p>This is one of the most powerful AD attacks.</p><p>If successful → attacker can dump password hashes of any domain user (including Administrator).</p><p>What is DCSync ?</p><p>Normally:</p><ul><li>Domain Controllers replicate directory data between each other.</li></ul><p>DCSync abuses this by:</p><ul><li>Using replication privileges</li><li>Requesting password hashes from DC</li><li>Without logging into DC interactively</li></ul><p>Install mimikatz in your windows machine. Give the user in it DC rights through the server AD. As for this attack we are gonna need Domain Controller rights.</p><p>In mimikatz go to path /x64/mimikatz.exe. Run it as administrator.</p><p>But before that we need to enable the Domain controller Access audit logs.</p><p>command: auditpol /set /subcategory:”Directory Service Access” /success:enable /failure:enable</p><p>Now let’s run mimikatz as administrator. Run the command: privilege::debug</p><p>lsadump::dcsync /domain:ghosts.com /user:Administrator</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p7hlOwoDaBRiGqfcZqFSiQ.png" /></figure><p>Now search the logs by adding 4662.</p><p>Search query: EventCode=4662 NOT Account_Name=”*$”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5u053zabFhkV3mZb4u532A.png" /></figure><p>This is because domain controller has $ in its account name. Any account except DC if tries to access the directory services or tries to replicate any service then it is considered as an attack.</p><p>Let’s create an alert by saving this search query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*aH41FO8oE8AXqn_MPbRuuA.png" /></figure><p>Repeat the process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-rIissABY_jKIOO-kieldg.png" /></figure><p>In this lab, we simulated real-world Active Directory attacks and successfully monitored them using Splunk Enterprise. Instead of only understanding attack theory, we performed practical offensive actions and validated how those attacks appear inside Windows Security logs.</p><p>By integrating Splunk Universal Forwarders with both the Domain Controller and client machine, we built a working detection pipeline capable of capturing authentication and directory service events in real time.</p><p>We simulated Kerberoasting by requesting service tickets for SPN accounts.<br> Each ticket request generated <strong>Event ID 4769</strong>, which we monitored in Splunk.</p><p>Key detection logic:</p><ul><li>Monitor EventCode=4769</li><li>Exclude machine accounts (*$)</li><li>Identify suspicious ticket requests from non-service users</li></ul><p>This demonstrated how attackers can request encrypted service tickets and crack them offline to recover service account passwords.</p><p>We disabled Kerberos pre-authentication for a test user and generated a new TGT request.</p><p>Normal Kerberos behavior:</p><ul><li>Pre-Authentication Type = 2 or 15</li></ul><p>AS-REP Roasting behavior:</p><ul><li>Pre-Authentication Type = 0</li></ul><p>Using Splunk, we filtered:</p><p>EventCode=4768 Pre_Authentication_Type=0</p><p>This allowed us to detect accounts vulnerable to offline password cracking without requiring a successful login.</p><p>We executed a DCSync attack using mimikatz and enabled Directory Service Access auditing.</p><p>Key observation:</p><ul><li>EventCode = 4662</li><li>Properties field contains replication GUIDs</li><li>Account name does NOT end with $.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f441da96c264" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kerberos related attacks on our windows server vm (Part -1).]]></title>
            <link>https://medium.com/@aaditnair2108/kerberos-related-attacks-on-our-windows-server-vm-part-1-a91d70cd5d8b?source=rss-d4b530769755------2</link>
            <guid isPermaLink="false">https://medium.com/p/a91d70cd5d8b</guid>
            <category><![CDATA[kerbrute]]></category>
            <category><![CDATA[kerberos]]></category>
            <category><![CDATA[bruteforce-attack]]></category>
            <dc:creator><![CDATA[Aadit Nair]]></dc:creator>
            <pubDate>Thu, 26 Feb 2026 00:04:06 GMT</pubDate>
            <atom:updated>2026-02-26T00:04:06.092Z</atom:updated>
            <content:encoded><![CDATA[<p>Last time we configured a windows server in our vm. We also added AD and DNS server in it. Then we created a Domain and added user. Now we are going to attack our AD’s kerberos service. We will be performing the kerbrute attack where it does an dictionary attack on searching the accounts present in an AD. So let’s perform it.</p><p>First let’s add some users in our AD.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*6NK9-J44ZskjJWYoEDRrKg.png" /></figure><p>user 1: harry potter</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*lTAEQJNOFMiia6CAgB3bJA.png" /></figure><p>user 2 : Loid Ranger</p><p>we have our 2 users we created now and one another in last lab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*AgeMYasdHq4ZD7NUbIuNpA.png" /></figure><p>Now let’s start our kali linux.</p><p>This will open up a mousepad window. You just need to copy and paste <em>machine IP &lt;AD server hostname+domain name&gt;</em>into mousepad under the kali host, make sure you have a tab after the last digit in the IP and the first spacing is key. Then click save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*XavGwfj0uWHczUPxW6jBDA.png" /></figure><p>Download a precompiled binary for your OS — <a href="https://github.com/ropnop/kerbrute/releases">https://github.com/ropnop/kerbrute/releases</a>. select amd 4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*lSIIhw_J6Aq_zUEVCKpKCA.png" /></figure><p>After downloading it. Create a new folder in any directory named kerberos_attack. Go to that directory.</p><p>cd /home/kali/AttackingKerberos/</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*tpYkGN4xms7kVamQa9xOqg.png" /></figure><p>Now let’s cut the newly downloaded file in the current directory and rename it as kerbute. command: mv /home/kali/Downloads/kerbrute_linux_amd64 kerbute</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*YZIvGah1YnO9WBVXyGLemQ.png" /></figure><p>Now check if it is present or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*EEPO74iOjRX4kzajLEi-PA.png" /></figure><p>Now give it executable rights. command: chmod +x kerbute</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*-bIRk2ZuxW6Qcw92-HDsVw.png" /></figure><p>Now let’s download wordlists for the bruteforce. command: wget <a href="https://raw.githubusercontent.com/Cryilllic/Active-Directory-Wordlists/master/User.tx">https://raw.githubusercontent.com/Cryilllic/Active-Directory-Wordlists/master/User.tx</a>t</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*T5fGxW9uwZkcT4u2yzgjbw.png" /></figure><p>Now let’s add the name of the users we have. Use nano.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*t8rK24FpoS9ej5rqItwEKw.png" /></figure><p>Now we are adding the half before @ in our login name.</p><p>Now let’s try it. command: ./kerbute userenum — dc DC1.ghosts.com -d ghosts.com User.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*87HnzhVAo3oC1LZXUopanw.png" /></figure><p>Success, we have found 4 matching accounts. One of them is default administrator account.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a91d70cd5d8b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows Server Active Directory Configuration and adding a user in it.]]></title>
            <link>https://medium.com/@aaditnair2108/windows-server-active-directory-configuration-and-adding-a-user-in-it-5ef6ae79ba85?source=rss-d4b530769755------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ef6ae79ba85</guid>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[windows-server]]></category>
            <dc:creator><![CDATA[Aadit Nair]]></dc:creator>
            <pubDate>Wed, 25 Feb 2026 01:02:12 GMT</pubDate>
            <atom:updated>2026-02-25T01:02:12.627Z</atom:updated>
            <content:encoded><![CDATA[<p>As part of building a realistic lab environment for security monitoring and SOC automation, I decided to configure <strong>Active Directory on Windows Server</strong>. Since most enterprise environments rely on centralized identity management, understanding how Active Directory works is essential for both system administration and cybersecurity.</p><p>In today’s setup, I configured Windows Server as a Domain Controller and installed Active Directory Domain Services (AD DS). After successfully promoting the server to a domain controller, I proceeded to create and manage users within the domain environment.</p><p>This hands-on exercise helped me understand:</p><ul><li>How domain-based authentication works</li><li>The role of a Domain Controller in an enterprise network</li><li>How users, groups, and policies are managed centrally</li><li>Why Active Directory is a critical component in security monitoring</li></ul><p>Adding a user in Active Directory may seem simple, but it plays a crucial role in identity management, access control, and audit logging — all of which are vital for cybersecurity operations.</p><p>In this post, I will walk through the configuration process and demonstrate how to add a user in Active Directory step by step.</p><p>I am going to run it in my Vmware. The specigications are given below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*gwK6Gba3GCl_I-l1ssJnJg.png" /></figure><p>Now let’s start.</p><p>Go to server management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZCXvaMPWk22xTk6tNSLChA.png" /></figure><p>In that go to local server and let’s change the name of the hardware.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h6-LNebLCtrAHKS1dmrpIA.png" /></figure><p>Now in description add DC1 and click the change button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*egF_C_RT-KuKAfCZnRMPkA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*4bgYk2hqgma6le1GmHfV3g.png" /></figure><p>Now if you click ok then it will prompt you that the changes would appear after restarting the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/1*GE4lB3J1aFThRM7Dse438Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*xiRlLUD09aAA7JLqxL9TDg.png" /></figure><p>Restart later. Now change the network adapters IP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*zf8ulFGB7B6OmEg7khiRag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/1*OfJjYI9NH9y7xDFv7vjaQQ.png" /></figure><p>Check for the IP change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sJU8DL3GK4sdn0Z6rRfeTQ.png" /></figure><p>Now go to settings and in that go to Network and internet -&gt; Advance settings -&gt; advance sharing settings and in that enable everything for both public and private networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*Y12AFKWhTVUCnoJ-FuYNhQ.png" /></figure><p>This allows other device to find your device and get files of your devices.</p><p>Now start your windows vm. (Version: Windows 11 Pro)</p><p>Press your windows button in the vm and search for network connections. In that select your active adapter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cz2a6yWPCcCdUAXBCDvb4A.png" /></figure><p>Now click properties and select TCP and IPV4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*Txgh4dhov-1h_stOGGgPbQ.png" /></figure><p>Change the DNS to IP of the server we already set before.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/1*5699qv65mpbGi_ZQCnlnBA.png" /></figure><p>Close it. And enable the discover and file sharing similar to what we did in windows server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JkH-lGUaUPqDDi7aGe-igg.png" /></figure><p>Follow the path I gave in the screenshot. Now ping the server IP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*Dh5Nyuyl8ZszMdwth68zVQ.png" /></figure><p>Now via server ping the windows host.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*5lPCRMVgk3zklV1D23PlDg.png" /></figure><p>Now restart the server for changes that we did before.</p><p>After starting the server manager would open on its own. Click “Manage”. Click the first option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GBLmz-WkQ3MVc2XHx9QsHQ.png" /></figure><p>Click next until the below window arrives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*yifMh7l39O_8lQYZjb4uAA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*dQ7PtydAtFRETKsG5pSs0A.png" /></figure><p>Select Active Directory Domain Services and DNS Server. Click Next.</p><p>Now click next till installation page. Check auto restart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*FcB_GAR-HXq39pgZaTLsZQ.png" /></figure><p>Click install. Now wait. Close once it installs. Now click.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7px252jZs-H2Ya1gIvGuBg.png" /></figure><p>Click the option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KqjIldGJ3e-W4njC7TAT9g.png" /></figure><p>Now you will have to create a new domain any.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*kPCXeMB1Xb7z96_G_sn4XQ.png" /></figure><p>Now add a password after clicking next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*EdxGjQS7BL-rqnSUFrr6Bw.png" /></figure><p>Now click next until the end. Before final installation you will be prompted to install it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*04oIGRP8Sh7vAisR1Vea7w.png" /></figure><p>Install. After installation windows will restart. The AD will start. Now click tools</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*s6z5PVtybKWvxfvrH-YNLQ.png" /></figure><p>In that AD users and computers. In that open users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*4k6g_SHc_UBSHwb2Ta0bRg.png" /></figure><p>Now right click the users. Click new and user. Fill the details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*BUYF4rUiNhGG5t488Zcgig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*VdB_9ChkvmjQjCY3Lm2E0w.png" /></figure><p>Now right click the newly created user. Go to properties. In that go to member of.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*AQw1Em1DgVGec_iAjtezWQ.png" /></figure><p>Click Add. Then add Administrators group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*SQOX2xu5YxgJO5IJDQx9Qg.png" /></figure><p>Click ok. Then apply and ok.</p><p>Now go to the windows vm. Now in the windows right click the windows icon. Go to system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KOFzD0c5bjZWZG2H32kNCA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*Sh7jlFSwkFVDe4KzEz07hA.png" /></figure><p>Now when it opens go to computer name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*nlsKW9h34-6_RqjJt4rw5w.png" /></figure><p>Now click change. Change to domain and your domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/1*3EDGp57VIV7d695UpugtnQ.png" /></figure><p>It will prompt to add username and password of user that can access the domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*-MPMzVsmUWfBUKfQ8cLqoA.png" /></figure><p>Add the new user credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/321/1*xW58DoMjyqPASXT6VpApFg.png" /></figure><p>We have successfully added our windows to the domain. After that it will prompt to restart. After that whatever happens in the domain the windows will also be affected.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ef6ae79ba85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automating Incident Response: Creating Cases from Snort Alerts Using Splunk, n8n, and TheHive]]></title>
            <link>https://medium.com/@aaditnair2108/automating-incident-response-creating-cases-from-snort-alerts-using-splunk-n8n-and-thehive-fd9d821cc14b?source=rss-d4b530769755------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd9d821cc14b</guid>
            <category><![CDATA[n8n]]></category>
            <category><![CDATA[snort]]></category>
            <category><![CDATA[splunk-enterprise]]></category>
            <category><![CDATA[the-hive]]></category>
            <category><![CDATA[n8n-workflow-automation]]></category>
            <dc:creator><![CDATA[Aadit Nair]]></dc:creator>
            <pubDate>Mon, 23 Feb 2026 21:54:40 GMT</pubDate>
            <atom:updated>2026-02-23T21:54:40.481Z</atom:updated>
            <content:encoded><![CDATA[<p>In modern Security Operations Centers (SOCs), handling alerts manually is time-consuming and inefficient. Security teams often receive hundreds of alerts daily, and without automation, critical incidents can be delayed or overlooked. To solve this problem, we can integrate multiple security tools to create an automated alert-to-case workflow.</p><p>In this project, we use Snort to detect malicious network activity, forward those alerts to Splunk for log analysis and monitoring, automate the workflow using n8n, and finally create incident cases in TheHive.</p><p>The objective is to transform raw security alerts into structured incident cases automatically. This reduces manual effort, improves response time, and ensures that every critical alert is properly tracked and investigated.</p><p>By the end of this implementation, we will have a complete end-to-end automated incident response pipeline — from detection to case creation — demonstrating how modern SOC automation can improve operational efficiency and security visibility.</p><p>Let’s start by integrating splunk and snort. Now I have posted a medium post where we already configured the snort. So open the splunk dashboard localhost:8000. Now here I will be using splunk enterprise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UngIDLAdtoRgdR9ofvNX1g.png" /></figure><p>Now open command prompt with administrator rights. Go to splunk forwarder file directory and in that also bin folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*-EiZuTWYjJbdl5PxldSwww.png" /></figure><p>Now run the command to add monitor on the alert.ids file of snort.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*rVsCgxNdfAhUvyi5YuYdXw.png" /></figure><p>Now restart your splunkforwarder. Now check your splunk if you have the old logs.</p><p>Use search: source=”C\\Snort\\log\\alert.ids”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VZCsWnehYVuQWbmLbdCUtQ.png" /></figure><p>Now let’s see if we can receive live alerts. Start your snort and kali ping.</p><p>Now to get the updated logs search the query again</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4QBalZ_SjqWwI0_M17-krQ.png" /></figure><p>So we can get live logs also. Now start your n8n and theHive.</p><p>Now open localhost:5678 for n8n. Create a new workflow. Add webhook and its parameters as given below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*2j0Kkkh1YFtoCGbsJSMRvg.png" /></figure><p>Now let’s create an alert in splunk. Again search the same above query to create alert with that search.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uupm9O9qfnDdbVyA0cl_eA.png" /></figure><p>Select the above fields.</p><p>Now save it as alert. Add the parameters as given</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*zrYPIkzazib-mTKut08Wlg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*63FL1RkSqEh8BBUvkciVOQ.png" /></figure><p>In add action select webhook. Now paste the webhook url here just change the localhost to the device IP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*-r-sop-QLuse8KHOUI_lEA.png" /></figure><p>Save it.</p><p>Start webhook and start pinging with snort running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0GIPKc2Seh9GAvr4HWvB5A.png" /></figure><p>We have captured the alert. Now after this add an edit field.</p><p>Fields to Set</p><p>host={{ $json.headers.host }}</p><p>timestamp =</p><p>{{ $json.body.result.date_mday }}{{ $json.body.result.date_month }}{{ $json.body.result.date_year }} — {{ $json.body.result.date_hour }}:{{ $json.body.result.date_minute }}:{{ $json.body.result.date_second }}</p><p>title={{ $json.body.search_name }}</p><p>Message={{ $json.body.result._raw }}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*F1a7PIcPGiQ1SI-mmtPsbQ.png" /></figure><p>Now our src and dest_ip is in message which cannot be directly extracted. So now add a new node named function. Now this should be in javascript.</p><p>Add this code inside the node:</p><p>const log = $input.first().json.message</p><p>const match = log.match(/(\d+\.\d+\.\d+\.\d+)\s+-&gt;\s+(\d+\.\d+\.\d+\.\d+)/);</p><p>return [{<br> src_ip: match ? match[1] : null,<br> dest_ip:103.224.182.246,<br>}]</p><p>Now this extracts both src_ip and dest_ip. It differentiates both of them based on their positions around the arrow. Now here we have manually added our Malicious IP so that we can get malious tag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ku258HArBL0_zz2XrgkSNw.png" /></figure><p>Now add a merge field as we need the entire details not only the src_ip and dest_ip.</p><p>Add the parameters as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KMNncwgTO4AeG3lhZHSRCw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZFMTVZSAOmuGwqkBNxFLsQ.png" /></figure><p>Let’s add http request node for virustotal enrichment. Add the details as below. In value of x-apikey add the api.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ac9nIM32g46lazBAIXti7A.png" /></figure><p>Now add if field to add condition for malicious IPs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lt132QqXqkrjHIbMpwUQrQ.png" /></figure><p>Now let’s add one more merge to combine data of if field and our first merge field. keep the parameters as the same as our first merge field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8MzivrVefPhYgonRd1Nacw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K1q9AmV75hPWUJuKRZL7qw.png" /></figure><p>Now add another http request for theHive integration. Add the below parameters. After bearer add your api key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sXAi2-ZMhcLzWjkFjtEYcA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*YCdm5Mnlqkls2CEIBOgajg.png" /></figure><p>Now the JSON content:</p><p>{<br> “title”: “Malicious Kali Ping Detected from {{ $json.dest_ip }}”,<br> “description”: “Snort detected a malicious ICMP ping activity.\n\nSource IP: {{ $json.src_ip }}\nDestination IP: {{ $json.dest_ip }}\n”,<br> “severity”: 2,<br> “startDate”: 1771872874000,<br> “tlp”: 2,<br> “pap”: 2,<br> “tags”: [<br> “snort”,<br> “icmp”,<br> “automated_case”<br> ],<br> “flag”: false<br>}g”: false<br>}</p><p>Now run it check theHive dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dVaENroar5MR92GKAFce7w.png" /></figure><p>So like this we have created the workflow. To enable automation let’s publish it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SHdASos2quwR6nL7vo7fsg.png" /></figure><p>Let’s start pinging and see the executions. Now we need to change the test url to production url.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*TIQDHFjePGgvLTGM-Tzrdg.png" /></figure><p>Before that change the greater than value for fast alerts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*Bg7eZN1yUk5XTVerf2CUhQ.png" /></figure><p>Save it. Now start the ping.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lgy_h6ABhDizJv_qLKWcpQ.png" /></figure><p>Record the last time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lCFZV5Gg8GGuTWO28tzzCA.png" /></figure><p>The latest execution after starting the ping.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U_Zlx9foyjNRhwrgvehZOA.png" /></figure><p>TheHive case dashboard. So we have achieved automation using snort, splunk, thehive and n8n.</p><p>In this lab, we successfully built a fully automated SOC workflow integrating Snort, Splunk, n8n, TheHive, and enrichment using VirusTotal.</p><p>We began by configuring Snort to detect malicious ICMP traffic and generate alerts. These alerts were forwarded to Splunk for centralized monitoring and real-time alerting. Using Splunk’s webhook functionality, alert data was automatically sent to n8n, where we extracted important fields such as source and destination IP addresses.</p><p>Before creating the case, we enriched the suspicious IP using VirusTotal’s API to gather threat intelligence data such as reputation, certificate details, network range, and registry information. This enrichment step added valuable context to the alert, enabling better investigation and faster decision-making.</p><p>Finally, n8n formatted the structured and enriched data and automatically created a case in TheHive via its API.</p><p>This end-to-end automation demonstrates how raw network alerts can be transformed into fully enriched, actionable incident cases with minimal manual effort. By integrating detection, analysis, enrichment, and case management, we significantly improved response efficiency, visibility, and overall SOC maturity.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd9d821cc14b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configuring Snort , creating rule and getting an alert.]]></title>
            <link>https://medium.com/@aaditnair2108/configuring-snort-creating-rule-and-getting-an-alert-0631935a1141?source=rss-d4b530769755------2</link>
            <guid isPermaLink="false">https://medium.com/p/0631935a1141</guid>
            <category><![CDATA[alert-based-on-rule]]></category>
            <category><![CDATA[snort]]></category>
            <category><![CDATA[id]]></category>
            <dc:creator><![CDATA[Aadit Nair]]></dc:creator>
            <pubDate>Mon, 23 Feb 2026 19:26:48 GMT</pubDate>
            <atom:updated>2026-02-23T19:26:48.959Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction to Snort</h3><p>Snort is an open-source Network Intrusion Detection and Prevention System (IDS/IPS) used to monitor and analyze network traffic in real time. It inspects incoming and outgoing packets and detects malicious activities such as port scans, brute-force attempts, malware communication, and exploit-based attacks.</p><p>Developed by Martin Roesch in 1998, Snort uses a powerful rule-based detection engine. Security teams can write custom rules to identify specific attack patterns or use community-provided rule sets to protect their networks.</p><p>Snort operates in three primary modes:</p><ul><li><strong>Sniffer Mode</strong> — Captures and displays network packets.</li><li><strong>Packet Logger Mode</strong> — Logs network traffic for analysis.</li><li><strong>Network Intrusion Detection Mode</strong> — Detects and alerts on suspicious activity.</li></ul><p>Due to its flexibility, lightweight architecture, and strong community support, Snort remains one of the most widely used IDS tools in cybersecurity environments today.</p><p>Let’s start by installing snort from its exe file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*kjXLnNalpBxv7JCbHxre5A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*IFhoi0QMvxSG5wZKfHDWEQ.png" /></figure><p>Now npcap is a pre-requisite for this ids. I have already installed it.</p><p>Now go to folder where Snort is installed. Default location is C:/Snort.</p><p>Now go to etc folder and open the snort.conf in any text editor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tQ37l8a5j9S-GUbI64KtUQ.png" /></figure><p>Now if we go to line no 44 and 45 we can see that our home net is mentioned as any. Change it to your IP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*5cUQR_rzBPVsX1tLl-3lSw.png" /></figure><p>Now after that our external IPs are also added as any. But we need it every except our home net IP. So instead of any add !$HOME_NET</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*18MkYqClk2TLxKEgYZrKrA.png" /></figure><p>Now go to 247 and 250 add their real path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*Oyw4R6zisuccCMbFC58_Ug.png" /></figure><p>Here the default is their linux path we have to change that to windows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*y3nqOuuVe3fyHhVxmJk9nQ.png" /></figure><p>This is the windows path. Now the main thing to take care is when we copy the path directly then we have to convert the backslash to forward slash. Comment the dynamicdetection line for now.</p><p>Also comment line no 113 and 114 as we are not adding blacklist and whitelist ip rules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*3y2jnm3wG7to39t1mHutDA.png" /></figure><p>Now go to line no 510. Remove both blacklist and whitelist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*vXv1qzo9vOjFbMP66tIR9Q.png" /></figure><p>Before we proceed go to rules folder and add local.rules file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*Ss5vyJgWFcZsS8Ru0iUcxA.png" /></figure><p>Copy its path. Add it in the local rules path in line 543.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*erkyCC7UXOuG81Sm_8LsdA.png" /></figure><p>Comment every other rules file. From 545 to 648.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UoQwxPoamZz1bOOzqvxi7Q.png" /></figure><p>Now create an alert.ids file in /log directory. Add that path in 186.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*WG6yPCsGZB5B32Hqv_GzXw.png" /></figure><p>Now start Snort using the command snort -c C:\Snort\etc\snort.conf -i 5</p><p>here i 5 is interface no 5. Before selecting your interface check it using snort.exe -W. This will display every interface of the device. Choose your interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-wmo239Bq7f-WyQuX-zxaw.png" /></figure><p>So we have successfully started our snort. Now stop it using Ctrl + c. Go to local rules and create a malicious IP ping. Use any other IP. Here I am gonna use my kali linux IP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*vUCMgaA8bkU6gAldt6d03Q.png" /></figure><p>Let’s create rule.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t1VQrBUC2dTSphsgCAM2ng.png" /></figure><p>Save it and start the snort.</p><p>Now start the ping</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*yxyrfl4gbLj1ScCmvv_JoA.png" /></figure><p>Check the alert.ids</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l7rmyc4YtytM-fsox0IxzA.png" /></figure><p>In this lab, we successfully configured Snort on a Windows system by modifying the snort.conf file, setting the correct HOME_NET and EXTERNAL_NET variables, updating file paths from Linux format to Windows format, and disabling unnecessary rule files for a cleaner testing environment.</p><p>We then created a custom rule inside the local.rules file to detect ICMP (ping) traffic from a specific malicious IP address. After running Snort with the appropriate network interface, we generated traffic from a test machine and verified that Snort successfully detected the activity and logged the alert in the alert/ids file.</p><p>This practical demonstration shows how Snort:</p><ul><li>Monitors real-time network traffic</li><li>Uses rule-based detection to identify suspicious activity</li><li>Generates alerts based on custom-defined security policies</li></ul><p>Through this exercise, we confirmed that Snort is an effective and flexible IDS tool that allows security analysts to simulate attacks, create detection rules, and monitor network events efficiently. This foundational setup can now be extended to detect more advanced threats, integrate with SIEM solutions, and strengthen overall network security monitoring.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0631935a1141" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 1: Extracting and Parsing Wazuh Alerts Using Python]]></title>
            <link>https://medium.com/@aaditnair2108/day-1-extracting-and-parsing-wazuh-alerts-using-python-31c06ce60b42?source=rss-d4b530769755------2</link>
            <guid isPermaLink="false">https://medium.com/p/31c06ce60b42</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[wazuh-alert]]></category>
            <category><![CDATA[wazuh-api]]></category>
            <dc:creator><![CDATA[Aadit Nair]]></dc:creator>
            <pubDate>Sun, 22 Feb 2026 21:26:04 GMT</pubDate>
            <atom:updated>2026-02-22T21:26:04.200Z</atom:updated>
            <content:encoded><![CDATA[<p>Today I will begin working on the foundation of my Unified Multi-SIEM SOC Dashboard project. The first step will be to connect to the Wazuh API and learn how to fetch security alerts programmatically.</p><p>Instead of manually viewing alerts in the Wazuh dashboard, I will explore how API authentication works, how to generate a token, and how to retrieve alert data using REST endpoints. This is an important step because centralized monitoring requires automated alert collection.</p><p>Today’s focus will be on understanding:</p><ul><li>How Wazuh API authentication works</li><li>How alerts are structured in JSON format</li><li>How to fetch latest alerts</li></ul><p>This will mark the beginning of building a centralized alert aggregation system.</p><p>Let’s start by checking wazuh-api access. Wazuh api runs on Wazuh-manager (port 55000).</p><p>Check the api by command: curl -k https://&lt;WAZUH_SERVER_IP&gt;:55000</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GjfskHGkP9r73pTVoCc53Q.png" /></figure><p>Now as we have never generated our authentication token we are going to need to generate the token.</p><p>Command: TOKEN=$(curl -u wazuh : wazuh -k -X POST “<a href="https://192.168.56.102:55000/security/user/authenticate?raw=true">https://&lt;server IP&gt;:55000/security/user/authenticate?raw=true</a>&quot;)</p><p>Replace the wazuh : wazuh with your username : password.</p><p>But I am going to use the default user here. Use echo $TOKEN to display the token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p75xnkW-ZUWaX5-E6akVog.png" /></figure><p>So I got my token here. Now let’s verify it is working or not. command: curl -k -X GET “<a href="https://192.168.56.102:55000/?pretty=true">https://192.168.56.102:55000/?pretty=true</a>&quot; -H “Authorization: Bearer $TOKEN”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*81KrAG0eL1uE5pTwm7O-Mg.png" /></figure><p>Now let’s try to get any endpoint data. Like let’s get agent data which is active.</p><p>Command: curl -k -X GET -H “Authorization: Bearer $TOKEN” “<a href="https://192.168.56.102:55000/agents?status=active&amp;pretty=true">https://192.168.56.102:55000/agents?status=active&amp;pretty=true</a>&quot;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3lVyY8nfaI1d2w-tCK3znQ.png" /></figure><p>Now there might come an issue where the token would get expired after 15 minutes so let’s reconfigure it to 24 hours which is 86400 seconds. Now in the time validity of api token is measured in seconds that is why we are going to use seconds here. Commands: curl -k -X PUT \<br>-H “Authorization: Bearer $TOKEN” \<br>-H “Content-Type: application/json” \<br>“<a href="https://192.168.56.102:55000/security/config">https://&lt;Server_IP&gt;:55000/security/config</a>&quot; \<br>-d ‘{“auth_token_exp_timeout”: 86400}’</p><p>Now let’s check the time validity of our token. Command: curl -k -H “Authorization: Bearer $TOKEN” \<br>“<a href="https://192.168.56.102:55000/security/config?pretty=true">https://&lt;server_ip&gt;:55000/security/config?pretty=true</a>&quot;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3LaZw0cdZHrfLyTvDYLhpQ.png" /></figure><p>There might be chances that your old token got expired so create a new fresh token to get the expected results.</p><p>Now when I searched for the alerts, I was not able to find them as it is saved in entirely different port. Now this is because the alerts are not stored in wazuh-manager or server. It is stored in wazuh-indexer and the port we are using is only for wazuh-manager. So to access the alerts we will be using port number 9200 which is used for OpenSearch.</p><p>Command: curl -k -u admin : admin https://localhost:9200</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*LiOopU26sjh1qMH6lozrMA.png" /></figure><p>Now let’s get the last 5 alerts generated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3hb-2MdU-FodA-vIK8VrxQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wCDvNMX5K6RdYfigI_sN5Q.png" /></figure><p>Now it some privilege access failed. Let’s check in wazuh web-gui.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M_Br7erZ_eFT1z0zdLYA4g.png" /></figure><p>So by this we can confirm that alerts can viewed from here. Now let’s create a python script by which we can access these alerts.</p><pre>import requests<br>import json<br>import urllib3<br>from datetime import datetime<br>import pytz<br><br># Disable SSL warnings<br>urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)<br><br># ===== CONFIGURATION =====<br>INDEXER_URL = &quot;https://&lt;server_ip&gt;:9200&quot;<br>INDEX = &quot;wazuh-alerts-*&quot;<br>USERNAME = &quot;admin&quot;<br>PASSWORD = &quot;admin&quot;<br><br># ===== USER INPUT =====<br>try:<br>    n = int(input(&quot;Enter number of latest alerts to fetch: &quot;))<br>except ValueError:<br>    print(&quot;Please enter a valid integer.&quot;)<br>    exit()<br><br># ===== QUERY BODY =====<br>query = {<br>    &quot;size&quot;: n,<br>    &quot;sort&quot;: [<br>        {&quot;@timestamp&quot;: {&quot;order&quot;: &quot;desc&quot;}}<br>    ]<br>}<br><br><br><br>try:<br>    response = requests.post(<br>        f&quot;{INDEXER_URL}/{INDEX}/_search&quot;,<br>        auth=(USERNAME, PASSWORD),<br>        headers={&quot;Content-Type&quot;: &quot;application/json&quot;},<br>        json=query,<br>        verify=False<br>    )<br><br>    response.raise_for_status()<br>    data = response.json()<br><br>    hits = data.get(&quot;hits&quot;, {}).get(&quot;hits&quot;, [])<br><br>    print(&quot;\n===== Latest Alerts =====\n&quot;)<br><br>    for i, hit in enumerate(hits, start=1):<br>        source = hit.get(&quot;_source&quot;, {})<br><br>        # --- Timestamp Conversion ---<br>        timestamp_raw = source.get(&quot;@timestamp&quot;, None)<br>        if timestamp_raw:<br>            dt_utc = datetime.strptime(timestamp_raw, &quot;%Y-%m-%dT%H:%M:%S.%fZ&quot;)<br>            dt_utc = dt_utc.replace(tzinfo=pytz.UTC)<br>            ist = pytz.timezone(&quot;Asia/Kolkata&quot;)<br>            dt_local = dt_utc.astimezone(ist)<br>            formatted_timestamp = dt_local.strftime(&quot;%b %d, %Y @ %H:%M:%S.%f&quot;)[:-3]<br>        else:<br>            formatted_timestamp = &quot;N/A&quot;<br><br>        agent = source.get(&quot;agent&quot;, {})<br>        rule = source.get(&quot;rule&quot;, {})<br>        process = source.get(&quot;process&quot;, {})<br><br>        print(f&quot;\n========== Alert #{i} ==========&quot;)<br>        print(f&quot;Timestamp       : {formatted_timestamp}&quot;)<br>        print(f&quot;Agent Name      : {agent.get(&#39;name&#39;, &#39;N/A&#39;)}&quot;)<br>        print(f&quot;Agent ID        : {agent.get(&#39;id&#39;, &#39;N/A&#39;)}&quot;)<br>        print(f&quot;Agent IP        : {agent.get(&#39;ip&#39;, &#39;N/A&#39;)}&quot;)<br><br>        print(f&quot;\n--- Rule Information ---&quot;)<br>        print(f&quot;Rule ID         : {rule.get(&#39;id&#39;, &#39;N/A&#39;)}&quot;)<br>        print(f&quot;Rule Level      : {rule.get(&#39;level&#39;, &#39;N/A&#39;)}&quot;)<br>        print(f&quot;Rule Description: {rule.get(&#39;description&#39;, &#39;N/A&#39;)}&quot;)<br>        print(f&quot;Rule Groups     : {&#39;, &#39;.join(rule.get(&#39;groups&#39;, [])) if rule.get(&#39;groups&#39;) else &#39;N/A&#39;}&quot;)<br><br>        mitre = rule.get(&quot;mitre&quot;, {})<br>        if mitre:<br>            print(f&quot;MITRE IDs       : {&#39;, &#39;.join(mitre.get(&#39;id&#39;, []))}&quot;)<br><br>        print(f&quot;\n--- Process Information ---&quot;)<br>        print(f&quot;Process Name    : {process.get(&#39;name&#39;, &#39;N/A&#39;)}&quot;)<br>        print(f&quot;Process PID     : {process.get(&#39;pid&#39;, &#39;N/A&#39;)}&quot;)<br><br>        win_eventdata = source.get(&quot;data&quot;, {}).get(&quot;win&quot;, {}).get(&quot;eventdata&quot;, {})<br>        print(f&quot;Process Name (Win)   : {win_eventdata.get(&#39;processName&#39;, &#39;N/A&#39;)}&quot;)<br><br>        print(f&quot;\n--- Network Information ---&quot;)<br>        print(f&quot;Source IP       : {source.get(&#39;srcip&#39;, &#39;N/A&#39;)}&quot;)<br>        print(f&quot;Destination IP  : {source.get(&#39;dstip&#39;, &#39;N/A&#39;)}&quot;)<br><br>        print(f&quot;\n--- User Information ---&quot;)<br>        print(f&quot;User            : {source.get(&#39;user&#39;, &#39;N/A&#39;)}&quot;)<br><br>        # Windows event ID (if exists)<br>        win_data = source.get(&quot;data&quot;, {}).get(&quot;win&quot;, {}).get(&quot;system&quot;, {})<br>        if win_data:<br>            print(f&quot;Windows Event ID: {win_data.get(&#39;eventID&#39;, &#39;N/A&#39;)}&quot;)<br><br>        print(&quot;\n--- Full Log ---&quot;)<br>        print(source.get(&quot;full_log&quot;, &quot;N/A&quot;))<br><br>        print(&quot;\n&quot; + &quot;=&quot; * 60)<br><br>except requests.exceptions.RequestException as e:<br>    print(&quot;Error connecting to Wazuh Indexer:&quot;)<br>    print(e)</pre><p>Now here you will be asked to how many alerts are needed to be displayed.</p><p>Give it an number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7oGn4a1h5Zb64zY6bS7lXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_WGElkAVyiP-B9oN21LOyA.png" /></figure><p>Now verify it with wazuh-alerts in gui.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UUCt-8K2ZLxSuP5sLkcUgQ.png" /></figure><p>Yes, it matches. Today’s work laid the foundation for automated alert aggregation. By extracting and parsing alerts from Wazuh Indexer, I took the first step toward building a centralized multi-SIEM monitoring platform.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31c06ce60b42" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[N8N bruteforce workflow.]]></title>
            <link>https://medium.com/@aaditnair2108/n8n-bruteforce-workflow-5dcac67816ad?source=rss-d4b530769755------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dcac67816ad</guid>
            <category><![CDATA[soc-lab]]></category>
            <category><![CDATA[the-hive]]></category>
            <category><![CDATA[n8n-workflow]]></category>
            <category><![CDATA[wazuh]]></category>
            <category><![CDATA[bruteforce-attack]]></category>
            <dc:creator><![CDATA[Aadit Nair]]></dc:creator>
            <pubDate>Thu, 19 Feb 2026 00:09:00 GMT</pubDate>
            <atom:updated>2026-02-19T00:09:00.276Z</atom:updated>
            <content:encoded><![CDATA[<p>Here I performed bruteforce on kali linux using windows. So let’s start</p><p>Ensure kali linux have an agent installed already and ssh. Now let’s go to ossec.conf to add auth.log which tracks every authentication logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*o5iHT2e6OsGf6un69tpK5A.png" /></figure><p>Now restart the wazuh agent.</p><p>Now let’s check the IP of kali</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*8x2o0uyOrrun-op1HviozQ.png" /></figure><p>I am gonna use the ip marked above. Now go to the host windows and open powershell. Write the command: ssh &lt;kali_username&gt;:&lt;kali_ip&gt;. After that it will ask for password, do not add the correct password.</p><p>Now let’s check the log</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*34l3a4-5rR5dI1kAMsjg4A.png" /></figure><p>Now let’s start our n8n.</p><p>Create a new workflow and add the webhook.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aBfM6yTcbrE5YzJAsPGqbg.png" /></figure><p>Copy the webhook url and add it ossec.conf of the wazuh-server to forward the alerts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*pp-jB89mK_WiB1SsqbD6Iw.png" /></figure><p>Now remember this that we would have to ensure that this wazuh alert is recieved. So now restart the manager. Now run the ssh commands 7–9 times. Now let’s open our webhook.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Qg6LZWc6iBZvauQAhNSUw.png" /></figure><p>Now we also need to ensure that no other log is forwarded. So for that let’s put an if condition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*mefjmMwdj6c48dtMuYOYpA.png" /></figure><p>Let’s keep firedtimes should be more than 5 and the rule id should be particular.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Stp9wI-1HP8-N97GlM6J3g.png" /></figure><p>Now let’s add a merge field to merge input of the if field and webhook.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*Y7P-3lKQVgCeinurHuGk0w.png" /></figure><p>We are combining the output of both fields and if both outputs are present only then it will move forward.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JDJUv8ftYO4WVrsyawzSYg.png" /></figure><p>Now add an edit field to filter out the required fields.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*rEV8d0dmFXw86cccwo-sVg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*avjAwR0vmkxt2q57pzhztA.png" /></figure><p>Drag and drop these fields in the edit field. These fields are going to be used in email and case creation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vL6NAmeX0es6fPQ8WYlLEg.png" /></figure><p>Now the end of edit field should be in both mail and http request for thehive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*88gzTgei883afvBlZVQHlQ.png" /></figure><p>Subject: 🚨 Multiple Authentication Failures Detected — {{ $json[‘Victim IP’] }}</p><p>Body: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset=”UTF-8&quot;&gt; &lt;title&gt;Security Alert&lt;/title&gt; &lt;/head&gt; &lt;body style=”margin:0; padding:0; font-family: Arial, sans-serif; background-color:#f4f6f9;”&gt; &lt;table width=”100%” cellpadding=”0&quot; cellspacing=”0&quot; style=”background-color:#f4f6f9; padding:20px;”&gt; &lt;tr&gt; &lt;td align=”center”&gt; &lt;table width=”600&quot; cellpadding=”0&quot; cellspacing=”0&quot; style=”background:#ffffff; border-radius:8px; overflow:hidden; box-shadow:0 4px 10px rgba(0,0,0,0.1);”&gt; &lt;! — Header → &lt;tr&gt; &lt;td style=”background:#d32f2f; padding:20px; text-align:center; color:#ffffff;”&gt; &lt;h2 style=”margin:0;”&gt;🚨 Security Alert&lt;/h2&gt; &lt;p style=”margin:5px 0 0 0;”&gt;Multiple Authentication Failures Detected&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;! — Body → &lt;tr&gt; &lt;td style=”padding:25px; color:#333333;”&gt; &lt;p&gt;Hello Team,&lt;/p&gt; &lt;p&gt; The monitoring system has detected repeated authentication failures that may indicate a potential brute-force attempt. &lt;/p&gt; &lt;table width=”100%” cellpadding=”8&quot; cellspacing=”0&quot; style=”border-collapse:collapse; margin-top:15px;”&gt; &lt;tr style=”background:#f0f2f5;”&gt; &lt;td&gt;&lt;strong&gt;Alert Title&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;unix_chkpwd: Password check failed&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;Rule ID&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;{{ $json.ID }}&lt;/td&gt; &lt;/tr&gt; &lt;tr style=”background:#f0f2f5;”&gt; &lt;td&gt;&lt;strong&gt;Severity&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;{{ $json.severity }}&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;Failed Attempts&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;{{ $json.firedtimes }}&lt;/td&gt; &lt;/tr&gt; &lt;tr style=”background:#f0f2f5;”&gt; &lt;td&gt;&lt;strong&gt;Username&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;{{ $json.src_username }}&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;Victim IP&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;{{ $json[‘Victim IP’] }}&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;h4 style=”margin-top:25px;”&gt;Recommended Actions:&lt;/h4&gt; &lt;ul&gt; &lt;li&gt;Verify whether login attempts were legitimate.&lt;/li&gt; &lt;li&gt;Review authentication logs for source IP address.&lt;/li&gt; &lt;li&gt;Consider temporary account lockout if attempts continue.&lt;/li&gt; &lt;li&gt;Monitor system for further suspicious activity.&lt;/li&gt; &lt;/ul&gt; &lt;p style=”margin-top:25px;”&gt; This alert was automatically generated by the SOC monitoring system. &lt;/p&gt; &lt;p style=”margin-top:30px;”&gt; Regards,&lt;br&gt; &lt;strong&gt;Security Operations Center (SOC)&lt;/strong&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;! — Footer → &lt;tr&gt; &lt;td style=”background:#eeeeee; padding:15px; text-align:center; font-size:12px; color:#666666;”&gt; Automated Security Notification | Do Not Reply &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/body&gt; &lt;/html&gt;</p><p>Now for this to work the body should be in HTML mode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y4Be7TzuexoUtkNwlnjPHA.png" /></figure><p>Check the mail’s inbox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*B2iIGf68P4EZlnX5GJpr9g.png" /></figure><p>Now let’s add the http request field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QVCkQ6B6Kifm3TZTwTAylg.png" /></figure><p>Now add as the below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KDm8HzvIv9EbL_I6aYt_MA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*2hfnTNoy085jeMCFOhh67A.png" /></figure><p>JSON body:</p><p>{<br> “title”: “Multiple Authentication Failures — {{$json[‘Victim IP’]}}”,<br> “description”: “The monitoring system detected repeated authentication failures that may indicate a brute-force attempt.\n\nAlert Details:\n\n- Alert Title: unix_chkpwd: Password check failed\n- Rule ID: {{$json.ID}}\n- Severity: {{$json.severity}}\n- Failed Attempts: {{$json.firedtimes}}\n- Username: {{$json.src_username}}\n- Victim IP: {{$json[‘Victim IP’]}}\n\nThis case was automatically generated by the SOC automation workflow.”,<br> “severity”: {{$json.severity}},<br> “tlp”: 2,<br> “pap”: 2,<br> “status”: “New”,<br> “tags”: [<br> “authentication_failure”,<br> “bruteforce_suspected”,<br> “linux”,<br> “wazuh”,<br> “auto_generated”<br> ],<br> “observables”: [<br> {<br> “dataType”: “ip”,<br> “data”: “{{$json[‘Victim IP’]}}”,<br> “tlp”: 2,<br> “pap”: 2,<br> “message”: “Victim IP involved in authentication failure alert”<br> },<br> {<br> “dataType”: “user-account”,<br> “data”: “{{$json.src_username}}”,<br> “tlp”: 2,<br> “pap”: 2,<br> “message”: “Username targeted during failed authentication attempts”<br> }<br> ]<br>}</p><p>For this to work we need to run it in JSON.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f0JyA2eg3tv2xejoC0rruQ.png" /></figure><p>Open theHive to check if the case has been recieved or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J8tfshiaRBw-taj65nb3yA.png" /></figure><p>So we have successfully created the workflow for bruteforce.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dcac67816ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Alert to Case: Building an Automated SOC Lab with Suricata, Wazuh, n8n, and TheHive]]></title>
            <link>https://medium.com/@aaditnair2108/from-alert-to-case-building-an-automated-soc-lab-with-suricata-wazuh-n8n-and-thehive-bda3dcd09dc5?source=rss-d4b530769755------2</link>
            <guid isPermaLink="false">https://medium.com/p/bda3dcd09dc5</guid>
            <category><![CDATA[n8n-workflow-automation]]></category>
            <category><![CDATA[wazuh-integration]]></category>
            <dc:creator><![CDATA[Aadit Nair]]></dc:creator>
            <pubDate>Tue, 17 Feb 2026 21:31:41 GMT</pubDate>
            <atom:updated>2026-02-17T21:31:41.541Z</atom:updated>
            <content:encoded><![CDATA[<p>Now in last blog we created an workflow which would mail us the alert now this time I would not only mail it but also create a case in TheHive. Here is the flow of the lab</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*hnsNsiSxsSUfCW8XrAN6hQ.png" /></figure><p>So first we need to install theHive in docker. Now this lab may need a lot of resources as we have are running:</p><ol><li>Kali Linux (attacker)</li><li>Wazuh (SIEM)</li><li>Windows Host (Victim)</li><li>Suricata in Windows Endpoint (IDS)</li><li>N8N (SOAR)</li><li>TheHive (Case Creator)</li></ol><p>So minimum memory required to run this entire lab smoothly is 16GB.</p><p>Let’s import the last workflow that we generated during Malicious IP alert automation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gyX6AEQwUWjzPWaEd9MuNw.png" /></figure><p>Now let add the below nodes:</p><ol><li>if node</li><li>merge node</li><li>2 x http node</li></ol><p>So let’s add it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QNmRMe7pDlZjZuUEBBh4SQ.png" /></figure><p>Now from the flow above flowchart let’s connect the nodes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iYrCt5a3lF2B2vJtGwwEZA.png" /></figure><p>Let me explain the workflow.</p><ol><li>Webhook would receive the alerts from wazuh.</li><li>edit field will collect selected data and would forward to both http field and merge field.</li><li>the http field would send the data to virustotal using the apikey of virustotal.</li><li>The if node would create a condition i.e if malicious count is more than 0 then it would send the data to merge field. Else if malicious is 0 then the workflow would end.</li><li>Now the merge field would merge the both the inputs and would send the data to both gmail field and http request field. Now the merge field would only forward the data if it recieves the data from both input.</li><li>The gmail node would select fields from edit field data it recieved and would send an email to the reciever.</li><li>The http request node would send selected data from edit field and would send it to our theHive. Which would then create a case.</li></ol><p>Configure the web request field. Now for this we would need an free virustotal account which would give us an api key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*V_68mX8bUDixJ4mjfJ6KBw.png" /></figure><p>Here in url the malicious IP is used from edit field. In header value add your apikey. The method should be GET.</p><p>Now let’s run it once and see the output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_3XL-VniugMg4esn_baEjQ.png" /></figure><p>Now to run this node we would need data from previous node.</p><p>Now lets configure the if node.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XZc2g8PPZU4TcoJsbHI1lA.png" /></figure><p>From the data we recieved this particular data counts the no of malicious count. Now the condition is if the count &gt; 0. So in our case it has one count.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/254/1*Z-8XlgTobo4ZPJN3NLGYZw.png" /></figure><p>So let’s test this workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*z-VXhyJP85DAnwnZW1dlRg.png" /></figure><p>The line in the input connected to if signals is green that means if condition worked.</p><p>Now let’s configure our Merge field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*o9MhSGIzauoHEihdTQotDQ.png" /></figure><p>This says that it combined the input from both the input fields. Now execute it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*-PM5tyqNg0RkwEaD03boMg.png" /></figure><p>Before configuring the http request let’s setup our newly installed theHive in our docker.</p><p>Start the docker and after some time go to localhost:9000.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bzjs1ChSU4LO-CPWzmZwdg.png" /></figure><p>Now add the credentials (if you are log inning first time and not changed the password):</p><p>username:admin@thehive.local</p><p>password: secret</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3xJTTp4xSAb_dBYsXkq_Qg.png" /></figure><p>Now I have already created an organization so I cannot create another. So we will be asked the Name of organization and a description. Other things should be default.</p><p>Now let’s go in our organization and create users. Click the + button on top left corner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z0sbdHiDzyzfYFDZ642kvA.png" /></figure><p>Now edit the fields like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*GnLXzYzGsHRsxm24MwZg9g.png" /></figure><p>login: &lt;any name&gt;@thehive.local</p><p>Name: &lt;any name&gt;</p><p>Profile: org-admin or analyst.</p><p>If we add the read only role then the user won’t be able to create cases.</p><p>Click the confirm button. Now go to users tab and click the preview button. Now this button will only appear if you hover the mouse pointer over it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fdTMbcEtamzcHGju-1vt0A.png" /></figure><p>Click the set password button to reset our password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*QB6gOEhcDc8lPWfrGurwfg.png" /></figure><p>Now login using the new user credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kVFZKXefRGJ-GTRBAVWXJQ.png" /></figure><p>Now click the profile pic at top right corner. In that go to settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KQ4FVOWpZNojhoiJAZsz2Q.png" /></figure><p>Now from here go to api key. Click the create button. This would create an apikey of the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*--NNmwcpMziGWQrYzeP0mA.png" /></figure><p>Now copy the apikey.</p><p>Now let’s go back to our N8N. Edit the second http request node.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*gGninXBXBOGO--5gvJ81Gw.png" /></figure><p>We need 2 headers first should have the user apikey and the second should be the format of sending data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*zp2tgAa0RDk8Qm-Dyou_5Q.png" /></figure><p>We are also sending the body that contains the data extracted from edit field.</p><p>Body code:</p><p>{<br> “title”: “Malicious IP detected — {{$json[“Malicious IP”]}}”,<br> “description”: “Alert: {{$json[“Alert”]}}\nMalicious IP: {{$json[“Malicious IP”]}}\nSeverity: {{$json[“Severity”]}}”,<br> “severity”: {{$json[“Severity”]}},<br> “startDate”: {{$now.toMillis()}},<br> “tlp”: 2,<br> “pap”: 2,<br> “tags”: [“suricata”, “virustotal”]<br>}</p><p>Now let’s run it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*peO9AJMKQ43hutSSndtB6Q.png" /></figure><p>Now check your theHive dashboard we would see a new case formed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AHTEo6YBNU7CtWILvAohXw.png" /></figure><p>So like that we have created a workflow which would also create a case. Let’s check the mail if the data we got was same only.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*exIoEfVUe6KdH9nFqu90HQ.png" /></figure><p>We have already configured this. Just run it now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OnqSqocz3W6yGWtnvMpTRg.png" /></figure><p>Now check the mail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OQjTeAq7c5_unVRFEsNlqQ.png" /></figure><p>automating this workflow would help to automatically detect and run the entire workflow.</p><p>So first go to ossec.conf and change the webhook-test to webhook in url portion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*NWedNuatKaWDZycJ8c5peA.png" /></figure><p>Now restart the manager.</p><p>Now go to workflow and publish it to automate the workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*EOy8_0bBdVkit1WA0Z2kQA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PYLVUUlzYfWFm5ZK3E2LAA.png" /></figure><p>Go to Executions to see the executions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rz-StTmjmpCPtFiiArydOg.png" /></figure><p>Last execution was on 2:21. So now ping the host.</p><p>Now if we see there is a new execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b3ij3G16WjcdPbED9MFrOQ.png" /></figure><p>Let’s check the case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Crg6svn7zu90gb6l3iQtmw.png" /></figure><p>Let’s check mail</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q3CqS-cIWoXCA90CTOVg7g.png" /></figure><p>Now run the ping again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QqSBFPnAtqGIpuO5QC27SA.png" /></figure><p>Building this automated SOC lab helped me understand how detection, enrichment, and incident response integrate in real-world environments. More importantly, it demonstrated that powerful security workflows can be built entirely with open-source tools. Automation not only reduces manual workload but also ensures faster and more consistent incident handling.</p><p>By transforming alerts into structured cases automatically, this lab simulates a production-grade SOC pipeline — bridging the gap between theoretical knowledge and practical implementation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bda3dcd09dc5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>