<?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 Md. Mahim Hossain on Medium]]></title>
        <description><![CDATA[Stories by Md. Mahim Hossain on Medium]]></description>
        <link>https://medium.com/@mahimsec?source=rss-2be56e3c1dcf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*0HVVnk0XUaLalVWVCCna2g.png</url>
            <title>Stories by Md. Mahim Hossain on Medium</title>
            <link>https://medium.com/@mahimsec?source=rss-2be56e3c1dcf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 21:20:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mahimsec/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[DFIR-IRIS and Wazuh Integration Guide]]></title>
            <link>https://mahimsec.medium.com/dfir-iris-and-wazuh-integration-guide-c8a66b485099?source=rss-2be56e3c1dcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8a66b485099</guid>
            <category><![CDATA[wazuh]]></category>
            <category><![CDATA[dfir-iris]]></category>
            <category><![CDATA[soc]]></category>
            <dc:creator><![CDATA[Md. Mahim Hossain]]></dc:creator>
            <pubDate>Fri, 03 Jul 2026 15:42:51 GMT</pubDate>
            <atom:updated>2026-07-03T15:48:35.485Z</atom:updated>
            <content:encoded><![CDATA[<p>This document describes how to integrate DFIR-IRIS with Wazuh so that Wazuh alerts are automatically forwarded to DFIR-IRIS for centralized incident handling. The workflow prepares DFIR-IRIS access, configures a custom Wazuh integration script, updates the Wazuh manager configuration, and validates the result from the DFIR-IRIS Alerts interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GuBPm5G2zuLa3JOo.jpg" /></figure><h4>Requirements</h4><p>We use the following infrastructure to demonstrate the integration of DFIR-IRIS with Wazuh:</p><ul><li>A deployment of the Wazuh 4.8.0 central components (Wazuh server, Wazuh indexer, and Wazuh dashboard). Refer to the <a href="https://documentation.wazuh.com/current/quickstart.html">Wazuh Quickstart guide</a> to install the central components on a Linux endpoint.</li><li>A running instance of DFIR-IRIS 2.4.7. Refer to the <a href="https://github.com/dfir-iris/iris-web?tab=readme-ov-file#running-iris">DFIR-IRIS Getting started guide</a> to configure an instance.</li></ul><h4>Information to collect before configuration</h4><ul><li>DFIR-IRIS customer ID: Use the customer ID that should receive Wazuh alerts. In this example, the default customer is IrisInitialClient with customer ID 1.</li><li>DFIR-IRIS API key: Retrieve the API key from the logged-in DFIR-IRIS user settings page.</li><li>DFIR-IRIS server address: The IP address or hostname and port used by DFIR-IRIS, for example <a href="https://192.168.1.2/alerts/add">https://192.168.1.2/alerts/add</a> or <a href="https://192.168.1.2:8000/alerts/add.">https://192.168.1.2:8000/alerts/add.</a></li><li>Wazuh dashboard address: The IP address or hostname of the Wazuh dashboard used in the alert_source_link field inside the integration script.</li></ul><h4>Integration process</h4><p>Follow the sections below in order. The process starts by preparing DFIR-IRIS, then configuring the Wazuh server, and finally validating that alerts arrive in DFIR-IRIS.</p><h4>Prepare DFIR-IRIS</h4><ol><li>Log in to the DFIR-IRIS dashboard with an administrator account. For a demonstration environment, the default administrator account can be used.</li><li>Add the IRIS user to the customer that will receive Wazuh alerts. Navigate to Advanced &gt; Access control, select the user, open the Customers tab, click Manage, add the correct customer, and click Save.</li><li>Find the customer ID by navigating to Advanced &gt; Customers and selecting the target customer. Record the customer ID because it will be used in the Wazuh integration script.</li><li>Open My settings from the user menu and copy the API key for the logged-in user. This key is required by the Wazuh server configuration.</li></ol><blockquote><strong>Important</strong></blockquote><blockquote>In this guide, alerts are sent to the default customer IrisInitialClient, which uses customer ID 1.</blockquote><h4>Create the Wazuh integration script</h4><p>Create the file /var/ossec/integrations/custom-wazuh_iris.py on the Wazuh server and paste the script below. This script reads Wazuh alerts in JSON format, maps the Wazuh rule level to an IRIS severity, and submits the alert to the DFIR-IRIS API.</p><pre>#!/var/ossec/framework/python/bin/python3<br># custom-wazuh_iris.py<br># Custom Wazuh integration script to send alerts to DFIR-IRIS<br>import sys<br>import json<br>import requests<br>import logging<br>from datetime import datetime</pre><pre># Configure logging<br>logging.basicConfig(filename=&#39;/var/ossec/logs/integrations.log&#39;, level=logging.INFO,<br>                    format=&#39;%(asctime)s %(levelname)s: %(message)s&#39;, datefmt=&#39;%Y-%m-%d %H:%M:%S&#39;)<br># Function to create a formatted string from alert details<br>def format_alert_details(alert_json):<br>    rule = alert_json.get(&quot;rule&quot;, {})<br>    agent = alert_json.get(&quot;agent&quot;, {})<br>    # Extracting MITRE information from the nested &#39;rule&#39; structure<br>    mitre = rule.get(&quot;mitre&quot;, {})<br>    mitre_ids = &#39;, &#39;.join(mitre.get(&quot;id&quot;, [&quot;N/A&quot;]))<br>    mitre_tactics = &#39;, &#39;.join(mitre.get(&quot;tactic&quot;, [&quot;N/A&quot;]))<br>    mitre_techniques = &#39;, &#39;.join(mitre.get(&quot;technique&quot;, [&quot;N/A&quot;]))<br>    details = [<br>        f&quot;Rule ID: {rule.get(&#39;id&#39;, &#39;N/A&#39;)}&quot;,<br>        f&quot;Rule Level: {rule.get(&#39;level&#39;, &#39;N/A&#39;)}&quot;,<br>        f&quot;Rule Description: {rule.get(&#39;description&#39;, &#39;N/A&#39;)}&quot;,<br>        f&quot;Agent ID: {agent.get(&#39;id&#39;, &#39;N/A&#39;)}&quot;,<br>        f&quot;Agent Name: {agent.get(&#39;name&#39;, &#39;N/A&#39;)}&quot;,<br>        f&quot;MITRE IDs: {mitre_ids}&quot;,<br>        f&quot;MITRE Tactics: {mitre_tactics}&quot;,<br>        f&quot;MITRE Techniques: {mitre_techniques}&quot;,<br>        f&quot;Location: {alert_json.get(&#39;location&#39;, &#39;N/A&#39;)}&quot;,<br>        f&quot;Full Log: {alert_json.get(&#39;full_log&#39;, &#39;N/A&#39;)}&quot;<br>    ]<br>    return &#39;\n&#39;.join(details)<br><br>def main():<br>    # Read parameters when integration is run<br>    if len(sys.argv) &lt; 4:<br>        logging.error(&quot;Insufficient arguments provided. Exiting.&quot;)<br>        sys.exit(1)<br>    alert_file = sys.argv[1]<br>    api_key = sys.argv[2]<br>    hook_url = sys.argv[3]<br>    # Read the alert file<br>    try:<br>        with open(alert_file) as f:<br>            alert_json = json.load(f)<br>    except Exception as e:<br>        logging.error(f&quot;Failed to read alert file: {e}&quot;)<br>        sys.exit(1)<br>    # Prepare alert details<br>    alert_details = format_alert_details(alert_json)<br>    # Convert Wazuh rule levels (0-15) -&gt; IRIS severity (1-6)<br>    alert_level = alert_json.get(&quot;rule&quot;, {}).get(&quot;level&quot;, 0)<br>    if alert_level &lt; 5:<br>        severity = 2<br>    elif alert_level &gt;= 5 and alert_level &lt; 7:<br>        severity = 3<br>    elif alert_level &gt;= 7 and alert_level &lt; 10:<br>        severity = 4<br>    elif alert_level &gt;= 10 and alert_level &lt; 13:<br>        severity = 5<br>    elif alert_level &gt;= 13:<br>        severity = 6<br>    else:<br>        severity = 1<br>    # Generate request<br>    payload = json.dumps({<br>        &quot;alert_title&quot;: alert_json.get(&quot;rule&quot;, {}).get(&quot;description&quot;, &quot;No Description&quot;),<br>        &quot;alert_description&quot;: alert_details,<br>        &quot;alert_source&quot;: &quot;Wazuh&quot;,<br>        &quot;alert_source_ref&quot;: alert_json.get(&quot;id&quot;, &quot;Unknown ID&quot;),<br>        &quot;alert_source_link&quot;: &quot;https://&lt;IP ADDRESS&gt;/app/wz-home&quot;,  # Replace with actual Wazuh dashboard IP address<br>        &quot;alert_severity_id&quot;: severity,<br>        &quot;alert_status_id&quot;: 2,  # &#39;New&#39; status<br>        &quot;alert_source_event_time&quot;: alert_json.get(&quot;timestamp&quot;, &quot;Unknown Timestamp&quot;),<br>        &quot;alert_note&quot;: &quot;&quot;,<br>        &quot;alert_tags&quot;: f&quot;wazuh,{alert_json.get(&#39;agent&#39;, {}).get(&#39;name&#39;, &#39;N/A&#39;)}&quot;,<br>        &quot;alert_customer_id&quot;: 1,  # &#39;1&#39; for default &#39;IrisInitialClient&#39;<br>        &quot;alert_source_content&quot;: alert_json  # raw log<br>    })<br>    # Send request to IRIS<br>    try:<br>        response = requests.post(hook_url, data=payload, headers={&quot;Authorization&quot;: &quot;Bearer &quot; + api_key, &quot;content-type&quot;: &quot;application/json&quot;}, verify=False)<br>        if response.status_code in [200, 201, 202, 204]:<br>            logging.info(f&quot;Sent alert to IRIS. Response status code: {response.status_code}&quot;)<br>        else:<br>            logging.error(f&quot;Failed to send alert to IRIS. Response status code: {response.status_code}&quot;)<br>    except Exception as e:<br>        logging.error(f&quot;Failed to send alert to IRIS: {e}&quot;)<br>        sys.exit(1)<br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><ul><li>Replace &lt;IP ADDRESS&gt; in alert_source_link with the actual Wazuh dashboard IP address or hostname.</li><li>Set alert_customer_id to the correct DFIR-IRIS customer ID. In this example, the value remains 1.</li></ul><h4>Set file ownership and permissions</h4><p>Run the following commands on the Wazuh server so that the root user and wazuh group can access the integration script:</p><pre>chmod 750 /var/ossec/integrations/custom-wazuh_iris.py<br>chown root:wazuh /var/ossec/integrations/custom-wazuh_iris.py</pre><h4>Update ossec.conf</h4><p>Append the integration block below to /var/ossec/etc/ossec.conf. This configuration forwards all alerts with severity level 7 or higher to DFIR-IRIS in JSON format.</p><pre>&lt;ossec_config&gt;<br>  &lt;!-- IRIS integration --&gt;<br>  &lt;integration&gt;<br>    &lt;name&gt;custom-wazuh_iris.py&lt;/name&gt;<br>    &lt;hook_url&gt;https://&lt;IRIS_IP_ADDRESS&gt;/alerts/add&lt;/hook_url&gt;<br>    &lt;level&gt;7&lt;/level&gt;<br>    &lt;api_key&gt;&lt;IRIS_API_KEY&gt;&lt;/api_key&gt;&lt;!-- Replace with your IRIS API key --&gt;<br>    &lt;alert_format&gt;json&lt;/alert_format&gt;<br>  &lt;/integration&gt;<br>&lt;/ossec_config&gt;</pre><ul><li>Replace &lt;IRIS_IP_ADDRESS&gt; with the DFIR-IRIS IP address or hostname. Include the port if DFIR-IRIS does not listen on port 443.</li><li>Replace &lt;IRIS_API_KEY&gt; with the API key copied from the DFIR-IRIS web console.</li><li>If required, you can further restrict forwarding by specific rule IDs or groups using supported Wazuh integration options.</li></ul><h4>Restart the Wazuh manager</h4><p>Apply the configuration changes by restarting the Wazuh manager service:</p><pre>systemctl restart wazuh-manager</pre><h4>Validate and visualize alerts</h4><ul><li>Trigger or wait for a Wazuh alert with severity 7 or higher.</li><li>Open the Alerts page in DFIR-IRIS and confirm that the forwarded Wazuh alert appears.</li><li>Open the alert details in DFIR-IRIS and verify that source, event time, source reference, tags, and raw alert content were preserved.</li><li>If alerts do not arrive, inspect /var/ossec/logs/integrations.log on the Wazuh server for API or payload errors.</li></ul><h4>Troubleshooting notes</h4><ul><li>If you use a non-administrator DFIR-IRIS account, ensure alert_read and alert_write permissions are assigned.</li><li>If the API endpoint uses a custom port, include that port in hook_url, for example <a href="https://192.168.1.2:8000/alerts/add.">https://192.168.1.2:8000/alerts/add.</a></li><li>Confirm that HTTPS connectivity from the Wazuh server to DFIR-IRIS is allowed by local firewall and network controls.</li><li>Validate that the customer ID configured in the script matches the correct customer in DFIR-IRIS.</li><li>If the Wazuh dashboard link inside DFIR-IRIS is incorrect, update alert_source_link in the Python script and restart the Wazuh manager again.</li></ul><h4>Conclusion</h4><p>Integrating DFIR-IRIS with Wazuh improves incident response by combining security monitoring with structured case and alert handling. Once connected, security teams can correlate Wazuh events inside DFIR-IRIS, track investigations more efficiently, and respond to incidents with better context and faster decision-making.</p><h4>Proof screenshots</h4><p>The screenshots below provide evidence of the integration workflow and successful alert forwarding from Wazuh to DFIR-IRIS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G8EOWx19iuYdSS9LalRQvQ.png" /><figcaption><em>Wazuh Threat Hunting dashboard showing recent security events from the monitored Ubuntu agent.</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*QCs_QmAWhgLvmWAIpxZyOg.png" /><figcaption><em>Wazuh document details view showing the event metadata, rule information, and raw log payload used by the integration.</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o5f9DqZ0a_rySRB7srQBJA.png" /><figcaption><em>DFIR-IRIS Alerts page showing alerts successfully ingested from the Wazuh manager.</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i197zvowruDidhRyMG5Wcg.png" /><figcaption><em>DFIR-IRIS alert detail page showing the source reference and deep link back to Wazuh.</em></figcaption></figure><p><strong>References</strong></p><ul><li>Wazuh Quickstart guide: <a href="https://documentation.wazuh.com/current/quickstart.html">https://documentation.wazuh.com/current/quickstart.html</a></li><li>DFIR-IRIS Getting Started guide: <a href="https://docs.dfir-iris.org/latest/">https://docs.dfir-iris.org/latest/</a></li><li>Wazuh integration with third-party APIs: <a href="https://documentation.wazuh.com/current/user-manual/manager/integration-with-external-apis.html">https://documentation.wazuh.com/current/user-manual/manager/integration-with-external-apis.html</a></li><li>DFIR-IRIS alerts documentation: <a href="https://docs.dfir-iris.org/latest/alerts/">https://docs.dfir-iris.org/latest/alerts/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8a66b485099" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying DFIR-IRIS with Docker: A Complete Step-by-Step Guide]]></title>
            <link>https://mahimsec.medium.com/deploying-dfir-iris-with-docker-a-complete-step-by-step-guide-7b38d1d820d2?source=rss-2be56e3c1dcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b38d1d820d2</guid>
            <category><![CDATA[dfir-iris]]></category>
            <category><![CDATA[soc]]></category>
            <category><![CDATA[case-management]]></category>
            <dc:creator><![CDATA[Md. Mahim Hossain]]></dc:creator>
            <pubDate>Thu, 02 Jul 2026 04:35:41 GMT</pubDate>
            <atom:updated>2026-07-02T04:35:41.731Z</atom:updated>
            <content:encoded><![CDATA[<p>Run a powerful incident response platform on your own infrastructure in minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cN-giMwy4i4DIk6I.png" /></figure><h3>Introduction</h3><p>DFIR-IRIS is an open-source incident response platform designed to help security professionals manage cases, track evidence, and collaborate effectively. It provides a structured workflow for handling investigations from start to finish, with features like case management, timeline analysis, and report generation.</p><p>While DFIR-IRIS can be installed manually, using Docker is by far the simplest and most reliable method. This guide will walk you through the entire process, from cloning the repository to accessing your live instance and performing initial configuration.</p><h3>Prerequisites</h3><p>Before you begin, ensure your system meets the following requirements:</p><ul><li>Docker: Installed and running on your system (version 20.10 or later recommended).</li><li>Docker Compose: Installed (usually included with Docker Desktop, or available separately for Linux).</li><li>Git: Installed to clone the repository.</li><li>Hardware: Minimum 4 GB of RAM and 20 GB of free disk space.</li><li>Operating System: Linux, macOS, or Windows with WSL2.</li></ul><h3>Step 1: Clone the Repository and Checkout a Stable Version</h3><p>The first step is to get the source code from the official GitHub repository. Using a stable release version is recommended for production environments.</p><pre>git clone https://github.com/dfir-iris/iris-web.git<br>cd iris-web</pre><p>To check out the latest stable version (replace v2.4.20 with the latest version from the project&#39;s releases page):</p><pre>git checkout v2.4.20</pre><h3>Step 2: Configure the Environment</h3><p>DFIR-IRIS uses environment variables for configuration. A template file named .env.model is included in the repository. Copy this file to create your own .env file.</p><pre>cp .env.model .env</pre><p>You can open the .env file in a text editor to review and customize important settings. Key parameters to consider are:</p><ul><li>SECRET_KEY: A cryptographic key used for session signing and encryption. It&#39;s highly recommended to change this to a unique, random value for production environments.</li><li>POSTGRES_PASSWORD and POSTGRES_USER: The credentials for the PostgreSQL database. Changing these from the defaults is essential for security.</li><li>PORT: The port on which the application will listen. The default is 443 (HTTPS). You can change this if there is a port conflict on your host machine.</li></ul><h3>Step 3: Pull Images and Start the Services</h3><p>With the configuration in place, you can now pull the required Docker images and start the containers.</p><pre>docker compose pull<br>docker compose up -d</pre><p>The pull command downloads the necessary Docker images. The up -d command starts all the services in detached mode, meaning they will run in the background.</p><p>The setup includes five core services:</p><ul><li>app: The main DFIR-IRIS web application.</li><li>db: The PostgreSQL database.</li><li>rabbitmq: The message broker for handling background tasks.</li><li>worker: The worker service that processes asynchronous jobs.</li><li>nginx: The web server that serves the application.</li></ul><h3>Step 4: Access the Application and Retrieve the Admin Password</h3><p>Once the containers are running, the DFIR-IRIS platform should be accessible. By default, it uses HTTPS, so you can access it at https://&lt;your_server_ip&gt;.</p><p>If you are running on your local machine, the address is usually <a href="https://localhost./">https://localhost.</a></p><p>Important: An initial administrator account is created automatically the first time the application runs. The password is generated and printed in the logs of the app container. You need to retrieve it to log in for the first time.</p><p>To find the password, run the following command and look for a line containing WARNING :: post_init :: create_safe_admin :: &gt;&gt;&gt;. The password will be shown there.</p><pre>docker compose logs app | grep &quot;WARNING :: post_init :: create_safe_admin&quot;</pre><h3>Step 5: First Login and Initial Configuration</h3><p>With the password retrieved, you can now log in to the platform. Use the following credentials:</p><ul><li>Username: administrator</li><li>Password: The password you retrieved from the logs.</li></ul><pre>docker compose logs app | grep &quot;WARNING :: post_init :: create_safe_admin&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i93obDbAhNJhPhYl2_nLow.png" /></figure><p>After logging in for the first time, you are strongly advised to change the administrator password immediately. Navigate to the user settings or administration panel to update it to a strong, unique password.</p><p>You are now ready to start using DFIR-IRIS! You can create your first case, add evidence, and begin your investigation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CeGK8dI7LXqdLtJJBUuWew.png" /></figure><h3>Conclusion</h3><p>Deploying DFIR-IRIS with Docker is a straightforward process that allows you to have a robust incident response platform up and running in minutes. By following these steps, you can set up a secure, containerized environment for managing your security incidents.</p><p>For more advanced configurations, such as custom SSL certificates, using an external database, or enabling advanced features like email notifications, refer to the official DFIR-IRIS documentation.</p><p>Happy hunting!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b38d1d820d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Monitoring a Home Server with Prometheus, Grafana, and Node Exporter]]></title>
            <link>https://mahimsec.medium.com/monitoring-a-home-server-with-prometheus-grafana-and-node-exporter-c68b61fb06d9?source=rss-2be56e3c1dcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/c68b61fb06d9</guid>
            <category><![CDATA[node-exporter]]></category>
            <category><![CDATA[soc]]></category>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[grafana]]></category>
            <category><![CDATA[prometheus]]></category>
            <dc:creator><![CDATA[Md. Mahim Hossain]]></dc:creator>
            <pubDate>Thu, 11 Jun 2026 07:11:02 GMT</pubDate>
            <atom:updated>2026-06-11T07:22:58.406Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A step-by-step guide to deploying Prometheus and Grafana with Docker Compose, exposing Linux host metrics through Node Exporter, and importing a ready-made Grafana dashboard.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H1z7_52h-LGrYO4K.png" /></figure><h4>Architecture Overview</h4><p>Before diving into the configuration, it is helpful to understand how these pieces fit together:</p><ul><li>Node Exporter runs natively on the Linux host and exposes system metrics on port 9100.</li><li>Prometheus, running in a Docker container, scrapes metrics from Node Exporter as well as internal metrics from itself.</li><li>Grafana, also running via Docker, connects to Prometheus as a data source and visualizes the collected metrics.</li><li>A community dashboard (Node Exporter Full, ID 1860) is imported into Grafana to provide immediate, out-of-the-box monitoring views.</li></ul><h4>Prerequisites</h4><p>To follow along with this guide, ensure you have the following ready:</p><ul><li>A Linux server or Virtual Machine (VM).</li><li>Docker and Docker Compose installed on the host.</li><li>sudo access for installing Node Exporter as a system-level systemd service.</li><li>Open ports on your host firewall: 3000 (Grafana), 9090 (Prometheus), and 9100 (Node Exporter).</li><li>The internal or static IP address of your server available.</li></ul><h4>Step 1 — Deploy Prometheus with Docker Compose</h4><p>We will start by deploying Prometheus. Using Docker Compose keeps our deployment clean and manageable. First, create a directory for your monitoring stack and create a docker-compose.yml file. Add the following YAML configuration to define the Prometheus service:</p><pre>services:<br>  prometheus:<br>    image: prom/prometheus<br>    container_name: prometheus<br>    command:<br>      - &#39;--config.file=/etc/prometheus/prometheus.yml&#39;<br>    ports:<br>      - 9090:9090<br>    restart: unless-stopped<br>    volumes:<br>      - ./prometheus:/etc/prometheus<br>      - prom_data:/prometheus<br>volumes:<br>  prom_data:</pre><p>Next, you need to create the configuration file that Prometheus will read upon startup. Create a folder named prometheus in the same directory, and inside it, create a file named prometheus.yml. Paste the exact configuration below:</p><pre>global:<br>  scrape_interval: 15s<br>  scrape_timeout: 10s<br>  evaluation_interval: 15s<br>alerting:<br>  alertmanagers:<br>    - static_configs:<br>      - targets: []<br>      scheme: http<br>      timeout: 10s<br>      api_version: v2<br>scrape_configs:<br>  - job_name: prometheus<br>    honor_timestamps: true<br>    scrape_interval: 15s<br>    scrape_timeout: 10s<br>    metrics_path: /metrics<br>    scheme: http<br>    static_configs:<br>      - targets:<br>        - localhost:9090<br>  - job_name: home_lab<br>    static_configs:<br>      - targets: [&#39;&lt;Server_IP&gt;:9100&#39;]</pre><p>This configuration file tells Prometheus how often to scrape data and where to look. We have two jobs defined: one for Prometheus itself, and another called home_lab for our host machine. Please note that the original sample uses the private IP &lt;Server_IP&gt;. You should replace this target IP address with your own server&#39;s IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f_6DqTTnlqT1pa6BA6zcPg.png" /><figcaption>Prometheus target health shows both Prometheus and the home_lab Node Exporter target as UP.</figcaption></figure><blockquote><strong>Note:</strong> If you check your Prometheus targets (at http://SERVER_IP:9090/targets) and see that targets are DOWN, verify your firewall rules, ensure the correct IP and port are configured in your YAML file, and check whether Node Exporter is actually running on the target machine.</blockquote><h4>Step 2 — Install Node Exporter as a systemd service</h4><p>Node Exporter is a lightweight binary that pulls hardware and OS metrics. While you can run it inside a Docker container, it is often more convenient and effective to run it natively on the host system as a systemd service so it has direct access to the kernel and hardware statistics without container boundaries.</p><p>Execute the following commands sequentially to download, extract, and install the binary:</p><pre>wget https://github.com/prometheus/node_exporter/releases/download/v1.11.1/node_exporter-1.11.1.linux-amd64.tar.gz</pre><pre>tar xvf node_exporter-1.11.1.linux-amd64.tar.gz</pre><pre>cd node_exporter-1.11.1.linux-amd64</pre><pre>sudo cp node_exporter /usr/local/bin</pre><pre>sudo useradd --no-create-home --shell /bin/false node_exporter</pre><pre>sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter</pre><pre>sudo nano /etc/systemd/system/node_exporter.service</pre><p>In the text editor, paste the following systemd service configuration exactly as shown:</p><pre>[Unit]<br>Description=Node Exporter<br>Wants=network-online.target<br>After=network-online.target<br><br>[Service]<br>User=node_exporter<br>Group=node_exporter<br>Type=simple<br>ExecStart=/usr/local/bin/node_exporter<br>Restart=always<br>RestartSec=3<br><br>[Install]<br>WantedBy=multi-user.target</pre><p>Save the file and exit your editor. Then, run the following commands to reload systemd, enable the service to start on boot, start it immediately, and check its status:</p><pre>sudo systemctl daemon-reload<br>sudo systemctl enable node_exporter<br>sudo systemctl start node_exporter<br>sudo systemctl status node_exporter.service</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*KR8y-GRnwrbpUaM8oCCbHQ.png" /><figcaption>Node Exporter running as an active systemd service.</figcaption></figure><blockquote><strong>Tip:</strong> You can open http://SERVER_IP:9100/metrics in any web browser to confirm that the raw, text-based metrics are successfully being exposed by the Node Exporter.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ytUdNKPLq6nxZhaYIQwc2A.png" /><figcaption>Prometheus target health shows both Prometheus and the home_lab Node Exporter target as UP.</figcaption></figure><h4>Step 3 — Deploy Grafana with Docker Compose</h4><p>Now that Prometheus is successfully scraping data, we need Grafana to visualize it. We will append Grafana to our existing Docker Compose setup. Open your docker-compose.yml file and update it so that it includes the Grafana service:</p><pre>version: &quot;13.0.2&quot;<br>services:<br>  grafana:<br>    image: grafana/grafana<br>    container_name: grafana<br>    restart: unless-stopped<br>    ports:<br>     - &#39;3000:3000&#39;<br>    volumes:<br>      - grafana-storage:/var/lib/grafana<br>volumes:<br>  grafana-storage: {}</pre><p>This configuration pulls the official Grafana image, maps port 3000, and mounts a volume to persist your dashboard data even if the container is rebuilt.</p><blockquote><strong>Editor’s Note:</strong> Newer Docker Compose versions may warn you that the version attribute at the top of the file is obsolete. If you see this warning, you can safely remove the version line to adhere to modern Compose specifications.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*bNEcebOqAPv9hOsDP0qGNQ.png" /><figcaption>Prometheus container started successfully with Docker Compose.</figcaption></figure><p>Run docker compose up -d to spin up the new Grafana container.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MUPPrZm3EBfMruskhWKBWA.png" /><figcaption>Grafana login page after the container is started.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nhQIlQoPkFdQ9H4G6LjGbA.png" /><figcaption>Grafana home screen after signing in.</figcaption></figure><p>Navigate to http://SERVER_IP:3000 in your browser. You can log in with the default Grafana credentials (usually admin / admin) if they are unchanged. It is highly recommended that you immediately change the admin password when prompted, especially if this server is accessible from outside a private network.</p><h4>Step 4 — Add Prometheus as a Grafana data source</h4><p>Grafana does not store data; it relies on external data sources. Let’s link our newly running Prometheus instance to Grafana so we can start generating graphs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bROmUyOUnCQ-qk-sTIj6hw.png" /><figcaption>Add a new data source in Grafana and choose Prometheus.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aFtMrQvcoa4PvUu7kQRHgw.png" /><figcaption>Configure the Prometheus data source and point Grafana to the Prometheus server URL.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QN17tjPjULJIMvOWxWc9kg.png" /><figcaption>Review the lower data source options before testing the connection.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I6ZL0rMc_rj-umPSWIfIKQ.png" /><figcaption>Grafana successfully queried the Prometheus API.</figcaption></figure><p>In the data source configuration screen, you must enter the HTTP URL for Prometheus. In this specific home lab setup, the URL is <a href="http://server/">http://&lt;S</a>erver_IP&gt;:9090. Make sure to replace this IP address with the actual address of your server. Once entered, click &quot;Save &amp; Test&quot; to ensure Grafana can communicate with the Prometheus API.</p><h4>Step 5 — Import the Node Exporter Full dashboard</h4><p>Building comprehensive dashboards from scratch can be time-consuming. Fortunately, Grafana Labs hosts a vast repository of community-created, reusable dashboards. For server monitoring, the “Node Exporter Full” dashboard is incredibly popular and comprehensive. Its Grafana.com ID is 1860.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hk1gv4kUwBKwyDSN9Fx4XQ.png" /><figcaption>From Dashboards, choose New → Import.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KRCblRvxZyPwqcRwDBD10Q.png" /><figcaption>Use dashboard ID 1860 to load the Node Exporter Full dashboard from Grafana.com.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uU7vi3TRdinHWHlV5pZYjw.png" /><figcaption>The Grafana.com dashboards gallery includes Node Exporter Full.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*biWpesGymc7GolOUDTKqHQ.png" /><figcaption>Node Exporter Full dashboard page on Grafana.com.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Vbh9FnhC4Sh5nTRw9lp-Q.png" /><figcaption>Import the dashboard and confirm the name, folder, and UID options.</figcaption></figure><p>When you click “Load” after entering the ID, Grafana will fetch the dashboard layout. You will be prompted to assign it to a folder and, most importantly, select the Prometheus data source you created in the previous step from a dropdown menu. Select your “home_lab” (or similarly named) Prometheus connection and click “Import”.</p><h4>Step 6 — View the finished dashboard</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1vZuVXarephGjCnnjJpqYA.png" /><figcaption>Node Exporter Full dashboard showing CPU, memory, disk, and network metrics.</figcaption></figure><p>Upon importing, you will immediately be presented with a rich interface displaying your host’s metrics. This dashboard neatly categorizes vital statistics including CPU utilization, memory consumption, disk space and IO limits, and network traffic over time. Monitoring these trends helps you baseline normal system behavior, making it much easier to detect anomalies or resource exhaustion before they cause a critical failure.</p><h3>Conclusion</h3><p>Setting up a comprehensive monitoring solution for your server does not require expensive enterprise software. By utilizing Docker Compose to spin up Prometheus and Grafana, and deploying Node Exporter via systemd, you establish a resilient, highly visible overview of your hardware’s health in minutes. With the foundational data flowing into your beautiful Grafana dashboards, your next steps could include configuring Alertmanager to send Slack or email notifications when CPU spikes, adding more Node Exporters for other servers in your network, or integrating application-level metrics to monitor your distinct software stacks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c68b61fb06d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BunkerWeb Setup and First Tour: Complete Documentation]]></title>
            <link>https://mahimsec.medium.com/bunkerweb-setup-and-first-tour-complete-documentation-469442047cf5?source=rss-2be56e3c1dcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/469442047cf5</guid>
            <category><![CDATA[soc]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[bunkerweb]]></category>
            <category><![CDATA[security-operation-center]]></category>
            <category><![CDATA[monitoring]]></category>
            <dc:creator><![CDATA[Md. Mahim Hossain]]></dc:creator>
            <pubDate>Wed, 10 Jun 2026 05:24:16 GMT</pubDate>
            <atom:updated>2026-06-10T05:24:16.805Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A practical walkthrough for deploying BunkerWeb with Docker and understanding the first screens you will see after installation.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jBm8r1QQS6BDhQSF.png" /></figure><h3>Introduction</h3><p>BunkerWeb is an open-source Web Application Firewall and reverse proxy designed to sit in front of your services, inspect incoming traffic, and block suspicious or malicious requests before they reach your applications. In this guide, you will deploy the All-In-One Docker image, reach the web interface on your LAN IP, complete the setup wizard, and take a first tour through the dashboard, instances, services, and reports screens.</p><h3>Prerequisites</h3><p>Before proceeding, make sure the following basics are in place:</p><ul><li>A Linux host with Docker installed and running.</li><li>Permission to publish ports 80 and 443 on the host.</li><li>A browser on the same network so you can open the setup wizard through the host IP.</li><li>Basic terminal access for running Docker and checking networking with ip a.</li></ul><blockquote><strong>Practical tip:</strong> If you are only testing on a local network, you can complete the first setup using the LAN address and refine public DNS or certificate settings later.</blockquote><h3>Installation</h3><p>We’ll begin by creating a working directory and launching the BunkerWeb Docker container.</p><h4>Step 1: Creating the Working Directory &amp; Running Docker</h4><p>Open your terminal and execute the following commands to create a directory and run the container in detached mode.</p><pre>mkdir BunkerWeb<br>cd BunkerWeb/<br>docker run -d \<br>  --name bunkerweb-aio \<br>  -v bw-storage:/data \<br>  -p 80:8080/tcp \<br>  -p 443:8443/tcp \<br>  -p 443:8443/udp \<br>  bunkerit/bunkerweb-all-in-one:1.6.11</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*5TDHFnluukkdbyONyS7qnA.png" /><figcaption><em>Terminal showing directory creation and the Docker run command executing successfully.</em></figcaption></figure><blockquote><strong>What this command does:</strong> it starts the BunkerWeb all-in-one container in the background, stores persistent data in the bw-storage volume, maps HTTP traffic from host port 80 to the container&#39;s internal port 8080, and maps HTTPS traffic from host port 443 to internal port 8443 for both TCP and UDP.</blockquote><h3>Network Verification</h3><p>To access the web interface, you need the IP address of your host machine. Run ip a and identify the active network interface. In the screenshot, the wireless interface wlo1 is up and shows the host IP address 192.168.0.209.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*896bsYkGE8vAjfI2KxHWow.png" /><figcaption><em>Output of the ‘ip a’ command showing the host IP as 192.168.0.209.</em></figcaption></figure><blockquote><strong>Note:</strong> The UI will be reachable at the host IP shown in your network configuration. For this guide, we use 192.168.0.209.</blockquote><h3>Initial Setup Wizard</h3><p>Open http://192.168.0.209 in your browser to begin the setup process. If name resolution and TLS are not configured yet, starting with plain HTTP on the LAN IP is the fastest way to reach the initial wizard.</p><h4>Step 1: Admin User</h4><p>The first step requires creating an administrator account. Ensure you use a strong password meeting the specified criteria.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h85NcuneGayJmHvqJcEY0w.png" /><figcaption><em>Creating the primary admin account.</em></figcaption></figure><h4>Step 2: UI Settings</h4><p>This screen controls core web UI behavior. You can define the server name, decide whether to request Let’s Encrypt certificates automatically, choose the challenge type, and tune certificate-related settings such as DNS provider and propagation delay. For a quick lab deployment, you can keep things simple and return later once DNS is fully in place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*9OHYqWcaMQTy3pOW4a4Fvg.png" /><figcaption><em>Configuring server details and SSL options.</em></figcaption></figure><h4>Step 3: Upgrade to PRO</h4><p>BunkerWeb also offers a PRO tier. This step is optional: if you already have a license, you can enter it here; otherwise, continue with the free plan and finish the deployment first. The important point is that the wizard does not block initial setup if you skip the upgrade.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*CqZH3oIhBokLBBzm_Bp4gg.png" /><figcaption><em>The PRO upgrade screen.</em></figcaption></figure><h4>Step 4: Overview</h4><p>The final review screen summarizes the values entered during the wizard, including the admin username and the URL that will be used for the BunkerWeb UI. This is the right place to confirm there are no typos before clicking the final setup button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*M1snj9RYa_4P2oCryugQ3A.png" /><figcaption><em>Final review of setup parameters.</em></figcaption></figure><h3>Touring the Interface</h3><p>After the wizard finishes, BunkerWeb presents the standard login form. Use the administrator credentials created in step one to sign in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/306/1*6-90kSljShotU3jLqt2SZA.png" /><figcaption><em>The BunkerWeb admin login screen.</em></figcaption></figure><blockquote><strong>Security reminder:</strong> avoid reusing a weak lab password in production. If this instance will be exposed outside your private network, rotate credentials and confirm HTTPS is configured correctly before broad access is allowed.</blockquote><h4>Dashboard</h4><p>The dashboard is the operational landing page. It summarizes plan information, memory consumption, instance count, service count, plugin count, total requests, and blocked requests. It is the fastest place to confirm that the container is alive and that BunkerWeb is already collecting traffic and security data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*di8PjhziUP0V7XOOTazB-g.png" /><figcaption><em>Dashboard showing system RAM and instances.</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uIXvHm55j5xBkmDJejty1A.png" /><figcaption><em>Dashboard detailing traffic requests and blocked IPs.</em></figcaption></figure><h4>Instances</h4><p>The <strong>Instances</strong> page lists the BunkerWeb nodes currently registered in the platform. In a small single-node setup, this is where you verify that the local instance is present, marked healthy, and regularly seen by the UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pzIosQoNRagYaY75pSE01A.png" /><figcaption><em>Managing BunkerWeb instances.</em></figcaption></figure><h4>Services</h4><p>The <strong>Services</strong> page is where you define and manage protected applications. Each row represents a service exposed through BunkerWeb, including its type, security mode, selected template, and current state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6wPkD9_Qd0n5zeUh8S0YaQ.png" /><figcaption><em>The Services configuration panel.</em></figcaption></figure><h4>Reports</h4><p>The <strong>Reports</strong> page gives you visibility into incoming requests and security events. This is the best place to inspect suspicious URLs, review source IP addresses, and confirm whether BunkerWeb is blocking payloads as expected.</p><h3>Security and Operational Notes</h3><ul><li>Use a strong administrator password and store it securely.</li><li>Prefer a unique server name that matches your DNS plan before enabling public certificates.</li><li>Keep Docker images updated so you receive security fixes and platform improvements.</li><li>Review the <strong>Reports</strong> page regularly after publishing a service to understand normal versus suspicious traffic.</li><li>Start with a minimal test service, validate routing and certificates, then add more applications gradually.</li></ul><blockquote><strong>Recommended first validation:</strong> after login, check that the instance is healthy, confirm the service appears online, and review the reports page for the first requests reaching the platform.</blockquote><h3>Attack Perform</h3><h4>SQL Injection Attack</h4><pre># Test command sent by attacker<br>curl -k -v &quot;https://192.168.0.209/?id=1&#39;%20OR%20&#39;1&#39;=&#39;1&quot;</pre><p>Step-by-step process with comments:</p><pre># ============================================<br># 1. REQUEST RECEIVED BY BUNKERWEB (NGINX)<br># ============================================<br><br># Client sends: GET /?id=1&#39; OR &#39;1&#39;=&#39;1<br># Source IP: 192.168.0.209 (local test)<br><br># ============================================<br># 2. NGINX CONFIGURATION LOADS MODSECURITY<br># ============================================<br><br># /etc/nginx/sites-enabled/bunkerweb.conf<br>server {<br>    listen 8443 ssl http2;<br>    <br>    # ModSecurity module is enabled<br>    modsecurity on;<br>    modsecurity_rules_file /etc/nginx/modsec/main.conf;<br>}<br><br># ============================================<br># 3. MODSECURITY PROCESSES THE REQUEST<br># ============================================<br><br># /etc/modsec/main.conf includes OWASP CRS<br>Include /etc/modsec/crs/crs-setup.conf<br>Include /etc/modsec/crs/rules/*.conf<br><br># ============================================<br># 4. OWASP CRS RULE MATCHES SQL INJECTION<br># ============================================<br><br># Rule ID: 942100 - SQL Injection Attack Detected<br># File: /etc/modsec/crs/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf<br><br>SecRule ARGS|ARGS_NAMES|REQUEST_HEADERS|XML:/* \<br>    &quot;@detectSQLi&quot; \<br>    &quot;id:942100,\<br>    phase:2,\<br>    block,\<br>    t:none,\<br>    msg:&#39;SQL Injection Attack Detected&#39;,\<br>    logdata:&#39;Matched Data: %{TX.0}&#39;,\<br>    severity:&#39;CRITICAL&#39;,\<br>    setvar:&#39;tx.sql_injection_score=+1&#39;,\<br>    chain&quot;<br><br># Pattern matched: &#39; OR &#39;1&#39;=&#39;1<br># This triggers the blocking action<br><br># ============================================<br># 5. BLOCKING ACTION EXECUTED<br># ============================================<br><br># ModSecurity denies the request<br># Sets HTTP response to 403 Forbidden<br># Adds security headers<br><br>location / {<br>    # Request denied before reaching backend<br>    return 403;<br>}<br><br># ============================================<br># 6. RESPONSE SENT BACK TO ATTACKER<br># ============================================<br><br># HTTP Response Headers:<br>&lt; HTTP/2 403 Forbidden<br>&lt; date: Wed, 10 Jun 2026 04:05:10 GMT<br>&lt; content-type: text/html<br>&lt; x-frame-options: SAMEORIGIN<br>&lt; x-xss-protection: 1; mode=block<br>&lt; strict-transport-security: max-age=63072000</pre><h4>XSS (Cross-Site Scripting)</h4><pre># Test command<br>curl -k -v &quot;https://192.168.0.209/?search=&lt;script&gt;alert(&#39;xss&#39;)&lt;/script&gt;&quot;</pre><p>Process with comments:</p><pre># ============================================<br># 1. MALICIOUS PAYLOAD DETECTED<br># ============================================<br><br># Payload: &lt;script&gt;alert(&#39;xss&#39;)&lt;/script&gt;<br># Argument: search<br><br># ============================================<br># 2. OWASP CRS XSS RULE MATCHES<br># ============================================<br><br># Rule ID: 941100 - XSS Attack Detected<br># File: /etc/modsec/crs/rules/REQUEST-941-APPLICATION-ATTACK-XSS.conf<br><br>SecRule ARGS|ARGS_NAMES|REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/ \<br>    &quot;@rx &lt;script.*&gt;.*&lt;/script&gt;&quot; \<br>    &quot;id:941100,\<br>    phase:2,\<br>    deny,\<br>    status:403,\<br>    msg:&#39;XSS Attack Detected&#39;,\<br>    logdata:&#39;Matched Data: %{TX.0}&#39;,\<br>    severity:&#39;CRITICAL&#39;&quot;<br><br># Pattern &lt;script&gt; detected → immediate DENY<br><br># ============================================<br># 3. RESPONSE: 403 FORBIDDEN<br># ============================================<br><br>&lt; HTTP/2 403 Forbidden<br>&lt; content-security-policy: object-src &#39;none&#39;</pre><h4>Path Traversal Blocking Process</h4><pre># Test command<br>curl -k -v &quot;https://192.168.0.209/../../etc/passwd&quot;</pre><p>Process with comments:</p><pre># ============================================<br># 1. PATH TRAVERSAL PATTERN DETECTED<br># ============================================<br><br># Request URI: /../../etc/passwd<br># Contains directory traversal sequence: ../<br><br># ============================================<br># 2. OWASP CRS PATH TRAVERSAL RULE<br># ============================================<br><br># Rule ID: 930120 - OS File Access Attempt<br># File: /etc/modsec/crs/rules/REQUEST-930-APPLICATION-ATTACK-LFI.conf<br><br>SecRule REQUEST_URI \<br>    &quot;@rx \.\./|\.\.\\\\|/etc/passwd|/win\.ini&quot; \<br>    &quot;id:930120,\<br>    phase:1,\<br>    deny,\<br>    status:404,\<br>    msg:&#39;OS File Access Attempt&#39;,\<br>    severity:&#39;CRITICAL&#39;&quot;<br><br># Matched: /etc/passwd and ../<br># Action: deny with status 404 (hides existence)<br><br># ============================================<br># 3. 404 RESPONSE (NOT FOUND)<br># ============================================<br><br># Server returns 404 instead of 403<br># This is a security measure - doesn&#39;t reveal if file exists<br><br>&lt; HTTP/2 404 Not Found<br>&lt; cache-control: no-cache, no-store, must-revalidate</pre><h4>Complete Request Flow Diagram With Comments</h4><pre># ============================================================================<br># FULL ATTACK BLOCKING PIPELINE<br># ============================================================================<br><br>[CLIENT] <br>    │<br>    │ 1. HTTP Request with malicious payload<br>    │    GET /?id=1&#39;+OR+&#39;1&#39;=&#39;1<br>    ▼<br>[NGINX] <br>    │<br>    │ 2. Receives request on port 443 (HTTPS)<br>    │    TLS termination handled<br>    ▼<br>[MODSECURITY ENGINE]<br>    │<br>    │ 3. Phase 1: Request Headers Inspection<br>    │    - Check method, URI, headers<br>    │    - No anomaly detected<br>    ▼<br>[MODSECURITY PHASE 2]<br>    │<br>    │ 4. Request Body &amp; Arguments Inspection<br>    │    - Parse ARGS: id=1&#39;+OR+&#39;1&#39;=&#39;1<br>    │    - Run through 200+ CRS rules<br>    │<br>    ├─▶ Rule 942100: &quot;@detectSQLi&quot; → MATCH!<br>    │<br>    │   Action: deny, status:403, severity:CRITICAL<br>    │<br>    ▼<br>[DECISION: BLOCK]<br>    │<br>    │ 5. ModSecurity sets:<br>    │    - deny_status = 403<br>    │    - error_message = &quot;SQL Injection Attack Detected&quot;<br>    │<br>    ▼<br>[NGINX RESPONSE GENERATION]<br>    │<br>    │ 6. Returns 403 Forbidden with:<br>    │    - Security headers (X-Frame-Options, CSP, etc.)<br>    │    - HTML error page<br>    │<br>    ▼<br>[CLIENT RECEIVES]<br>    │<br>    │ 7. HTTP/2 403 Forbidden<br>    │    &lt;html&gt;403 Forbidden&lt;/html&gt;<br>    │<br>    ▼<br>[LOGGING]<br>    │<br>    │ 8. Attack logged to:<br>    │    - /var/log/nginx/error.log<br>    │    - /var/log/modsec/audit.log<br>    │<br>    └─▶ docker logs bunkerweb-aio (shows block entry)</pre><h4>ModSecurity Audit Log Entry (Example)</h4><pre># Location: /var/log/modsec/audit.log<br># This is what gets recorded when an attack is blocked<br><br>--14a53e2c-A--<br>[10/Jun/2026:04:05:10 +0000] 192.168.0.209 443 192.168.0.209<br>GET /?id=1&#39;%20OR%20&#39;1&#39;=&#39;1 HTTP/2.0<br>User-Agent: curl/8.18.0<br><br>--14a53e2c-B--<br>GET /?id=1&#39;%20OR%20&#39;1&#39;=&#39;1 HTTP/2.0<br>Host: 192.168.0.209<br><br>--14a53e2c-C--<br>id=1&#39; OR &#39;1&#39;=&#39;1<br><br>--14a53e2c-D--<br># ModSecurity Intervention Details<br>Apache-Error: File: /etc/modsec/crs/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf<br>Apache-Error: Line: 85<br>Apache-Error: RuleId: 942100<br>Apache-Error: Msg: SQL Injection Attack Detected<br><br>--14a53e2c-E--<br>HTTP/2.0 403 Forbidden<br>Content-Length: 146<br>X-Frame-Options: SAMEORIGIN<br>X-XSS-Protection: 1; mode=block</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hBt_0Y-j99dStFDIqgdobg.png" /><figcaption><em>Detailed logs of incoming requests and security events.</em></figcaption></figure><h3>Troubleshooting</h3><blockquote><strong>Common Issues:</strong></blockquote><blockquote><strong>Image Pull Issues:</strong> Ensure your Docker daemon has internet access if you see “Unable to find image locally”.</blockquote><blockquote><strong>Port Exposure:</strong> Verify ports 80 and 443 aren’t already in use by other services like Apache or Nginx on your host.</blockquote><blockquote><strong>Local IP Access:</strong> If the web UI isn’t loading, re-check your IP address using ip a and ensure firewall rules allow incoming traffic on ports 80 and 443.</blockquote><h3>Conclusion</h3><p>You now have a working BunkerWeb installation, have completed the four-step wizard, and have seen the key pages that matter most on day one: dashboard, instances, services, and reports. From here, the natural next step is to publish a real service behind BunkerWeb, enable the appropriate TLS and security settings, and monitor the platform as traffic begins to flow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=469442047cf5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Install QEMU and KVM on Kali Linux]]></title>
            <link>https://mahimsec.medium.com/how-to-install-qemu-and-kvm-on-kali-linux-0a16c722b504?source=rss-2be56e3c1dcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/0a16c722b504</guid>
            <category><![CDATA[virtual-machine]]></category>
            <category><![CDATA[kvm]]></category>
            <category><![CDATA[debain]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[qemu]]></category>
            <dc:creator><![CDATA[Md. Mahim Hossain]]></dc:creator>
            <pubDate>Fri, 15 May 2026 20:11:30 GMT</pubDate>
            <atom:updated>2026-05-15T20:11:30.902Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re running Kali Linux and want to spin up virtual machines with near-native performance, QEMU paired with KVM acceleration is the way to go. The easiest and most powerful way to manage these VMs is by using virt-manager, a user-friendly graphical interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MSad3KgidLCVStu-.jpg" /></figure><h4>In this guide, I’ll walk you through the entire setup process step by step:</h4><h4>Step 1: Update Your System</h4><p>Start by updating your package lists and upgrading existing packages:</p><pre>sudo apt update &amp;&amp; sudo apt upgrade -y</pre><h4>Step 2: Install QEMU, KVM, and virt-manager</h4><p>Install the core QEMU system, KVM hypervisor, virtualization libraries, and virt-manager:</p><pre>sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager -y</pre><h4>Step 3: Configure User Permissions</h4><p>Add your current user to the libvirt and kvm groups. This allows you to manage VMs without needing sudo every time:</p><pre>sudo usermod -aG libvirt $USER<br>sudo adduser $USER kvm</pre><blockquote>⚠️ Note: You’ll need to log out and back in (or reboot) for these group changes to take effect.</blockquote><h4>Step 4: Enable and Start the Virtualization Service</h4><p>Start the libvirtd service and enable it to launch automatically on boot:</p><pre>sudo systemctl enable --now libvirtd</pre><p>If needed, you can manually start it later with:</p><pre>sudo systemctl start libvirtd</pre><h4>Step 5: Verify the Installation</h4><p>Check if KVM modules are loaded correctly:</p><pre>lsmod | grep kvm</pre><p>You should see output containing kvm and either kvm_intel or kvm_amd, depending on your CPU.</p><p>✅ If you see those lines, KVM is working properly.</p><h3>Next Steps</h3><p>Launch virt-manager from your terminal or application menu:</p><p>bash</p><pre>virt-manager</pre><p>From there, you can create and manage virtual machines with ease.</p><h3>Final Thoughts</h3><p>You’ve successfully installed QEMU with KVM acceleration on Kali Linux. This setup gives you lightweight, high-performance virtualization — perfect for testing, development, or running additional operating systems alongside Kali.</p><p>If you run into any issues, double-check that virtualization is enabled in your system’s BIOS/UEFI.</p><p>Happy virtualizing! 🐧💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0a16c722b504" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SOC Lab Deployment Documentation: TheHive 5.2 + Cortex + MISP + Dependencies]]></title>
            <link>https://mahimsec.medium.com/soc-lab-deployment-documentation-thehive-5-2-cortex-misp-dependencies-c7f494d780ca?source=rss-2be56e3c1dcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7f494d780ca</guid>
            <category><![CDATA[soc]]></category>
            <category><![CDATA[cortex]]></category>
            <category><![CDATA[misp]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[the-hive]]></category>
            <dc:creator><![CDATA[Md. Mahim Hossain]]></dc:creator>
            <pubDate>Mon, 11 May 2026 10:53:24 GMT</pubDate>
            <atom:updated>2026-05-11T10:53:24.450Z</atom:updated>
            <content:encoded><![CDATA[<p>This documentation describes the complete deployment of a Security Operations Center (SOC) lab environment using Docker Compose. The stack includes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5aA36K8w6sYVANlL.png" /></figure><h3>Step-by-Step Deployment Process</h3><h4>Step 1: Create a project directory and necessary subdirectories/files:</h4><pre>mkdir -p ~/soc-lab/{cortex/logs,server-configs,logs,files,ssl}<br>cd ~/soc-lab</pre><p>Place your docker-compose.yml in ~/soc-lab/.</p><pre>~/soc-lab/<br>├── docker-compose.yml          # Main compose file<br>├── thehive.conf                # TheHive configuration (MISP integration)<br>├── cortex/<br>│   ├── logs/                   # Cortex log directory<br>│   └── application.conf        # Cortex configuration<br>├── server-configs/             # MISP configuration files<br>├── logs/                       # MISP logs<br>├── files/                      # MISP file storage<br>└── ssl/                        # SSL certificates</pre><h4>Step 2: Add User to Docker Group (Optional but Recommended)</h4><pre>sudo usermod -aG docker $USER<br>newgrp docker</pre><h4>Step 3: Create TheHive Configuration File</h4><p>TheHive requires an application.conf file. Create ~/soc-lab/thehive.conf</p><pre>nano ~/soc-lab/thehive.conf</pre><p>Paste this content:</p><pre># ============================================<br># TheHive 5.2 Configuration File<br># ============================================<br><br># MISP Module Enable<br>play.modules.enabled += org.thp.thehive.connector.misp.MispModule<br><br># MISP Server Configuration<br>misp {<br>  interval: 1 hour<br>  servers: [<br>    {<br>      name = &quot;MISP&quot;<br>      url = &quot;https://misp.local&quot;           # MISP container name (Docker DNS)<br>      auth {<br>        type = key<br>        key = &quot;Yl1M7biMolOcb1qk7HCgNih3OjpUyUJqesDXtazB&quot;<br>      }<br>      tags = [&quot;tag1&quot;, &quot;tag2&quot;, &quot;tag3&quot;]<br>      caseTemplate = &quot;misp&quot;<br>      includedTheHiveOrganisations = [&quot;Morgan Maxwell&quot;]<br><br>      # SSL/TLS Settings (for self-signed certs)<br>      wsConfig.ssl.loose.acceptAnyCertificate = true<br>      wsConfig.ssl.loose.allowWeakCiphers = true<br>    }<br>  ]<br>}</pre><h4>Step 4: Create Cortex Configuration</h4><p>Create ~/soc-lab/cortex/application.conf</p><pre>nano ~/soc-lab/cortex/application.conf</pre><p>Paste this content:</p><pre># ============================================<br># Cortex Configuration File<br># ============================================<br><br># Application Secret (generate a strong one for production)<br>play.http.secret.key=&quot;changeme-please-generate-a-32-char-secret-key-here&quot;<br><br># Search Configuration (Elasticsearch)<br>search {<br>  index = cortex<br>  uri = &quot;http://elasticsearch:9200&quot;<br>}<br><br># Analyzer Paths<br>analyzer {<br>  path = [&quot;/opt/cortex/analyzers&quot;]<br>}<br><br># Job Directories<br>job {<br>  directory = &quot;/tmp/cortex-jobs&quot;<br>  dockerDirectory = &quot;/tmp/cortex-jobs&quot;<br>}<br><br># Authentication<br>auth {<br>  method = [<br>    {<br>      name = local<br>      provider = local<br>    }<br>  ]<br>}<br><br># Organization Settings<br>organization {<br>  name = &quot;SOC-Lab&quot;<br>}</pre><h4>Step 5: Create the Docker Compose File</h4><pre>nano ~/soc-lab/docker-compose.yml</pre><p>Paste this COMPLETE configuration:</p><pre># ============================================<br># SOC Lab Stack - Docker Compose<br># TheHive 5.2 + Cortex + MISP + Dependencies<br># ============================================<br><br>services:<br>  # ------------------------------------------<br>  # 1. CASSANDRA (TheHive Database)<br>  # ------------------------------------------<br>  cassandra:<br>    image: cassandra:4<br>    container_name: soc-cassandra<br>    restart: unless-stopped<br>    ports:<br>      - &quot;9042:9042&quot;<br>    environment:<br>      - CASSANDRA_CLUSTER_NAME=TheHive<br>      - CASSANDRA_NUM_TOKENS=256<br>      - CASSANDRA_START_RPC=true<br>    volumes:<br>      - cassandradata:/var/lib/cassandra<br>    networks:<br>      - SOC_NET<br>    healthcheck:<br>      test: [&quot;CMD&quot;, &quot;cqlsh&quot;, &quot;-e&quot;, &quot;describe keyspaces&quot;]<br>      interval: 30s<br>      timeout: 10s<br>      retries: 5<br><br>  # ------------------------------------------<br>  # 2. ELASTICSEARCH (Search &amp; Indexing)<br>  # ------------------------------------------<br>  elasticsearch:<br>    image: docker.elastic.co/elasticsearch/elasticsearch:7.17.9<br>    container_name: soc-elasticsearch<br>    restart: unless-stopped<br>    mem_limit: 512m<br>    ports:<br>      - &quot;9200:9200&quot;<br>    environment:<br>      - discovery.type=single-node<br>      - xpack.security.enabled=false<br>      - cluster.name=hive<br>      - http.host=0.0.0.0<br>      - &quot;ES_JAVA_OPTS=-Xms256m -Xmx256m&quot;<br>      - bootstrap.memory_lock=true<br>    ulimits:<br>      memlock:<br>        soft: -1<br>        hard: -1<br>    volumes:<br>      - elasticsearchdata:/usr/share/elasticsearch/data<br>    networks:<br>      - SOC_NET<br>    healthcheck:<br>      test: [&quot;CMD&quot;, &quot;curl&quot;, &quot;-f&quot;, &quot;http://localhost:9200/_cluster/health&quot;]<br>      interval: 30s<br>      timeout: 10s<br>      retries: 5<br><br>  # ------------------------------------------<br>  # 3. MINIO (S3-Compatible Object Storage)<br>  # ------------------------------------------<br>  minio:<br>    image: quay.io/minio/minio:latest<br>    container_name: soc-minio<br>    restart: unless-stopped<br>    command: [&quot;server&quot;, &quot;/data&quot;, &quot;--console-address&quot;, &quot;:9002&quot;]<br>    environment:<br>      - MINIO_ROOT_USER=minioadmin<br>      - MINIO_ROOT_PASSWORD=minioadmin<br>    ports:<br>      - &quot;9002:9002&quot;<br>    volumes:<br>      - miniodata:/data<br>    networks:<br>      - SOC_NET<br>    healthcheck:<br>      test: [&quot;CMD&quot;, &quot;curl&quot;, &quot;-f&quot;, &quot;http://localhost:9002/minio/health/live&quot;]<br>      interval: 30s<br>      timeout: 10s<br>      retries: 3<br><br>  # ------------------------------------------<br>  # 4. CORTEX (Observable Analysis Engine)<br>  # ------------------------------------------<br>  cortex.local:<br>    image: thehiveproject/cortex:latest<br>    container_name: soc-cortex<br>    restart: unless-stopped<br>    environment:<br>      - job_directory=/tmp/cortex-jobs<br>      - docker_job_directory=/tmp/cortex-jobs<br>    volumes:<br>      - /var/run/docker.sock:/var/run/docker.sock<br>      - /tmp/cortex-jobs:/tmp/cortex-jobs<br>      - ./cortex/logs:/var/log/cortex<br>      - ./cortex/application.conf:/cortex/application.conf:ro<br>    depends_on:<br>      elasticsearch:<br>        condition: service_healthy<br>    ports:<br>      - &quot;9001:9001&quot;<br>    networks:<br>      - SOC_NET<br><br>  # ------------------------------------------<br>  # 5. THEHIVE (Incident Response Platform)<br>  # ------------------------------------------<br>  thehive:<br>    image: strangebee/thehive:5.2<br>    container_name: soc-thehive<br>    restart: unless-stopped<br>    depends_on:<br>      cassandra:<br>        condition: service_healthy<br>      elasticsearch:<br>        condition: service_healthy<br>      minio:<br>        condition: service_healthy<br>      cortex.local:<br>        condition: service_started<br>    mem_limit: 1500m<br>    ports:<br>      - &quot;9000:9000&quot;<br>    environment:<br>      - JVM_OPTS=&quot;-Xms1024M -Xmx1024M&quot;<br>    command:<br>      - --secret<br>      - &quot;lab123456789&quot;<br>      - &quot;--cql-hostnames&quot;<br>      - &quot;cassandra&quot;<br>      - &quot;--index-backend&quot;<br>      - &quot;elasticsearch&quot;<br>      - &quot;--es-hostnames&quot;<br>      - &quot;elasticsearch&quot;<br>      - &quot;--s3-endpoint&quot;<br>      - &quot;http://minio:9002&quot;<br>      - &quot;--s3-access-key&quot;<br>      - &quot;minioadmin&quot;<br>      - &quot;--s3-secret-key&quot;<br>      - &quot;minioadmin&quot;<br>      - &quot;--s3-use-path-access-style&quot;<br>    volumes:<br>      - ./thehive.conf:/etc/thehive/application.conf:ro    # FIXED: Bind mount for config<br>      - thehivedata:/etc/thehive/data                      # Data volume<br>    networks:<br>      - SOC_NET<br><br>  # ------------------------------------------<br>  # 6. MISP MYSQL (Database for MISP)<br>  # ------------------------------------------<br>  misp_mysql:<br>    image: mysql/mysql-server:5.7<br>    container_name: soc-misp-mysql<br>    restart: unless-stopped<br>    volumes:<br>      - mispsqldata:/var/lib/mysql<br>    environment:<br>      - MYSQL_DATABASE=mispdb<br>      - MYSQL_USER=mispuser<br>      - MYSQL_PASSWORD=misppass<br>      - MYSQL_ROOT_PASSWORD=mispass<br>    networks:<br>      - SOC_NET<br>    healthcheck:<br>      test: [&quot;CMD&quot;, &quot;mysqladmin&quot;, &quot;ping&quot;, &quot;-h&quot;, &quot;localhost&quot;]<br>      interval: 30s<br>      timeout: 10s<br>      retries: 5<br><br>  # ------------------------------------------<br>  # 7. REDIS (Cache for MISP)<br>  # ------------------------------------------<br>  redis:<br>    image: redis:latest<br>    container_name: soc-redis<br>    restart: unless-stopped<br>    networks:<br>      - SOC_NET<br>    healthcheck:<br>      test: [&quot;CMD&quot;, &quot;redis-cli&quot;, &quot;ping&quot;]<br>      interval: 10s<br>      timeout: 3s<br>      retries: 5<br><br>  # ------------------------------------------<br>  # 8. MISP (Threat Intelligence Platform)<br>  # ------------------------------------------<br>  misp.local:<br>    image: coolacid/misp-docker:core-latest<br>    container_name: soc-misp<br>    restart: unless-stopped<br>    depends_on:<br>      misp_mysql:<br>        condition: service_healthy<br>      redis:<br>        condition: service_healthy<br>    ports:<br>      - &quot;80:80&quot;<br>      - &quot;443:443&quot;<br>    volumes:<br>      - &quot;./server-configs/:/var/www/MISP/app/Config/&quot;<br>      - &quot;./logs/:/var/www/MISP/app/tmp/logs/&quot;<br>      - &quot;./files/:/var/www/MISP/app/files&quot;<br>      - &quot;./ssl/:/etc/nginx/certs&quot;<br>    environment:<br>      - MYSQL_HOST=misp_mysql<br>      - MYSQL_DATABASE=mispdb<br>      - MYSQL_USER=mispuser<br>      - MYSQL_PASSWORD=misppass<br>      - MYSQL_ROOT_PASSWORD=mispass<br>      - MISP_ADMIN_EMAIL=mispadmin@lab.local<br>      - MISP_ADMIN_PASSPHRASE=mispadminpass<br>      - MISP_BASEURL=https://192.168.0.107        # ← REPLACE WITH YOUR IP<br>      - TIMEZONE=Asia/Dhaka<br>      - INIT=true<br>      - CRON_USER_ID=1<br>      - REDIS_FQDN=redis<br>      - HOSTNAME=https://192.168.0.107            # ← REPLACE WITH YOUR IP<br>    networks:<br>      - SOC_NET<br><br>  # ------------------------------------------<br>  # 9. MISP MODULES (Enrichment Services)<br>  # ------------------------------------------<br>  misp-modules:<br>    image: coolacid/misp-docker:modules-latest<br>    container_name: soc-misp-modules<br>    restart: unless-stopped<br>    environment:<br>      - &quot;REDIS_BACKEND=redis&quot;<br>    depends_on:<br>      - redis<br>      - misp_mysql<br>    networks:<br>      - SOC_NET<br><br># ============================================<br># VOLUMES<br># ============================================<br>volumes:<br>  miniodata:<br>  cassandradata:<br>  elasticsearchdata:<br>  thehivedata:<br>  mispsqldata:<br><br># ============================================<br># NETWORKS<br># ============================================<br>networks:<br>  SOC_NET:<br>    driver: bridge<br>    ipam:<br>      config:<br>        - subnet: 172.20.0.0/16</pre><h4>Step 6: Fix MISP Configuration Issues</h4><p>Your MISP container has placeholder &lt;IP&gt; values. Replace these with your actual server IP or domain:</p><pre># Get your server IP<br>ip addr show | grep &quot;inet &quot; | head -1<br># Example: If your IP is 192.168.1.100, use:<br># MISP_BASEURL=https://192.168.1.100<br># HOSTNAME=https://192.168.1.100</pre><pre>environment:<br>  - MISP_BASEURL=https://192.168.1.100    # ← Replace with your IP<br>  - HOSTNAME=https://192.168.1.100        # ← Replace with your IP</pre><h4>Step 7: Deploy the Stack</h4><pre>cd ~/soc-lab<br><br># Pull images first<br>docker-compose pull<br><br># Start services (detached mode)<br>docker-compose up -d<br><br># Check service status<br>docker-compose ps</pre><h4>Step 8: Access &amp; Initial Setup</h4><pre>| Service           | URL                          | Purpose             |<br>| ----------------- | ---------------------------- | ------------------- |<br>| **TheHive**       | `http://YOUR_SERVER_IP:9000` | Incident Response   |<br>| **Cortex**        | `http://YOUR_SERVER_IP:9001` | Observable Analysis |<br>| **MISP**          | `https://YOUR_SERVER_IP`     | Threat Intelligence |<br>| **MinIO Console** | `http://YOUR_SERVER_IP:9002` | File Storage        |<br>| **Elasticsearch** | `http://YOUR_SERVER_IP:9200` | Search Index        |</pre><h4>Step 9: Enable Firewall</h4><pre>sudo ufw default deny incoming<br>sudo ufw default allow outgoing<br><br># Allow necessary ports<br>sudo ufw allow 22/tcp      # SSH<br>sudo ufw allow 80/tcp      # MISP HTTP<br>sudo ufw allow 443/tcp     # MISP HTTPS<br>sudo ufw allow 9000/tcp    # TheHive<br>sudo ufw allow 9001/tcp    # Cortex<br>sudo ufw allow 9002/tcp    # MinIO Console<br><br>sudo ufw enable</pre><h4>Step 10: All Services — User &amp; Password Table</h4><pre># Generate strong passwords<br>openssl rand -base64 32</pre><pre>| # | Service     | URL                         | Username / Email      | Password              | Notes                                           |<br>| - | ----------- | --------------------------- | --------------------- | --------------------- | ----------------------------------------------- |<br>| 1 | **TheHive** | `http://192.168.0.107:9000` | `admin@thehive.local` | `secret`              | Change on first login                           |<br>| 2 | **Cortex**  | `http://192.168.0.107:9001` | Create on first setup | Create on first setup | Click &quot;Update Database&quot;, then create superadmin |<br>| 3 | **MISP**    | `https://192.168.0.107`     | `mispadmin@lab.local` | `mispadmin            |     </pre><h3>Quick Commands Reference</h3><pre># Start all services<br>docker-compose up -d<br># Stop all services<br>docker-compose down<br># Stop and remove volumes (WARNING: deletes data)<br>docker-compose down -v<br># View logs<br>docker-compose logs -f [service_name]<br># Restart specific service<br>docker-compose restart thehive<br># Scale check (resource monitoring)<br>docker stats</pre><h3>Appendix: Network Diagram</h3><pre>┌─────────────────────────────────────────┐<br>│           Docker Network: SOC_NET       │<br>│         (Subnet: 172.20.0.0/16)         │<br>│                                         │<br>│  ┌──────────┐    ┌──────────────┐       │<br>│  │ TheHive  │◄──►│  Cassandra   │       │<br>│  │  :9000   │    │    :9042     │       │<br>│  └────┬─────┘    └──────────────┘       │<br>│       │                                 │<br>│       │         ┌──────────────┐        │<br>│       │         │Elasticsearch │        │<br>│       │         │    :9200     │        │<br>│       │         └──────────────┘        │<br>│       │                                 │<br>│       │         ┌──────────────┐        │<br>│       │         │    MinIO     │        │<br>│       │         │    :9002     │        │<br>│       │         └──────────────┘        │<br>│       │                                 │<br>│       └────────►┌──────────────┐        │<br>│                 │   Cortex     │        │<br>│                 │    :9001     │        │<br>│                 └──────────────┘        │<br>│                                         │<br>│  ┌──────────┐    ┌──────────────┐       │<br>│  │   MISP   │◄──►│  MISP MySQL  │       │<br>│  │  :80/443 │    │    :3306     │       │<br>│  └────┬─────┘    └──────────────┘       │<br>│       │                                 │<br>│       └────────►┌──────────────┐        │<br>│                 │    Redis     │        │<br>│                 │    :6379     │        │<br>│                 └──────────────┘        │<br>│                                         │<br>└─────────────────────────────────────────┘</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7f494d780ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Complete Guide: Installing Shuffle SOAR on Ubuntu Server 22.04.5 with Docker]]></title>
            <link>https://mahimsec.medium.com/complete-guide-installing-shuffle-soar-on-ubuntu-server-22-04-5-with-docker-aa2cc1ad5b9a?source=rss-2be56e3c1dcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa2cc1ad5b9a</guid>
            <category><![CDATA[soar]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[shuffle]]></category>
            <category><![CDATA[soc]]></category>
            <dc:creator><![CDATA[Md. Mahim Hossain]]></dc:creator>
            <pubDate>Sun, 10 May 2026 06:56:18 GMT</pubDate>
            <atom:updated>2026-05-10T06:56:18.137Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*g-ryG8Wby5s4PogT.png" /></figure><h3>What is Shuffle?</h3><p>Shuffle is an open-source Security Orchestration, Automation, and Response (SOAR) platform that helps security teams automate their workflows, integrate security tools, and respond to incidents faster. It provides a visual workflow editor, extensive app integrations, and a flexible automation engine.</p><h3>Why Use Shuffle?</h3><ul><li>Open Source &amp; Free — No licensing costs, fully self-hosted</li><li>Visual Workflow Builder — Drag-and-drop automation without coding</li><li>200+ Pre-built Apps — Integrations with popular security tools (TheHive, MISP, VirusTotal, Slack, etc.)</li><li>Active Community — Regular updates and community support</li><li>API-First Design — Easy to extend and customize</li></ul><h3>Step-by-Step Installation</h3><h4>Step 1: Update System Packages</h4><p>Always start with a fully updated system:</p><pre>sudo apt update &amp;&amp; sudo apt upgrade -y<br>sudo apt autoremove -y</pre><h4>Step 2: Configure Docker Permissions</h4><p>Add your user to the Docker group to run commands without sudo:</p><pre>sudo usermod -aG docker $USER<br>newgrp docker</pre><p>Verify Docker installation:</p><pre>docker --version<br>docker compose version</pre><h4>Step 3: Configure System for OpenSearch</h4><p>OpenSearch (the database) requires specific kernel settings:</p><p>Disable swap memory:</p><pre>sudo swapoff -a<br><br># Make permanent by commenting swap in fstab<br>sudo sed -i &#39;/ swap / s/^\(.*\)$/#\1/g&#39; /etc/fstab</pre><p>Set memory mapping limit (CRITICAL):</p><pre>sudo sysctl -w vm.max_map_count=262144<br><br># Make permanent<br>echo &quot;vm.max_map_count=262144&quot; | sudo tee -a /etc/sysctl.conf</pre><p>Verify the setting:</p><pre>sysctl vm.max_map_count<br># Output should be: vm.max_map_count = 262144</pre><h4>Step 4: Clone Shuffle Repository</h4><pre># Clone from GitHub<br>git clone https://github.com/frikky/Shuffle.git<br><br># Navigate to Shuffle directory<br>cd Shuffle<br><br># Verify the directory structure<br>ls -la</pre><h4>Step 5: Prepare Database Directory</h4><p>OpenSearch runs as a non-root user (UID 1000) inside the container:</p><pre># Create database directory<br>mkdir -p shuffle-database<br><br># Set correct ownership<br>sudo chown -R 1000:1000 shuffle-database<br><br># Set proper permissions<br>chmod 755 shuffle-database</pre><h4>Step 6: Configure Admin Credentials</h4><pre>nano .env</pre><p>Add the following content (customize your password):</p><pre># Admin Account Configuration<br>SHUFFLE_DEFAULT_USERNAME=admin<br>SHUFFLE_DEFAULT_PASSWORD=YourStrongPassword123!</pre><h4>Step 7: Launch Shuffle</h4><p>Start all services:</p><pre>docker compose up -d</pre><p>Monitor the startup process (recommended):</p><pre>docker compose logs -f</pre><h4>Step 8: Verify All Services Are Running</h4><pre>docker ps --format &quot;table {{.Names}}\t{{.Status}}\t{{.Ports}}&quot;</pre><p>Expected output:</p><pre>NAMES                 STATUS          PORTS<br>shuffle-frontend      Up 2 minutes    0.0.0.0:3001-&gt;80/tcp<br>shuffle-backend       Up 2 minutes    5001/tcp<br>shuffle-orborus       Up 2 minutes    <br>shuffle-opensearch    Up 2 minutes    9200/tcp, 9300/tcp<br>shuffle-proxy         Up 2 minutes    443/tcp, 80/tcp</pre><p>All containers should show “Up” status.</p><h4>Step 9: Access Shuffle Web Interface</h4><p>Open your web browser and navigate to:</p><pre>http://[YOUR_SERVER_IP]:3001</pre><p>Login with:</p><ul><li>Username: admin (or what you set in .env)</li><li>Password: YourStrongPassword123! (or what you set)</li></ul><h3>Post-Installation Configuration</h3><h4>Verify API Connectivity</h4><pre># Check backend health<br>curl http://localhost:5001/api/v1/health<br><br># Expected response: {&quot;status&quot;:&quot;ok&quot;}</pre><h3>Troubleshooting Common Issues</h3><h4>Issue 1: Cannot Log In — No Default User Created</h4><p>Root cause: The .env file was not created or is missing credentials.</p><p>Solution:</p><pre>cd ~/Shuffle<br>docker compose down<br><br># Create or edit .env file<br>echo &quot;SHUFFLE_DEFAULT_USERNAME=admin&quot; &gt;&gt; .env<br>echo &quot;SHUFFLE_DEFAULT_PASSWORD=YourNewPassword123!&quot; &gt;&gt; .env<br><br># Restart Shuffle<br>docker compose up -d<br><br># Wait 2 minutes for initialization<br>sleep 120<br><br># Try logging in again</pre><p>Verification: Check that the environment variables are loaded:</p><pre>docker exec shuffle-backend env | grep SHUFFLE_DEFAULT</pre><h4>Issue 2: OpenSearch Fails to Start — Memory Mapping Error</h4><p>Root cause: Linux kernel parameter not set correctly.</p><p>Solution:</p><pre># Set parameter immediately<br>sudo sysctl -w vm.max_map_count=262144<br><br># Make permanent<br>echo &quot;vm.max_map_count=262144&quot; | sudo tee -a /etc/sysctl.conf<br><br># Verify setting<br>sysctl vm.max_map_count<br><br># Restart OpenSearch<br>docker compose restart shuffle-opensearch<br><br># Check if it&#39;s running<br>docker compose logs shuffle-opensearch --tail=20</pre><h4>Issue 3: Backend Cannot Connect to OpenSearch</h4><p>Root cause: OpenSearch takes 30–60 seconds to fully initialize, especially on first run.</p><p>Solution:</p><p>This is normal during first startup. Wait 2–3 minutes. If it persists:</p><pre># Check if OpenSearch is healthy<br>docker ps | grep opensearch<br><br># Check OpenSearch logs for errors<br>docker compose logs shuffle-opensearch | tail -50<br><br># Test OpenSearch connectivity from backend container<br>docker exec shuffle-backend curl -k https://shuffle-opensearch:9200<br><br># If still failing, restart all services<br>docker compose down<br>docker compose up -d</pre><h4>Issue 4: Port 3001 Already in Use</h4><p>Root cause: Another service is using port 3001.</p><p>Solution 1: Change Shuffle’s port</p><pre>cd ~/Shuffle<br><br># Edit .env file<br>nano .env<br><br># Add or modify:<br>FRONTEND_PORT=8080<br><br># Restart Shuffle<br>docker compose down<br>docker compose up -d<br><br># Access at: http://your-server-ip:8080</pre><p>Solution 2: Find and stop the conflicting service</p><pre># Find what&#39;s using port 3001<br>sudo lsof -i :3001<br>sudo netstat -tulpn | grep 3001<br><br># Stop the conflicting service (example for nginx)<br>sudo systemctl stop nginx</pre><h4>Issue 5: Permission Denied for Database Directory</h4><p>Root cause: The shuffle-database directory has incorrect ownership.</p><p>Solution:</p><pre>cd ~/Shuffle<br><br># Stop OpenSearch<br>docker compose stop shuffle-opensearch<br><br># Fix ownership (OpenSearch runs as UID 1000)<br>sudo chown -R 1000:1000 shuffle-database<br><br># Set correct permissions<br>chmod 755 shuffle-database<br><br># Restart OpenSearch<br>docker compose start shuffle-opensearch<br><br># Verify it&#39;s running<br>docker compose logs shuffle-opensearch --tail=20</pre><h3>Conclusion</h3><p>You have successfully installed Shuffle SOAR on Ubuntu Server 22.04.5. The platform is now ready for:</p><ul><li>Creating automated security workflows</li><li>Integrating with your existing security tools</li><li>Responding to incidents faster</li></ul><h3>Next Steps</h3><ol><li>Explore the Workflow Editor — Start with simple automation</li><li>Install Apps — Browse the App Marketplace for integrations</li><li>Create API Keys — For programmatic access</li><li>Invite Team Members — Add users in Settings</li><li>Read Official Documentation — <a href="https://shuffle.dev/docs">https://shuffle.dev/docs</a></li></ol><h3>Support Resources</h3><ul><li>Documentation: <a href="https://shuffle.dev/docs">https://shuffle.dev/docs</a></li><li>GitHub: <a href="https://github.com/frikky/Shuffle">https://github.com/frikky/Shuffle</a></li><li>Discord Community: <a href="https://discord.gg/shuffle">https://discord.gg/shuffle</a></li><li>Issue Tracker: <a href="https://github.com/frikky/Shuffle/issues">https://github.com/frikky/Shuffle/issues</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa2cc1ad5b9a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Install Docker on Ubuntu Server 22.04.5 (The Right Way)]]></title>
            <link>https://mahimsec.medium.com/how-to-install-docker-on-ubuntu-server-22-04-5-the-right-way-b08deae48b2c?source=rss-2be56e3c1dcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/b08deae48b2c</guid>
            <category><![CDATA[docker-image]]></category>
            <category><![CDATA[soc]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[docker-compose]]></category>
            <dc:creator><![CDATA[Md. Mahim Hossain]]></dc:creator>
            <pubDate>Sat, 09 May 2026 07:45:23 GMT</pubDate>
            <atom:updated>2026-05-09T07:45:23.906Z</atom:updated>
            <content:encoded><![CDATA[<p>A complete, copy‑paste guide for beginners and sysadmins</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mQWFQ1sK-G_yttCl.png" /></figure><p>If you’re running Ubuntu Server 22.04.5 and want to containerize your apps, Docker is the industry standard. But installing it <em>correctly</em> — not just apt install docker.io — makes all the difference for security, updates, and long‑term stability.</p><p>In this guide, I’ll walk you through the official Docker method using their GPG key and repository. You’ll end up with a production‑ready installation and learn why each step matters.</p><blockquote><strong>Why not the Ubuntu default package?<br></strong>The docker.io package in Ubuntu’s repos is often outdated. Docker’s own repo gives you the latest stable release, security patches, and tools like docker compose plugin.</blockquote><h3>Prerequisites</h3><ul><li>A machine (or VM) running Ubuntu Server 22.04.5 LTS.</li><li>sudo privileges.</li><li>An internet connection.</li></ul><h3>Step 1 — Update Your System &amp; Install Prerequisites</h3><p>First, refresh the package index and install ca-certificates and curl. These are needed to fetch Docker’s GPG key securely.</p><pre>sudo apt update<br>sudo apt install ca-certificates curl -y</pre><h3>Step 2 — Add Docker’s Official GPG Key</h3><p>Package managers use GPG keys to verify that the software you download hasn’t been tampered with. We’ll create a special directory and store the key there.</p><pre>sudo install -m 0755 -d /etc/apt/keyrings<br>sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc<br>sudo chmod a+r /etc/apt/keyrings/docker.asc</pre><p><em>What’s happening?</em></p><ul><li>install -m 0755 -d creates /etc/apt/keyrings with safe permissions.</li><li>curl downloads the key.</li><li>chmod a+r makes the key readable by everyone (required by APT).</li></ul><h3>Step 3 — Add the Official Docker Repository</h3><p>Now we tell APT where to find Docker’s software. The command below automatically detects your Ubuntu version (jammy for 22.04) and your CPU architecture (amd64, arm64, etc.).</p><pre>echo \<br>  &quot;deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \<br>  $(. /etc/os-release &amp;&amp; echo &quot;${UBUNTU_CODENAME:-$VERSION_CODENAME}&quot;) stable&quot; | \<br>  sudo tee /etc/apt/sources.list.d/docker.list &gt; /dev/null</pre><p>Then update APT again so it sees the new repository:</p><pre>sudo apt update</pre><p>If you ever see a “GPG error” in the future, it’s likely because the key expired. Run sudo apt update again – Docker automatically renews the key.</p><h3>Step 4 — Install Docker Engine and Plugins</h3><p>This single command installs the Docker daemon (docker-ce), the CLI (docker-ce-cli), the container runtime (containerd.io), and the official buildx and compose plugins.</p><pre>sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y</pre><h3>Step 5 — Start Docker and Enable Auto‑Start</h3><p>Even after installation, the Docker service may not be running. Let’s start it and make sure it comes back after a reboot.</p><pre>sudo systemctl start docker<br>sudo systemctl enable docker</pre><p>To verify that Docker is active:</p><pre>sudo systemctl status docker</pre><p>You should see active (running) in green.</p><h3>Step 6 — Test With hello-world</h3><p>Nothing beats a real test. Run the official hello-world container:</p><pre>sudo docker run hello-world</pre><p>If everything works, you’ll see a friendly message like:</p><blockquote>Hello from Docker!<br>This message shows that your installation appears to be working correctly.</blockquote><h3>Optional — Run Docker Without sudo (Highly Recommended)</h3><p>Typing sudo before every docker command gets old fast. Adding your user to the docker group removes that need.</p><pre># Add your current user to the docker group<br>sudo usermod -aG docker $USER<br><br># Activate the group change in your current shell<br>newgrp docker<br><br># Test without sudo<br>docker run hello-world</pre><h3>Final Thoughts</h3><p>You’ve now installed Docker on Ubuntu Server 22.04.5 using the official, secure, and update‑friendly method. Whether you’re spinning up a local dev environment or provisioning a production host, this setup will serve you well.</p><p>Remember to check for updates regularly:</p><pre>sudo apt update &amp;&amp; sudo apt upgrade</pre><p>Docker releases new versions often, so staying updated gives you the latest features and security fixes.</p><p>Enjoy containerizing your world! 🐳</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b08deae48b2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OpenCTI Manual Deployment Complete Documentation]]></title>
            <link>https://mahimsec.medium.com/opencti-manual-deployment-complete-documentation-594ebd780b71?source=rss-2be56e3c1dcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/594ebd780b71</guid>
            <category><![CDATA[opencti]]></category>
            <dc:creator><![CDATA[Md. Mahim Hossain]]></dc:creator>
            <pubDate>Thu, 07 May 2026 18:11:05 GMT</pubDate>
            <atom:updated>2026-05-07T18:11:05.137Z</atom:updated>
            <content:encoded><![CDATA[<p>This documentation describes the complete manual deployment process for OpenCTI 6.5.0. Below are all the issues and their solutions explained step by step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RCsyGB9itJEwR5D_.png" /></figure><h3>System Prerequisites</h3><h4>Hardware Requirements</h4><pre>|Component  | Minimum    |Recommended  |<br>---------------------------------------<br>|CPU        | 4 cores    |   8 cores   |<br>---------------------------------------<br>|RAM        | 8 GB       | 16 GB       |<br>---------------------------------------<br>|Storage    | 50 GB SSD  | 100 GB+ SSD | <br>----------------------------------------</pre><h4>Software Requirements</h4><ul><li>OS: Ubuntu 22.04 LTS (Debian-based)</li><li>Node.js: v20.x or higher</li><li>Python: 3.10+</li><li>Elasticsearch: 8.x</li><li>Redis: 7.x</li><li>RabbitMQ: 3.x</li><li>MinIO: Latest (S3-compatible storage)</li></ul><h3>Common Problems &amp; Solutions:</h3><h4>Problem 1: Node.js Version Conflict</h4><p>Error: dpkg: error processing package nodejs / trying to overwrite &#39;/usr/include/node/common.gypi&#39;</p><p>Root Cause: Ubuntu default Node.js v12 and NodeSource v20 conflict.</p><p>Solution:</p><pre># Remove all existing Node.js packages<br>sudo apt-get remove --purge -y nodejs npm nodejs-doc libnode-dev<br>sudo apt-get autoremove -y<br>sudo rm -rf /usr/local/lib/nodejs /usr/local/bin/node /usr/local/bin/npm<br><br># Install Node.js 20 using NVM (recommended)<br>curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash<br>source ~/.bashrc<br>nvm install 20<br>nvm alias default 20</pre><h4>Problem 2: Elasticsearch Connection Refused</h4><p>Error: connect ECONNREFUSED 127.0.0.1:9200</p><p>Root Cause: Elasticsearch is not installed or is not running.</p><p>Solution:</p><pre># Install Elasticsearch 8.x<br>wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elastic.gpg<br>echo &quot;deb [signed-by=/usr/share/keyrings/elastic.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main&quot; | sudo tee /etc/apt/sources.list.d/elastic-8.x.list<br>sudo apt-get update<br>sudo apt-get install -y elasticsearch<br><br># Disable security for testing<br>sudo nano /etc/elasticsearch/elasticsearch.yml<br># Add: xpack.security.enabled: false<br><br>sudo systemctl start elasticsearch<br>sudo systemctl enable elasticsearch</pre><h4>Problem 3: MinIO Authentication Failed</h4><p>Error: The Access Key Id you provided does not exist in our records</p><p>Root Cause: The MinIO credentials in the OpenCTI configuration do not match.</p><p>Solution:</p><pre># Reset MinIO with default credentials<br>sudo pkill -9 minio<br>sudo rm -rf /root/.minio<br>sudo nohup minio server /data/minio --console-address &quot;:9001&quot; &gt; /tmp/minio.log 2&gt;&amp;1 &amp;<br><br># Install MinIO client<br>wget https://dl.min.io/client/mc/release/linux-amd64/mc -O /tmp/mc<br>chmod +x /tmp/mc<br>sudo mv /tmp/mc /usr/local/bin/<br><br># Configure with default credentials<br>mc alias set local http://localhost:9000 minioadmin minioadmin<br>mc mb local/opencti-bucket</pre><h4>Problem 4: Admin User Initialization Failed</h4><p>Error: You need to configure the environment vars</p><p>Root Cause: production.json admin configuration incomplete or token missing</p><p>Solution:</p><pre>&quot;admin&quot;: {<br>  &quot;email&quot;: &quot;admin@opencti.io&quot;,<br>  &quot;password&quot;: &quot;YourStrongPassword123!&quot;,<br>  &quot;token&quot;: &quot;550e8400-e29b-41d4-a716-446655440000&quot;,  // Use uuidgen<br>  &quot;externally_managed&quot;: false<br>}</pre><h4>Problem 5: Connection Timeout from Browser</h4><p>Error: The connection has timed out (port 4000)</p><p>Root Cause: OpenCTI is binding only to localhost, not to all network interfaces.</p><p>Solution:</p><pre>// In production.json<br>&quot;base_url&quot;: &quot;http://0.0.0.0:4000/&quot;,  // Changed from localhost</pre><h4>Problem 6: Missing Redis or RabbitMQ</h4><p>Error: Unit redis-server.service could not be found</p><p>Root Cause: Dependencies are not installed.</p><p>Solution:</p><pre># Install Redis<br>sudo apt-get install -y redis-server<br>sudo systemctl start redis-server<br>sudo systemctl enable redis-server<br><br># Install RabbitMQ<br>sudo apt-get install -y rabbitmq-server<br>sudo systemctl start rabbitmq-server<br>sudo systemctl enable rabbitmq-server</pre><h3>Step-by-Step Deployment:</h3><h4>Phase 1: System Preparation</h4><pre># 1. Update system<br>sudo apt-get update &amp;&amp; sudo apt-get upgrade -y<br><br># 2. Install basic dependencies<br>sudo apt-get install -y build-essential curl wget git uuid-runtime<br><br># 3. Install Node.js 20 using NVM<br>curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash<br>source ~/.bashrc<br>nvm install 20<br>nvm use 20<br>npm install -g yarn corepack<br>corepack enable</pre><h4>Phase 2: Install Dependencies</h4><pre># 1. Install Elasticsearch<br>wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elastic.gpg<br>echo &quot;deb [signed-by=/usr/share/keyrings/elastic.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main&quot; | sudo tee /etc/apt/sources.list.d/elastic-8.x.list<br>sudo apt-get update<br>sudo apt-get install -y elasticsearch<br>sudo systemctl start elasticsearch<br>sudo systemctl enable elasticsearch<br><br># 2. Install Redis<br>sudo apt-get install -y redis-server<br>sudo systemctl start redis-server<br>sudo systemctl enable redis-server<br><br># 3. Install RabbitMQ<br>sudo apt-get install -y rabbitmq-server<br>sudo systemctl start rabbitmq-server<br>sudo systemctl enable rabbitmq-server<br><br># 4. Install MinIO<br>wget https://dl.min.io/server/minio/release/linux-amd64/minio<br>chmod +x minio<br>sudo mv minio /usr/local/bin/<br>sudo mkdir -p /data/minio<br>sudo nohup minio server /data/minio --console-address &quot;:9001&quot; &gt; /tmp/minio.log 2&gt;&amp;1 &amp;<br><br># 5. Configure MinIO bucket<br>wget https://dl.min.io/client/mc/release/linux-amd64/mc -O /tmp/mc<br>chmod +x /tmp/mc<br>sudo mv /tmp/mc /usr/local/bin/<br>mc alias set local http://localhost:9000 minioadmin minioadmin<br>mc mb local/opencti-bucket</pre><h4>Phase 3: OpenCTI Installation</h4><pre># 1. Download OpenCTI<br>sudo mkdir -p /opt/opencti<br>cd /opt/opencti<br>LATEST_VERSION=&quot;6.5.0&quot;  # Check GitHub for latest<br>sudo wget https://github.com/OpenCTI-Platform/opencti/releases/download/${LATEST_VERSION}/opencti-release-${LATEST_VERSION}.tar.gz<br>sudo tar xvfz opencti-release-${LATEST_VERSION}.tar.gz<br>sudo chown -R $USER:$USER /opt/opencti<br><br># 2. Install Python dependencies<br>cd /opt/opencti/opencti<br>pip3 install -r src/python/requirements.txt<br><br># 3. Install Node dependencies<br>yarn install<br><br># 4. Build application<br>yarn build</pre><h4>Phase 4: Configuration</h4><pre># 1. Create production config<br>cp config/default.json config/production.json<br><br># 2. Generate UUID for admin token<br>ADMIN_TOKEN=$(uuidgen)<br><br># 3. Update configuration (use nano or sed)<br>nano config/production.json</pre><p>Final production.json template:</p><pre>{<br>  &quot;app&quot;: {<br>    &quot;port&quot;: 4000,<br>    &quot;base_url&quot;: &quot;http://0.0.0.0:4000/&quot;,<br>    &quot;admin&quot;: {<br>      &quot;email&quot;: &quot;admin@opencti.io&quot;,<br>      &quot;password&quot;: &quot;Admin@OpenCTI2024!&quot;,<br>      &quot;token&quot;: &quot;GENERATED_UUID_HERE&quot;,<br>      &quot;externally_managed&quot;: false<br>    }<br>  },<br>  &quot;elasticsearch&quot;: {<br>    &quot;url&quot;: &quot;http://localhost:9200&quot;<br>  },<br>  &quot;redis&quot;: {<br>    &quot;hostname&quot;: &quot;localhost&quot;,<br>    &quot;port&quot;: 6379<br>  },<br>  &quot;rabbitmq&quot;: {<br>    &quot;hostname&quot;: &quot;localhost&quot;,<br>    &quot;port&quot;: 5672,<br>    &quot;username&quot;: &quot;guest&quot;,<br>    &quot;password&quot;: &quot;guest&quot;<br>  },<br>  &quot;minio&quot;: {<br>    &quot;bucket_name&quot;: &quot;opencti-bucket&quot;,<br>    &quot;endpoint&quot;: &quot;localhost&quot;,<br>    &quot;port&quot;: 9000,<br>    &quot;use_ssl&quot;: false,<br>    &quot;access_key&quot;: &quot;minioadmin&quot;,<br>    &quot;secret_key&quot;: &quot;minioadmin&quot;<br>  }<br>}</pre><h4>Phase 5: Start OpenCTI</h4><pre># For testing (keep terminal open)<br>cd /opt/opencti/opencti<br>yarn serv<br><br># For production (using tmux)<br>tmux new -s opencti<br>cd /opt/opencti/opencti<br>yarn serv<br># Press Ctrl+B, then D to detach</pre><h3>Verification &amp; Testing:</h3><h4>Service Health Check Script</h4><pre>#!/bin/bash<br>echo &quot;=== OpenCTI Health Check ===&quot;<br><br>echo -n &quot;Elasticsearch: &quot;<br>curl -s http://localhost:9200 &gt; /dev/null &amp;&amp; echo &quot;✅ Running&quot; || echo &quot;❌ Down&quot;<br><br>echo -n &quot;Redis: &quot;<br>redis-cli ping 2&gt;/dev/null | grep -q PONG &amp;&amp; echo &quot;✅ Running&quot; || echo &quot;❌ Down&quot;<br><br>echo -n &quot;RabbitMQ: &quot;<br>sudo systemctl is-active rabbitmq-server &gt; /dev/null &amp;&amp; echo &quot;✅ Running&quot; || echo &quot;❌ Down&quot;<br><br>echo -n &quot;MinIO: &quot;<br>curl -s http://localhost:9000/minio/health/ready &gt; /dev/null &amp;&amp; echo &quot;✅ Running&quot; || echo &quot;❌ Down&quot;<br><br>echo -n &quot;OpenCTI: &quot;<br>curl -s http://localhost:4000 &gt; /dev/null &amp;&amp; echo &quot;✅ Running&quot; || echo &quot;❌ Down&quot;<br><br>echo -n &quot;Port 4000: &quot;<br>sudo ss -tlnp | grep -q 4000 &amp;&amp; echo &quot;✅ Listening&quot; || echo &quot;❌ Not listening&quot;</pre><h4>Access OpenCTI</h4><pre>URL: http://YOUR_SERVER_IP:4000<br>Username: admin@opencti.io<br>Password: (as configured in production.json)</pre><h3>Production Setup:</h3><pre># Create service file<br>sudo nano /etc/systemd/system/opencti-platform.service</pre><pre>[Unit]<br>Description=OpenCTI Platform<br>After=network.target elasticsearch.service redis-server.service rabbitmq-server.service<br><br>[Service]<br>Type=simple<br>User=root<br>WorkingDirectory=/opt/opencti/opencti<br>ExecStart=/usr/bin/yarn serv<br>Restart=on-failure<br>RestartSec=10<br>Environment=&quot;NODE_ENV=production&quot;<br><br>[Install]<br>WantedBy=multi-user.target</pre><pre># Enable and start<br>sudo systemctl daemon-reload<br>sudo systemctl enable opencti-platform<br>sudo systemctl start opencti-platform<br><br># Check status<br>sudo systemctl status opencti-platform<br><br># View logs<br>sudo journalctl -u opencti-platform -f</pre><h4>Firewall Configuration</h4><pre># Allow OpenCTI port<br>sudo ufw allow 4000/tcp<br><br># If using Nginx reverse proxy<br>sudo ufw allow 80/tcp<br>sudo ufw allow 443/tcp</pre><h4>Nginx Reverse Proxy</h4><pre>server {<br>    listen 80;<br>    server_name opencti.yourdomain.com;<br>    <br>    location / {<br>        proxy_pass http://127.0.0.1:4000;<br>        proxy_http_version 1.1;<br>        proxy_set_header Upgrade $http_upgrade;<br>        proxy_set_header Connection &#39;upgrade&#39;;<br>        proxy_set_header Host $host;<br>        proxy_cache_bypass $http_upgrade;<br>        proxy_set_header X-Real-IP $remote_addr;<br>        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>        proxy_set_header X-Forwarded-Proto $scheme;<br>    }<br>}</pre><h4><em>Support &amp; Resources</em></h4><ul><li><em>Official Documentation: https://docs.opencti.io</em></li><li><em>GitHub: https://github.com/OpenCTI-Platform/opencti</em></li><li><em>Community Slack: https://community.filigran.io</em></li><li><em>Connectors: https://github.com/OpenCTI-Platform/connectors</em></li></ul><h4>Conclusion</h4><p>If you follow this documentation, you should be able to deploy OpenCTI without any issues. The most important points are:</p><ul><li>Use Node.js 20+ (NVM is recommended)</li><li>Disable Elasticsearch security (for testing purposes)</li><li>Make sure the MinIO credentials match</li><li>Set base_url to 0.0.0.0 for remote access</li><li>The admin token must be a UUID</li></ul><p>After a successful deployment, log in for the first time and explore the dashboard! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=594ebd780b71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Configure a Static IP Address on Ubuntu Using Netplan]]></title>
            <link>https://mahimsec.medium.com/how-to-configure-a-static-ip-address-on-ubuntu-using-netplan-f625bbcfcb6b?source=rss-2be56e3c1dcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/f625bbcfcb6b</guid>
            <category><![CDATA[static-ip-adress]]></category>
            <category><![CDATA[network-management]]></category>
            <category><![CDATA[ubuntu-server]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Md. Mahim Hossain]]></dc:creator>
            <pubDate>Sun, 12 Apr 2026 16:44:11 GMT</pubDate>
            <atom:updated>2026-04-12T16:44:11.014Z</atom:updated>
            <content:encoded><![CDATA[<p>Setting a static IP on Ubuntu ensures your system always uses the same address — important for servers, SOC labs, and remote access.</p><h4>Example Configuration</h4><p>Edit your Netplan file cat:</p><pre>/etc/netplan/01-network-manager-all.yaml</pre><pre>network:<br>  version: 2<br>  renderer: NetworkManager<br>  ethernets:<br>    ens33:<br>      dhcp4: no<br>      addresses:<br>        - 192.168.0.120/24<br>      gateway4: 192.168.0.1<br>      nameservers:<br>        addresses:<br>          - 103.86.198.250<br>          - 8.8.8.8</pre><h4>Key Points</h4><ul><li>dhcp4: no → disables automatic IP</li><li>addresses → your static IP</li><li>gateway4 → router IP</li><li>nameservers → DNS servers</li></ul><h4>Apply Changes</h4><pre>sudo netplan apply</pre><h4>Conclusion</h4><p>Using Netplan makes static IP configuration simple and reliable — perfect for stable networking in professional or lab environments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f625bbcfcb6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>