<?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-05-02T10:28:35+00:00</updated><id>/feed.xml</id><title type="html">Finch’s Professional Blog</title><subtitle>Not that bad of a description i guess.</subtitle><entry><title type="html">Genpass-RS</title><link href="/programming/software/2026/04/22/genpass.html" rel="alternate" type="text/html" title="Genpass-RS" /><published>2026-04-22T22:47:24+00:00</published><updated>2026-04-22T22:47:24+00:00</updated><id>/programming/software/2026/04/22/genpass</id><content type="html" xml:base="/programming/software/2026/04/22/genpass.html"><![CDATA[<p><a href="https://github.com/merci-libre/genpass-rs">Genpass-RS</a> is my flagship project that I have been working on since 2023. 
It was originally written in C and then refactored into the powerful tool that it is today.</p>

<h2 id="origins">Origins</h2>

<p>The idea came from one bored day at work when I was working at an arcade and had 0 customers.
At which point, I’d already completed all my tasks for the day; no repairs, no customers, no restocking–
nada. So I pulled out my notebook from my bag and after giving my coworker an elongated spiel about the
<a href="https://en.wikipedia.org/wiki/Infinite_monkey_theorem">infinite monkey theorem</a>, I came up with the idea
for trying to create a bruteforce generator using the infinite monkey theorem.</p>

<p>Of course, using a random generation for each password was going to be super inefficient, but I was curious
to see if I was able to make it– and sure enough with the help of some early AI tools I was able to make it.</p>
<blockquote>
  <p>only small parts of the project used AI generated code. At the time I was comfortable with AI tooling. Nowadays I reject it all together for the sake of our planet’s
survival, and for political and moral implications.</p>
</blockquote>

<p>The <a href="https://github.com/merci-libre/genpass">project was originally written in C</a>, but as time went on; I kind of abandoned the old project. 
I was relatively new to writing C, so a lot of the code used was rather redundant, buggy or outright just bad. The code base could have been so
much more efficiently written, but that was on me.</p>

<p>So after a while, the project was abanoned– until the next year.</p>

<h2 id="revival">Revival</h2>
<p>At the time I wanted to give other languages a try. I wasn’t a large fan of the way that C’s functional programming style was and writing a project
in a language without modern features can be a bit of a pain in the ass, especially as a solo-dev. The thing was was that I didn’t want to abandon
the speed of C, and more importantly; I wanted to be able to add more features fast and easily.</p>

<p>I gave it some thought, and I decided that my best course of action forward was to write it in Rust due to its <a href="https://dev.to/sgchris/zero-cost-abstractions-what-it-really-means-in-rust-13l0">Zero-Cost Abstractions</a>.
I’ve experimented a little in Rust, but unlike how I started with Genpass, I didn’t want to use AI for generating any code. Instead, I opted for reading documentation and
learning features from the official Rust Book and using my project to solidify the fundamentals.</p>

<p>This project I learned about how Cargo worked and it was an absolute life-saver when it came to finding crates that would help speed up the development process.
Of course, it didn’t come without some trial and error, but I eventually got things to work out.</p>

<h3 id="implementing-features">Implementing Features</h3>
<p>For a period of time, I had liked a lot of features that KeePassXC had in their tool, so I decided to copy some over into genpass-rs. I mostly liked the estimation of password 
strength that they had using zxcvbn, and the password management feature which made things pretty easy to find. However, I wanted to make something different– I wanted to not
just make a regular old password tool; you can just use KeePassXC for that. I wanted to make something more fun, but still useful, which is when I implemented the 
<a href="https://en.wikipedia.org/wiki/Steganography">steganography</a> module for the tool. Luckily, there already was a library written that I could use to implement that feature.</p>

<p>What was missing was that added layer of protection before hand before inserting the bytes into the images, so for a period of time I used another crate to implement that cryptography
feature before just handwriting that one feature instead of loading all of that project’s depenedencies.</p>

<p>Now, the project was practically complete, but to this very day I still come up with new ideas for it.</p>

<h3 id="what-i-learned">What I learned</h3>
<p>From this project, I gained a lot of insight into how Rust works as a language, and numerous security concepts regarding safe password generation. For Rust, I learned about
how the language works:</p>

<ul>
  <li>How it differs from other OOP languages when it comes to polymorphic behavior.</li>
  <li>The language’s strengths and weaknesses.</li>
  <li>How it handles strings and character types.</li>
  <li>Most importantly how to efficiently use references and memory.</li>
  <li>How to write better and cleaner Rust for maintainability.</li>
</ul>

<p>These became heavily influential in other projects, but more than that what drives me to continue improving the project all together.</p>

<p>In regards to my security journey, development on this project taught me:</p>

<ul>
  <li>How CSPRNGs differ from normal Random Number Generation.</li>
  <li>How bit entropy works for measuring password strength.</li>
  <li>How to measure password strength with different algorithms (and why zxcvbn is the industry standard)</li>
  <li>Symmetric encryption.</li>
</ul>]]></content><author><name></name></author><category term="programming" /><category term="Software" /><summary type="html"><![CDATA[Genpass-RS is my flagship project that I have been working on since 2023. It was originally written in C and then refactored into the powerful tool that it is today.]]></summary></entry><entry><title type="html">Python SAT</title><link href="/programming/software/2026/04/22/sat.html" rel="alternate" type="text/html" title="Python SAT" /><published>2026-04-22T22:47:24+00:00</published><updated>2026-04-22T22:47:24+00:00</updated><id>/programming/software/2026/04/22/sat</id><content type="html" xml:base="/programming/software/2026/04/22/sat.html"><![CDATA[<p>Python-SAT was my final project for my Introduction to Programming taken during my first year of transferring into Loyola University. 
The project itself dove into concepts well beyond the course structure. It was built to be a robust CLI tool for ensuring certain services 
were active on my home network. This project was built in Python as per the course requirements.</p>

<h1 id="about">About</h1>

<p>I already have a super-extensive readme that you can go checkout <a href="https://github.com/merci-libre/python-sat">here</a>.
You can also watch my youtube video about it: <a href="https://www.youtube.com/watch?v=0byYOxiLP-c">here</a>.</p>]]></content><author><name></name></author><category term="programming" /><category term="Software" /><summary type="html"><![CDATA[Python-SAT was my final project for my Introduction to Programming taken during my first year of transferring into Loyola University. The project itself dove into concepts well beyond the course structure. It was built to be a robust CLI tool for ensuring certain services were active on my home network. This project was built in Python as per the course requirements.]]></summary></entry><entry><title type="html">Happy Time: Self-deleting Binary</title><link href="/programming/malware/2026/04/22/self-deleting-bin.html" rel="alternate" type="text/html" title="Happy Time: Self-deleting Binary" /><published>2026-04-22T22:47:24+00:00</published><updated>2026-04-22T22:47:24+00:00</updated><id>/programming/malware/2026/04/22/self-deleting-bin</id><content type="html" xml:base="/programming/malware/2026/04/22/self-deleting-bin.html"><![CDATA[<p>This post goes over the self-deleting binary; A malware proof of concept project that I’ve been working on
since December of 2025. Project can be <a href="https://github.com/westwardfishdme/POC_binary_self_deletion">found here</a>.</p>

<h1 id="happy-time">Happy Time</h1>
<p>Such a strange name isn’t it? I think that’s what makes it so eye-catching. <code class="language-plaintext highlighter-rouge">happytime</code> is a malware evasion
proof of concept based on old leaked CIA documents from 2016 under the code name <strong>Hive</strong>. It originally was
designed to be used as a part of their infrastructure to delete the reverse shells and tools off of their C2 
clients. It never made it to the final implementation because of issues with system clock configurations.</p>

<h2 id="how-it-works">How it Works</h2>
<p>Essentially, the program starts a thread inside of this <code class="language-plaintext highlighter-rouge">main</code> function here:</p>
<div class="language-rust highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">fn</span> <span class="nf">main</span><span class="p">()</span> <span class="k">-&gt;</span> <span class="nb">Result</span><span class="o">&lt;</span><span class="p">(),</span> <span class="nb">Box</span><span class="o">&lt;</span><span class="k">dyn</span> <span class="n">Error</span><span class="o">&gt;&gt;</span> <span class="p">{</span>
    <span class="cm">/* Main Function */</span>
    <span class="nd">eprintln!</span><span class="p">(</span><span class="s">"Started self-deleting malware testing."</span><span class="p">);</span>
    <span class="k">let</span> <span class="k">mut</span> <span class="n">bin_path</span><span class="p">:</span> <span class="nn">path</span><span class="p">::</span><span class="n">PathBuf</span> <span class="o">=</span> <span class="k">match</span> <span class="nf">get_malware_path</span><span class="p">()</span> <span class="p">{</span>
        <span class="nf">Ok</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> <span class="k">=&gt;</span> <span class="n">v</span><span class="p">,</span>
        <span class="nf">Err</span><span class="p">(</span><span class="n">e</span><span class="p">)</span> <span class="k">=&gt;</span> <span class="p">{</span>
            <span class="nd">eprintln!</span><span class="p">(</span><span class="s">"can't get path to binary: {e}"</span><span class="p">);</span>
            <span class="nn">PathBuf</span><span class="p">::</span><span class="nf">from</span><span class="p">(</span><span class="s">""</span><span class="p">)</span>
        <span class="p">}</span>
    <span class="p">};</span>

    <span class="k">let</span> <span class="n">pid</span> <span class="o">=</span> <span class="nn">process</span><span class="p">::</span><span class="nf">id</span><span class="p">();</span>

    <span class="c1">// thread for process daemonization</span>
    <span class="k">let</span> <span class="n">handle</span> <span class="o">=</span> <span class="nn">thread</span><span class="p">::</span><span class="nf">spawn</span><span class="p">(</span><span class="k">move</span> <span class="p">||</span> <span class="p">{</span>
        <span class="nd">dbg!</span><span class="p">(</span><span class="o">&amp;</span><span class="n">bin_path</span><span class="p">,</span> <span class="n">pid</span><span class="p">);</span>

        <span class="k">let</span> <span class="k">mut</span> <span class="n">counter</span><span class="p">:</span> <span class="nb">u64</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
        <span class="k">loop</span> <span class="p">{</span>
            <span class="n">bin_path</span> <span class="o">=</span> <span class="nf">get_malware_path</span><span class="p">()</span><span class="nf">.expect</span><span class="p">(</span><span class="s">"something went wrong within the thread"</span><span class="p">);</span>
            <span class="k">if</span> <span class="nf">timer</span><span class="p">(</span><span class="n">counter</span><span class="p">,</span> <span class="n">SECONDS_BEFORE_DELETION</span><span class="p">)</span> <span class="p">{</span>
                <span class="k">match</span> <span class="nf">delete</span><span class="p">(</span><span class="o">&amp;</span><span class="n">bin_path</span><span class="p">)</span> <span class="p">{</span>
                    <span class="nf">Ok</span><span class="p">(())</span> <span class="k">=&gt;</span> <span class="p">(),</span>
                    <span class="nf">Err</span><span class="p">(</span><span class="n">e</span><span class="p">)</span> <span class="k">=&gt;</span> <span class="nd">eprintln!</span><span class="p">(</span><span class="s">"{e}"</span><span class="p">),</span>
                <span class="p">}</span>
                <span class="k">break</span><span class="p">;</span>
            <span class="p">}</span>
            <span class="c1">// sleep 1 second.</span>
            <span class="nn">thread</span><span class="p">::</span><span class="nf">sleep</span><span class="p">(</span><span class="nn">time</span><span class="p">::</span><span class="nn">Duration</span><span class="p">::</span><span class="nf">from_secs</span><span class="p">(</span><span class="mi">1</span><span class="p">));</span>
            <span class="n">counter</span> <span class="o">+=</span> <span class="mi">1</span><span class="p">;</span>
        <span class="p">}</span>
    <span class="p">});</span>
    <span class="k">match</span> <span class="n">handle</span><span class="nf">.join</span><span class="p">()</span> <span class="p">{</span>
        <span class="nf">Ok</span><span class="p">(())</span> <span class="k">=&gt;</span> <span class="p">(),</span>
        <span class="nf">Err</span><span class="p">(</span><span class="n">_e</span><span class="p">)</span> <span class="k">=&gt;</span> <span class="p">{</span>
            <span class="nn">process</span><span class="p">::</span><span class="nf">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
        <span class="p">}</span>
    <span class="p">};</span>
    <span class="nf">Ok</span><span class="p">(())</span>
<span class="p">}</span>

</code></pre></div></div>
<p>Essentially what it’s doing is finding the process path to the executable inside of a symlink in the <code class="language-plaintext highlighter-rouge">/proc</code> directory and continuously tracking the binary’s location.
After a set period of time, the process will then delete the binary at the path. Below is the source code overlining this process:</p>
<div class="language-rust highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">fn</span> <span class="nf">get_malware_path</span><span class="p">()</span> <span class="k">-&gt;</span> <span class="nb">Result</span><span class="o">&lt;</span><span class="nn">path</span><span class="p">::</span><span class="n">PathBuf</span><span class="p">,</span> <span class="nb">Box</span><span class="o">&lt;</span><span class="k">dyn</span> <span class="n">Error</span><span class="o">&gt;&gt;</span> <span class="p">{</span>
    <span class="cm">/*In Linux, we can get the path of a binary
     * from /proc/PID/exe, which is a symlink to
     * the binary.
     *
     * This will be the path that the software to use to delete the binary.
     * */</span>
    <span class="k">let</span> <span class="n">pid</span> <span class="o">=</span> <span class="nn">process</span><span class="p">::</span><span class="nf">id</span><span class="p">();</span>
    <span class="k">let</span> <span class="n">formatted</span> <span class="o">=</span> <span class="nd">format!</span><span class="p">(</span><span class="s">"/proc/{pid}/exe"</span><span class="p">);</span>

    <span class="k">let</span> <span class="n">path</span> <span class="o">=</span> <span class="nn">fs</span><span class="p">::</span><span class="nf">read_link</span><span class="p">(</span><span class="nn">path</span><span class="p">::</span><span class="nn">PathBuf</span><span class="p">::</span><span class="nf">from</span><span class="p">(</span><span class="n">formatted</span><span class="p">))</span><span class="o">?</span><span class="p">;</span>
    <span class="k">match</span> <span class="nn">fs</span><span class="p">::</span><span class="nf">exists</span><span class="p">(</span><span class="o">&amp;</span><span class="n">path</span><span class="p">)</span> <span class="p">{</span>
        <span class="nf">Ok</span><span class="p">(</span><span class="n">_v</span><span class="p">)</span> <span class="k">=&gt;</span> <span class="nd">eprintln!</span><span class="p">(</span><span class="s">"binary found @ {}"</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">path</span><span class="nf">.to_string_lossy</span><span class="p">()),</span>
        <span class="nf">Err</span><span class="p">(</span><span class="n">_e</span><span class="p">)</span> <span class="k">=&gt;</span> <span class="p">{</span>
            <span class="nd">eprintln!</span><span class="p">(</span><span class="s">"failed to get legitimate binary path."</span><span class="p">);</span>
            <span class="k">let</span> <span class="n">_</span> <span class="o">=</span> <span class="nf">get_malware_path</span><span class="p">();</span>
        <span class="p">}</span>
    <span class="p">}</span>
    <span class="nf">Ok</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
<span class="p">}</span>
<span class="k">fn</span> <span class="nf">delete</span><span class="p">(</span><span class="n">abs_path</span><span class="p">:</span> <span class="o">&amp;</span><span class="n">PathBuf</span><span class="p">)</span> <span class="k">-&gt;</span> <span class="nb">Result</span><span class="o">&lt;</span><span class="p">(),</span> <span class="nb">Box</span><span class="o">&lt;</span><span class="k">dyn</span> <span class="n">Error</span><span class="o">&gt;&gt;</span> <span class="p">{</span>
    <span class="cm">/*Deletes the path of the binary*/</span>
    <span class="nd">eprintln!</span><span class="p">(</span><span class="s">"Deleting {BIN_NAME} @ path={:?}"</span><span class="p">,</span> <span class="n">abs_path</span><span class="p">);</span>
    <span class="nn">fs</span><span class="p">::</span><span class="nf">remove_file</span><span class="p">(</span><span class="n">abs_path</span><span class="p">)</span><span class="o">?</span><span class="p">;</span>
    <span class="nf">Ok</span><span class="p">(())</span>
<span class="p">}</span>
</code></pre></div></div>
<blockquote>
  <p>Note: On failure, get_malware_path() will make a recursive call to retry and obtain that binary path.</p>
</blockquote>

<h2 id="applicable-use">Applicable use</h2>
<p>While the proof of concept’s <a href="https://github.com/westwardfishdme/POC_binary_self_deletion/tree/live">live branch</a> lacks any malicious code at the moment,
it’s use as a part of a larger malicious ecosystem would make it invaluable to hiding any semblance of a trace inside of a target’s machine. In addition,
the modularity of the project allows it to implement different forms of deletion conditions, or even allowing different levels of deletion such as overwriting
the path with garbage information before deletion.</p>

<p>The reason that this works as effectively as it does is because of the nature of how executables work on linux, which I will briefly explain here:</p>

<ol>
  <li>When an executable runs on a machine, the process will remain in memory until the process completes.</li>
  <li>Linux follows the UNIX philosophy; treating everything as a file. This means that we can essentially get all the information that we need about
the executable from a file somewhere on the system, in this case the symlink <code class="language-plaintext highlighter-rouge">/proc/{pid}/exe</code> contains all of the information required for this POC
to be viable.</li>
  <li>Rust compiles all of the dependencies into the binary. Allowing us to build for what we need.</li>
</ol>

<p>In theory, this only allows us to use it on Unix-like machines; however since I haven’t tested it on any other Unix-like operating systems, I can’t
provide details into it’s effectiveness or reliability.</p>

<h2 id="defending-its-publicity">Defending its publicity.</h2>
<p>You might ask yourself:</p>

<ul>
  <li>“Why make this public? Couldn’t a bad actor get their hands on this and use it for their own malicious purpose?”</li>
</ul>

<p>The answer is simply yes; but that can go for literally anything. The idea behind technology is that it is morally neutral and for general research purposes
it is better that this is public and not hidden. Let’s face it, if a bad actor can already write malware; they can more than certainly implement other ways
to obscure their tracks for researchers. My proof of concept keeps the code readable so that other researchers can look at how this works at a high level.</p>

<p>In addition; the live branch is planned to only contain minimal source code to execute a reverse shell, search for potential exploits on the system, and do nothing 
more and nothing less.</p>

<p>I am someone who fiercely believes in the freedom of information, and someone else’s unethical behavior is not my responsibility, nor my jurisdiction.</p>

<h3 id="credits">Credits</h3>
<p>S/O to the people at Langley for their work. Not a huge fan of everything you do, but your work is always impressive.</p>]]></content><author><name></name></author><category term="programming" /><category term="Malware" /><summary type="html"><![CDATA[This post goes over the self-deleting binary; A malware proof of concept project that I’ve been working on since December of 2025. Project can be found here.]]></summary></entry></feed>