<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>gallant</title>
    <subtitle>Vincent Knight&#x27;s corner of the web: Rust projects, reverse engineering and other nonsense.</subtitle>
    <link href="https://www.gallant.lol/atom.xml" rel="self" type="application/atom+xml"/>
    <link href="https://www.gallant.lol"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2023-05-15T00:00:00+00:00</updated>
    <id>https://www.gallant.lol/atom.xml</id>
    <entry xml:lang="en">
        <title>Reverse Engineering a Toy</title>
        <published>2023-05-15T00:00:00+00:00</published>
        <updated>2023-05-15T00:00:00+00:00</updated>
        <author>
          <name>Unknown</name>
        </author>
        <link rel="alternate" href="https://www.gallant.lol/blog/reverse/" type="text/html"/>
        <id>https://www.gallant.lol/blog/reverse/</id>
        
        <content type="html">&lt;h2 id=&quot;disclaimer-this-write-up-is-not-professional-at-all-and-i-will-leave-details-out&quot;&gt;Disclaimer: This write-up is not professional at all, and I will leave details out&lt;&#x2F;h2&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;alright, &lt;em&gt;check it&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;So I was just chilling at school when all of a sudden, I get a message from my pal in Canada. It was a discord attachment named &lt;code&gt;ClickMe.exe&lt;&#x2F;code&gt;
Now I ain&#x27;t no fool, so I decided to examine it in a closed environment, the events that happened are as follows in sequential order.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;I opened the executable in &amp;quot;Ghidra&amp;quot;&lt;&#x2F;li&gt;
&lt;li&gt;I ran the executable in a VM without network access&lt;&#x2F;li&gt;
&lt;li&gt;Then, I opened the thing in a text editor&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Ghidra is a software analysis and reverse engineering tool created by the NSA. Ghidra was made in Java, but don&#x27;t put it down because of that; it is &lt;strong&gt;POWERFUL&lt;&#x2F;strong&gt;.
As I was scrolling mindlessly through the assembly code, I noticed a repeated term in the function names. &lt;&#x2F;p&gt;
&lt;p&gt;&amp;quot;PYZ&amp;quot;&lt;&#x2F;p&gt;
&lt;p&gt;Now I looked this term up, and it belongs to a library of compiling python code into a single executable. Next I checked what internal libraries the application was using (he didn&#x27;t strip symbols) and it was using the win32&#x27;s network and file API&#x27;s.&lt;&#x2F;p&gt;
&lt;p&gt;Next, I threw that shenaniganizer into a virtual machine to study its behavior. I had a few SysInternal tools up as I launched the program. So I gingerly double-clicked on its icon and...&lt;&#x2F;p&gt;
&lt;p&gt;An Error popped up. This wasn&#x27;t entirely unexpected since I had the internet off, and it was using network protocols, but still. I examined the popup error and noticed that it was a Python trace-back. The trace-back essentially said that it couldn&#x27;t access a website known for grabbing IP&#x27;s and the geolocation of the IP.&lt;&#x2F;p&gt;
&lt;p&gt;Here&#x27;s what we know so far:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;This is an application made in Python to be bundled into an executable for accessibility&lt;&#x2F;li&gt;
&lt;li&gt;It was messing with my files and was connecting to external servers&lt;&#x2F;li&gt;
&lt;li&gt;One of the network operations was grabbing my IP address and is probably sending it somewhere&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The last thing I did was a bit of a desperate measure, I know I could&#x27;ve searched through the assembly or decompile back to python code (which I tried and failed to do) but it was a little too tedious.
So I popped it into a text editor, I don&#x27;t know what I was expecting, but I was glad I did it. Among the garbage of binary code being converted to UTF-8, there was a Discord webhook for the info they got from me, so they had a place to send it to. Below the link was a template for sending my information, based on the template they were grabbing my:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;MAC address&lt;&#x2F;li&gt;
&lt;li&gt;IP address&lt;&#x2F;li&gt;
&lt;li&gt;My GPU and CPU info&lt;&#x2F;li&gt;
&lt;li&gt;and other computer ID info...&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;From here I kind of just said &#x27;yipee!&#x27; and laid the software to rest...&lt;&#x2F;p&gt;
&lt;p&gt;I can provide a sample if you contact me through my email. &lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Catbox3d</title>
        <published>2022-10-13T00:00:00+00:00</published>
        <updated>2022-10-13T00:00:00+00:00</updated>
        <author>
          <name>Unknown</name>
        </author>
        <link rel="alternate" href="https://www.gallant.lol/projects/cat-box/" type="text/html"/>
        <id>https://www.gallant.lol/projects/cat-box/</id>
        
        <content type="html">&lt;fieldset&gt;
 &lt;legend&gt;Intro&lt;&#x2F;legend&gt;
   &lt;blockquote&gt;
    My fork on &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;karx1&quot;&gt;karx&#x27;s&lt;&#x2F;a&gt; original project &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;gallantcrusader&#x2F;catbox3d&quot;&gt;cat-box&lt;&#x2F;a&gt;.
    A 2D (for now) game engine built on top of SDL2 for Platform Independence, Input, and Window Management purposes.
   &lt;&#x2F;blockquote&gt;
&lt;&#x2F;fieldset&gt;
&lt;p&gt;I chose Rust due to its memory safety, but in actuality the massive WASM support that comes with it.&lt;&#x2F;p&gt;
&lt;p&gt;My future plans with this project is 3D model rendering with the usage of the wgpu crate with an OpenGL backend.&lt;&#x2F;p&gt;
&lt;p&gt;It also has raw window support, in practice I made a wallpaper engine-esque application where catbox3d can write to X11&#x27;s root window.&lt;&#x2F;p&gt;
&lt;p&gt;Examples of mini projects made:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;gallantcrusader&#x2F;ping-rs&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;gallantcrusader&#x2F;ping-rs&lt;&#x2F;a&gt; &lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.gallant.lol&#x2F;projects&#x2F;yai&quot;&gt;https:&#x2F;&#x2F;www.gallant.lol&#x2F;projects&#x2F;yai&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;img src=&quot;&#x2F;cb1.png&quot; alt=&quot;Example Application&quot; class=&quot;full-width&quot;&gt;
&lt;img src=&quot;&#x2F;cb2.png&quot; alt=&quot;Example Code&quot; class=&quot;full-width&quot;&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>weather-python</title>
        <published>2022-10-13T00:00:00+00:00</published>
        <updated>2022-10-13T00:00:00+00:00</updated>
        <author>
          <name>Unknown</name>
        </author>
        <link rel="alternate" href="https://www.gallant.lol/projects/winning/" type="text/html"/>
        <id>https://www.gallant.lol/projects/winning/</id>
        
        <content type="html">&lt;h4 id=&quot;1-argument-zip-code-gets-weather-and-displays-it&quot;&gt;1 argument&#x2F;zip code gets weather and displays it&lt;&#x2F;h4&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>You Are (Not) An Idiot</title>
        <published>2022-10-13T00:00:00+00:00</published>
        <updated>2022-10-13T00:00:00+00:00</updated>
        <author>
          <name>Unknown</name>
        </author>
        <link rel="alternate" href="https://www.gallant.lol/projects/yai/" type="text/html"/>
        <id>https://www.gallant.lol/projects/yai/</id>
        
        <content type="html">&lt;p&gt;Uses game engine &#x27;cat-box&#x27; to recreate the classic You Are An Idiot animation from the 90&#x27;s&lt;&#x2F;p&gt;
&lt;p&gt;will add video later&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>The Benefits of Rust</title>
        <published>2022-05-06T00:00:00+00:00</published>
        <updated>2022-05-06T00:00:00+00:00</updated>
        <author>
          <name>Unknown</name>
        </author>
        <link rel="alternate" href="https://www.gallant.lol/blog/the-benefits-of-rust/" type="text/html"/>
        <id>https://www.gallant.lol/blog/the-benefits-of-rust/</id>
        
        <content type="html">&lt;h1 id=&quot;rust-is-like-c-but-memory-safe&quot;&gt;Rust is like C++, but memory safe.&lt;&#x2F;h1&gt;
&lt;hr &#x2F;&gt;
&lt;img src=&quot;&#x2F;ferris-not-desired.svg&quot; alt=&quot;Ferris the crab, confused&quot; class=&quot;ferris&quot;&gt;
&lt;h3 id=&quot;but-what-does-this-mean&quot;&gt;But what does this mean?&lt;&#x2F;h3&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;Rust catches unsafe memory practices at compile time and SCREAMS at you to figure it out!&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
