<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2026-09-05T16:58:33+01:00</updated><id>/feed.xml</id><title type="html">UndedInside</title><subtitle>Hi, I&apos;m Unded. I&apos;m a helpdesk analyst with an interest in cybersecurity and making</subtitle><entry><title type="html">Lock Your Ducking Computer!</title><link href="/blog/2026/09/04/lock-your-ducking-computer.html" rel="alternate" type="text/html" title="Lock Your Ducking Computer!" /><published>2026-09-04T22:14:00+01:00</published><updated>2026-09-04T22:14:00+01:00</updated><id>/blog/2026/09/04/lock-your-ducking-computer</id><content type="html" xml:base="/blog/2026/09/04/lock-your-ducking-computer.html"><![CDATA[<p>I knew I wanted to be a hacker since I first laid my eyes on <a href="https://hak5.org">hak5.</a> Specifically it was the WiFi Pineapple that stole my heart but, as a broke teen, the only thing I could afford was the Rubber Ducky.</p>

<p>I had no idea what I was doing. Beyond a simple phone brute-forcer, I can’t say I did anything with it. But I was carrying a hacking tool around with me at all times. It looked like a normal USB but it could type at thousands of words a minute! All I had to do was learn a little more and then no one was safe. I was <del>a scriptkiddie</del> a hacker!</p>

<p>Unfortunately I never learned that one extra piece of information that would make me dangerous. The Ducky stayed in my bag never to pwn.</p>

<p>All this changed, however, when I bought the <a href="https://flipper.net">Flipper Zero</a> and spotted a familiar option in the menu. ‘BadUSB’. Just like a Ducky.</p>

<p>I had learned a little bit more since my teen years with the unused Ducky. I knew what both a bind <strong>and</strong> reverse shell were. I was aware of some tips and tricks, and had been going to conferences for a couple of years. Whats more, the Flipper Zero used DuckyScript! The very same scripting language I had fumbled around with! This time, when I sat down to write some hacks, I knew what I was doing.</p>

<p>You can find the fruits of this labour (and development) <a href="https://github.com/UndedInside/DuckyScriptPayloads">here on my GitHub.</a></p>

<p>I’ll still be honest, there’s nothing particularly ground-breaking there, but when writing scripts I tried to keep a particular scenario in mind:</p>
<ul>
  <li>I’m on a pentest job.</li>
  <li>Someone has stepped away from their computer and left it unlocked.</li>
  <li>I don’t know how long of a window I’ve got, but I want to make every second count.</li>
</ul>

<p>To this aim I have tried to come up with scripts that will utilize the Ducky/Flipper’s rapid typing speed and make the most of the situation. Maybe I’ll disable Windows Defender, then plant a bind shell to connect to it later. Maybe I’ll set up persistant access on this Linux/Mac machine. Maybe I’ll just rick roll them instead, as a friendly reminder to…</p>

<p><strong>Lock Your Ducking Computer!</strong></p>]]></content><author><name></name></author><category term="blog" /><summary type="html"><![CDATA[I knew I wanted to be a hacker since I first laid my eyes on hak5. Specifically it was the WiFi Pineapple that stole my heart but, as a broke teen, the only thing I could afford was the Rubber Ducky.]]></summary></entry><entry><title type="html">Luhn Algorithm Calculator</title><link href="/blog/2026/09/04/luhn-algorithm-calculator.html" rel="alternate" type="text/html" title="Luhn Algorithm Calculator" /><published>2026-09-04T19:35:00+01:00</published><updated>2026-09-04T19:35:00+01:00</updated><id>/blog/2026/09/04/luhn-algorithm-calculator</id><content type="html" xml:base="/blog/2026/09/04/luhn-algorithm-calculator.html"><![CDATA[<p>(This project was originally completed 2021-09-19)</p>

<p>I was buying something online, when I noticed it was telling me I had mistyped my card details before I had pressed submit. It was telling me I had made a mistake <em>in real time!</em> In my head, there were two options:</p>
<ol>
  <li>The site knows my card details before I even enter them or,</li>
  <li>It can somehow work out what they are meant to be.</li>
</ol>

<p>Out of fear of psychic identity thieves, I decided to do some googling and found out the website was using something called <a href="https://en.wikipedia.org/wiki/Luhn_algorithm"><em>Luhn Algorithm.</em></a></p>

<p>The Luhn algorithm is a simple ‘check digit’<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup> algorithm which is used in a number of different contexts - including credit card numbers. The way it works is the bank only ‘comes up’ with the first 15 digits of the card number, with the last one worked out by the Luhn algorithm. You can then validate a card number by removing the last digit, calculating what it should be with the first 15, then comparing it to the last one you were provided. If they match then the number is valid, if they don’t then they probably typed the number in wrong. The Luhn algorithm doesn’t tell you if a card is in use - only that the number is a valid one.</p>

<p>Not only did I find this information about the Luhn algorithm but I also found the psuedocode for it. I had been looking for an excuse to practice my C++ so I took this as an opportunity.</p>

<h2 id="how-the-luhn-algorithm-works">How the Luhn Algorithm Works:</h2>
<p>The steps to calculate a check digit are:</p>
<ol>
  <li>From the left, double every second digit</li>
  <li>From the right, subtract 9 from the digit if the digit is more than 9</li>
  <li>Sum all the resulting digits</li>
  <li>Calculate (10 - (&lt;answer from 3&gt; mod 10)) mod 10<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">2</a></sup></li>
  <li>The number you get from that is your checkbit.</li>
</ol>

<p>Taking the number 79927398713 as an example, we can calculate it by first removing the 3 and then:</p>

<table>
  <thead>
    <tr>
      <th style="text-align: left">Digits (reversed)</th>
      <th style="text-align: center">1</th>
      <th style="text-align: center">7</th>
      <th style="text-align: center">8</th>
      <th style="text-align: center">9</th>
      <th style="text-align: center">3</th>
      <th style="text-align: center">7</th>
      <th style="text-align: center">2</th>
      <th style="text-align: center">9</th>
      <th style="text-align: center">9</th>
      <th style="text-align: center">7</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left">Multipliers</td>
      <td style="text-align: center">2</td>
      <td style="text-align: center">1</td>
      <td style="text-align: center">2</td>
      <td style="text-align: center">1</td>
      <td style="text-align: center">2</td>
      <td style="text-align: center">1</td>
      <td style="text-align: center">2</td>
      <td style="text-align: center">1</td>
      <td style="text-align: center">2</td>
      <td style="text-align: center">1</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td style="text-align: left"> </td>
      <td style="text-align: center">2</td>
      <td style="text-align: center">7</td>
      <td style="text-align: center">16</td>
      <td style="text-align: center">9</td>
      <td style="text-align: center">6</td>
      <td style="text-align: center">7</td>
      <td style="text-align: center">4</td>
      <td style="text-align: center">9</td>
      <td style="text-align: center">18</td>
      <td style="text-align: center">7</td>
    </tr>
    <tr>
      <td style="text-align: left">Sum digits</td>
      <td style="text-align: center">2</td>
      <td style="text-align: center">7</td>
      <td style="text-align: center">7</td>
      <td style="text-align: center">9</td>
      <td style="text-align: center">6</td>
      <td style="text-align: center">7</td>
      <td style="text-align: center">4</td>
      <td style="text-align: center">9</td>
      <td style="text-align: center">9</td>
      <td style="text-align: center">7</td>
    </tr>
  </tfoot>
</table>

<p>The sum of all these digits is 67.</p>

<p>67 mod 10 is 7</p>

<p>10 minus 7 is 3</p>

<p>The check digit we calculated was 3, as was the one we were given, so we can verify that this is correct.</p>

<h2 id="my-implementation">My Implementation:</h2>

<p>You can find my implementation of a Luhn algorithm calculator <a href="https://github.com/UndedInside/ULC">on my GitHub</a></p>

<p>Use the <code class="language-plaintext highlighter-rouge">-c</code> flag to calculate a check digit, or the <code class="language-plaintext highlighter-rouge">-v</code> flag to verify a full number (This will return <code class="language-plaintext highlighter-rouge">1</code> if valid and <code class="language-plaintext highlighter-rouge">0</code> if invalid)</p>

<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:1" role="doc-endnote">
      <p>Cambridge dictionary: “noun, a number that is used in a computer program to help find or prevent errors” not to be comfused with a Czech digit, which is what people of Czechia have on the end of their hands <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:2" role="doc-endnote">
      <p>The reason for this last mod 10 is that, without it, if the sum from step 3 is a multiple of 10, the final answer for the check digit would be 10 and not 0. 10 is obviously not a digit, so a valid number would be marked as invalid because it has a 0 at the end and not the impossible 10. Thank you to my friend Blake for finding out the reason for that. I have had to patch the code almost 5 years later. <a href="#fnref:2" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name></name></author><category term="blog" /><summary type="html"><![CDATA[(This project was originally completed 2021-09-19)]]></summary></entry><entry><title type="html">Hello World! Again!</title><link href="/blog/2026/09/04/hello-world-again.html" rel="alternate" type="text/html" title="Hello World! Again!" /><published>2026-09-04T18:22:00+01:00</published><updated>2026-09-04T18:22:00+01:00</updated><id>/blog/2026/09/04/hello-world-again</id><content type="html" xml:base="/blog/2026/09/04/hello-world-again.html"><![CDATA[<p>Okay, for real this time…</p>

<h1 id="hello-world">Hello, World!</h1>

<p>Admittedly I forgot I even had this project, but after some fiddling around with Ruby, Jekyll, installing and uninstalling Gems, and even breaking my OS, we’re back!</p>

<p>I’m going to be adding several posts about projects I have worked on in the past, so stay tuned…</p>]]></content><author><name></name></author><category term="blog" /><summary type="html"><![CDATA[Okay, for real this time…]]></summary></entry><entry><title type="html">Hello World!</title><link href="/blog/2021/12/22/hello-world.html" rel="alternate" type="text/html" title="Hello World!" /><published>2021-12-22T13:18:50+00:00</published><updated>2021-12-22T13:18:50+00:00</updated><id>/blog/2021/12/22/hello-world</id><content type="html" xml:base="/blog/2021/12/22/hello-world.html"><![CDATA[<p>Welcome to the very first blog post of my new site! Things are still a work in progress, so everything is subject to change.</p>

<p>Thank you for visiting, and have a wonderful day!</p>]]></content><author><name></name></author><category term="blog" /><summary type="html"><![CDATA[Welcome to the very first blog post of my new site! Things are still a work in progress, so everything is subject to change. Thank you for visiting, and have a wonderful day!]]></summary></entry></feed>