<?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 Cenky on Medium]]></title>
        <description><![CDATA[Stories by Cenky on Medium]]></description>
        <link>https://medium.com/@hasancenk453?source=rss-fd4b9e02cf63------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*NzE0xNRJY17LThRt</url>
            <title>Stories by Cenky on Medium</title>
            <link>https://medium.com/@hasancenk453?source=rss-fd4b9e02cf63------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 16:39:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hasancenk453/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[Setting Up Wazuh: Sysmon Integration, FIM, and Active Response]]></title>
            <link>https://hasancenk453.medium.com/setting-up-wazuh-sysmon-integration-fim-and-active-response-17661c4decbe?source=rss-fd4b9e02cf63------2</link>
            <guid isPermaLink="false">https://medium.com/p/17661c4decbe</guid>
            <category><![CDATA[endpoint-security]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[wazuh]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Cenky]]></dc:creator>
            <pubDate>Tue, 01 Sep 2026 19:33:46 GMT</pubDate>
            <atom:updated>2026-09-01T19:33:46.201Z</atom:updated>
            <content:encoded><![CDATA[<p>In this lab, I set up Wazuh to monitor a Windows endpoint and collect Sysmon events for better visibility into system activity. I also configure File Integrity Monitoring to track changes in a test directory and use Active Response to react to repeated failed RDP login attempts. The goal is to bring these features together in a simple environment and see how Wazuh handles detection and response in practice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hlu-zu5Em6nc4qSXx5WA1A.jpeg" /></figure><p>I created a Windows 10 VM for this lab. Since I’ve already covered the step-by-step installation in previous articles, I won’t go into the details. Download links are below.</p><p><a href="https://www.microsoft.com/tr-tr/software-download/windows10ISO">Windows 10 Disk Görüntüsünü indirin (ISO Dosyası)</a></p><p>First, boot up Windows machine and download Sysmon from the official Microsoft page:</p><p><a href="https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon">Sysmon - Sysinternals</a></p><p>Next, to speed up the setup process, download a prebuilt Sysmon configuration file from the link below:</p><p><a href="https://raw.githubusercontent.com/olafhartong/sysmon-modular/refs/heads/master/sysmonconfig.xml">https://raw.githubusercontent.com/olafhartong/sysmon-modular/refs/heads/master/sysmonconfig.xml</a></p><p>Once the files are ready, open PowerShell as an administrator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*ENIvTb4HvoYWbDt3PelZVA.png" /></figure><p>Extract the downloaded sysmon.zip file into a folder and install Sysmon using the configuration file just downloaded. Install it with the following command:</p><pre>.\Sysmon64.exe -i .\sysmonconfig.xml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*McKgICYsZDuisH879IA84w.png" /></figure><p>Now, it’s time to install Wazuh. I will install it on my host machine using Docker.</p><p>Keep in mind that the installation commands might differ depending on your setup. If you are using a different environment, you can easily ask an AI tool to find installation commands for your specific system.</p><p><strong>1. Installing Docker</strong></p><p>sudo pacman -S docker docker-compose git</p><p><strong>2. Enabling and Starting Docker</strong></p><p>sudo systemctl enable --now docker</p><p><strong>3. Downloading Wazuh</strong></p><p>git clone https://github.com/wazuh/wazuh-docker.git -b v4.14.7</p><p>cd wazuh-docker/single-node</p><p><strong>4. Configuring Virtual Memory</strong><br>For the Wazuh Indexer to run properly, increase the virtual memory map count with the following commands:</p><p>sudo sysctl -w vm.max_map_count=262144</p><p>echo &#39;vm.max_map_count=262144&#39; | sudo tee /etc/sysctl.d/99-wazuh.conf</p><p><strong>5. Generating Wazuh Certificates</strong></p><p>This step generates the required certificates for the Wazuh Indexer, Dashboard, Manager, and Filebeat to communicate securely.</p><p>docker compose -f generate-indexer-certs.yml run --rm generator</p><p><strong>6. Starting the Wazuh Containers</strong></p><p>docker compose up -d</p><p>With the default settings on my host machine, We can<strong> </strong>access the Wazuh web interface at <a href="https://localhost/">https://localhost</a>. This means Wazuh serves on port 443 by default.</p><p>When you install it using Docker, the default dashboard credentials are as follows. However, keep in mind that the username and password might differ depending on your installation method or the Wazuh version you are using.</p><p>Username: admin</p><p>Password: SecretPassword</p><p>At this stage, if there are no issues with the network settings, our Windows machine should be able to communicate with the Wazuh Docker instance running on our host machine. The exact IP address you use to connect will vary depending on the network configuration you chose when setting up your virtual machine.</p><p>In my case, the Windows machine has the IP address 192.168.122.131. On my host computer, I can see the following virbr0 network configuration:</p><pre>virbr0: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500<br>        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255<br>        ether 52:54:00:eb:59:8b  txqueuelen 1000  (Ethernet)<br>        RX packets 107572  bytes 11426038 (10.8 MiB)<br>        RX errors 0  dropped 0  overruns 0  frame 0<br>        TX packets 569680  bytes 1832730523 (1.7 GiB)<br>        TX errors 0  dropped 77 overruns 0  carrier 0  collisions 0</pre><p>Based on this setup, I can successfully connect to the Wazuh interface from my Virtual Windows machine by navigating to https://192.168.122.1 in the browser.</p><p>Now, let’s configure Wazuh. First, log in to the dashboard. Once logged in, look for the “Deploy new agent” button on the main screen. In the version I am using, it was located in the top left corner, but its exact position might vary depending on your version. Click that button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*upHOD6dJeiyL_cA3Llp-Ag.png" /></figure><p>Since I am going to monitor the Windows machine, select the Windows option. For the server address, enter the same IP address we used earlier to access the Wazuh interface from the Windows computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QNgWn062NNflWJ8DOnb5ug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*vtQWnWKLgUulzgslE2k_Xw.png" /></figure><p>You can leave the rest of the settings as they are. Next, Wazuh will generate an installation script. We need to run this script on our Windows machine. Before doing that, make sure you are using an up-to-date PowerShell and running it with Administrator privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xOpJDaf6lcUP3TAs3Mlksw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rxYGclLdC_jxjjgcZK8HKw.png" /></figure><p>After running the installation script, start the Wazuh service by executing the NET START Wazuh command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IklcrV-H785MXh52OR4E1A.png" /></figure><p>After waiting a few moments, I can see my Windows machine successfully connected in the Wazuh dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9GdgFow1-g1iSU5KALl-qA.png" /></figure><h3>Forwarding Sysmon Events to Wazuh</h3><p>When you install the Wazuh agent on Windows, it creates a local configuration file named ossec.conf (C:\Program Files (x86)\ossec-agent\ossec.conf). The agent uses this file to determine things like which Wazuh Manager to connect to when it starts, which logs to send, which files and registry keys to monitor, and how often to run scans.</p><p>To collect Sysmon logs, open this file, find the &lt;!-- Log analysis --&gt; section, and add the following lines right below it:</p><pre>&lt;localfile&gt;<br>    &lt;location&gt;Microsoft-Windows-Sysmon/Operational&lt;/location&gt;<br>    &lt;log_format&gt;eventchannel&lt;/log_format&gt;<br>  &lt;/localfile&gt;</pre><p>After saving the file, restart the Wazuh agent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*K2eg4BVWKh7KFtR4W9NHVA.png" /></figure><p>We are now successfully collecting Sysmon logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*tSwwTP2qHpkYsDRiluMHsw.png" /></figure><p>To test this and manually generate some Sysmon logs, I am going to run a few example commands on the Windows machine.</p><pre>net user guest /active:yes <br># (Activates the built-in guest account)</pre><pre>net user guest guestPasswd <br># (Sets the password for the guest account to &quot;guestPasswd&quot;)</pre><pre>net user test1 test1Passwd /add <br># (Creates a new user named &quot;test1&quot; with the password &quot;test1Passwd&quot;)</pre><pre>net localgroup administrators test1 /add <br># (Adds the &quot;test1&quot; user to the administrators group)</pre><pre>net localgroup administrators <br># (Lists all the users currently in the administrators group)</pre><pre>net user test1 /delete <br># (Deletes the &quot;test1&quot; user)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ov6pTGRa1qjjphXdZsZ5w.png" /></figure><p>Now, when we check the logs in the Wazuh dashboard, we can see the events generated by the commands we just executed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-8yOezJI1wIYbgkb819wLg.png" /></figure><h3>Tracking File Changes with FIM</h3><p><strong>File Integrity Monitoring (FIM)</strong> is a security mechanism that continuously watches your system’s files for any changes. It works by comparing the current state of your files. This allows you to instantly detect malicious activities, such as malware installations, backdoor creations, or tampered configuration settings.</p><p>To enable File Integrity Monitoring (FIM), we need to edit the ossec.conf file we worked on earlier. Just like before, run Notepad as an Administrator and open the configuration file.</p><p>For this example, I created a test folder on my desktop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*WprgyOxueomw3cg-HOLfCg.png" /></figure><p>To track any changes made inside this folder, we need to add its path to the configuration file. Find the following line in your ossec.conf file:<br> &lt;directories realtime=&quot;yes&quot;&gt;%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\Startup&lt;/directories&gt;</p><p>Right below that line, add your custom folder path like this:</p><p>&lt;directories realtime=&quot;yes&quot;&gt;C:\Users\Cenk\Desktop\Secret Directory&lt;/directories&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*3M3hOvaJePma6mr62RMMhw.png" /></figure><p>After saving the changes, restart the Wazuh Agent on your Windows machine. Once the agent is back up and running, I made a quick modification to a file inside that test folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*13S_CPMvXLswRhSLLr5o6A.png" /></figure><p>Now, if we head over to the Wazuh Dashboard and check the File Integrity Monitoring section for the Windows machine, we should be able to see the log recording that exact change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p2s6XJa0yaMPp21hqBVVfA.png" /></figure><h3>Active Response</h3><p>At this stage, first enable the Remote Desktop feature on Windows and restart the machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*BiRGn5P_FnuWBTFjR5gSwQ.png" /></figure><p>Once it reboots, we can successfully connect to the Windows machine using Remmina.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*lw5l4BCMcw00LT8_S5CWwA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oG08kOZLqMlxJolQO0wiOA.png" /></figure><p>If we search for this action in the Wazuh dashboard, we can see the connection logs recorded there as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hxb0P_h7tIM6N-i81hh6Sg.png" /></figure><p>Next, I will intentionally try to connect to the Windows account using an incorrect password to generate a failed login event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*pZo-OEN3yHF1WrPqK0ybkg.png" /></figure><p>To create a custom rule for this scenario, first we need to open the following configuration file:</p><p>/wazuh-docker/single-node/config/wazuh_cluster/wazuh_manager.conf</p><p>In this file, remove the comment tags around the active-response block to enable it, and write the information for the rule I&#39;ll create in the next step here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jf1We_4S61n6xzvj30Pb0g.png" /></figure><p>After updating the configuration file, go back to the Wazuh web interface to add our custom rule.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/323/1*Ofa3feUx6xsjVCZwYtF-zw.png" /></figure><p>I define the rule as shown below to detect brute force attempts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XulfRuoaN4vCuRuxT9qCUQ.png" /></figure><p>Now, to test it, I intentionally make 3 failed login attempts. Exactly as expected, the custom rule we just created gets triggered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*DWErL6xNvqb5hc-A5fGFmg.png" /></figure><p>Furthermore, because we activated the firewall response in our configuration, Wazuh automatically blocked and banned our IP address to stop the simulated attack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zbeNHF-qH1AQ3Xd82Y1R6g.png" /></figure><p>With this setup, Wazuh can collect Sysmon events, monitor file changes, and automatically respond to selected security events. This lab provides a simple example of how monitoring, detection, and response can work together on a Windows endpoint. From here, the configuration can be expanded with additional rules and response actions for more advanced use cases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17661c4decbe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Practical Linux Hardening With Yocto]]></title>
            <link>https://hasancenk453.medium.com/practical-linux-hardening-with-yocto-9f82f2a6c56c?source=rss-fd4b9e02cf63------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f82f2a6c56c</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[apparmor]]></category>
            <dc:creator><![CDATA[Cenky]]></dc:creator>
            <pubDate>Sat, 11 Jul 2026 10:19:41 GMT</pubDate>
            <atom:updated>2026-07-15T18:23:52.444Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PSajoBFGnKRCtwSuebFs3w.png" /></figure><p>IoT devices and embedded systems are often used for long periods of time. Because of size and cost constraints, they usually have very limited resources, and they are often not easy to access physically once deployed. Therefore, updating the device, checking logs, or fixing a security problem can be harder than in a normal server environment.</p><p>For this reason, security in embedded Linux systems should not only depend on application code. We should assume that application code can have bugs. Then we should add system level protections to reduce the impact of these bugs.</p><p>In this article, I will explain <strong>how Linux hardening can be done</strong> on a Linux image created with the Yocto Project.</p><h3>What is the Yocto Project?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T1zZRzQxrpawebeh4OezdQ.png" /></figure><p>The Yocto Project is not a ready-to-use Linux distribution like Ubuntu, Debian, or Fedora. It is an open-source build ecosystem. It is mostly used to create custom Linux-based systems for embedded devices and special-purpose systems. In general-purpose Linux distributions, many things come ready by default. You install the system and then add packages with a package manager. Yocto works in a different way. With Yocto, we can control many low-level details, such as:</p><ul><li>which packages will be included in the image,</li><li>which kernel configurations will be used,</li><li>which services will run,</li><li>how the image will boot.</li></ul><p>These are very important for embedded systems. IoT devices often need small operating system images. They may also need to run on limited hardware. Yocto allows us to build a Linux system directly for our needs instead of using a large general-purpose Linux distribution. This is also useful for security. By including only the packages we need, we can reduce the attack surface of the operating system from the beginning.</p><h3>How to Create A Basic Yocto Image</h3><p>Before starting the build process, we need to install the required packages on the host system.</p><p>sudo apt-get install build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 libcrypt-dev locales python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xz-utils zstd</p><p>After that, we can clone Poky. Poky is the reference distribution of the Yocto Project. It includes BitBake, OpenEmbedded metadata, and the basic layers needed for building an image. For more detailed information, you can check this link: <a href="https://wiki.yoctoproject.org/wiki/Glossary_of_Terms_and_Acronyms">https://wiki.yoctoproject.org/wiki/Glossary_of_Terms_and_Acronyms</a></p><pre>git clone -b scarthgap https://git.yoctoproject.org/poky<br>cd poky</pre><p>I used the scarthgap branch. Yocto has different release branches. It is important to use the same branch for Poky and the other layers. This helps us avoid build errors and compatibility problems.</p><p>After cloning Poky, we prepare the build environment with this command.</p><p>source oe-init-build-env build</p><p>I used QEMU to run the image. For this, I edited the build/conf/local.conf file and selected the QEMU x86-64 machine:</p><pre>MACHINE = &quot;qemux86-64&quot;</pre><p>Then I built a minimal image:</p><pre>bitbake core-image-minimal</pre><p>This build can take a long time depending on the system. Even a minimal image can take a few hours to build. After the build is complete, the image can be started with QEMU:</p><pre>runqemu qemux86-64 core-image-minimal nographic</pre><p>I used nographic because I wanted to run the system directly in the terminal. This makes it easier to use copy and paste while testing.</p><h3>What Is Hardening?</h3><p>Hardening means making a system more secure than its default state. A Linux system may work correctly after installation, but this does not always mean it is secure. Some services may be enabled even if we do not need them. Some applications may have more permissions than they need. Some files or directories may have weak permissions.</p><p>The main goal of hardening is to reduce the number of possible weaknesses in the system. If a vulnerability exists, hardening should also reduce its impact.</p><p>For example, if an application has a path traversal or SSRF vulnerability, hardening may not fix the bug in the application code, but it can limit what the attacker can access by using that bug.</p><h3>Threat Model: What are we trying to protect?</h3><p>When doing hardening, instead of adding random security settings, we should first define the threat model, because before adding security settings, we should first think about the threat model.</p><p>For example, we can ask these questions:</p><ul><li>Which user runs this service?</li><li>Which user should run this service?</li><li>Which files does this service really need to read?</li><li>Which directories does it need to write to?</li><li>Does it need network access?</li><li>Does it only make outbound connections, or does it also listen on a port?</li><li>Does it really need root privileges?</li><li>Which Linux capabilities are needed?</li><li>If the service is compromised, which files can the attacker read?</li><li>If the service is compromised, can the attacker create persistence?</li><li>Can the service access other local services?</li><li>If it runs in a container, which host resources are shared?</li></ul><p>In my project, I used a “default deny” approach. Instead of allowing the process to access everything and then blocking some parts, I allowed only the resources that the process really needed.</p><h3>Layered Security Approach</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*huKmhGws4m_zje6QJKeTgQ.png" /></figure><p>As we will see in the examples, the goal is not to solve everything with only one security mechanism. Instead, the goal is to limit the process at different levels.</p><p>For example, one security layer can block one attack. Another layer can reduce the impact of a different attack. This is called layered security. If one layer is not enough, another layer can still help.</p><h3>Reducing The Attack Surface</h3><p>One of the first security steps is to keep the attack surface small.</p><p>The Poky image I used was already minimal. It did not include many packages by default. I tried to keep this approach while adding new packages. I only added the packages that I needed for the hardening tests.</p><p>My local.conf file looked similar to this:</p><pre>INIT_MANAGER = &quot;systemd&quot;</pre><pre>VIRTUAL-RUNTIME_init_manager = &quot;systemd&quot;<br>VIRTUAL-RUNTIME_initscripts = &quot;&quot;</pre><pre>###############################################################################<br># Distro features<br>#<br># systemd        : for systemd init system and service management<br># virtualization: for Docker/container support<br># security       : for meta-security layer integration<br># apparmor       : to enable AppArmor support<br>###############################################################################</pre><pre>DISTRO_FEATURES:append = &quot; systemd virtualization security apparmor&quot;</pre><pre>QB_KERNEL_CMDLINE_APPEND:append = &quot; apparmor=1 security=apparmor&quot;</pre><pre>###############################################################################<br># Image packages<br>#<br># These packages were added on top of core-image-minimal.<br>#<br># python3/python3-core : to run the sensor-app application<br># shadow               : for user/group management<br># sudo                 : for lab and demo convenience<br># libcap/libcap-bin    : for Linux capabilities tests<br># docker-moby          : for Docker engine and container isolation tests<br># apparmor             : for AppArmor userspace tools and apparmor_parser<br># nano                 : to edit files inside the QEMU target<br>###############################################################################</pre><pre>IMAGE_INSTALL:append = &quot; \<br>    python3 \<br>    python3-core \<br>    shadow \<br>    sudo \<br>    libcap \<br>    libcap-bin \<br>    docker-moby \<br>    apparmor \<br>    nano \<br>&quot;</pre><p>The goal was not to install everything. The goal was to start from a minimal image and add only the packages needed for the tests. This is important because one of the best ways to reduce the attack surface is to not install unnecessary packages in the first place.</p><h3>Running Applications With The Correct User</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uEpldWCbcnu5_gcYbpXcwA.png" /></figure><p>One of the first steps in Linux hardening is to avoid running services as root.</p><p>A process running as root has the highest privileges on the system. If this process has a vulnerability, an attacker can use that vulnerability with root privileges. In my test environment, I created a simple IoT sensor application with Python. The application name was sensor-app.py. This application provides these HTTP endpoints:</p><ul><li>/health</li><li>/sensor</li><li>/state</li><li>/log</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wqrMD1CWXDZDOKMwWvYDFQ.png" /></figure><p>Normally, the /log endpoint is used to read log files. However, because of a bug in the code, this endpoint has a directory traversal vulnerability. This means that the filename coming from the user is added to the file path without enough validation. When the application runs as root, this vulnerability becomes very dangerous.</p><p>For example, when I sent this payload to the /log endpoint, the application could read /etc/shadow:</p><pre>wget -qO- http://127.0.0.1:8080/log?file=../../../../../etc/shadow</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KleIeGy7VqgeJVR8eNGBcw.png" /></figure><p>Normally, this file should not be readable by a normal user. But the backend process was running as root, so the file could be read. To reduce this risk, I created a new user for the application. Then I ran the application with this user instead of root. This user was called sensoruser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nJu_oV45JbU9_pC9QFI8-g.png" /></figure><p>After this change, even if an attacker finds a vulnerability in the application, the attacker can only act with the permissions of sensoruser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-jcULACkjVysHfbMkn8l3g.png" /></figure><p>This does not fix the vulnerability in the code. But it reduces the impact of the vulnerability. This is the main idea of least privilege</p><h3>Limiting Process Access With AppArmor</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xb__-SPFoTo0FFOv1sUohQ.png" /></figure><p>In the previous step, I ran sensor-app with a special user instead of root. Because of this, the application no longer had root privileges. It could not read files such as /etc/shadow, which require root permissions. However, there was still another problem. Since the application was running as sensoruser, it could still access files that belong to sensoruser. For example, if sensoruser has a private SSH key, the vulnerable application may be able to read it. I tested this with the same directory traversal vulnerability:</p><pre>wget -qO- http://127.0.0.1:8080/log?file=../../../../home/sensoruser/.ssh/id_ed25519</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QwWFn-2guTgB2UBz_EeJyw.png" /></figure><p>At this point, the least privilege approach was not enough. The application was not root, but it could still access sensitive files of the same user. To solve this problem, I used AppArmor. AppArmor is a Linux security mechanism that provides Mandatory Access Control.</p><p>With normal Linux permissions, the system asks:</p><blockquote><em>Can this user read this file?</em></blockquote><p>With AppArmor, we can also ask:</p><blockquote><em>Can this process read this file?</em></blockquote><p>This is an important difference. Even if sensoruser can normally read its own private key file, we can block this access for the sensor-app process with an AppArmor profile. I created an AppArmor profile for sensor-app and ran the application with this profile.</p><p>The profile allowed only the files and directories that the application needed.</p><p>For example:</p><ul><li>Python runtime files could be read.</li><li>Application files could be read.</li><li>Log and state directories could be written.</li><li>Network access was allowed for the HTTP server.</li><li>Sensitive paths were denied.</li></ul><p>Some important deny rules looked like this:</p><pre>audit deny /home/sensoruser/.ssh/** r,<br>audit deny /home/** rwklx,<br>audit deny /root/** rwklx,<br>audit deny /etc/shadow r,</pre><p>These rules mean that sensor-app cannot read the SSH private key of sensoruser. It also cannot access sensitive paths such as /root or /etc/shadow. I started the application with systemd. The service still used sensoruser.</p><p>Then I tried the same private key read again:</p><pre>wget -qO- http://127.0.0.1:8080/log?file=../../../../home/sensoruser/.ssh/id_ed25519</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eq5Bf71590MHVZGPWD-FvA.png" /></figure><p>This time, the application returned 403 Forbidden. The AppArmor audit log also showed that the access was denied. This result shows why AppArmor is useful. The vulnerability still exists in the application. But the process cannot access files that are not allowed by the AppArmor profile. AppArmor does not fix the bug, it just limits what the bug can do.</p><h3>Docker for network isolation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J4p6yl4KKJ6QGOF_l1rluw.png" /></figure><p>In the last example, we will look at how we can take precautions against an SSRF vulnerability. SSRF means Server-Side Request Forgery. In this type of vulnerability, the attacker makes the server send a request to another address. This can be dangerous because the server may be able to access internal services that are not open to the outside world.</p><p>In this scenario, I used two applications:</p><ul><li>sensor-app.py</li><li>mock_admin.py</li></ul><p>The mock_admin.py application represents a simple internal admin service. It listens only on localhost: 127.0.0.1:9000</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*_9l_o7xoNfAaF_niolAK4g.png" /></figure><p>It has an /admin endpoint and returns a demo secret:</p><pre>YOCTO_ADMIN_PANEL_SECRET_DEMO</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*vZq4fmj0qDNAvu83oVv4Ag.png" /></figure><p>This service is not open to the outside network. It can only be accessed from the same machine. On the other side, sensor-app has a /fetch endpoint. This endpoint takes a URL from the user and sends an HTTP request to that URL from the server side.</p><p>For example:</p><pre>wget -qO- http://127.0.0.1:8080/fetch?url=http://127.0.0.1:9000/admin</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wrAzo8iiEQ2e09Q8HeVfcg.png" /></figure><p>This kind of feature can exist in real systems. For example, an application may fetch data from another service, call a webhook, or connect to an integration. But if the user-controlled URL is not validated correctly, this feature can become an SSRF vulnerability.</p><p>When sensor-app runs directly on the host, it shares the same network namespace with mock_admin. Because of this, a request from sensor-app to 127.0.0.1:9000 can reach the mock_admin service on the host. This means an attacker can use the public sensor-app service to reach an internal localhost service.</p><p>At this point, Docker can help us with network isolation. I containerized sensor-app and ran it inside a Docker container. The Dockerfile created a separate user and ran the application with that user:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q_VE0Devz7IAlKFXSJFa2g.png" /></figure><p>Then I built the Docker image and ran the container:</p><p>After running the container, I tested the same SSRF request again:</p><pre>wget -qO- http://127.0.0.1:18080/fetch?url=http://127.0.0.1:9000/admin</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zg7VFBcA98M8eXpXSeKIvQ.png" /></figure><p>This time, the request failed with 403 Forbidden. The reason is network isolation. When the application runs inside a Docker container, the container has its own network namespace. So 127.0.0.1 inside the container is not the host’s localhost. It is the container’s own localhost.</p><p>Because of this, the application inside the container cannot reach the host service running on 127.0.0.1:9000. This example shows that Docker solves a different problem than AppArmor. AppArmor limits file access and process permissions. Docker bridge networking gives network namespace isolation.</p><p>However, Docker is not automatically secure in every case. If we run the container with --network host, the container uses the host network namespace. In that case, 127.0.0.1 inside the container becomes the host’s localhost again, and the SSRF vulnerability works again. So using containers is not enough by itself. The container must also be configured correctly.</p><h3>Conclusion</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JKxmck7idx0eEU5EoWaa0Q.png" /></figure><p>Linux hardening should not depend on only one security mechanism. A layered approach is better. Running a service with a limited user, restricting file access with AppArmor, and using Docker isolation when needed are steps that support each other. If one layer is not enough, another layer can reduce the impact of the attack or stop it from becoming more serious.</p><p><em>Thanks for reading. If this article helped you or taught you something new, you can support my work on Kreosus. Every contribution helps me keep researching and writing.<br></em><a href="https://kreosus.com/cenky"><em>Support my work</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f82f2a6c56c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud Environment Security]]></title>
            <link>https://hasancenk453.medium.com/cloud-environment-security-3b0f1213e959?source=rss-fd4b9e02cf63------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b0f1213e959</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Cenky]]></dc:creator>
            <pubDate>Mon, 24 Nov 2025 11:22:52 GMT</pubDate>
            <atom:updated>2026-07-15T18:23:37.440Z</atom:updated>
            <content:encoded><![CDATA[<p>The move from traditional data centers to cloud environments and orchestration platforms like Kubernetes has changed the way we think about security. In this article, I will explain some important points to consider when securing cloud environments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*0v2KZz1l-Jm3nvnvlRDoPQ.jpeg" /></figure><h3><strong>Shared Responsibility Model</strong></h3><p>One of the biggest misunderstandings about cloud security is the idea that <em>“I moved my data to the cloud, so everything is automatically safe.”</em> In reality, the cloud provider only gives you a secure building. Locking the doors, closing the windows, and deciding who gets the key is still your responsibility.</p><p>In cloud environments, responsibilities are divided into three main categories:</p><ul><li><strong>Provider’s Responsibilities:</strong> Protecting physical servers, data centers, the physical network, and the virtualization layer.</li><li><strong>Customer Responsibilities:</strong> Identity and Access Management (IAM), data encryption, application security, and compliance.</li><li><strong>Variable Responsibilities:</strong> These depend on the service model (IaaS, PaaS, SaaS). For example, in IaaS, you handle OS patches, but in PaaS, the provider handles them.</li></ul><h3>Zero Trust Approach</h3><p>Zero Trust was introduced in 2010 by John Kindervag. Today, it is one of the main security standards. Its basic principle is simple: <strong>never trust, always verify.</strong></p><p>Instead of trusting internal traffic by default, Zero Trust treats everything as untrusted and is built around three main principles:</p><ul><li><strong>Least Privilege:</strong> Give users and services only the minimum permissions they need to do their job. For example, a database administrator should not have permission to write logs on a web server.</li><li><strong>Micro-Segmentation:</strong> Divide the cloud network (VPC/vNET) into small, isolated segments. Even if an attacker compromises one container, they should not be able to reach others.</li><li><strong>Continuous Verification:</strong> Every access request must be authenticated and authorized, even if it comes from inside the network.</li></ul><h3>Protecting Kubernetes Through Its Lifecycle</h3><p>Kubernetes is built on a cloud-native architecture, so following the CNCF (Cloud Native Computing Foundation) security lifecycle is important. Kubernetes security should not be handled as separate pieces. It should be a complete process that covers the entire lifecycle of your application.</p><p><strong>A. Build Stage</strong></p><ul><li>Use secure and trusted base images.</li><li>Check for supply chain attacks on dependencies.</li><li>Identify threat surfaces during the design phase.</li></ul><p><strong>B. Deploy Stage</strong></p><p>These are the security controls that should be applied before the image is deployed to the cluster.</p><ul><li>Scan images for known CVEs.</li><li>Store images in private, access-controlled registries.</li><li>Sign images and allow only signed images to run inside the cluster.</li></ul><p><strong>C. Runtime Stage</strong></p><p>This is the most critical stage. There are three main focus areas for this stage:</p><ul><li><strong>API Security:</strong> The Kubernetes API Server is the brain of the cluster. Use RBAC to limit access and always enforce TLS.</li><li><strong>Compute Security:</strong> Containers share the same kernel. A container escape can compromise the whole node. Therefore, limiting Linux capabilities and applying security profiles is vital.</li><li><strong>Network Security:</strong> By default, all Pods can talk to each other. Use NetworkPolicies to control which Pod can communicate with which.</li></ul><h3>Pod Security Standards (PSS)</h3><p>Kubernetes v1.25 and later versions use Pod Security Standards to define how much freedom or restriction a Pod should have. This standards has three levels.</p><ol><li><strong>Privileged:</strong> Almost no restrictions. Only system-level components should run in this mode.</li><li><strong>Baseline:</strong> Blocks known privilege escalation techniques but allows most common applications to run.</li><li><strong>Restricted:</strong> The most secure level. It bans running Pods as the root user, drops kernel capabilities, and enforces strict seccomp profiles.</li></ol><h3>Where to Start?</h3><p>Cloud and Kubernetes security is a deep topic, but paying attention to a few basic steps can protect you from many risks.</p><ul><li><strong>Identity Management (IAM):</strong> Give Service Accounts and users only the permissions they need. Unnecessary permissions are potential security leaks.</li><li><strong>Encryption:</strong> Encrypt data both at rest and in transit. Using TLS for communication between microservices is a necessity.</li><li><strong>Do Not Trust Defaults:</strong> Cloud services and Kubernetes often come with default settings. These defaults are usually focused on convenience, not security.</li><li><strong>Automation:</strong> Humans can make mistakes. Add automatic vulnerability scanning tool into your CI/CD pipeline.</li></ul><p>Security is not a destination, it is a continuous journey. By applying these basic principles, you can build a much safer cloud and Kubernetes environment.</p><p><em>Thanks for reading. If this article helped you or taught you something new, you can support my work on Kreosus. Every contribution helps me keep researching and writing.<br></em><a href="https://kreosus.com/cenky"><em>Support my work</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b0f1213e959" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Smart Security Automation Lab with Splunk and N8N]]></title>
            <link>https://hasancenk453.medium.com/building-a-smart-security-automation-lab-with-splunk-and-n8n-76272675ba4a?source=rss-fd4b9e02cf63------2</link>
            <guid isPermaLink="false">https://medium.com/p/76272675ba4a</guid>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[splunk]]></category>
            <category><![CDATA[n8n]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Cenky]]></dc:creator>
            <pubDate>Mon, 27 Oct 2025 18:26:39 GMT</pubDate>
            <atom:updated>2026-07-15T18:23:24.491Z</atom:updated>
            <content:encoded><![CDATA[<p>In this project, we will set up two virtual machines. One of our virtual machines will run Windows 10, while the other will run Ubuntu Server. On the Ubuntu Server, we will have the <strong>Splunk</strong> and <strong>n8n</strong> applications. The goal is to analyze the logs coming from Windows using Splunk and generate appropriate alerts. Then, these alerts will be reviewed and commented on by an AI, with the help of n8n.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HrB2FLPVeYANdU2UDHUl5g.png" /></figure><p>Since my previous article as well as many online resources already cover the step by step process of setting up virtual machines, I won’t go into too much detail in this section. I performed a standard Windows 10 installation with 4 GB of RAM, 2 CPU cores, and 40 GB of storage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eg5HuloTD-1smXSSwtPf-Q.png" /></figure><p>Next, I started setting up Ubuntu Server. The installation process is simpler than the standard Ubuntu desktop version. After selecting the installation language, I set the server name, username, and password. On the next screen, it’s important to enable “<strong>Install OpenSSH server</strong>” so that we can access the server remotely via SSH later on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pJIFILwR0Ta-y-sEpkwWEQ.png" /></figure><p>After that, installation begins. We just need to wait for it to finish. When it’s done, we restart the server and log in with the username and password we created earlier. At this point, our Ubuntu Server is up and running ready for the next steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5puALNEiA2U-lACsxzC-pw.png" /></figure><p>From this point on, to prevent any connection issues, both of our virtual machines need to be on the <strong>NAT network</strong>. This way, they will be able to communicate with each other as well as with the host machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*LVYlW4ARIPvjHlKrMtbvPA.png" /></figure><p>To make working with our Ubuntu Server easier, we’ll connect to it via <strong>SSH</strong> from our host computer. This allows us to manage the server through the terminal without needing to use its console directly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*XeWuaD7WxX9v2k7dYjDUjQ.png" /></figure><p>The first thing we’ll do is <strong>install Splunk</strong> on our Ubuntu Server. After signing up, we can download Splunk by using the installation script provided on the official website.</p><p><a href="https://www.splunk.com/en_us/download/splunk-enterprise.html">https://www.splunk.com/en_us/download/splunk-enterprise.html</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_VEnDogFPsmgqKagcWABjw.png" /></figure><p>After downloading the <strong>.deb </strong>file, we install it using the following command (your file name may differ depending on the version you downloaded). Once the installation is complete, we navigate to the directory where Splunk’s binaries are stored and <strong>start Splunk</strong> from there.</p><pre>sudo dpkg -i splunk-10.0.1-c486717c322b-linux-amd64.deb<br>cd /opt/splunk/bin<br>sudo ./splunk start</pre><p>When you start Splunk for the first time, you’ll see a long Terms and Conditions page. Scroll all the way to the bottom, type <strong>“y”</strong> to accept, and proceed. Next, you’ll be asked to create a username and password. These credentials will be used later to log in to the Splunk web interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*SWSybSyGimzBKp7TgvmngQ.png" /></figure><p>After a short wait, Splunk will become accessible on <strong>port 8000</strong>. If we’ve configured the network settings correctly as mentioned earlier we’ll be able to access Splunk from our host machine. We can then log in using the username and password we created a moment ago.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*wOYtGVX_O3WfN5bR3z5DQw.png" /></figure><p>Once you’ve logged into Splunk, the first thing to do is set up the port that will receive logs from other machines. Go to <strong>Settings → Forwarding and Receiving</strong>, then click <strong>Configure Receiving</strong>. Next, click the green <strong>New Receiving Port</strong> button. In the dialog box, enter <strong>9997</strong> as the port number and click Save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U0zMTWxj5ilsHwLtQ1gWCQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jh64GiTw_pGxitJNyX4HRw.png" /></figure><p>To organize incoming logs more efficiently, we’ll create a new index in Splunk. Under Settings, just below the “Forwarding and Receiving” section, there’s the <strong>“Indexes”</strong> option. Click on it to open the <strong>Indexes page</strong>. Then click New Index, enter a name for your index and save it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hlLfQ5B46NrCgPUinu9Yzg.png" /></figure><p>Next, we’ll install the <strong>Splunk Universal Forwarder </strong>on our Windows 10 virtual machine to Splunk instance. You can find the download scripts for Universal Forwarder at the link below.</p><p><a href="https://www.splunk.com/en_us/download/universal-forwarder.html">https://www.splunk.com/en_us/download/universal-forwarder.html</a></p><p>After downloading the <strong>.msi </strong>installer, double-click it to start the setup. The installation is mostly straightforward just clicking Next button. The most important part is the <strong>Receiving Indexer</strong> step. You should enter your Ubuntu server’s <strong>local IP address</strong> and the listening port (9997) you configured earlier during the Splunk setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*NL1F-mGZdKSoNGvoT2843w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*TCeEsC-xyI3QxSnaiOdKCA.png" /></figure><p>Next, we’ll edit the <strong>inputs.conf</strong> file. This file defines which logs the Universal Forwarder should collect and send to Splunk. By default, <strong>inputs.conf</strong> doesn’t exist after installation, so we’ll create it manually in the following path:</p><pre>C:\Program Files\SplunkUniversalForwarder\etc\system\local</pre><p>Create a new file named <strong>inputs.conf</strong> and add the following configuration. Make sure the <strong>index</strong> name matches the one you created earlier in Splunk. This setup ensures that logs from your Windows machine are sent to the correct index, making them easy to search and filter later.</p><pre>[WinEventLog://Microsoft-Windows-Sysmon/Operational]<br>index = splunk-project<br>disabled = false<br>renderXml = true<br><br>[WinEventLog://Microsoft-Windows-Windows Defender/Operational]<br>index = splunk-project<br>disabled = false<br><br>[WinEventLog://Microsoft-Windows-PowerShell/Operational]<br>index = splunk-project<br>disabled = false<br><br>[WinEventLog://Application]<br>index = splunk-project<br>disabled = false<br><br>[WinEventLog://Security]<br>index = splunk-project<br>disabled = false<br><br>[WinEventLog://System]<br>index = splunk-project<br>disabled = false<br><br>[WinEventLog://Microsoft-Windows-TerminalServices-LocalSessionManager/Operational]<br>index = splunk-project<br>disabled = false</pre><p>After a short wait, the logs from our Windows machine should start appearing in Splunk.</p><pre>index=”splunk-project”</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6dQoGUjONtMqUzWZHKVZkg.png" /></figure><p>Next, we’ll install <strong>n8n</strong> on our Ubuntu server using <strong>Docker</strong>. First, let’s install Docker and Docker Compose, then prepare a directory for our n8n setup:</p><pre>sudo apt install docker.io<br>sudo apt install docker-compose<br>cd ~<br>mkdir n8n<br>cd n8n<br>touch docker-compose.yaml<br>nano docker-compose.yaml </pre><p>After creating the file, open it and add the configuration shown below. Be sure to replace the host address with your Ubuntu server’s IP address we’ll use that later to access the n8n dashboard via the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*nZXxy0n0F7ArAT70cUThLA.png" /></figure><p>After completing the configurations above, we’ll deploy n8n using the following commands:</p><pre>sudo docker-compose pull<br>sudo docker-compose up -d </pre><p>After this step, the <strong>n8n</strong> directory will be owned by the <strong>root</strong> user. To avoid permission issues, change the ownership of the <strong>n8n_data/ </strong>folder to your own user:</p><pre>sudo chown -R your_username:your_username n8n_data/</pre><p>Now, stop and restart the service. Once restarted, open your browser and go to <strong>http://&lt;your-server-ip&gt;:5678 </strong>to access the n8n dashboard.</p><pre>sudo docker-compose down<br>sudo docker-compose up -d </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VWn0VpvYkv4k4ELT8XpUqw.png" /></figure><p>Once you’ve logged into n8n, click <strong>“Add first step”</strong> on the main dashboard or the <strong>“+”</strong> icon in the top right corner to add a new node. Choose the <strong>Webhook</strong> node. Set the <strong>HTTP Method</strong> to <strong>POST</strong>, then copy the generated <strong>Webhook URL</strong>. We’ll use this URL in Splunk to send alerts directly to n8n.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k7nQydd6hWtgioaKfMCAPA.png" /></figure><p>As an example, let’s add <strong>EventCode=4625</strong> to our search query. This event code corresponds to <strong>failed logon attempts</strong> on the Windows machine, allowing us to identify potential unauthorized access or brute-force attempts. Once you’ve verified that the logs appear in Splunk, click <strong>Save As → Alert</strong> in the top-right corner to open the alert creation screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZffLjUdl4AdJ22KsqQduNg.png" /></figure><p>In the alert configuration screen, first give your alert a <strong>Title</strong>. By default, the Alert Type is set to <em>Run every week</em>. Change it to <strong>Run on</strong> <strong>Cron schedule</strong>, and set the <strong>Cron Expression</strong> to:</p><pre>* * * * *</pre><p>This configuration makes the alert run <strong>every minute</strong>, which is useful for testing purposes. Next, scroll down to <strong>Trigger Actions</strong> and add both <strong>Add to Triggered Alerts</strong> and <strong>Webhook</strong>. In the <strong>Webhook</strong> tab, paste the <strong>Webhook URL</strong> that we copied earlier from <strong>n8n</strong>. Once saved, Splunk will send an HTTP POST request to your n8n workflow every time this alert is triggered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N9hDV_ovYpUGfUUdOYq_vg.png" /></figure><p>After waiting for a while, we will see an output similar to the following</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VvzOdLMZun4S7Ab0e53ofw.png" /></figure><p>Next, we add an AI Agent node, similar to how we added the Webhook node earlier. I used Mistral, since it provides a free API key but you can use any AI service you prefer. n8n also includes dedicated nodes for some providers like Google and OpenAI, so you can use those directly if you’re working with their APIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*HU0TCHFwSEhZztKZsSZssQ.png" /></figure><p>In my setup, I set the Source for Prompt to <strong>“Define below”</strong>, and passed the alert data coming from the Webhook. For the <strong>System Message</strong>, where we tell the AI who it is and what it should do, I wrote a prompt that fits our current use case, as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nd1ozmoM7ViSzrqcSSqDUg.png" /></figure><p>Everything is ready now. From here on, it’s all up to your curiosity and willingness to experiment. You can start building your own security automation lab.</p><p><em>Thanks for reading. If this article helped you or taught you something new, you can support my work on Kreosus. Every contribution helps me keep researching and writing.<br></em><a href="https://kreosus.com/cenky"><em>Support my work</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76272675ba4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Malware Analysis Lab on Linux]]></title>
            <link>https://hasancenk453.medium.com/building-a-malware-analysis-lab-on-linux-4855fc9a3609?source=rss-fd4b9e02cf63------2</link>
            <guid isPermaLink="false">https://medium.com/p/4855fc9a3609</guid>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Cenky]]></dc:creator>
            <pubDate>Sat, 04 Oct 2025 19:05:38 GMT</pubDate>
            <atom:updated>2026-07-15T18:23:09.171Z</atom:updated>
            <content:encoded><![CDATA[<p>Performing malware analysis and reverse engineering on a personal computer can be risky. Accidentally executing a sample may harm your system. For this reason, analysts use virtual machines that are isolated from external networks. In this article I’ll walk you through how to build that environment on Linux.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NYo2rZS_eXpYVwgGU74KyA.png" /></figure><h3>What you’ll build</h3><p>A two-VM lab:</p><ul><li><strong>Windows 10</strong> with <strong>FLARE VM</strong> for reversing and triage tools<br><a href="https://www.microsoft.com/en-us/software-download/windows10ISO">https://www.microsoft.com/en-us/software-download/windows10ISO</a></li><li><strong>REMnux</strong> (Ubuntu-based) to simulate network services and safely observe traffic<br><a href="https://releases.ubuntu.com/20.04/">https://releases.ubuntu.com/20.04/</a></li></ul><h3>Hypervisor &amp; Manager</h3><p>We’ll use <strong>QEMU/KVM</strong> with <strong>virt-manager</strong> on Linux. You can follow a guide for your distro:</p><ul><li>Debian/Ubuntu: <br><a href="https://linuxconfig.org/setting-up-virtual-machines-with-qemu-kvm-and-virt-manager-on-debian-ubuntu">https://linuxconfig.org/setting-up-virtual-machines-with-qemu-kvm-and-virt-manager-on-debian-ubuntu</a><br><a href="https://www.youtube.com/watch?v=Kq849CpGd88">https://www.youtube.com/watch?v=Kq849CpGd88</a></li><li>Arch/Manjaro:<br><a href="https://www.siberoloji.com/how-to-install-and-use-qemukvm-on-arch-linux/">https://www.siberoloji.com/how-to-install-and-use-qemukvm-on-arch-linux/</a><br><a href="https://computingforgeeks.com/install-kvm-qemu-virt-manager-arch-manjar/">https://computingforgeeks.com/install-kvm-qemu-virt-manager-arch-manjar/</a></li></ul><h3>Windows 10 VM</h3><p>When you open Virtual Machine Manager, you’ll see screen on the left side. Using the button in the top left corner, you can open the menu to create a new virtual machine. Since we’ve already downloaded the necessary ISO files, we can proceed with the Local install media option shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*Eg6KTnxbxkIM5tsNXTMcug.png" /></figure><p>On the next screen, when we click <strong>Browse</strong>, the panel on the right will appear. We should move the files we downloaded earlier into the <em>/var/lib/libvirt/images </em>directory indicated here. Then, select <strong>Windows</strong> and click the <strong>Choose Volume</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*Iq9SRnHP7L0uYGouiOyXmA.png" /></figure><p>First, we’ll specify the amount of <strong>RAM</strong> and the number of <strong>CPUs</strong> to allocate to our virtual machine. If you have more resources available, you can increase these allocations. Next, we’ll set the <strong>disk space</strong> for the VM. If you’re short on storage, you can go down to <strong>60 GB</strong>, but anything lower isn’t recommended. Finally, we’ll choose a name for the virtual machine and proceed to the installation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5PLzWRqz2C2upQKf2kfV3A.png" /></figure><p>The virtual machine will start automatically. From this point, select <strong>Windows 10 Pro</strong> as the operating system and complete a standard Windows installation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*gGtlwZV7SCqb2XhK6Y-vyg.png" /></figure><h4>Installing FLARE VM</h4><p>Before proceeding with the <strong>FLARE VM</strong> installation, we need to make a few adjustments on Windows. First, we pause updates. Then, we disable <strong>Windows Defender</strong> both from <strong>Windows Settings</strong> and via <strong>Group Policy</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*3ssn3OvVEpLLNh41bVOkJA.png" /></figure><p>In addition, we disable the firewall separately for both the <strong>Domain</strong> profile and the <strong>Standard</strong> profile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0TaR-XRkEe49JRtsmUIDsQ.png" /></figure><p>Now we’ll download the <strong>FLARE VM</strong> script, which installs a complete set of reverse-engineering and malware-analysis tools on our Windows VM. Run <strong>PowerShell as Administrator</strong> and use the command below to fetch the installer (You can also search for “FLARE VM install Github” on Google if you prefer):</p><pre>(New-Object net.webclient).DownloadFile(&#39;https://raw.githubusercontent.com/mandiant/flare-vm/main/install.ps1&#39;,&quot;$([Environment]::GetFolderPath(&quot;Desktop&quot;))\install.ps1&quot;)</pre><p>Before running the script, navigate to your <strong>Desktop</strong> in PowerShell and execute:</p><pre>Unblock-File .\install.ps1<br>Set-ExecutionPolicy Unrestricted -Force</pre><p>After that, we can run the file we downloaded named <strong>install.ps1</strong>. Since we’re using <strong>QEMU</strong>, this warning appeared; we can proceed by clicking <strong>Continue</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*97gWlD6bKJhg09wXGHfCYQ.png" /></figure><p>After a long wait, the installation has completed. To ensure everything was set up correctly, it’s a good idea to restart the computer. You should take a snapshot at this point, because you’ll be running malware samples on the VM later and will want to revert to a clean state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*9zAE-G83lURxCIKqR1o34A.png" /></figure><h3>REMnux VM</h3><p>Now we’ll set up our Linux-based <strong>REMnux</strong> virtual machine. REMnux will help us simulate internet communication. We’ll follow steps similar to the ones we used on the Windows VM. I allocated the same amount of RAM and CPU as on Windows, and <strong>40 GB</strong> of storage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DFEOfNCvMZopMhQPWtF9hw.png" /></figure><p>After clicking the <strong>Finish</strong> button, the virtual machine will start, and we’ll complete a standard Ubuntu installation. Afterwards, the first thing we do is apply the updates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mqTq_H3mjYBkulAaEZYkCA.png" /></figure><p>To install <strong>REMnux</strong> on our Ubuntu machine, run the following commands in order. If you like, you can also review the detailed guide here:<br><a href="https://docs.remnux.org/install-distro/install-from-scratch"><em>https://docs.remnux.org/install-distro/install-from-scratch</em></a></p><pre>wget https://REMnux.org/remnux-cli<br>mv remnux-cli remnux<br>chmod +x remnux<br>sudo mv remnux /usr/local/bin<br>sudo apt install -y gnupg curl<br>sudo remnux install<br>sudo reboot</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RZfd6ABRhbeeI3o_UzYFgA.png" /></figure><p>After these steps, we have also created our REMnux machine.</p><h3>Network Setting</h3><p>Now we’ll configure the network settings required to isolate the <strong>FLARE VM</strong> and <strong>REMnux</strong> machines from both our home network and the external internet. To do this, open the network settings by clicking the buttons in sequence as shown below. The <strong>start</strong> and <strong>end</strong> IP addresses you choose must not conflict with the IPs on your local network. After entering the necessary information, you can click the <strong>Finish</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KUVtOyDrr0IKyFn5IvdT4g.png" /></figure><p>Then, in the <strong>NIC settings</strong> for both the <strong>FLARE VM</strong> and the <strong>REMnux</strong> VM, select the network we created as the <strong>network source</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*1-S7syRv2xVXl8BWymPvzw.png" /></figure><p>After these steps, our virtual machines will be able to see each other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6_XZ7KrlSb3X9RqQaN3utQ.png" /></figure><p>Now we’ll make a few adjustments so our <strong>REMnux</strong> and <strong>FLARE VM</strong> machines can communicate correctly and consistently.</p><p>First, open the /etc/inetsim/inetsim.conf file with a text editor, make the changes shown below, and save. Set the default <strong>DNS</strong> IP to the IP address of our <strong>REMnux</strong> machine. The other settings can remain as shown in the image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7oWqU3x01at0y60B1whEwQ.png" /></figure><p>Next, on <strong>FLARE VM</strong>, open <strong>Network Connections</strong> and set the <strong>DNS server</strong> to the IP address of our <strong>REMnux</strong> machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mUjXgknZlnYVkxPvVP3vLg.png" /></figure><p>After starting <strong>INetSim</strong> on <strong>REMnux</strong>, everything is ready. We can download the malware we want to analyze and examine it in our lab, which is isolated from the external network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0SEILZ4Elgf1xzOJCpu1GA.png" /></figure><p><em>Thanks for reading. If this article helped you or taught you something new, you can support my work on Kreosus. Every contribution helps me keep researching and writing.<br></em><a href="https://kreosus.com/cenky"><em>Support my work</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4855fc9a3609" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create a Fake Persona: Sock Puppet]]></title>
            <link>https://hasancenk453.medium.com/how-to-create-a-fake-persona-sock-puppet-e4a6f8404d57?source=rss-fd4b9e02cf63------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4a6f8404d57</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[threat-intelligence]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[sockpuppet]]></category>
            <category><![CDATA[osint]]></category>
            <dc:creator><![CDATA[Cenky]]></dc:creator>
            <pubDate>Wed, 20 Aug 2025 19:50:53 GMT</pubDate>
            <atom:updated>2026-07-15T18:22:41.638Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is a Sock Puppet?</h3><p>A sock puppet is an online fake identity that people use on the internet to hide who they really are. The term comes from a puppeteer who controlled a hand puppet used to entertain children.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pGSlnmzc7nsINPbafbDcyA.png" /></figure><p>As we constantly see in the news, fake accounts are generally used for purposes such as deceiving people, publishing fake comments, harassing others, or inciting the public. However, in the fields of cybersecurity and open source intelligence (OSINT), an online persona is an essential component of operational security (OPSEC). For an investigator, penetration tester, or journalist, a sock puppet is a digital shield. It protects their real identity, their organization, and the integrity of their investigation from being compromised.</p><h3>Part 1: Planning Your Persona</h3><p>First, you should define your persona’s purpose. How much detail you need depends on what you want to do. A basic profile for looking around a forum takes much less effort than creating a full character to build trust across the internet.</p><p><strong>Selecting Convincing Name:</strong> Avoid generic names like “John Smith.” You can use a fake name generator to create a realistic identity that fits a specific age and demographic.</p><p><strong>Creating a Logical Backstory:</strong> Don’t just invent a name, think about a life. Where did they grow up? What is their job? What are their hobbies, interests, and political leanings? This backstory will guide all of their future online activity.</p><p>You can use the sites below to build a realistic persona. They provide most of the information you’ll need and offer tools to add extra detail. I won’t go through each one here. Much of the content focuses on U.S. citizens, but you can adjust the details to fit your needs.</p><p><a href="https://www.fakenamegenerator.com/">https://www.fakenamegenerator.com/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pPWdU2anKiu9W5byRejNnw.png" /></figure><p><a href="https://businer.com/fakeid.php">https://businer.com/fakeid.php</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p58NKHIiKme1h-OoIcv2-g.png" /></figure><p><strong>Selecting Profile Picture: </strong>Do not use a photo of a real person taken from the web. This can be instantly uncovered with a reverse image search. Instead, use a service like This Person Doesn’t Exist, which uses AI to generate realistic human faces.</p><p><a href="https://thispersondoesnotexist.com/">https://thispersondoesnotexist.com/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*5cU-hxG7d3BpemcwaYoMvg.png" /></figure><h3>Part 2: Your Anonymity Infrastructure</h3><p>This is the most critical phase. Your real identity must be isolated from your sock puppet’s activity.</p><p><strong>Step 1:</strong> Isolate Your Environment. You can set up a virtual machine on your host computer and carry out your operations within that environment to keep your activities isolated from your main system. Alternatively, you can use the Tails OS Linux distro, which runs from a USB drive and routes all network traffic through the Tor network. Most people may not prefer this approach as it is less convenient to use, however by using distributions like Qubes OS as your primary operating system, you can make it more difficult for your privacy to be compromised through strong isolation. Additionally, using a privacy focused browser such as DuckDuckGo or LibreWolf on these systems will strengthen your privacy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aUETLrBzlbIC2C1Gc6u8cA.png" /></figure><p><strong>Step 2:</strong> Hide Your Connection. You should use a VPN to keep your IP address hidden. VPN service providers are not perfect. Therefore, you should not trust them blindly and assume that you are completely anonymous. However, this is usually not a major issue if you are not engaging in illegal activities. You can choose well known services such as Mullvad or Proton VPN for basic protection, or you can use the Tor network mentioned above for a higher level of security.</p><p><strong>Step 3:</strong> Secure Your Communications. You will need an email address and phone number to sign up for social media and other services. Do not use your personal Gmail or Outlook. Their business model involves data analysis. You can use encrypted, privacy focused services like ProtonMail or Tuta Mail. You can also use services such as TempMail and 10MinuteMail for one time emails. If you are serious about this, the best option for a phone number is to use disposable SIM cards or eSIMs that are not linked to your identity. For one time SMS verifications, you can use services such as sms-receive.net or receive-smss.com, which are easy to find online, but a dedicated number is better for long term personas.</p><h3>Part 3: Deployment and Maintenance</h3><p>Once the technical infrastructure is ready, it’s time to bring your persona to life.</p><p><strong>Create Social Media Profiles:</strong> Use your anonymous email, phone number, and persona details to register the necessary social media accounts. You should be consistent across all platforms.</p><p><strong>Build Slowly:</strong> Do not immediately dive into your objective. An account created yesterday that suddenly starts engaging in sensitive topics is a huge red flag. Spend weeks or even months building a natural history. Post about your persona’s hobbies, or current events. Follow accounts related to their interests.</p><p><strong>Add Depth:</strong> To make the persona more believable, you can create a blog on a platform like Medium, GitHub, or LinkedIn. Sharing everyday thoughts or work related updates from time to time makes your persona look more realistic.</p><h3>Part 4: Critical Considerations — OPSEC and Ethics</h3><p><strong>Operational Security (OPSEC):</strong> The Golden Rule is never mix your real and fake online activities. Do not use the same browser, avoid logging in from your home Wi-Fi without a VPN, and never interact with your persona’s content from your real account. Also you can test your persona before deploying it for a critical task. You can try to uncover it yourself or ask a trusted colleague to try as well.</p><p><strong>The Ethical and Legal Line:</strong> While it can serve as a shield for privacy and personal security, sock puppetry has also been exploited for harassment, fraud, impersonation, and disinformation. Misusing it in such ways carries serious legal consequences. The methods outlined here are intended only to help you protect your privacy, not to cause harm. Always remember that even behind a persona, your actions have real world impact.</p><p><em>Thanks for reading. If this article helped you or taught you something new, you can support my work on Kreosus. Every contribution helps me keep researching and writing.<br></em><a href="https://kreosus.com/cenky"><em>Support my work</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4a6f8404d57" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>