<?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 Chandula Jayathilake on Medium]]></title>
        <description><![CDATA[Stories by Chandula Jayathilake on Medium]]></description>
        <link>https://medium.com/@chandulapamodajayathilake?source=rss-926ab3717467------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*il6Xy0avljlTZ9IpkgQigg.jpeg</url>
            <title>Stories by Chandula Jayathilake on Medium</title>
            <link>https://medium.com/@chandulapamodajayathilake?source=rss-926ab3717467------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 23:46:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chandulapamodajayathilake/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[Opensearch-dashboards on Kubernetes]]></title>
            <link>https://medium.com/@chandulapamodajayathilake/opensearch-dashboards-on-kubernetes-46d52e122f50?source=rss-926ab3717467------2</link>
            <guid isPermaLink="false">https://medium.com/p/46d52e122f50</guid>
            <category><![CDATA[logging-and-monitoring]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[opensearch-dashboard]]></category>
            <category><![CDATA[opensearch]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Chandula Jayathilake]]></dc:creator>
            <pubDate>Sun, 07 Sep 2025 04:33:25 GMT</pubDate>
            <atom:updated>2025-09-07T04:33:25.653Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SMhErHzYfEoOBWIp07M5HA.jpeg" /></figure><p>I always wanted to know how monitoring in Kubernetes work. So when looked into several monitoring tools I found that Opensearch by Amazon is a great tool for this. But during this implementation I ran into many issues with fluent-bit. I used Fluent-bit to ship logs from Kubernetes to Opensearch. The configuration of Fluent-bit was so hard to get right and caused me many troubles. 😑.</p><p>I will guide you on how to setup this monitoring tool correctly so that you won’t have to bear the same problems i got into 😉</p><p>I am doing this on an Ubuntu EC2. First off we need a Kubernetes cluster to work on. For this I am using a Minikube cluster.</p><ol><li>Install kubectl</li></ol><p>This is the official documentation <a href="http://kubernetes.io/docs/tasks/tools/install-kubectl-linux/">http://kubernetes.io/docs/tasks/tools/install-kubectl-linux/</a> , I will add the commands needed below as well:</p><pre>#Download the latest release with the command:  <br>curl -LO &quot;https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl&quot;<br>  <br>#Download the kubectl checksum file:<br>curl -LO &quot;https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256&quot;<br><br>#Validate the kubectl binary against the checksum file:<br>echo &quot;$(cat kubectl.sha256)  kubectl&quot; | sha256sum --check</pre><pre>#if valid:<br>kubectl: OK<br><br>#If the check fails, sha256 exits with nonzero status and prints output similar to:<br>kubectl: FAILED<br>sha256sum: WARNING: 1 computed checksum did NOT match</pre><pre>#install kubectl<br>sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl<br><br>#test installation<br>kubectl version --client</pre><p>2. Install Docker for minikube</p><p>I installed docker in which i created the minikube cluster. The link for docker installation is: <a href="https://docs.docker.com/engine/install/ubuntu/">https://docs.docker.com/engine/install/ubuntu/</a></p><p>and remember to <strong>add the user to the docker group</strong></p><pre>sudo usermod -aG docker $USER<br><br>#either log out and log back in OR<br>#run the below command to activate this group membership without needing to fully log out and in<br>newgrp docker</pre><p>3. Install Minikube</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TpMIdTPd19tzULzzdBeTeg.png" /><figcaption>Minikube installation: <a href="https://minikube.sigs.k8s.io/docs/start/?arch=%2Flinux%2Fx86-64%2Fstable%2Fbinary+download">https://minikube.sigs.k8s.io/docs/start/?arch=%2Flinux%2Fx86-64%2Fstable%2Fbinary+download</a></figcaption></figure><pre>curl -LO https://github.com/kubernetes/minikube/releases/latest/download/minikube-linux-amd64<br><br>sudo install minikube-linux-amd64 /usr/local/bin/minikube &amp;&amp; rm minikube-linux-amd64</pre><p>Next start the cluster and see whether it is working</p><pre>minikube start<br><br>#if needed more control over resource allocation and installation method<br>minikube start --driver=docker --cpus=6 --memory=24000mb<br><br>#list all pods<br>kubectl get pods -A</pre><p>4. Install Opensearch</p><p><a href="https://docs.opensearch.org/latest/install-and-configure/install-opensearch/debian/">https://docs.opensearch.org/latest/install-and-configure/install-opensearch/debian/</a></p><pre>sudo apt-get update &amp;&amp; sudo apt-get -y install lsb-release ca-certificates curl gnupg2<br><br>curl -o- https://artifacts.opensearch.org/publickeys/opensearch-release.pgp | sudo gpg --dearmor --batch --yes -o /usr/share/keyrings/opensearch-release-keyring<br><br>echo &quot;deb [signed-by=/usr/share/keyrings/opensearch-release-keyring] https://artifacts.opensearch.org/releases/bundle/opensearch/3.x/apt stable main&quot; | sudo tee /etc/apt/sources.list.d/opensearch-3.x.list<br><br>sudo apt-get update<br><br>sudo apt list -a opensearch</pre><p>Final command will list the available opensearch versions, i will proceed with installing the latest version:</p><pre># For new installations of OpenSearch 2.12 and later, you must define a custom admin password in order to set up a demo security configuration.<br># Use one of the following commands to define a custom admin password:<br>sudo env OPENSEARCH_INITIAL_ADMIN_PASSWORD=&lt;custom-admin-password&gt; apt-get install opensearch</pre><p>If the installation succeeds, it means APT has validated that the repository metadata was signed with a trusted GPG key.</p><p>Lets enable and start opensearch</p><pre>sudo systemctl enable opensearch<br><br>sudo systemctl start opensearch<br><br>#check status<br>sudo systemctl status opensearch</pre><p>Next we need to tweak some settings in opensearch:</p><pre><br>sudo nano /etc/opensearch/opensearch.yml<br><br>#add this ----------------------<br>network.host: 0.0.0.0<br>discovery.type: single-node<br>---------------------------------<br><br># then run<br>sudo systemctl daemon-reload<br>sudo systemctl enable opensearch<br>sudo systemctl start opensearch<br>sudo systemctl status opensearch<br><br>#confirm functionality<br>curl -X GET https://localhost:9200 -u &#39;admin:&lt;custom-admin-password&gt;&#39; -k</pre><p>5. Install Opensearch dashboard</p><p><a href="https://docs.opensearch.org/latest/install-and-configure/install-dashboards/debian/">https://docs.opensearch.org/latest/install-and-configure/install-dashboards/index/</a></p><pre>sudo apt-get update &amp;&amp; sudo apt-get -y install lsb-release ca-certificates curl gnupg2<br><br>curl -o- https://artifacts.opensearch.org/publickeys/opensearch-release.pgp | sudo gpg --dearmor --batch --yes -o /usr/share/keyrings/opensearch-release-keyring<br><br>echo &quot;deb [signed-by=/usr/share/keyrings/opensearch-release-keyring] https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/3.x/apt stable main&quot; | sudo tee /etc/apt/sources.list.d/opensearch-dashboards-3.x.list<br><br>sudo apt-get update<br><br>#list all versions<br>sudo apt list -a opensearch-dashboards<br></pre><pre>#Once complete, enable OpenSearch.<br>sudo systemctl enable opensearch-dashboards<br><br>#Start OpenSearch.<br>sudo systemctl start opensearch-dashboards<br><br>#Verify that OpenSearch launched correctly.<br>sudo systemctl status opensearch-dashboards</pre><p>Next change these settings in opensearch-dashboard to bind dashboard to any available interface:</p><pre>sudo nano /etc/opensearch-dashboards/opensearch_dashboards.yml<br><br>#add this line-----------------<br><br>server.host: &quot;0.0.0.0&quot;<br><br>-------------------------------</pre><p>You should be able to access the opensearch dashboard at <a href="http://localhost:5601/">http://localhost:5601</a></p><p>or in my case</p><p><a href="http://localhost:5601/">http://&lt;EC2-vm-public-ip&gt;:5601</a></p><p>Use the username and password given during installation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*VnNMaaM22jF8uO-6Nso-Eg.png" /></figure><p>6. Install Fluent-bit</p><p>It is easier to install fluent-bit using helm</p><pre>helm repo add fluent https://fluent.github.io/helm-charts<br><br>helm repo update</pre><p>Next add fluent-bit-values.yaml:</p><p>This is a general values.yaml file you can use this version 1 or version 2.</p><pre># version 1<br># fluent-bit-values.yaml<br>config:<br>  inputs: |<br>    [INPUT]<br>        Name              tail<br>        Path              /var/log/containers/*.log<br>        Tag               kube.*<br>        Parser            docker<br>        Mem_Buf_Limit     5MB<br>        Refresh_Interval  5<br>    [INPUT]<br>        Name              systemd<br>        Tag               host.*<br>        Systemd_Filter    _SYSTEMD_UNIT=kubelet.service<br>        Systemd_Filter    _SYSTEMD_UNIT=docker.service<br>        Strip_Underscores On<br>  outputs: |<br>    [OUTPUT]<br>        Name              opensearch<br>        Match             *<br>        Host              98.84.135.190<br>        Port              9200<br>        Index             minikube-logs<br>        Logstash_Format   On<br>        tls               On<br>        tls.verify        Off<br>        HTTP_User         admin<br>        HTTP_Passwd       abcABC@123</pre><p>I am using a nginx default site in the kubernetes cluster to get the logs. If you also want to try with nginx try this version 2.</p><pre># version 2<br># fluent-bit-values.yaml - Add Nginx parsing<br>config:<br>  service: |<br>    [SERVICE]<br>        Log_Level         debug<br>        Parsers_File      /fluent-bit/etc/parsers.conf<br>        Parsers_File      /fluent-bit/etc/conf/custom_parsers.conf<br>        HTTP_Server       On<br>        HTTP_Listen       0.0.0.0<br>        HTTP_Port         2020<br><br>  inputs: |<br>    # Tail Kubernetes container logs<br>    [INPUT]<br>        Name              tail<br>        Path              /var/log/containers/*.log<br>        Tag               kube.*<br>        Parser            docker<br>        Mem_Buf_Limit     5MB<br>        Refresh_Interval  5<br><br>    # Tail Nginx access logs<br>    [INPUT]<br>        Name              tail<br>        Path              /var/log/nginx/access.log<br>        Tag               nginx.access<br>        Parser            nginx_custom<br>        Mem_Buf_Limit     5MB<br>        Refresh_Interval  5<br><br>  filters: |<br>    # Basic filter for debugging - just add a field to track processing<br>    [FILTER]<br>        Name              modify<br>        Match             nginx.*<br>        Add               processed_by fluent-bit<br><br>  outputs: |<br>    # Output to stdout for debugging first<br>    [OUTPUT]<br>        Name              stdout<br>        Match             nginx.*<br>        Format            json_lines<br><br>    # Also output to OpenSearch<br>    [OUTPUT]<br>        Name              opensearch<br>        Match             nginx.*<br>        Host              host.minikube.internal<br>        Port              9200<br>        Index             nginx<br>        Logstash_Format   On<br>        Logstash_Prefix   nginx<br>        Replace_Dots      On<br>        TLS               On<br>        TLS.Verify        Off<br>        HTTP_User         admin<br>        HTTP_Passwd       abcABC@123<br>        Retry_Limit       3<br>        Suppress_Type_Name On<br>        Trace_Error       On<br>        Trace_Output      On<br><br>  customParsers: |<br>    [PARSER]<br>        Name        nginx_custom<br>        Format      regex<br>        Regex       ^(?&lt;remote_addr&gt;[^ ]*) - (?&lt;remote_user&gt;[^ ]*) \[(?&lt;time_local&gt;[^\]]*)\] &quot;(?&lt;method&gt;[A-Z]+) (?&lt;uri&gt;[^ ]*) (?&lt;protocol&gt;[^&quot;]*)&quot; (?&lt;status&gt;[0-9]{3}) (?&lt;body_bytes_sent&gt;[^ ]*) &quot;(?&lt;http_referer&gt;[^&quot;]*)&quot; &quot;(?&lt;http_user_agent&gt;[^&quot;]*)&quot; &quot;(?&lt;http_x_forwarded_for&gt;[^&quot;]*)&quot;<br>        Time_Key    time_local<br>        Time_Format %d/%b/%Y:%H:%M:%S %z</pre><p>Upgrade the fluent-bit installation</p><pre>helm upgrade --install fluent-bit fluent/fluent-bit -f fluent-bit-values.yaml</pre><p>7. Install Nginx site on the kubernetes cluster</p><pre># nginx-config.yaml<br><br>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: nginx-config<br>data:<br>  default.conf: |<br>    server {<br>        listen 80;<br><br>        location / {<br>            root /usr/share/nginx/html;<br>            index index.html;<br>        }<br><br>        location /forbidden {<br>            return 403;<br>        }<br><br>        location /notfound {<br>            return 404;<br>        }<br><br>        location /error {<br>            return 500;<br>        }<br><br>        location /redirect {<br>            return 302 http://$host/;<br>        }<br>    }</pre><pre># nginx-deployment.yaml<br><br>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: nginx<br>  namespace: default<br>spec:<br>  replicas: 1<br>  selector:<br>    matchLabels:<br>      app: nginx<br>  template:<br>    metadata:<br>      labels:<br>        app: nginx<br>    spec:<br>      containers:<br>        - name: nginx<br>          image: nginx:stable<br>          ports:<br>            - containerPort: 80<br>          volumeMounts:<br>            - name: nginx-config-volume<br>              mountPath: /etc/nginx/nginx.conf<br>              subPath: nginx.conf<br>      volumes:<br>        - name: nginx-config-volume<br>          configMap:<br>            name: nginx-config<br>            items:<br>              - key: nginx.conf<br>                path: nginx.conf</pre><pre>kubectl apply -f nginx-deployment.yaml</pre><p>8. Check logs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*q4R-OzPv7wtk1_iUgD7rmQ.png" /></figure><p>Here nginx* logs refer to the logs generated by nginx.</p><p>These are the pods running in my environment:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*LfW7eaPtEv9lUTHOjF-mEw.png" /></figure><p>9. Now its time to configure dashboard to show the logs</p><pre>Create an Index Pattern<br><br>1. Go to Management → Index Patterns.<br><br>2. Click Create index pattern.<br><br>3. Enter the index name used by Fluent Bit, e.g.:nginx*<br><br>4. Select the time filter field (usually @timestamp).<br><br>5. Save the index pattern.</pre><pre># Generate traffic with different forwarded IPs to display in dashboard<br><br>curl -H &quot;X-Forwarded-For: 192.168.1.100&quot; http://$(minikube ip):30080/<br>curl -H &quot;X-Forwarded-For: 10.0.0.50&quot; http://$(minikube ip):30080/error<br>curl -H &quot;X-Forwarded-For: 172.16.0.200&quot; http://$(minikube ip):30080/redirect<br>curl -H &quot;X-Forwarded-For: 203.0.113.45&quot; http://$(minikube ip):30080/notfound</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*NjiCDSjd9DQmmvW3D0dZnw.png" /></figure><p>Now your discovery page in opensearch dashboards should look like:<br>You can learn to create dashboards in their official documentation: <a href="https://docs.opensearch.org/latest/dashboards/dashboard/index/">https://docs.opensearch.org/latest/dashboards/dashboard/index/</a></p><p>That’s all.<br>Happy monitoring 😃</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46d52e122f50" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tired with the VirtualBox Ubuntu Server default shell?]]></title>
            <link>https://medium.com/@chandulapamodajayathilake/tired-with-the-virtualbox-ubuntu-server-default-shell-cb87ee4ca9cb?source=rss-926ab3717467------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb87ee4ca9cb</guid>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[ubuntu-server]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[virtualbox]]></category>
            <category><![CDATA[shell]]></category>
            <dc:creator><![CDATA[Chandula Jayathilake]]></dc:creator>
            <pubDate>Wed, 23 Jul 2025 17:45:55 GMT</pubDate>
            <atom:updated>2025-07-23T17:45:55.203Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B-Ygh7QpZAo8hAqL3xAVpA.png" /><figcaption>SSH into server</figcaption></figure><p>After a long day of coding, 🥲you just want to tinker around and run a few experiments on your own terms.😉 So, you spin up a fresh Ubuntu Server on a VirtualBox VM. Everything looks good so far…</p><p>The machine boots up, Ubuntu installs successfully, and you’re greeted with the default shell. You enter your username and password — voilà! Your server is up and running. 😊</p><p>Excited, you begin your experiments. You find some interesting packages to install, copy the commands from your browser, and try to paste them into the VirtualBox shell… but nothing happens. That’s when you realize: the default VirtualBox terminal for headless servers doesn’t support clipboard sharing. Great. 😑</p><p>Still, you’re determined. “It’s just a few commands,” you think, and manually type them in. The installation runs and produces a long log. You want to scroll up and review how it started — but the shell doesn’t even let you scroll. You get frustrated.😒 Your motivation fades. You abandon your experiment.</p><p>So how can you avoid this pain? 🤔</p><p><strong>Simple.</strong><br> SSH into your server from your favorite terminal. 😁</p><p>Here’s how to do it… 😏</p><pre>sudo apt update<br>sudo apt install openssh-server -y</pre><pre>sudo systemctl start ssh<br>sudo systemctl enable ssh</pre><p>Also do this to permit root login:</p><pre>sudo nano /etc/ssh/sshd_config</pre><p>Ensure the following line is present and <strong>not commented</strong>: “PermitRootLogin yes”</p><pre>sudo systemctl restart ssh</pre><p>Next you need to change the network settings in your virtual box 😊</p><ol><li>Go to <strong>VirtualBox &gt; Your VM &gt; Settings &gt; Network</strong>.</li><li>Adapter 1 → Attached to: <strong>NAT</strong></li><li>Click <strong>Advanced &gt; Port Forwarding</strong>.</li><li>Add a rule like:</li></ol><pre>Name   Protocol     Host IP     Host Port     Guest IP     Guest Port<br>SSH     TCP                      2222                        22</pre><p>This forwards host port 2222 to VM’s port 22.</p><p>Finally, SSH to your server from your favorite terminal 😁</p><pre>ssh username@localhost -p 2222</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb87ee4ca9cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Streamlining Vagrant Setup with Vagrant Creator: Say Goodbye to Manual Configurations!]]></title>
            <link>https://medium.com/@chandulapamodajayathilake/streamlining-vagrant-setup-with-vagrant-creator-say-goodbye-to-manual-configurations-d6e0ad913674?source=rss-926ab3717467------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6e0ad913674</guid>
            <category><![CDATA[vagrant]]></category>
            <category><![CDATA[package]]></category>
            <category><![CDATA[pipy]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Chandula Jayathilake]]></dc:creator>
            <pubDate>Mon, 15 Apr 2024 16:21:24 GMT</pubDate>
            <atom:updated>2024-04-15T16:21:24.438Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gg7O6k-9G9DSo86JBs8dCg.png" /><figcaption>Background by Freepik</figcaption></figure><h3>🚀 What is Vagrant Creator?</h3><p>Vagrant Creator is a Python package designed by me to simplify the process of generating Vagrant init files with custom configurations. Whether you’re new to Vagrant or a seasoned developer, this tool aims to streamline the creation of your Vagrant environments by offering an interactive, user-friendly interface.</p><h4><strong>PyPI page:</strong></h4><p><a href="https://pypi.org/project/vagrant-creator/">https://pypi.org/project/vagrant-creator/</a></p><h3>🛠️ Installation</h3><p>Getting started with Vagrant Creator is straightforward. Simply install the package using pip:</p><pre>pip install vagrant-creator</pre><h3>📝 Usage</h3><p>Once installed, running vagrant-creator will launch an interactive setup to guide you through the configuration of your Vagrant environment. Let&#39;s take a closer look at how it works:</p><h3>Entering Information</h3><ul><li>Default Values: Pressing Enter will use the default value shown in parentheses.</li><li>Multiple Inputs: You can add multiple forwarded ports or provisioning commands by following the prompts.</li></ul><h4>Forwarded Ports</h4><p>When prompted to add a forwarded port, enter y to add a port or n to skip:</p><ul><li>Guest Port: Enter the guest port number (default: 8080).</li><li>Host Port: Enter the host port number (default: 8080).</li><li>Auto Correct: Enable auto-correct (default: true). Enter t for true or f for false.</li></ul><h4>Provisioning Commands</h4><p>When prompted to add a provisioning command, enter y to add a command or n to skip:</p><ul><li>Command: Enter the provisioning command (e.g., sudo yum install ansible -y).</li></ul><h3>Example</h3><p>Here’s a quick example of the interactive setup:</p><pre>$ vagrant-creator<br><br>===================================== Vagrant file generator =====================================<br>Enter vm box name (default: centos/7): <br>Enter CPU (default: 1): <br>Enter RAM in MB (default: 1024): <br>Enter Machine Name (default: default-machine): <br>Enter Host Name (default: localhost): <br>Enter IP Address (default: 192.168.33.10): <br>Do you want to add a forwarded port? [y (Yes) /n (No)]: y<br>Enter the guest port number (default: 8080): <br>Enter the host port number (default: 8080): <br>Enable auto correct? (default: true) [t (True) /f (False)]: t<br>Do you want to add a provisioning command? [y (Yes) /n (No)]: y<br>Enter the provisioning command (e.g., &#39;sudo yum install ansible -y&#39;): sudo apt-get install ansible -y<br>Do you want to add a provisioning command? [y (Yes) /n (No)]: n<br>Vagrantfile generated successfully!</pre><h3>📄 License</h3><p>This project is licensed under the MIT License. For more details, check out the LICENSE file.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6e0ad913674" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux XZ Terror Unveiled]]></title>
            <link>https://medium.com/@chandulapamodajayathilake/linux-xz-terror-unveiled-357922d2151f?source=rss-926ab3717467------2</link>
            <guid isPermaLink="false">https://medium.com/p/357922d2151f</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[attack]]></category>
            <category><![CDATA[xz]]></category>
            <category><![CDATA[backdoor]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Chandula Jayathilake]]></dc:creator>
            <pubDate>Wed, 03 Apr 2024 10:04:25 GMT</pubDate>
            <atom:updated>2024-04-03T10:04:25.009Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Da-tMvKXKUJ5tt_b7_o8Cw.png" /></figure><h3>What happened ?</h3><p>A highly sophisticated and carefully planned attack has targeted the XZ compression tool which is a most widespread tool used in Linux distros, impacting major Linux distributions such as Debian, CI, and openSUSE. This attack is considered one of the most well-executed supply chain attacks to date. The code was designed to execute at the end of a script and modify the liblzma library, which is part of the XZ Utils package, to provide unauthenticated access to affected machines through a secret backdoor. The severity of this vulnerability is rated at a Threat Level Midnight 10.0, surpassing well-known bugs like Heartbleed, Shellshock, and Log4Shell on the CVE severity scale and is named <a href="https://nvd.nist.gov/vuln/detail/CVE-2024-3094">CVE-2024–3094</a>.</p><p>The attack was carried out over several years by a user named Jia Tan (JiaT75), who had become a trusted person over several years by contributing to the project XZ Utils which was authored by and is still led by <a href="https://tukaani.org/xz-backdoor/">Lasse Collin</a>. The attack timeline is as follows:</p><ul><li>JiaTan has created the github user account in 2021.</li><li>In April 2022, Jia Tan has submitted a patch to the xz project via a mailing list.</li><li>Unknown accounts, including Jigar Kumar and Dennis Ens, has pressured the long-time maintainer, Lasse Collin, to merge the patch and add Jia Tan as a new maintainer.</li><li>Lasse Collin, having limited availability, has then agreed to add Jia Tan as a maintainer.</li><li>Over the next two years, Jia Tan had gained trust and became a regular contributor to this xz project.</li><li>By March 2023, Jia Tan had become the primary contact for xz in Google’s oss-fuzz platform.</li><li>Ultimately, Jia Tan has introduced the backdoor identified as <a href="https://nvd.nist.gov/vuln/detail/CVE-2024-3094">CVE-2024–3094</a> into the xz compression library.</li></ul><h3>Discovery of the imminent threat</h3><p>A vigilant software engineer named Andre Frin, while benchmarking PostgreSQL on an unstable Debian branch, has detected unusual CPU usage during SSH logins which would be overlooked by many. Initially thinking as an issue in Debian, however has conducted an investigation. Upon investigation, he had traced the issue upstream to XZ utils, a widely relied-upon tool for file compressions.</p><h3>Responsible entities</h3><p>The attacker is yet unknown. It could be an individual or an organization. The cybersecurity and open-source communities suspect that the extended and organized actions of “Jia Tan” indicate the involvement of a sophisticated threat actor.</p><h3>Security Measures</h3><ul><li><strong>Urgent Patching</strong>: If you are using any version of <strong>xz-utils</strong>, <strong>immediately update</strong> to a patched version (preferably <strong>5.6.2</strong> or later). Check your Linux distribution’s official repositories for the latest updates.Focus on updating systems that utilize systemd and have publicly accessible SSH ports to minimize immediate vulnerabilities.</li><li><strong>Verify Integrity</strong>: Ensure that the updated package is from a <strong>trusted source</strong>. Verify the integrity of the software using cryptographic hashes or package signing.</li><li><strong>Monitor Access</strong>: Keep an eye on access logs and user activity. Look for any unauthorized logins or unusual behavior.</li></ul><h3>What can we do as the community?</h3><p>If you discover any evidence of exploitation or suspicious activity linked to the XZ backdoor, promptly report it to the appropriate Linux distribution maintainers or security teams, fostering a collective effort within the community.</p><p>Share relevant information to keep others informed and safeguarded. Stay updated by monitoring security news and advisories, subscribing to mailing lists, or following security-focused websites.</p><p>It’s crucial to analyze and learn from this incident to enhance awareness and implement measures to avert similar attacks in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=357922d2151f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>