<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Low Latency Log</title><link>https://loonins.github.io/lowlatencylog/</link><description>Recent content on Low Latency Log</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 19 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://loonins.github.io/lowlatencylog/index.xml" rel="self" type="application/rss+xml"/><item><title>Reverse shell in C</title><link>https://loonins.github.io/lowlatencylog/posts/reverse-shell/</link><pubDate>Mon, 19 Oct 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/reverse-shell/</guid><description>&lt;h1 id="whats-a-reverse-shell"&gt;What&amp;rsquo;s a reverse shell?&lt;/h1&gt;
&lt;p&gt;A reverse shell is a remote command-line session where the target machine connects outward to an attacker-controlled listener, rather than the attacker connecting directly into the target. Once connected, the attacker can type commands that execute on the target and see their output.&lt;/p&gt;
&lt;h2 id="how-does-it-work"&gt;How does it work?&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;The attacker starts listening on a port.&lt;/li&gt;
&lt;li&gt;The target runs a program that opens a TCP connection to the attacker&amp;rsquo;s listener.&lt;/li&gt;
&lt;li&gt;The target redirects the stdin, stdout and stderr of the program to the connection.&lt;/li&gt;
&lt;li&gt;The attacker terminal becomes an interactive shell on the target.&lt;/li&gt;
&lt;/ol&gt;
&lt;h1 id="whats-a-socket"&gt;What&amp;rsquo;s a socket?&lt;/h1&gt;
&lt;p&gt;When two processes need to communicate, they need some way to exchange data. On an operating system, this is usually done through a syscall that exposes the underlying communication mechanism.&lt;/p&gt;</description></item><item><title>Level 7</title><link>https://loonins.github.io/lowlatencylog/posts/natas/level_7/</link><pubDate>Thu, 08 Oct 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/natas/level_7/</guid><description>&lt;h2 id="natas-7--devlog"&gt;Natas 7 – devlog&lt;/h2&gt;
&lt;p&gt;First thing I did was just poke around the site. The landing page has two links: &lt;strong&gt;Home&lt;/strong&gt; and &lt;strong&gt;About&lt;/strong&gt;. Nothing special, but inspecting the URLs shows a pattern:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Home → &lt;code&gt;index.php?page=home&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;About → &lt;code&gt;index.php?page=about&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So the app is routing pages through a single &lt;code&gt;index.php&lt;/code&gt; using a &lt;code&gt;page&lt;/code&gt; query parameter.&lt;/p&gt;
&lt;p&gt;Next, I tried passing something other than &lt;code&gt;home&lt;/code&gt; or &lt;code&gt;about&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;index.php?page=foo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That immediately threw an error mentioning &lt;code&gt;include()&lt;/code&gt;.
&lt;img src="../level_7/natas_7_error.png" alt="Error"&gt;
At this point, my mental model was:&lt;/p&gt;</description></item><item><title>Level 8</title><link>https://loonins.github.io/lowlatencylog/posts/natas/level_8/</link><pubDate>Thu, 08 Oct 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/natas/level_8/</guid><description>&lt;h2 id="natas-8--devlog"&gt;Natas 8 – devlog&lt;/h2&gt;
&lt;p&gt;Like Level 6, this challenge presents a form that checks a “secret”. The difference is that the secret is no longer stored in plain text; it’s transformed before comparison.&lt;/p&gt;
&lt;p&gt;Viewing the page source shows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-php" data-lang="php"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$encodedSecret&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;3d3d516343746d4d6d6c315669563362&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;encodeSecret&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$secret&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;bin2hex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;strrev&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;base64_encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$secret&lt;/span&gt;&lt;span class="p"&gt;)));&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;array_key_exists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;submit&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$_POST&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;encodeSecret&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$_POST&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;secret&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nv"&gt;$encodedSecret&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Access granted. The password for natas9 is &amp;lt;censored&amp;gt;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Wrong secret&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So the flow is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;User submits a secret via &lt;code&gt;$_POST['secret']&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The server runs &lt;code&gt;encodeSecret()&lt;/code&gt; on it:&lt;br&gt;
&lt;code&gt;base64_encode → strrev → bin2hex&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The result is compared against &lt;code&gt;$encodedSecret&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To win, I need an input whose encoded form equals &lt;code&gt;3d3d516343746d4d6d6c315669563362&lt;/code&gt;. That means inverting the transformation:&lt;/p&gt;</description></item><item><title>K-Nearest Neighbors from scratch</title><link>https://loonins.github.io/lowlatencylog/posts/ml-from-scratch/knn-from-scratch/</link><pubDate>Wed, 16 Sep 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/ml-from-scratch/knn-from-scratch/</guid><description>&lt;h2 id="k-nearest-neighbors"&gt;K-Nearest Neighbors&lt;/h2&gt;
&lt;p&gt;The K-Nearest Neighbors (KNN) algorithm is a simple and intuitive algorithm that can be used for classification and regression tasks.&lt;/p&gt;
&lt;p&gt;In discrete distributions any new data point is given, the algorithm will find the K-nearest neighbors of new points and predict the class of the new point based on the majority vote of the K-nearest neighbors(Generally, K is odd to avoid ties).
In case of continuous distributions, the distance between the new point and the K-nearest neighbors is calculated and averaged to get the predicted value.
Unlike linear and logistic regression, KNN does not require a linear model to be trained. There are no parameters to be tuned. Its a lazy learning algorithm, the calculations are done at the time of prediction.
The distance between the new point and the K-nearest neighbors is calculated using the Euclidean distance. However, other distance metrics can be used as well such as Manhattan distance, Minkowski distance, Cosine distance etc.&lt;/p&gt;</description></item><item><title>What's Logistic Regression?</title><link>https://loonins.github.io/lowlatencylog/posts/ml-from-scratch/logistic-regression-from-scratch/</link><pubDate>Mon, 14 Sep 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/ml-from-scratch/logistic-regression-from-scratch/</guid><description>&lt;p&gt;Previously, I talked about how linear regression worked and implemented it in Python from scratch. This post is about understanding and implementing logistic regression from scratch. I will talk about what logistic regression is, how it works, and why we use it.&lt;/p&gt;
&lt;h1 id="intro"&gt;Intro&lt;/h1&gt;
&lt;p&gt;Unfortunately or fortunately, the field of ML cannot be discussed without understanding the underlying mathematics on which it is built.&lt;/p&gt;
&lt;p&gt;Similar to linear regression, we are approximating some parameters and then using them to make predictions. However, unlike linear regression, we are not predicting a particular value but rather trying to classify an input into a category.&lt;/p&gt;</description></item><item><title>What's Linear Regression</title><link>https://loonins.github.io/lowlatencylog/posts/ml-from-scratch/linear-regression-from-scratch/</link><pubDate>Mon, 24 Aug 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/ml-from-scratch/linear-regression-from-scratch/</guid><description>&lt;p&gt;Machine Learning works by training a set of parameters and using them to predict future data. But what are these parameters and how do they work? Why are there so many of these algorithms?&lt;/p&gt;
&lt;p&gt;Each ML model is essentially a mathematical function whose parameters are optimized to best fit our data&lt;/p&gt;
&lt;p&gt;In this blog, I demonstrate how a linear regression model works, why we use it and understand how it predict data and what&amp;rsquo;s it&amp;rsquo;s &amp;ldquo;learning&amp;rdquo;.&lt;/p&gt;</description></item><item><title>Level 6</title><link>https://loonins.github.io/lowlatencylog/posts/natas/level_6/</link><pubDate>Fri, 26 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/natas/level_6/</guid><description>&lt;h2 id="natas-6--devlog"&gt;Natas 6 – devlog&lt;/h2&gt;
&lt;p&gt;This level presents a simple form: enter a “secret”, hit submit, and if it matches the server’s value, you get the natas7 password.&lt;/p&gt;
&lt;p&gt;The interesting part isn’t the form itself, but the page source. Right at the top, there’s this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-php" data-lang="php"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;&amp;lt;?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;include&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;includes/secret.inc&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;array_key_exists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;submit&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$_POST&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$secret&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nv"&gt;$_POST&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;secret&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Access granted. The password for natas7 is &amp;lt;censored&amp;gt;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Wrong secret&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So the logic is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Include &lt;code&gt;includes/secret.inc&lt;/code&gt;, which presumably defines &lt;code&gt;$secret&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;On form submit, compare &lt;code&gt;$secret&lt;/code&gt; with &lt;code&gt;$_POST['secret']&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If they match, reveal the next password.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That &lt;code&gt;include&lt;/code&gt; line immediately raises a question: is &lt;code&gt;includes/secret.inc&lt;/code&gt; itself accessible via HTTP?&lt;/p&gt;</description></item><item><title>Level 4 – Referer Spoofing</title><link>https://loonins.github.io/lowlatencylog/posts/natas/level_4/</link><pubDate>Thu, 25 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/natas/level_4/</guid><description>&lt;h2 id="initial-observation"&gt;Initial Observation&lt;/h2&gt;
&lt;p&gt;As with previous levels, I started by inspecting the application via the browser’s developer tools (Network tab + HTML source). The hint on the page states:&lt;/p&gt;
&lt;p&gt;&lt;img src="./devtools.png" alt="Hint"&gt;&lt;/p&gt;
&lt;p&gt;This strongly suggests that the server is making an authorization decision based on some notion of “where the user came from,” rather than on a proper authentication mechanism.&lt;/p&gt;
&lt;h2 id="identifying-the-attack-surface"&gt;Identifying the Attack Surface&lt;/h2&gt;
&lt;p&gt;Given the wording “users from …”, the natural question is: how can the server infer the origin of a request?&lt;/p&gt;</description></item><item><title>Natas Level 5</title><link>https://loonins.github.io/lowlatencylog/posts/natas/level_5/</link><pubDate>Thu, 25 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/natas/level_5/</guid><description>&lt;h2 id="natas-5--devlog"&gt;Natas 5 – devlog&lt;/h2&gt;
&lt;p&gt;The page loads with a simple “access restricted” message and nothing else.&lt;/p&gt;
&lt;p&gt;&lt;img src="./hint.png" alt="Hint"&gt;&lt;/p&gt;
&lt;p&gt;Digging into the HTTP request, I spot a cookie:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;loggedin=0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That looks like a boolean flag the server uses to decide whether I’m authenticated. In other words, the site is storing auth state in a client‑controlled cookie.&lt;/p&gt;
&lt;p&gt;Initial request from the browser:&lt;/p&gt;
&lt;p&gt;&lt;img src="./req.png" alt="Request"&gt;&lt;/p&gt;
&lt;p&gt;Since cookies are under my control, I edit the request and change:&lt;/p&gt;</description></item><item><title>Natas Level 0</title><link>https://loonins.github.io/lowlatencylog/posts/natas/level_0/</link><pubDate>Sun, 21 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/natas/level_0/</guid><description>&lt;h3 id="natas-level-0"&gt;Natas Level 0&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Username:&lt;/strong&gt; &lt;code&gt;natas0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Password:&lt;/strong&gt; &lt;code&gt;natas0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;URL:&lt;/strong&gt; &lt;a href="http://natas0.natas.labs.overthewire.org"&gt;http://natas0.natas.labs.overthewire.org&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;I started by opening the browser’s &lt;strong&gt;Inspect&lt;/strong&gt; (right‑click → Inspect) and looking at the HTML.&lt;/p&gt;
&lt;p&gt;&lt;img src="image.png" alt="Checking the HTML with the Inspect tool"&gt;&lt;/p&gt;
&lt;p&gt;As expected, the password for the next level is hidden in this page’s HTML.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;a href="../../natas/level_1"&gt;next level&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Natas Level 1</title><link>https://loonins.github.io/lowlatencylog/posts/natas/level_1/</link><pubDate>Sun, 21 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/natas/level_1/</guid><description>&lt;p&gt;&lt;a href="../../natas/level_0"&gt;previous level&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="login"&gt;Login&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Password:&lt;/strong&gt; &lt;code&gt;0nzCigAq7t2iALyvU9xcHlYN4MlkIwlq&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Username:&lt;/strong&gt; &lt;code&gt;natas1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;URL:&lt;/strong&gt; &lt;a href="http://natas1.natas.labs.overthewire.org"&gt;http://natas1.natas.labs.overthewire.org&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;Right-clicking is blocked, so just open DevTools with the shortcut. In Firefox, press &lt;code&gt;&amp;lt;F12&amp;gt;&lt;/code&gt;; check the correct shortcut for your browser.&lt;/p&gt;
&lt;p&gt;I usually start by reading through the HTML before checking anything else.&lt;/p&gt;
&lt;p&gt;Looking at the &lt;code&gt;content&lt;/code&gt; div under &lt;code&gt;body&lt;/code&gt;, I found:&lt;/p&gt;
&lt;p&gt;&lt;img src="image.png" alt="Found the next password in the content div"&gt;&lt;/p&gt;
&lt;p&gt;With this, we got the password for the next level.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;a href="../../natas/level_2"&gt;next level&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Natas Level 2</title><link>https://loonins.github.io/lowlatencylog/posts/natas/level_2/</link><pubDate>Sun, 21 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/natas/level_2/</guid><description>&lt;h3 id="level-2"&gt;Level 2&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Username:&lt;/strong&gt; &lt;code&gt;natas2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;URL:&lt;/strong&gt; &lt;a href="http://natas2.natas.labs.overthewire.org"&gt;http://natas2.natas.labs.overthewire.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Password:&lt;/strong&gt; &lt;code&gt;TguMNxKo1DSa1tujBLuZJnDUlCcUAPlI&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;When looking through the HTML, I found there is an image stored at &lt;code&gt;./files/pixel.png&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="./image.png" alt="Pixel.png reference in the HTML"&gt;&lt;/p&gt;
&lt;p&gt;With this, I checked out the PNG by visiting:&lt;br&gt;
&lt;code&gt;http://natas2.natas.labs.overthewire.org/files/pixel.png&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This wasn&amp;rsquo;t particularly useful, so I checked what was at:&lt;br&gt;
&lt;code&gt;http://natas2.natas.labs.overthewire.org/files&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="./image2.png" alt="Directory listing at /files"&gt;&lt;/p&gt;
&lt;p&gt;I wondered what was hiding in &lt;code&gt;user.txt&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="./image3.png" alt="Contents of users.txt"&gt;&lt;/p&gt;
&lt;p&gt;With that, I got the password for the next level.&lt;/p&gt;</description></item><item><title>Natas Level 3</title><link>https://loonins.github.io/lowlatencylog/posts/natas/level_3/</link><pubDate>Sun, 21 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/natas/level_3/</guid><description>&lt;h3 id="level-3"&gt;Level 3&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Username:&lt;/strong&gt; &lt;code&gt;natas3&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;URL:&lt;/strong&gt; &lt;a href="http://natas3.natas.labs.overthewire.org"&gt;http://natas3.natas.labs.overthewire.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Password:&lt;/strong&gt; &lt;code&gt;3gqisGdR0pjm6tpkDKdIWO2hSvchLeYH&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;This time, the hint hidden in the HTML is:&lt;/p&gt;
&lt;p&gt;&lt;img src="image_12.png" alt="Hint from the HTML"&gt;&lt;/p&gt;
&lt;p&gt;Interesting — maybe this has something to do with &lt;code&gt;robots.txt&lt;/code&gt;, since Google uses it to specify which pages to index.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s check it at &lt;code&gt;http://natas3.natas.labs.overthewire.org/robots.txt&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;User-agent: *
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Disallow: /s3cr3t/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It disallows &lt;code&gt;/s3cr3t/&lt;/code&gt; from being indexed. I should definitely check it out:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Index of /s3cr3t
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[ICO] Name Last modified Size Description
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[PARENTDIR] Parent Directory -
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[TXT] users.txt 2026-06-14 17:38 40
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Apache/2.4.58 (Ubuntu) Server at natas3.natas.labs.overthewire.org Port 80
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;users.txt&lt;/code&gt; file holds the password for the next level.&lt;/p&gt;</description></item><item><title>Bandit 31 -&gt; 32</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_31_32/</link><pubDate>Sat, 20 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_31_32/</guid><description>&lt;h1 id="login"&gt;login&lt;/h1&gt;
&lt;p&gt;SSH: We don&amp;rsquo;t need SSH for this level!
password: &lt;code&gt;fb5S2xb7bRyFmAvQYQGEqsbhVyJqhnDy&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="level-goal"&gt;level goal&lt;/h3&gt;
&lt;p&gt;There is a git repository at ssh://bandit31-git@bandit.labs.overthewire.org/home/bandit31-git/repo via the port 2220. The password for the user bandit31-git is the same as for the user bandit31.&lt;/p&gt;
&lt;p&gt;From your local machine (not the OverTheWire machine!), clone the repository and find the password for the next level. This needs git installed locally on your machine.&lt;/p&gt;
&lt;h3 id="log"&gt;log&lt;/h3&gt;
&lt;p&gt;clone the repo and check the readme&lt;/p&gt;</description></item><item><title>Bandit 13 to 14</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_13_14/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_13_14/</guid><description>&lt;h3 id="login"&gt;Login&lt;/h3&gt;
&lt;p&gt;ssh: &lt;code&gt;ssh bandit13@bandit.labs.overthewire.org&lt;/code&gt;
pass: &lt;code&gt;FO5dwFsc0cbaIiH0h8J2eUks2vdTDwAn&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="level-goal"&gt;Level Goal&lt;/h3&gt;
&lt;p&gt;The password for the next level is stored in /etc/bandit_pass/bandit14 and can only be read by user bandit14. For this level, you don’t get the next password, but you get a private SSH key that can be used to log into the next level. Look at the commands that logged you into previous bandit levels, and find out how to use the key for this level.
If you need help with this level: a hint file can be found in the home directory.
Make sure to read the error messages as they are informative.&lt;/p&gt;</description></item><item><title>Bandit 14 -&gt; 15</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_14_15/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_14_15/</guid><description>&lt;h3 id="level-goal"&gt;Level Goal&lt;/h3&gt;
&lt;p&gt;The password for the next level can be retrieved by submitting the password of the current level to port 30000 on localhost.&lt;/p&gt;
&lt;h3 id="solution"&gt;Solution&lt;/h3&gt;
&lt;p&gt;For this level, we need to send a request to port 30000 on localhost with the password of the current level and get the response.
From the last level we know the password for current level resides in &lt;code&gt;/etc/bandit_pass/bandit14&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So now we can pipe the contents of &lt;code&gt;/etc/bandit_pass/bandit14&lt;/code&gt; to port 30000 on localhost and get the response.&lt;/p&gt;</description></item><item><title>Bandit 15 → 16</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_15_16/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_15_16/</guid><description>&lt;h3 id="level-goal"&gt;Level Goal&lt;/h3&gt;
&lt;p&gt;The password for the next level can be retrieved by submitting the password of the current level to port 30001 on localhost using SSL/TLS encryption.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Helpful note:&lt;/strong&gt; Getting &amp;ldquo;DONE&amp;rdquo;, &amp;ldquo;RENEGOTIATING&amp;rdquo; or &amp;ldquo;KEYUPDATE&amp;rdquo;? Read the &amp;ldquo;CONNECTED COMMANDS&amp;rdquo; section in the manpage.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="solution"&gt;Solution&lt;/h3&gt;
&lt;p&gt;Unlike the previous level (port 30000 over TCP), port 30001 wraps the same service in &lt;strong&gt;SSL/TLS&lt;/strong&gt;. I can&amp;rsquo;t use &lt;code&gt;nc&lt;/code&gt; here .&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cat /etc/bandit_pass/bandit15 &lt;span class="p"&gt;|&lt;/span&gt; ncat --ssl localhost &lt;span class="m"&gt;30001&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or, I can use &lt;code&gt;openssl&lt;/code&gt; to connect to port 30001 over SSL/TLS.&lt;/p&gt;</description></item><item><title>Bandit 16 → 17</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_16_17/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_16_17/</guid><description>&lt;h3 id="level-goal"&gt;Level Goal&lt;/h3&gt;
&lt;p&gt;The credentials for the next level can be retrieved by submitting the password of the current level to a port on localhost in the range 31000 to 32000. The task is to first identify which ports are listening, then determine which of those speak SSL/TLS, and finally find the one service that returns the next credentials instead of echoing the input back.&lt;/p&gt;
&lt;h3 id="solution"&gt;Solution&lt;/h3&gt;
&lt;p&gt;The easiest way to identify open ports and check if they speak SSL/TLS is use &lt;code&gt;nmap&lt;/code&gt; to scan the ports. However, I wanted to try completing this level using only Linux built-ins.&lt;/p&gt;</description></item><item><title>Bandit 17 → 18</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_17_18/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_17_18/</guid><description>&lt;h2 id="level-goal"&gt;Level Goal&lt;/h2&gt;
&lt;p&gt;There are 2 files in the homedirectory: passwords.old and passwords.new. The password for the next level is in passwords.new and is the only line that has been changed between passwords.old and passwords.new&lt;/p&gt;
&lt;p&gt;NOTE: if you have solved this level and see ‘Byebye!’ when trying to log into bandit18, this is related to the next level, bandit19&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;
&lt;p&gt;The solution is to use the &lt;code&gt;diff&lt;/code&gt; command to compare the 2 files:&lt;/p&gt;</description></item><item><title>Bandit 18 → 19</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_18_19/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_18_19/</guid><description>&lt;h2 id="level-goal"&gt;Level Goal&lt;/h2&gt;
&lt;p&gt;The password for the next level is stored in a file readme in the homedirectory. Unfortunately, someone has modified .bashrc to log you out when you log in with SSH.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="login"&gt;Login&lt;/h2&gt;
&lt;p&gt;ssh: ssh -p 2220 &lt;a href="mailto:bandit18@bandit.labs.overthewire.org"&gt;bandit18@bandit.labs.overthewire.org&lt;/a&gt;
pass: x2gLTTjFwMOhQ8oWNbMN362QKxfRqGlO&lt;/p&gt;
&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;
&lt;p&gt;When you log in with SSH, you are logged out, as the .bashrc file is modified to log you out.&lt;/p&gt;
&lt;p&gt;I get logged out before I am able to anything. All I need to do is login and cat the readme file.&lt;/p&gt;</description></item><item><title>Bandit 19 → 20</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_19_20/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_19_20/</guid><description>&lt;h3 id="login"&gt;Login&lt;/h3&gt;
&lt;p&gt;ssh: &lt;code&gt;ssh -p 2220 bandit19@bandit.labs.overthewire.org&lt;/code&gt;
pass: &lt;code&gt;cGWpMaKXVwDUNgPAVJbWYuGHVn9zl3j8&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="level-goal"&gt;LEVEL GOAL&lt;/h3&gt;
&lt;p&gt;To gain access to the next level, you should use the setuid binary in the homedirectory. Execute it without arguments to find out how to use it. The password for this level can be found in the usual place (/etc/bandit_pass), after you have used the setuid binary.&lt;/p&gt;
&lt;h3 id="solution"&gt;Solution&lt;/h3&gt;
&lt;p&gt;Let&amp;rsquo;s first find out what the setuid binary do:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bandit19@bandit:~$ ./bandit20-do
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Run a &lt;span class="nb"&gt;command&lt;/span&gt; as another user.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Example: ./bandit20-do whoami
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Aha, it allows me to run a command as user &lt;code&gt;bandit20&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Bandit 20 → 21</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_20_21/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_20_21/</guid><description>&lt;h3 id="login"&gt;Login&lt;/h3&gt;
&lt;p&gt;ssh: &lt;code&gt;ssh -p 2220 bandit20@bandit.labs.overthewire.org&lt;/code&gt;
pass: &lt;code&gt;0qXahG8ZjOVMN9Ghs7iOWsCfZyXOUbYO&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="level-goal"&gt;LEVEL GOAL&lt;/h3&gt;
&lt;p&gt;There is a setuid binary in the homedirectory that does the following: it makes a connection to localhost on the port you specify as a commandline argument. It then reads a line of text from the connection and compares it to the password in the previous level (bandit20). If the password is correct, it will transmit the password for the next level (bandit21).&lt;/p&gt;</description></item><item><title>Bandit 21 → 22</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_21_22/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_21_22/</guid><description>&lt;h3 id="login"&gt;Login&lt;/h3&gt;
&lt;p&gt;ssh: &lt;code&gt;ssh -p 2220 bandit21@bandit.labs.overthewire.org&lt;/code&gt;
pass: &lt;code&gt;EeoULMCra2q0dSkYj561DX7s1CpBuOBt&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="level-goal"&gt;Level Goal&lt;/h3&gt;
&lt;p&gt;A program is running automatically at regular intervals from cron, the time-based job scheduler. Look in /etc/cron.d/ for the configuration and see what command is being executed.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="solution"&gt;Solution&lt;/h3&gt;
&lt;p&gt;Let&amp;rsquo;s first find out what the program do:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bandit21@bandit:~$ cat /etc/cron.d/cronjob_bandit22
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;@reboot bandit22 /usr/bin/cronjob_bandit22.sh &lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&amp;gt; /dev/null
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;* * * * * bandit22 /usr/bin/cronjob_bandit22.sh &lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&amp;gt; /dev/null
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So at every reboot, the user &lt;code&gt;bandit22&lt;/code&gt; will run a script at &lt;code&gt;/usr/bin/cronjob_bandit22.sh&lt;/code&gt; and send all the output to a null device.&lt;/p&gt;</description></item><item><title>Bandit 22 → 23</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_22_23/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_22_23/</guid><description>&lt;h3 id="login"&gt;Login&lt;/h3&gt;
&lt;p&gt;ssh: &lt;code&gt;ssh -p 2220 bandit22@bandit.labs.overthewire.org&lt;/code&gt;
pass: &lt;code&gt;0qXahG8ZjOVMN9Ghs7iOWsCfZyXOUbYO&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="level-goal"&gt;Level Goal&lt;/h3&gt;
&lt;p&gt;A program is running automatically at regular intervals from cron, the time-based job scheduler. Look in /etc/cron.d/ for the configuration and see what command is being executed.&lt;/p&gt;
&lt;p&gt;NOTE: Looking at shell scripts written by other people is a very useful skill. The script for this level is intentionally made easy to read. If you are having problems understanding what it does, try executing it to see the debug information it prints.&lt;/p&gt;</description></item><item><title>Bandit 23 → 24</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_23_24/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_23_24/</guid><description>&lt;h3 id="login"&gt;Login&lt;/h3&gt;
&lt;p&gt;ssh: &lt;code&gt;ssh -p 2220 bandit23@bandit.labs.overthewire.org&lt;/code&gt;
pass: &lt;code&gt;0Zf11ioIjMVN551jX3CmStKLYqjk54Ga&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="level-goal"&gt;Level Goal&lt;/h3&gt;
&lt;p&gt;A program is running automatically at regular intervals from cron, the time-based job scheduler. Look in /etc/cron.d/ for the configuration and see what command is being executed.&lt;/p&gt;
&lt;p&gt;NOTE: This level requires you to create your own first shell-script. This is a very big step and you should be proud of yourself when you beat this level!&lt;/p&gt;
&lt;p&gt;NOTE 2: Keep in mind that your shell script is removed once executed, so you may want to keep a copy around…&lt;/p&gt;</description></item><item><title>Bandit 24 → 25</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_24_25/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_24_25/</guid><description>&lt;h3 id="login"&gt;Login&lt;/h3&gt;
&lt;p&gt;ssh: &lt;code&gt;ssh -p 2220 bandit24@bandit.labs.overthewire.org&lt;/code&gt;
pass: &lt;code&gt;gb8KRRCsshuZXI0tUuR6ypOFjiZbf3G8&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="level-goal"&gt;Level Goal&lt;/h3&gt;
&lt;p&gt;A daemon is listening on port 30002 and will give you the password for bandit25 if given the password for bandit24 and a secret numeric 4-digit pincode. There is no way to retrieve the pincode except by going through all of the 10000 combinations, called brute-forcing.
You do not need to create new connections each time&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="solution"&gt;Solution&lt;/h3&gt;
&lt;p&gt;To solve this level, we need to brute-force the pincode.&lt;/p&gt;</description></item><item><title>Bandit 25 → 26</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_25_26/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_25_26/</guid><description>&lt;h3 id="login"&gt;Login&lt;/h3&gt;
&lt;p&gt;ssh: &lt;code&gt;ssh -p 2220 bandit24@bandit.labs.overthewire.org&lt;/code&gt;&lt;br&gt;
pass: &lt;code&gt;iCi86ttT4KSNe1armKiwbQNmB3YJP3q4&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;After solving the previous level we log in as &lt;code&gt;bandit24&lt;/code&gt; and then grab the SSH key for &lt;code&gt;bandit26&lt;/code&gt; from the home directory of &lt;code&gt;bandit25&lt;/code&gt; (see previous post for that part). We’ll use that key to hit a weird, restricted shell as &lt;code&gt;bandit26&lt;/code&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="level-goal"&gt;Level goal&lt;/h3&gt;
&lt;p&gt;Instead of a normal shell like &lt;code&gt;/bin/bash&lt;/code&gt;, &lt;code&gt;bandit26&lt;/code&gt; uses a custom program as its login shell. The goal is to figure out what that program is, how it behaves, and how to escape from it into a real shell.&lt;/p&gt;</description></item><item><title>Bandit 26 → 27</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_26_27/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_26_27/</guid><description>&lt;link rel="stylesheet" href="https://loonins.github.io/lowlatencylog/css/vendors/admonitions.53cd9f8afa9d9a8ac09093f668df057bc6d0f4bbd0886f39991a7b99934a7432.css" integrity="sha256-U82fivqdmorAkJP2aN8Fe8bQ9LvQiG85mRp7mZNKdDI=" crossorigin="anonymous"&gt;
&lt;div class="admonition info"&gt;
&lt;div class="admonition-header"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"&gt;&lt;path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/&gt;&lt;/svg&gt;
&lt;span&gt;Login details&lt;/span&gt;
&lt;/div&gt;
&lt;div class="admonition-content"&gt;
&lt;p&gt;Check the &lt;a href="../bandit_25_26/"&gt;previous level&lt;/a&gt; for login details.
It&amp;rsquo;s not possible to login to this level using just ssh.&lt;/p&gt;</description></item><item><title>Bandit 27 → 28</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_27_28/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_27_28/</guid><description>&lt;p&gt;&lt;a href="../bandit_26_27/"&gt;previous level&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="level-goal"&gt;Level Goal&lt;/h3&gt;
&lt;p&gt;There is a git repository at ssh://bandit27-git@bandit.labs.overthewire.org/home/bandit27-git/repo via the port 2220. The password for the user bandit27-git is the same as for the user bandit27.&lt;/p&gt;
&lt;p&gt;From your local machine (not the OverTheWire machine!), clone the repository and find the password for the next level. This needs git installed locally on your machine.&lt;/p&gt;
&lt;h3 id="solution"&gt;Solution&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bandit27@bandit:~$ git clone ssh://bandit27-git@bandit.labs.overthewire.org:2220/home/bandit27-git/repo
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Cloning into &lt;span class="s1"&gt;&amp;#39;repo&amp;#39;&lt;/span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The password for repo is same as the level.&lt;/p&gt;</description></item><item><title>Bandit 28 → 29</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_28_29/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_28_29/</guid><description>&lt;h2 id="login-details"&gt;Login Details&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Password:&lt;/strong&gt;&lt;code&gt;Yz9IpL0sBcCeuG7m9uQFt8ZNpS4HZRcN&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="level-goal"&gt;Level Goal&lt;/h2&gt;
&lt;p&gt;There is a Git repository at:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ssh://bandit28-git@bandit.labs.overthewire.org/home/bandit28-git/repo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;on port &lt;code&gt;2220&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The password for the user &lt;code&gt;bandit28-git&lt;/code&gt; is the same as for the user &lt;code&gt;bandit28&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;From your &lt;strong&gt;local machine&lt;/strong&gt; (or from the Bandit box using &lt;code&gt;localhost&lt;/code&gt;), clone the repository and find the password for the next level. You need Git installed where you run the clone command.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;
&lt;p&gt;We start by cloning the repository. In my case, I’m doing this directly from the Bandit machine:&lt;/p&gt;</description></item><item><title>Bandit 29 → 30</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_29_30/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_29_30/</guid><description>&lt;h2 id="login-details"&gt;Login Details&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Password:&lt;/strong&gt; &lt;code&gt;4pT1t5DENaYuqnqvadYs1oE4QLCdjmJ7&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="level-goal"&gt;Level Goal&lt;/h2&gt;
&lt;p&gt;There is a git repository at
&lt;code&gt;ssh://bandit29-git@bandit.labs.overthewire.org/home/bandit29-git/repo&lt;/code&gt;
via port &lt;code&gt;2220&lt;/code&gt;.&lt;br&gt;
The password for &lt;code&gt;bandit29-git&lt;/code&gt; is the same as for the user &lt;code&gt;bandit29&lt;/code&gt;.
From your &lt;strong&gt;local machine&lt;/strong&gt; (as the level text suggests) you’re supposed to clone this repository and find the password for the next level. In practice you can also do these git commands directly on the Bandit box as long as &lt;code&gt;git&lt;/code&gt; is installed.&lt;/p&gt;</description></item><item><title>Bandit 30-31</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_30_31/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_30_31/</guid><description>&lt;h3 id="login"&gt;Login&lt;/h3&gt;
&lt;p&gt;password: &lt;code&gt;qp30ex3VLz5MDG1n91YowTv4Q8l7CDZL&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="solution"&gt;Solution&lt;/h3&gt;
&lt;p&gt;clone the repo&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git clone ssh://bandit30-git@bandit.labs.overthewire.org:2220/home/bandit30-git/repo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Check the README.md&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cat README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;just an epmty file... muahaha
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;At first glance, nothing useful. No commits leaking data, no extra branches.&lt;/p&gt;
&lt;p&gt;So if it’s not in the working tree, the next step is to think about what Git stores beyond files.&lt;/p&gt;
&lt;p&gt;Git doesn’t just track the latest state. It keeps all objects: commits, trees, blobs, references.&lt;/p&gt;
&lt;p&gt;Branches are one way to reference commits. But they’re not the only one.&lt;/p&gt;</description></item><item><title>Bandit Level 32 → Level 33</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_32_33/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_32_33/</guid><description>&lt;h3 id="login"&gt;Login&lt;/h3&gt;
&lt;p&gt;ssh: ssh &lt;a href="mailto:bandit32@bandit.labs.overthewire.org"&gt;bandit32@bandit.labs.overthewire.org&lt;/a&gt; -p 2220
password: &lt;code&gt;3O9RfhqyAlVBEZpVb6LYStshZoqoSx5K&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="level-goal"&gt;Level Goal&lt;/h3&gt;
&lt;p&gt;After all this git stuff, it’s time for another escape. Good luck!&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id="log"&gt;log&lt;/h3&gt;
&lt;p&gt;Immediately dropped into something unusual:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;WELCOME TO THE UPPERCASE SHELL
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;First instinct: try basic commands.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt;&amp;gt; ls
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sh: 1: LS: Permission denied
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt;&amp;gt; cat
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sh: 1: CAT: Permission denied
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt;&amp;gt; &lt;span class="nb"&gt;cd&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sh: 1: CD: Permission denied
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Everything gets forced to uppercase before execution. So ls becomes LS, which doesn’t exist (or isn’t allowed). Same for every other command.&lt;/p&gt;</description></item><item><title>Bandit 11 → 12</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_11_12/</link><pubDate>Thu, 18 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_11_12/</guid><description>&lt;h1 id="bandit-11--12"&gt;Bandit 11 → 12&lt;/h1&gt;
&lt;h2 id="login"&gt;Login&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;SSH: &lt;code&gt;ssh bandit11@bandit.labs.overthewire.org -p 2220&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Password: &lt;code&gt;dtR173fZKb0RRsDFSGsg3RWnpNVj3qRr&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="level-goal"&gt;Level Goal&lt;/h2&gt;
&lt;p&gt;The password for the next level is stored in the file &lt;code&gt;data.txt&lt;/code&gt;, where all lowercase (&lt;code&gt;a-z&lt;/code&gt;) and uppercase (&lt;code&gt;A-Z&lt;/code&gt;) letters have been rotated by 13 positions.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;
&lt;p&gt;This level uses &lt;strong&gt;ROT13&lt;/strong&gt;, a Caesar cipher with a shift of 13. Since the English alphabet has 26 letters, applying ROT13 twice returns the original text, which makes it useful for simple obfuscation but not for real security.&lt;/p&gt;</description></item><item><title>Bandit 12 to 13</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_12_13/</link><pubDate>Thu, 18 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_12_13/</guid><description>&lt;h1 id="bandit-12-to-13"&gt;Bandit 12 to 13&lt;/h1&gt;
&lt;h2 id="login"&gt;Login&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;SSH: &lt;code&gt;ssh bandit12@bandit.labs.overthewire.org -p 2220&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Password: &lt;code&gt;7x16WNeHIi5YkIhWsfFIqoognUTyj9Q4&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="level-goal"&gt;Level Goal&lt;/h2&gt;
&lt;p&gt;The password for the next level is stored in &lt;code&gt;data.txt&lt;/code&gt;. This file is a &lt;strong&gt;hexdump&lt;/strong&gt; of a file that has been &lt;strong&gt;repeatedly compressed&lt;/strong&gt; multiple times.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Strategy hints from the level:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a working directory under &lt;code&gt;/tmp&lt;/code&gt; (use a hard-to-guess name, or better: &lt;code&gt;mktemp -d&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Copy &lt;code&gt;data.txt&lt;/code&gt; there using &lt;code&gt;cp&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Rename it using &lt;code&gt;mv&lt;/code&gt; (read the manpages!)&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="my-approach"&gt;My Approach&lt;/h2&gt;
&lt;p&gt;The last time I solved this level, I manually:&lt;/p&gt;</description></item><item><title>Bandit Level 10 → Level 11</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_10_11/</link><pubDate>Thu, 18 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_10_11/</guid><description>&lt;h1 id="bandit-level-9--level-10"&gt;Bandit Level 9 → Level 10&lt;/h1&gt;
&lt;h2 id="login"&gt;login&lt;/h2&gt;
&lt;p&gt;ssh: &lt;code&gt;ssh bandit9@bandit.labs.overthewire.org -p 2220&lt;/code&gt;
pass: &lt;code&gt;FGUW5ilLVJrxX9kMYMmlN4MgbpfMiqey&lt;/code&gt;&lt;/p&gt;
&lt;h2 id="level-goal"&gt;Level Goal&lt;/h2&gt;
&lt;p&gt;The password for the next level is stored in the file data.txt, which contains base64 encoded data&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="approach"&gt;Approach&lt;/h2&gt;
&lt;p&gt;Generally a good to know if a file is base64 encoded is to look if it ends with equal signs. This isn&amp;rsquo;t a guaranteed way to tell if the file is base64 encoded, but got to start somewhere.&lt;/p&gt;</description></item><item><title>Thread Synchronization</title><link>https://loonins.github.io/lowlatencylog/posts/thread_sync/</link><pubDate>Thu, 18 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/thread_sync/</guid><description>&lt;p&gt;Threads sometimes need to access shared resources at the same time. This part of code is called a &lt;strong&gt;critical section&lt;/strong&gt;. This causes race conditions and is a nightmare to debug. The technique used to solve this problem is &lt;strong&gt;Thread Synchronization&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In my last post, I implemented solutions using flags and Peterson&amp;rsquo;s algorithm, but they &lt;strong&gt;don&amp;rsquo;t work reliably on newer machines&lt;/strong&gt;. Since software alone can&amp;rsquo;t solve the issue, &lt;strong&gt;hardware support is needed&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Calculating Number of Primes using Multithreading</title><link>https://loonins.github.io/lowlatencylog/posts/prime-no-multithreading/</link><pubDate>Tue, 16 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/prime-no-multithreading/</guid><description>&lt;p&gt;In the last post, I wrote about how to create threads and problems caused by them (race conditions).&lt;/p&gt;
&lt;p&gt;In this post, I&amp;rsquo;ll show how to calculate the number of primes using multithreading. The idea is simple:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use an algorithm to check if a number is prime&lt;/li&gt;
&lt;li&gt;Increment a counter if it is&lt;/li&gt;
&lt;li&gt;Run multiple threads on different ranges&lt;/li&gt;
&lt;li&gt;Sum up the total primes&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let&amp;rsquo;s look at the code.&lt;/p&gt;
&lt;h2 id="the-code"&gt;The Code&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-c" data-lang="c"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;typedef&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;Range&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;volatile&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;counter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="nf"&gt;isPrime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nf"&gt;primeLoop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;arg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Range&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Range&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="n"&gt;arg&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;isPrime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;counter&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// &amp;lt;-- BUG: Not atomic!
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;isPrime&lt;/code&gt; function checks if a number is prime, and &lt;code&gt;primeLoop&lt;/code&gt; increments the global &lt;code&gt;counter&lt;/code&gt; for each prime it finds in its range.&lt;/p&gt;</description></item><item><title>Peterson's Solution to Race Conditions</title><link>https://loonins.github.io/lowlatencylog/posts/peterson_solution/</link><pubDate>Tue, 16 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/peterson_solution/</guid><description>&lt;p&gt;In the last couple of posts, I&amp;rsquo;ve discussed race conditions and what causes them, in pursuit of understanding multithreading.&lt;/p&gt;
&lt;p&gt;Today, I want to look at an old solution to this problem: &lt;strong&gt;Peterson&amp;rsquo;s Algorithm&lt;/strong&gt;. But first, let&amp;rsquo;s understand why our &amp;ldquo;obvious&amp;rdquo; solutions don&amp;rsquo;t actually work.&lt;/p&gt;
&lt;h2 id="whats-a-critical-section"&gt;What&amp;rsquo;s a Critical Section?&lt;/h2&gt;
&lt;p&gt;A &lt;strong&gt;critical section&lt;/strong&gt; is any part of code where shared data might be accessed while being concurrently modified by multiple threads.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s understand this by looking at code:&lt;/p&gt;</description></item><item><title>What I Learned About Data Races By Writing a pthread Race Demo in C</title><link>https://loonins.github.io/lowlatencylog/posts/pthread-race-condition-demo/</link><pubDate>Mon, 15 Jun 2026 22:08:00 +0530</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/pthread-race-condition-demo/</guid><description>&lt;p&gt;I&amp;rsquo;ve been learning more about operating systems and concurrency in C. I came across an interesting idea called &lt;a href="https://en.wikipedia.org/wiki/Race_condition#Data_races"&gt;data races&lt;/a&gt; in the context of multi-threaded programming.&lt;/p&gt;
&lt;p&gt;The idea is that two or more threads can access the same memory location at the same time, and if there&amp;rsquo;s no synchronization, the result is &lt;strong&gt;undefined&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In this post, I&amp;rsquo;ll write a small C program that demonstrates data races.&lt;/p&gt;
&lt;h2 id="what-are-threads"&gt;What Are Threads?&lt;/h2&gt;
&lt;p&gt;Each program executes as a separate &lt;strong&gt;process&lt;/strong&gt;, and each process has its own memory space.&lt;/p&gt;</description></item><item><title>Bandit Level 2 → Level 3</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_02_03/</link><pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_02_03/</guid><description>&lt;h1 id="bandit-level-2--level-3"&gt;Bandit Level 2 → Level 3&lt;/h1&gt;
&lt;h2 id="login"&gt;Login&lt;/h2&gt;
&lt;p&gt;SSH: &lt;code&gt;ssh bandit2@bandit.labs.overthewire.org -p 2220&lt;/code&gt;
Password: &lt;code&gt;263JGJPfgU6LtdEvgfWU1XP5yac29mFx&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="task"&gt;Task&lt;/h2&gt;
&lt;p&gt;Get the password from the file called &lt;code&gt;--spaces in this filename--&lt;/code&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;This filename is a nightmare because it mixes hyphens and spaces. Nobody in their right mind does this, so use underscores like a sane person.&lt;/p&gt;
&lt;p&gt;When I first tried to &lt;code&gt;cat --spaces in this filename--&lt;/code&gt;, it failed immediately. The command interpreted &lt;code&gt;--spaces&lt;/code&gt; as an option and treated the rest of the name (&lt;code&gt;in&lt;/code&gt;, &lt;code&gt;this&lt;/code&gt;, &lt;code&gt;filename--&lt;/code&gt;) as separate files that do not exist.&lt;/p&gt;</description></item><item><title>Bandit Level 3 → Level 4</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_03_04/</link><pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_03_04/</guid><description>&lt;h1 id="bandit-level-3--level-4"&gt;Bandit Level 3 → Level 4&lt;/h1&gt;
&lt;h2 id="login"&gt;Login&lt;/h2&gt;
&lt;p&gt;SSH: &lt;code&gt;ssh bandit3@bandit.labs.overthewire.org -p 2220&lt;/code&gt;
Password: &lt;code&gt;MNk8KNH3Usiio41PRUEoDFPqfxLPlSmx&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="level-goal"&gt;Level Goal&lt;/h2&gt;
&lt;p&gt;The password for the next level is stored in a hidden file in the inhere directory.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="rambling"&gt;Rambling&lt;/h2&gt;
&lt;p&gt;Some files are hidden from the user by default and start with &lt;code&gt;.&lt;/code&gt;, like &lt;code&gt;.env&lt;/code&gt; or &lt;code&gt;.bashrc&lt;/code&gt;. We can view them in the terminal using the &lt;code&gt;ls -a&lt;/code&gt; command.&lt;br&gt;
Like most things in Linux, the reason for their existence is legacy and has hardly anything to do with security.&lt;br&gt;
Early Unix directories included &lt;code&gt;.&lt;/code&gt; for “current directory” and &lt;code&gt;..&lt;/code&gt; for “parent directory,” and directory listings were adjusted to skip names starting with a dot so those special entries would not clutter the output. That convention accidentally created the modern “dotfile” behavior, where any filename beginning with &lt;code&gt;.&lt;/code&gt; is hidden by default in tools like &lt;code&gt;ls&lt;/code&gt; and many file managers.&lt;/p&gt;</description></item><item><title>Bandit Level 4 → Level 5</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_04_05/</link><pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_04_05/</guid><description>&lt;h1 id="bandit-level-4--level-5"&gt;Bandit Level 4 → Level 5&lt;/h1&gt;
&lt;h2 id="login"&gt;Login&lt;/h2&gt;
&lt;p&gt;SSH &lt;code&gt;ssh bandit4@bandit.labs.overthewire.org -p 2220&lt;/code&gt;
Password: &lt;code&gt;2WmrDFRmJIq3IPxneAaMGhap0pFhF3NJ&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="level-goal"&gt;Level Goal&lt;/h2&gt;
&lt;p&gt;The password for the next level is stored in the only human-readable file in the inhere directory.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="rambling"&gt;Rambling&lt;/h2&gt;
&lt;p&gt;There are 10 files in the directory, but only one is human-readable, i.e. a text file.&lt;br&gt;
I have the option to use a brute-force approach to find the password by catting each file one by one, but that is not very efficient.&lt;br&gt;
It is much more efficient to use the &lt;code&gt;file&lt;/code&gt; command to check the type of each file and then use &lt;code&gt;cat&lt;/code&gt; to view the contents.&lt;br&gt;
&lt;code&gt;file&lt;/code&gt; determines the file type.&lt;/p&gt;</description></item><item><title>bandit level 5 → level 6</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_05_06/</link><pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_05_06/</guid><description>&lt;h1 id="bandit-level-5--level-6"&gt;bandit level 5 → level 6&lt;/h1&gt;
&lt;h2 id="login"&gt;login&lt;/h2&gt;
&lt;p&gt;ssh: &lt;code&gt;ssh bandit5@bandit.labs.overthewire.org -p 2220&lt;/code&gt;
password: &lt;code&gt;4oqyvpkxzooeoo5ptw81fb8j8lxxguqw&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="level-goal"&gt;level goal&lt;/h2&gt;
&lt;p&gt;the password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;human-readable&lt;/li&gt;
&lt;li&gt;1033 bytes in size&lt;/li&gt;
&lt;li&gt;not executable&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="rambling"&gt;rambling&lt;/h2&gt;
&lt;p&gt;In the last level, I used the &lt;code&gt;file&lt;/code&gt; command to detect human-readable files.&lt;br&gt;
&lt;code&gt;grep&lt;/code&gt; searches the given lines for a specific pattern defined by the user, or the opposite using the &lt;code&gt;-v&lt;/code&gt; flag.&lt;br&gt;
the pipe &lt;code&gt;|&lt;/code&gt; operator takes the output of one command and sends it as input to the next one. a command like &lt;code&gt;&amp;lt;command1&amp;gt; | grep &amp;lt;pattern&amp;gt;&lt;/code&gt; is useful here because it lets me filter command output.&lt;/p&gt;</description></item><item><title>bandit level 6 → level 7</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_06_07/</link><pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_06_07/</guid><description>&lt;h1 id="bandit-level-6--level-7"&gt;bandit level 6 → level 7&lt;/h1&gt;
&lt;h2 id="login"&gt;login&lt;/h2&gt;
&lt;p&gt;ssh: ssh &lt;a href="mailto:bandit6@bandit.labs.overthewire.org"&gt;bandit6@bandit.labs.overthewire.org&lt;/a&gt; -p 2220
password: &lt;code&gt;HWasnPhtq9AVKe0dmk45nxy20cvUa6EG&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="level-goal"&gt;level goal&lt;/h2&gt;
&lt;p&gt;the password for the next level is stored somewhere on the server and has all of the following properties:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;owned by user bandit7&lt;/li&gt;
&lt;li&gt;owned by group bandit6&lt;/li&gt;
&lt;li&gt;33 bytes in size&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="rambling"&gt;rambling&lt;/h2&gt;
&lt;p&gt;this is a fun one, instead of searching just one directory, i will have to search the entire file system. there is a minor problem though, i don&amp;rsquo;t have the permissions to search the entire file system. so, when i use find command with the required parameters, i am flooded with permission denied errors.&lt;/p&gt;</description></item><item><title>bandit level 7 → level 8</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_07_08/</link><pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_07_08/</guid><description>&lt;h1 id="bandit-level-7--level-8"&gt;Bandit Level 7 → Level 8&lt;/h1&gt;
&lt;h2 id="login"&gt;Login&lt;/h2&gt;
&lt;p&gt;ssh: &lt;code&gt;ssh bandit7@bandit.labs.overthewire.org -p 2220&lt;/code&gt;
password: &lt;code&gt;morbNTDkSW6jIlUc0ymOdMaLnOlFVAaj&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="level-goal"&gt;Level Goal&lt;/h2&gt;
&lt;p&gt;The password for the next level is stored in the file data.txt next to the word millionth&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="approach"&gt;Approach&lt;/h2&gt;
&lt;p&gt;This one is pretty easy. I solved it using &lt;code&gt;grep&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bandit7@bandit:~$ cat data.txt &lt;span class="p"&gt;|&lt;/span&gt; grep &lt;span class="s2"&gt;&amp;#34;millionth&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;cat&lt;/code&gt; command display all the contents of &lt;code&gt;data.txt&lt;/code&gt;, then &lt;code&gt;|&lt;/code&gt; operator takes the output of cat command and give it to &lt;code&gt;grep&lt;/code&gt; command, which print the line with pattern &amp;lsquo;millionth&amp;rsquo;&lt;/p&gt;</description></item><item><title>Bandit Level 8 → Level 9</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_08_09/</link><pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_08_09/</guid><description>&lt;h1 id="bandit-level-8--level-9"&gt;Bandit Level 8 → Level 9&lt;/h1&gt;
&lt;p&gt;login
ssh: ssh &lt;a href="mailto:bandit8@bandit.labs.overthewire.org"&gt;bandit8@bandit.labs.overthewire.org&lt;/a&gt; -p 2220
password: &lt;code&gt;dfwvzFQi4mU0wfNbFOe9RoWskMLg7eEc&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="level-goal"&gt;Level Goal&lt;/h2&gt;
&lt;p&gt;The password for the next level is stored in the file data.txt and is the only line of text that occurs only once.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="approach"&gt;Approach&lt;/h2&gt;
&lt;p&gt;The password is repeated only once in the file. I need to just remove all the repeated lines.
So, I ran &lt;code&gt;uniq&lt;/code&gt; on the &lt;code&gt;data.txt&lt;/code&gt; file&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bandit8@bandit:~$ uniq -u data.txt &lt;span class="c1"&gt;#-u or --unique only print unique lines&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But wait&amp;hellip; the output looked identical to just running &lt;code&gt;cat data.txt&lt;/code&gt;. What&amp;rsquo;s wrong?
Back to the manual I went, and there was the crucial detail I&amp;rsquo;d missed:&lt;/p&gt;</description></item><item><title>Bandit Level 9 → Level 10</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_09_10/</link><pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_09_10/</guid><description>&lt;h1 id="bandit-level-9--level-10"&gt;Bandit Level 9 → Level 10&lt;/h1&gt;
&lt;h2 id="login"&gt;login&lt;/h2&gt;
&lt;p&gt;ssh: &lt;code&gt;ssh bandit9@bandit.labs.overthewire.org -p 2220&lt;/code&gt;
password: &lt;code&gt;4CKMh1JI91bUIZZPXDqGanal4xvAg0JM&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="level-goal"&gt;Level Goal&lt;/h2&gt;
&lt;p&gt;The password for the next level is stored in the file data.txt in one of the few human-readable strings, preceded by several ‘=’ characters.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="approach"&gt;Approach&lt;/h2&gt;
&lt;p&gt;My casual CTF practice suggested using the &lt;code&gt;strings&lt;/code&gt; command to pull out only the readable text from the file..&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bandit9@bandit:~$ strings data.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;l0@P&lt;span class="o"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;,k&lt;span class="o"&gt;=&lt;/span&gt;?
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tIsrQ
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;k&lt;span class="sb"&gt;`&lt;/span&gt;Dl5
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;....
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The output was a bit overwhelming, so I decided to pipe the output to &lt;code&gt;grep&lt;/code&gt; to filter out the lines that contained the password.&lt;/p&gt;</description></item><item><title>OverTheWire Bandit level 0 Walkthrough</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_00/</link><pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_00/</guid><description>&lt;h1 id="overthewire-bandit-level-0-walkthrough"&gt;OverTheWire Bandit level 0 Walkthrough&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://overthewire.org/wargames/bandit/bandit0.html"&gt;OverTheWire: Level Goal&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://overthewire.org/"&gt;OverTheWire&lt;/a&gt; is a great platform “to learn and practice security concepts in the form of fun-filled games.” It has several so-called “wargames,” each focused on a different area of security.&lt;/p&gt;
&lt;p&gt;The recommended starting point is Bandit, which focuses on basic Linux and Git commands.&lt;/p&gt;
&lt;p&gt;I have worked through it a couple of times and wanted to write this walkthrough to get more comfortable with writing and to keep a reference for future me. My thought process may differ from other authors, so it may also help someone else going through Bandit.&lt;/p&gt;</description></item><item><title>Bandit Level 0 → Level 1</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_00_01/</link><pubDate>Thu, 11 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_00_01/</guid><description>&lt;h1 id="bandit-level-0--level-1"&gt;Bandit Level 0 → Level 1&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://overthewire.org/wargames/bandit/bandit1.html"&gt;OverTheWire: Level Goal&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="task"&gt;Task&lt;/h2&gt;
&lt;p&gt;The password for the next level is stored in a file called &lt;strong&gt;readme&lt;/strong&gt; located in the home directory.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="a-little-theory"&gt;A little theory&lt;/h2&gt;
&lt;p&gt;When I SSH into a specific user, I land in that user’s home directory. This level focuses on learning basic Linux tools. In the terminal, &lt;code&gt;man&lt;/code&gt; and the &lt;code&gt;--help&lt;/code&gt; flag are going to be useful. Not all commands support both, so it is worth checking.&lt;/p&gt;</description></item><item><title>Bandit Level 1 → Level 2</title><link>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_01_02/</link><pubDate>Thu, 11 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/bandit/bandit_01_02/</guid><description>&lt;h1 id="bandit-level-1--level-2"&gt;Bandit Level 1 → Level 2&lt;/h1&gt;
&lt;h2 id="login"&gt;Login&lt;/h2&gt;
&lt;p&gt;SSH: &lt;code&gt;ssh bandit1@bandit.labs.overthewire.org -p 2220&lt;/code&gt;
Password: &lt;code&gt;ZjLjTmM6FvvyRnrb2rfNWOZOTa6ip5If&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="task"&gt;Task&lt;/h2&gt;
&lt;p&gt;Get the password from the file called &lt;code&gt;-&lt;/code&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="a-little-bit-of-theory"&gt;A little bit of Theory&lt;/h2&gt;
&lt;p&gt;In Linux, arguments starting with a hyphen (&lt;code&gt;-&lt;/code&gt;) are typically interpreted as command flags. To reference a file named literally &lt;code&gt;-&lt;/code&gt;, I need to bypass the command’s option-parsing logic.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;
&lt;p&gt;First, I checked that the file existed:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bandit1@bandit:~$ ls
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;-
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Using &lt;code&gt;cat -&lt;/code&gt; will not work, because &lt;code&gt;-&lt;/code&gt; is treated as standard input. I needed to give a relative path instead:&lt;/p&gt;</description></item><item><title>About Me</title><link>https://loonins.github.io/lowlatencylog/posts/hello-world/</link><pubDate>Wed, 10 Jun 2026 00:00:00 +0000</pubDate><guid>https://loonins.github.io/lowlatencylog/posts/hello-world/</guid><description>&lt;p&gt;I’m Sourish, a second-year IT student at IIIT Allahabad. I spend most of my time somewhere between systems, security, and low-level programming, basically anything that forces me to confront what the machine is actually doing instead of what I think it’s doing.&lt;/p&gt;
&lt;p&gt;I like taking things apart. Sometimes that means stepping through binaries in a debugger, sometimes it means reading source code line by line, and sometimes it just means breaking something and sitting with the mess until it starts to make sense. Clean abstractions are useful, but they hide too much. The interesting parts are where they fail—where assumptions leak, where undefined behavior creeps in, where a small oversight turns into a vulnerability.&lt;/p&gt;</description></item></channel></rss>