<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Home on Kevin J.</title><link>http://0xdeadbeer.xyz/</link><description>Recent content in Home on Kevin J.</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Fri, 25 Apr 2025 19:18:53 +0200</lastBuildDate><atom:link href="http://0xdeadbeer.xyz/index.xml" rel="self" type="application/rss+xml"/><item><title>Getting Rid of Bots</title><link>http://0xdeadbeer.xyz/posts/bot-forbidden/</link><pubDate>Fri, 25 Apr 2025 19:18:53 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/bot-forbidden/</guid><description>&lt;p>In my &lt;a href="http://0xdeadbeer.xyz/posts/dead-internet-theory">previous post&lt;/a> I released the statistics of human vs. bot traffic for my whole website. Human traffic
makes up 3% of the total requests I logged since the 9th of April - 50 thousand requests.&lt;/p>
&lt;p>With this, it is clear that bots have to go. I do not want my server to waste needless bandwidth on crawlers,
A.I. bots, directory enumerators, sshd enumerators, etc.&lt;/p>
&lt;p>This allowed me to finally get comfortable with fail2ban. A daemon which polls your logs in search of specific
regex patterns which you configure. If it detects N matches from a specific IP inside a certain time period M,
it throws the IP in a jail for W amount of time. Needless to say, those parameters are all configurable.&lt;/p></description></item><item><title>Bad Bot Statistics For My Website</title><link>http://0xdeadbeer.xyz/posts/dead-internet-theory/</link><pubDate>Thu, 24 Apr 2025 00:54:16 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/dead-internet-theory/</guid><description>&lt;p>Context: &lt;a href="https://www.youtube.com/watch?v=ofWmufzwUNo">&amp;ldquo;Dead Internet Theroy Confirmed: 51% of Traffic now Non-Human&amp;rdquo;&lt;/a>&lt;/p>
&lt;p>My droplet runs on Apache2. A bit of text manipulation tells me that since the 9th of April:&lt;/p>
&lt;ul>
&lt;li>it served about 50k client requests - in total.
&lt;ul>
&lt;li>&lt;code>cat access.log* | wc -l&lt;/code> outputs &lt;code>52818&lt;/code>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>48k of which contained the word &amp;ldquo;bot&amp;rdquo; in their apache access log line.
&lt;ul>
&lt;li>&lt;code>cat access.log* | grep -i &amp;quot;bot&amp;quot; | wc -l&lt;/code> outputs &lt;code>48396&lt;/code>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>2k of which did not.
&lt;ul>
&lt;li>&lt;code>cat access.log* | grep -v -i &amp;quot;bot&amp;quot; | wc -l&lt;/code> outputs &lt;code>2018&lt;/code>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>With this I can confidently say that barely 3% of my total traffic is not an A.I. bot.
I certainly cannot classify private, custom, hacking bots. Which is why I round the number and
say ~3% while the math shows 3.82%. A bit of searching through the access.log files shows numerous
requests of dictionary attacks and the like. Which is why I am rounding the percentage down in the
first place and call THAT my end estimate of normal, healthy traffic.&lt;/p>
&lt;p>Let me say it again. In a span of 15 days, my server received 50k client requests and a good 3% of which
was normal, healthy traffic.&lt;/p>
&lt;p>Ah, long time no see! Mobsecurity!&lt;/p></description></item><item><title>Gallery</title><link>http://0xdeadbeer.xyz/pages/gallery/</link><pubDate>Sun, 27 Oct 2024 22:28:56 +0100</pubDate><guid>http://0xdeadbeer.xyz/pages/gallery/</guid><description/></item><item><title>Debugging multiprocessing software with GDB</title><link>http://0xdeadbeer.xyz/posts/gdb-multiprocessing/</link><pubDate>Sat, 28 Sep 2024 14:33:17 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/gdb-multiprocessing/</guid><description>&lt;h2 id="backstory">&lt;i>Backstory&lt;/i>&lt;/h2>
&lt;p>Since ever I started the development of my high school finals project - &lt;a href="http://git.0xdeadbeer.xyz/0xdeadbeer/proxlib">a proxy library&lt;/a> -
I have had the desire to master the art of debugging multiprocessing software.
Up until now I had no idea it was even possible due to the scarse general
information available about it.&lt;/p>
&lt;p>&lt;code>set follow-fork-mode [mode]&lt;/code> seemed promising and quite honestly, worked as expected.
Except, I realized that to debug my proxy, I was in need of a more dynamic approach such as:&lt;/p>
&lt;ul>
&lt;li>being asked whether to follow the child/parent as I catch multiple forks&lt;/li>
&lt;li>switching between the parent or multiple children instantly&lt;/li>
&lt;li>releasing the parent while I only debug the child or vice versa&lt;/li>
&lt;/ul>
&lt;p>I read more about it online and it seemed as if the first of my requirements was an already supported feature
of GDB - (&lt;code>set follow-fork-mode ask&lt;/code>) - which would ask the user at runtime whether they want to follow
the child or the parent the second they hit a fork/vfork syscall. Sadly, newer versions of GDB have had it cut off
and deprecated for whatever reason.&lt;/p>
&lt;p>The frustration got me really close to taking initiative and writing myself a little patch for the modern versions of GDB
so they would also have this useful feature. But something told me there had to be a better way. And oh boy, better way there was.&lt;/p>
&lt;h2 id="start">&lt;i>Start&lt;/i>&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ccc;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go-template" data-lang="go-template">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 1&lt;/span>&lt;span>/* main.c */
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 2&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 3&lt;/span>&lt;span>#include &amp;lt;stdio.h&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 4&lt;/span>&lt;span>#include &amp;lt;unistd.h&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 5&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 6&lt;/span>&lt;span>int main(void) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 7&lt;/span>&lt;span> fprintf(stdout, &amp;#34;--multiprocessing example--\n&amp;#34;);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 8&lt;/span>&lt;span> for (int i = 0; i &amp;lt; 5; i++) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 9&lt;/span>&lt;span> pid_t pid = fork();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">10&lt;/span>&lt;span> if (pid == 0) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">11&lt;/span>&lt;span> fprintf(stdout, &amp;#34;&amp;gt;&amp;gt;hello from child: %d\n&amp;#34;, i);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">12&lt;/span>&lt;span> return 0;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">13&lt;/span>&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">14&lt;/span>&lt;span> if (pid &amp;lt; 0) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">15&lt;/span>&lt;span> fprintf(stderr, &amp;#34;&amp;gt;&amp;gt;failed forking\n&amp;#34;);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">16&lt;/span>&lt;span> return -1;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">17&lt;/span>&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">18&lt;/span>&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">19&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">20&lt;/span>&lt;span> fprintf(stdout, &amp;#34;&amp;gt;&amp;gt;hello from parent\n&amp;#34;);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">21&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">22&lt;/span>&lt;span> return 0;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">23&lt;/span>&lt;span>}&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>We are going to step through this program - getting into the nitty griddy of debugging and seeing
what options we have depending on our demands. First of all, use your compiler of choice. I am going to use
GCC and turn on debugging info.&lt;/p>
&lt;pre>&lt;code>gcc -g3 main.c -o main
&lt;/code>&lt;/pre>
&lt;p>Before we continue, make sure you at least have the following setting enabled in .gdbinit:&lt;/p>
&lt;pre>&lt;code>set detach-on-fork off
&lt;/code>&lt;/pre>
&lt;p>A very convenient option that will block execution of both the parent and the new child - not
letting one of them run unless you manually call continue.&lt;/p>
&lt;h2 id="following-the-parent">&lt;i>Following the parent&lt;/i>&lt;/h2>
&lt;p>This scenario is unsurprisingly simple. GDB does this automatically, therefore, I will not cover it.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ccc;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go-template" data-lang="go-template">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 1&lt;/span>&lt;span>[hemisquare@detached-hemi tmp]$ gdb main
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 2&lt;/span>&lt;span>(gdb) break main 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 3&lt;/span>&lt;span>Breakpoint 1 at 0x1161: file main.c, line 7.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 4&lt;/span>&lt;span>(gdb) run
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 5&lt;/span>&lt;span>Starting program: /home/hemisquare/tmp/main 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 6&lt;/span>&lt;span>[Thread debugging using libthread_db enabled]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 7&lt;/span>&lt;span>Using host libthread_db library &amp;#34;/usr/lib/libthread_db.so.1&amp;#34;.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 8&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 9&lt;/span>&lt;span>Breakpoint 1, main () at main.c:7
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">10&lt;/span>&lt;span>7	 fprintf(stdout, &amp;#34;--multiprocessing example--\n&amp;#34;);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">11&lt;/span>&lt;span>(gdb) s
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">12&lt;/span>&lt;span>--multiprocessing example--
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">13&lt;/span>&lt;span>8	 for (int i = 0; i &amp;lt; 5; i++) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">14&lt;/span>&lt;span>(gdb) 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">15&lt;/span>&lt;span>9	 pid_t pid = fork();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">16&lt;/span>&lt;span>(gdb) 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">17&lt;/span>&lt;span>[New inferior 2 (process 51915)]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">18&lt;/span>&lt;span>[Thread debugging using libthread_db enabled]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">19&lt;/span>&lt;span>Using host libthread_db library &amp;#34;/usr/lib/libthread_db.so.1&amp;#34;.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">20&lt;/span>&lt;span>10	 if (pid == 0) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">21&lt;/span>&lt;span>(gdb) p pid
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">22&lt;/span>&lt;span>$1 = 51915
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">23&lt;/span>&lt;span>(gdb) # we are the parent&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h2 id="following-the-child">&lt;i>Following the child&lt;/i>&lt;/h2>
&lt;p>Similar to the parent example, I will step until we hit the first fork syscall.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ccc;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go-template" data-lang="go-template">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 1&lt;/span>&lt;span>[hemisquare@detached-hemi tmp]$ gdb main 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 2&lt;/span>&lt;span>(gdb) break main
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 3&lt;/span>&lt;span>Breakpoint 1 at 0x1161: file main.c, line 7.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 4&lt;/span>&lt;span>(gdb) run
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 5&lt;/span>&lt;span>Starting program: /home/hemisquare/tmp/main 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 6&lt;/span>&lt;span>[Thread debugging using libthread_db enabled]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 7&lt;/span>&lt;span>Using host libthread_db library &amp;#34;/usr/lib/libthread_db.so.1&amp;#34;.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 8&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 9&lt;/span>&lt;span>Breakpoint 1, main () at main.c:7
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">10&lt;/span>&lt;span>7	 fprintf(stdout, &amp;#34;--multiprocessing example--\n&amp;#34;);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">11&lt;/span>&lt;span>(gdb) s
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">12&lt;/span>&lt;span>--multiprocessing example--
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">13&lt;/span>&lt;span>8	 for (int i = 0; i &amp;lt; 5; i++) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">14&lt;/span>&lt;span>(gdb) 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">15&lt;/span>&lt;span>9	 pid_t pid = fork();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">16&lt;/span>&lt;span>(gdb) 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">17&lt;/span>&lt;span>[New inferior 2 (process 52175)]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">18&lt;/span>&lt;span>[Thread debugging using libthread_db enabled]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">19&lt;/span>&lt;span>Using host libthread_db library &amp;#34;/usr/lib/libthread_db.so.1&amp;#34;.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">20&lt;/span>&lt;span>10	 if (pid == 0) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">21&lt;/span>&lt;span>(gdb)&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>So, currently we are inside the parent &amp;ldquo;inferior&amp;rdquo;. And inferior is just a GDB term for processes, threads, or whatever it is that you are debugging.
Through forks, we create another inferior which we can switch to. As you can see, we now have two inferiors:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ccc;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go-template" data-lang="go-template">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">1&lt;/span>&lt;span>(gdb) info inferiors
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">2&lt;/span>&lt;span> Num Description Connection Executable 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">3&lt;/span>&lt;span>* 1 process 52172 1 (native) /home/hemisquare/tmp/main 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">4&lt;/span>&lt;span> 2 process 52175 1 (native) /home/hemisquare/tmp/main 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">5&lt;/span>&lt;span>(gdb)&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>The &amp;lsquo;*&amp;rsquo; indicates the inferior we are currently residing in. Inferior 2 is the newborn child we just forked.
Let&amp;rsquo;s switch into the child!&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ccc;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go-template" data-lang="go-template">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 1&lt;/span>&lt;span>(gdb) inferior 2 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 2&lt;/span>&lt;span>[Switching to inferior 2 [process 52175] (/home/hemisquare/tmp/main)]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 3&lt;/span>&lt;span>[Switching to thread 2.1 (Thread 0x7ffff7dab740 (LWP 52175))]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 4&lt;/span>&lt;span>#0 0x00007ffff7e90b57 in _Fork () from /usr/lib/libc.so.6
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 5&lt;/span>&lt;span>(gdb) finish
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 6&lt;/span>&lt;span>Run till exit from #0 0x00007ffff7e90b57 in _Fork () from /usr/lib/libc.so.6
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 7&lt;/span>&lt;span>0x00007ffff7e966e2 in fork () from /usr/lib/libc.so.6
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 8&lt;/span>&lt;span>(gdb) finish
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666"> 9&lt;/span>&lt;span>Run till exit from #0 0x00007ffff7e966e2 in fork () from /usr/lib/libc.so.6
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">10&lt;/span>&lt;span>0x0000555555555192 in main () at main.c:9
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">11&lt;/span>&lt;span>9	 pid_t pid = fork();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">12&lt;/span>&lt;span>(gdb) nexti
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">13&lt;/span>&lt;span>10	 if (pid == 0) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">14&lt;/span>&lt;span>(gdb) p pid 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">15&lt;/span>&lt;span>$1 = 0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">16&lt;/span>&lt;span>(gdb) s
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">17&lt;/span>&lt;span>11	 fprintf(stdout, &amp;#34;&amp;gt;&amp;gt;hello from child: %d\n&amp;#34;, i);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">18&lt;/span>&lt;span>(gdb) 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">19&lt;/span>&lt;span>&amp;gt;&amp;gt;hello from child: 0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">20&lt;/span>&lt;span>12	 return 0;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#666">21&lt;/span>&lt;span>(gdb) &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>As you can see, here, we were able to step through the code of the child. Notice that the parent is still handing where we
left it at. It is totally okay to now switch back into the parent inferior and continue the execution from there.&lt;/p>
&lt;h2 id="conclusion">&lt;i>Conclusion&lt;/i>&lt;/h2>
&lt;p>Knowing this is essential for debugging my proxy library. I am thankful I now know GDB just a little better and was
hopefully able to provide you with a useful learning resource. I might extend this article in case I master more
interesting multiprocessing or multithreading techniques.&lt;/p></description></item><item><title>Hacker Ethic</title><link>http://0xdeadbeer.xyz/posts/hacker-ethic/</link><pubDate>Mon, 12 Aug 2024 08:40:06 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/hacker-ethic/</guid><description>&lt;ol>
&lt;li>Access to computers - and anything which might teach you something about the way the world works - should be unlimited and total. Always yield to the Hands-On imperative!&lt;/li>
&lt;li>All information should be free.&lt;/li>
&lt;li>Mistrust authority - promote decentralization&lt;/li>
&lt;li>Hackers should be judged by their hacking, not bogus criteria such as degrees, age, race, or position.&lt;/li>
&lt;li>You can create art and beauty on a computer.&lt;/li>
&lt;li>Computers can change your life for the better.&lt;/li>
&lt;/ol></description></item><item><title>proxy.c</title><link>http://0xdeadbeer.xyz/posts/proxy-c/</link><pubDate>Wed, 07 Aug 2024 00:20:45 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/proxy-c/</guid><description>&lt;p>I am writing a HTTP/s proxy server from scratch in C. So far
I have successfully implemented basic HTTP proxying. Much work
still has to be done though. I am looking for interested folks who would
be interested in helping me and build a bond to advance this project further,
if their interest or passion is genuine and strong.&lt;/p>
&lt;p>The reason for such an absurd goal is to write a new terminal
foss wanna-be BurpSuite hacking utility. One that does not impose
hard delay limits on the user&amp;rsquo;s requests nor hides any functionality
behind an expensive license - like BurpSuite. I want this to be a swiss army knife
of my hacking days. Potentially helping my-future-self and, if this really succeeds,
other web security engineers as well - a dream. Thus I am looking forward to
any contacts at &lt;a href="mailto:jerebicakevin@gmail.com">jerebica dot kevin at gmail&lt;/a> from
interested candidates.&lt;/p>
&lt;p>In the meantime, you can take a look at the progress or source-code
of the proxy.c at &lt;a href="http://104.248.140.85:81/0xdeadbeer/proxy">tesseract:81/0xdeadbeer/proxy&lt;/a> - my self-hosted Gitea instance&lt;/p>
&lt;p>Current TODO list:&lt;/p>
&lt;ul>
&lt;li>Parse port out of Host header (default_value:80)&lt;/li>
&lt;li>Implement server message parsing&lt;/li>
&lt;li>Verify and search for memory leaks&lt;/li>
&lt;li>More testing, debugging, fixing&lt;/li>
&lt;li>Implement HTTPS with OpenSSL&lt;/li>
&lt;/ul></description></item><item><title>Floppies</title><link>http://0xdeadbeer.xyz/posts/floppies/</link><pubDate>Thu, 25 Apr 2024 21:21:30 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/floppies/</guid><description>&lt;p>&lt;img src="http://0xdeadbeer.xyz/images/floppies/pic1.jpg" alt="Floppy Reader"> Floppy reader positioned on my 2
year old custom-built PC. What an occurrence! The old meets the new hahah&lt;/p>
&lt;p>A youngster like me could hardly appreciate the simplicity behind these things,
let alone the struggle elders had to go through to work with such technology. I
was searching for a male aux to male aux connector the other day and stumbled
on this reader with a stack of floppies nearby. The mounting process was
unsurprisingly easy since I am running Linux. I have no idea what is the case
with Windows, and franky, I do not care at this point in time. I rush to my
computer in all awe, excited to see what obscure and ancient data these might
have in them or how they even work. Most had MS DOS executables and Batch
installation scripts for some kind of software as well as some XLS tables and
other uninteresting data.&lt;/p>
&lt;p>The mounting process had a peculiarity though.. I had to mount the whole disk
and not just a partition whose file-system has been recognized by the kernel
(&lt;code>mount /dev/sda /mnt&lt;/code> instead of &lt;code>mount /dev/sda1 /mnt&lt;/code>). Is that weird? I do
not know..&lt;/p>
&lt;p>After minutes of staring at these boring files and finding nothing that would
suffice my interest.. I have decided to format one of the floppies with an ext4
file-system and make it my personal mini space. It is not like I can fit 4K
images in here, but a couple of text files will suffice.&lt;/p>
&lt;p>&lt;img src="http://0xdeadbeer.xyz/images/floppies/pic2.jpg" alt="Interesting Floppies"> Here I collected all
diskettes with English shortnotes&lt;/p>
&lt;p>An interesting feature of floppies is that you can forcibly restrict the
reader&amp;rsquo;s head from writing to the disc by flicking a tiny switch on the bottom
right side of the plastic cover. Not all floppies have that switch though.&lt;/p>
&lt;p>One thing I learned from researching floppies is their design mechanism. From
what I read, they work magnetically just like modern hard disks and beneath the
plastic is located the actual disc where the data is stored. When you insert
the floppy into the reader, it flicks the metal shield, exposing the internal
disc (black rectangle), attaches to it a read/write head and there it operates
according to the system&amp;rsquo;s commands (reading/writing the data while the disc
spins around).&lt;/p></description></item><item><title>Information Scarcity</title><link>http://0xdeadbeer.xyz/posts/information-scarcity/</link><pubDate>Fri, 01 Mar 2024 21:55:39 +0100</pubDate><guid>http://0xdeadbeer.xyz/posts/information-scarcity/</guid><description>&lt;p>I will not be picking battles between the extreme right or left side of the
political spectrum. In fact, I will merely try to report on the negative
impacts that capitalism has had on this astounding technology, referred to as
&amp;ldquo;the internet&amp;rdquo;. I will also try to stay away from emotional writing, even if
such a technology lies very close to my heart. This does not mean I side with
left nor right. This means the common individual should focus more on the
problem at hand and come up with the best possible solution for that specific
scenario rather than just falling onto the extreme left or right wing.&lt;/p>
&lt;p>This is especially true for developers..&lt;/p>
&lt;p>We live in a world where money is power. That fact should not be ignored. The
creation of internet was an unexpected turn for the market. Companies realized
that it was a powerful tool to gain new customers with. And of course, how
could it not be? You are more exposed to the new customers&amp;rsquo; eyes and are
therefore, more likely to make more sales and profit, right? How could have
that possibly turned for the worse?&lt;/p>
&lt;h2 id="data-protection">Data Protection&lt;/h2>
&lt;p>The internet that we live in today is a mess. Service creation -&amp;gt; data
collection -&amp;gt; data breach. In that order. Service creation refers to any act of
writing or shipping software for the end-user (or the end-developer depending
on what you are creating). Data collection refers to the collection of
personally identifiable information without explicit or full consent from the
user (which, let&amp;rsquo;s be real, is the case in 2024. Well, unless you are keen on
reading the 2000 word long privacy policy for every product that you use, which
can be changed by the company at any time of the day. Without your consent.
Have fun reading these vague essays). Data breach refers to the unescapable
information compromise that will happen sooner or later in the process of
shipping software to a wider audience. Production code is never 100% safe and
free from security vulnerabilities. Therefore, every time a maliscious user
discovers an unknown vulnerability, a potential data breach is about to take
place. The possible outcomes range from absolutely nothing to the total data
compromise for the users.&lt;/p>
&lt;p>Sometimes I find myself questioning the intelect of the people who create
solutions to simple problems, yet feel this internal need to surround the
solution with software rubbish. Perhaps you have noticed that many websites
nowadays require account creation with a personally identifiable email address,
phone number, gender, address, and much more. Most of such websites deal with
problems whose core solution is SIMPLIFICATION, yet they go the other way
around, endlessly complicating their systems over and over again until they
break. And as you might imagine, the more code a product has, the more
vulnerable it is to security vulnerabilities. That is the number one lesson
every developer should be aware of before starting out on their problem solving
journey.&lt;/p>
&lt;p>Not to mention the pace at which the developers are forced to work. Data
protection is most definitely not the top priority for a company as much as the
process for profiting is. Developers are constantly pounded and pounded to
create software as quickly as possible. Limiting them with impossibly short
deadlines and stressing them out. This most definitely leads to security bugs.&lt;/p>
&lt;h2 id="rise-for-the-money">Rise for the Money&lt;/h2>
&lt;p>Do we really wish for such use of such a powerful technology? A technology that
has the potential to transmit GIGABYTES of information every second, yet is
limited by the SOS (shiny object syndrome) of humans and their will to make
money by wasting processing power on advertisements, distract the end-users
with useless popups, make them fill forms, and create accounts to spam them
with new deals and make even more money? All of that while also collecting in
bulk all sorts of personally identifiable information? Just to give them the
content that they needed to inform themselves? Just to accomplish the one basic
idea that internet, this stunning technology, promised to bring to the table
since it ever came to existence? How did that happen? How did usage of such a
technology further push drawbacks against it?&lt;/p>
&lt;p>The approach that the first internet took, was by far the best at fulfilling
what we define as &amp;ldquo;internet&amp;rdquo; - a place for people to find and share
information, not necessarily limited by race, background, actions, political
standpoint, or any other form of bias. Before the companies realized the
potential of this technology and invaded it with bloat, internet was a place
for individuals to share information, get to know other people, and create
something personal. Something private. Something that was a digital footprint
of the community. That footprint represented people and their will to
collaborate and share information.&lt;/p>
&lt;p>However, as companies and governments got more involved, they started throwing
more and more capitalistic structures into it, which resulted in a slow death
of the initial goal and reason behind this technology.&lt;/p>
&lt;p>This can be widely shown from the fact, that blogs, BLOGS, a once subjective
and private online expression of somebody&amp;rsquo;s persona or presence, are now
spitting blood to be the top tier result on Google&amp;rsquo;s search page. That
evidently puts money and power before community, collaboration, and especially,
&lt;em>content quality&lt;/em>. Which is quite self-evident after you notice the vagueness
that most articles have online. The page fills you with popups, advertisements,
forms to fill, and required login pages, just to access content that is
precooked by artificial intelligence, is extremely vague, and potentially
misleading. Yes, it is indeed, a triumph for information scarcity that is
taking place on one of the biggest highways of information we currently
possess. And it does indeed, show one of many negative traits of capitalism
after you throw it into a free cyber space.&lt;/p>
&lt;h2 id="clapback">Clapback&lt;/h2>
&lt;p>Formerly, to escape this hellish use of the internet, you had to stop using the
internet. Now, there is a new world that digital rights activists and freedom
seekers are creating. It is a strong and willingful movement that has been
standing its ground for many decades. It was in September 1983 that Richard
Stallman launched the GNU project, whose goal was to create a fully functioning
operating system and a toolset to work with data on that system. Today, a
combination of the GNU project and Linux kernel (the core of an operating
system) is known as GNU/Linux and it is a perfect alternative to the
proprietary systems like OS X or MS Windows that we do not deserve nor need.&lt;/p></description></item><item><title>OpenSSL Notes and Resources</title><link>http://0xdeadbeer.xyz/posts/openssl-notes/</link><pubDate>Sat, 24 Feb 2024 17:35:10 +0100</pubDate><guid>http://0xdeadbeer.xyz/posts/openssl-notes/</guid><description>&lt;ul>
&lt;li>
&lt;p>Note: This article will get updates over time as I continue on reading the source code of the OpenSSL project.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Note: These notes mainly cover the latest version at the time of updating this article. Currently, I am reading: v3.2.1&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Note: Notes are provided at my will and convenience. Keep in mind that it takes time for me to take notes and write articles. If you desire an even deeper understanding of the project, you are welcome to read the &lt;a href="https://github.com/openssl/openssl">source code&lt;/a>, and if you can, &lt;a href="https://github.com/0xdeadbeer/blog">contributing to this article&lt;/a> would be greatly appreciated.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="common-structs">Common structs&lt;/h3>
&lt;p>These are the most common structs you will come accross when reading the source code.&lt;/p>
&lt;ul>
&lt;li>&lt;code>SSL_CTX&lt;/code>: context for a program. Can be created using &lt;code>SSL_CTX_new(3)&lt;/code>&lt;/li>
&lt;li>&lt;code>SSL&lt;/code> (SSL_CONNECTION) represents a SSL connection (and is created under a context)&lt;/li>
&lt;li>&lt;code>SSL_METHOD&lt;/code>: struct with function pointers that a context inherits and can use when it has to perform an SSL action (connect, read, peek, write, ctrl, etc.)&lt;/li>
&lt;li>&lt;code>SSL_SESSION&lt;/code>:&lt;/li>
&lt;li>&lt;code>SSL_CIPHER&lt;/code>:&lt;/li>
&lt;/ul>
&lt;hr>
&lt;ul>
&lt;li>&lt;code>TLS_client_method&lt;/code>: a SSL_METHOD with client utility function pointers&lt;/li>
&lt;li>&lt;code>TLS_server_method&lt;/code>: a SSL_METHOD with server utility function pointers&lt;/li>
&lt;/ul>
&lt;hr>
&lt;ul>
&lt;li>&lt;code>BIO&lt;/code>: struct that can be used to handle program I/O. There are two types of BIOs, source/sink and filter. A BIO can represent an open file, a network socket, a memory buffer, etc. &lt;a href="https://www.openssl.org/docs/man1.1.1/man7/bio.html">[1]&lt;/a> &lt;a href="https://stackoverflow.com/a/51672134">[2]&lt;/a>&lt;/li>
&lt;li>&lt;code>BIO_METHOD&lt;/code>: struct with function pointers that a BIO inherits and can use when it has to perform an I/O action (bwrite, bread, bputs, bgets, crtl, etc.)&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="resources">Resources&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://www.youtube.com/watch?v=RNqlpA1qH64">Matt Caswell on OpenSSL and Cryptography&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://datatracker.ietf.org/doc/html/rfc5246">RFC: The Transport Layer Security (TLS) Protocol Version 1.2&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://datatracker.ietf.org/doc/html/rfc8446">RFC: The Transport Layer Security (TLS) Protocol Version 1.3&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://datatracker.ietf.org/doc/html/rfc6066">RFC: Transport Layer Security (TLS) Extensions: Extension Definitions&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>The Hacker Mindset</title><link>http://0xdeadbeer.xyz/posts/the-hacker-mindset/</link><pubDate>Sat, 24 Feb 2024 16:43:00 +0100</pubDate><guid>http://0xdeadbeer.xyz/posts/the-hacker-mindset/</guid><description>&lt;p>&lt;img src="http://0xdeadbeer.xyz/images/cliff.jpg" alt="Cliff Stoll: Good Science">&lt;/p>
&lt;p>Image credit: &lt;a href="https://www.youtube.com/watch?v=xHEIOgONq6A">AT&amp;amp;T Tech Channel - Cliff Stoll: Good
Science&lt;/a>&lt;/p>
&lt;p>First, there comes excruciating pain. Suddenly, an eye blinding flash travels
across his eyes. Look at him. He finally gazed outside the womb. He is now a
small fraction of this world and all of its complications. Where will this
child go? Just how will reality shape him? Will he break and succumb to
despair, or regrow into an even more resilient, mature human? As the mother
cries in joy, his little neurons start to fire little sparks of data that
resonate all across his brain from hemisphere to hemisphere. And they do so
very quickly. With a sheer speed of 100 meters per second. His brain has
millions if not billions of connections! That is not a super computer. That is
a human.&lt;/p>
&lt;p>Before his parents know it, he is already learning his first ABCs and doing
basic mathematics. A few years pass, and he starts developing new emotions.
More years pass and he is capable of deep abstract thought. Curiosity and
questions are like fuel and oxygen. Waiting for the little spark to complete
the job and burst into a violent reaction of fire. For knowledge. A new
experiment proves to be as exciting as a new question. Forcing the child to
push the limits of his brain and make connections based on his experience, or
lack thereof.&lt;/p>
&lt;p>This is how I like to describe hackers. We lack hackers. Passionate people.
People that will pass knowledge down the generations with real excitement. And
you cannot imagine THE BEST of such people until you see them in action. If you
scout through the internet carefully, you might notice them. Here are some that
I cannot help myself but to share. For they have deeply impacted my thinking:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://www.youtube.com/@melodysheep">John D. Boswell&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/watch?v=P1ww1IXRfTA">Richard Feynman&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/watch?v=Qt0844ViQDI">Cliff Stoll&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@TomScottGo">Tom Scott&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.gnu.org/">Richard Stallman&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.khanacademy.org/">Khan Academy&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>“Hackers”. I am not referring to cyber security specialists, consultants, or
attackers, although they do constitute a big portion of individuals with such
a mentality. I am referring to people that wonder and explore. What hackers
used to be defined as before media acted out with its usual &amp;ldquo;drama, drama,
drama.. drama&amp;rdquo; move and pictured us as &amp;ldquo;the bad guys&amp;rdquo;. The bad guys are not
hackers. They are criminals. End of the story.&lt;/p>
&lt;p>Why do we lack them? Because people are not flawless. We make mistakes, even
when we think we are doing the right thing. A statement kills curiosity. It
closes your options and puts you on a single track. Some parents do that. Some
teachers do that. Which can have profound effects on the child. Children need
questions. They are born to be curious. If the environment models them to be
silent, shut up, and not question about the system or statement in question,
how will they ever familiarize themselves with it? That is why extreme patience
is needed when introducing somebody to a topic. Especially children.&lt;/p>
&lt;p>Is there a way out of such closed thinking? Perhaps. For me it was FOSS (Free
and Open-Source Software). I no longer am tied to a proprietary system that I
detest. I am free to use my computer however I like. Which pushes me to
understand my own system better and in more depth. It enables me to think in
new ways and make my computer do funny things. Even if impractical, it still
is.. fun. The reason behind it also lies in data protection and privacy. But
that is another discussion. For you, the entry point might also reside in FOSS,
or maybe mathematics, physics, chemistry, biology, etcetera. At the end of the
day, all major subjects are fundamentally interlinked. Curiosity will push you
outside of your own field if you just let it do so. That is when you will
realize that every subject has a profound meaning and beauty.&lt;/p>
&lt;p>The greatest twist will come when you discover something new on your own that
is interlinked with what you know you LOVE doing. But that resides inside a
completely different field that you remember hating because of a past
experience - like school.&lt;/p>
&lt;p>This is what I learned in my concluding years of adolescence. I now like to
think optimistically about the coming generations. Let&amp;rsquo;s take care and be
welcoming of our future pioneers. Let’s respect the work of the ones who came
before us. They are after all, the reason why we are here.&lt;/p></description></item><item><title>The Machinery of Life</title><link>http://0xdeadbeer.xyz/posts/the-machinery-of-life/</link><pubDate>Wed, 13 Dec 2023 23:25:43 +0100</pubDate><guid>http://0xdeadbeer.xyz/posts/the-machinery-of-life/</guid><description>&lt;p>&lt;img src="http://0xdeadbeer.xyz/images/the_machinery_of_life.png" alt="The Machinery of Life">&lt;/p>
&lt;p>For my 18th birthday, I asked my relatives for some books that I have not
gotten to yet in my read list. One particularly stood out.. titled The
Machinery of Life from David S. Goodsell. I remember noting this title after
watching a live stream from one of my most respected YouTubers,
&lt;a href="https://www.youtube.com/@thethoughtemporium">@TheThoughtEmporium&lt;/a>.&lt;/p>
&lt;p>The live was about starting out in genetic engineering. How difficult it is,
how expensive can it get, all the caveats that come along the way, etc. I do
not know why I watched that live. Maybe just because the title seemed cool and
interesting. But after finishing the live stream and noting a couple of
interesting resources Justin offered (books, websites, &amp;hellip;), I closed my text
editor and never looked at that notes file again. Re-seeing this title in my
notes file right before my birthday made me want to explore it. And so this is
what I got.&lt;/p>
&lt;p>I must say that I have been really enjoying this book, even though I have not
devoted many hours of my life to biology - and my main focus is still in
computer science. I particularly like the illustrations, most of which were
(apparently) either hand drawn with watercolors (see the thumbnail) or rendered
by a computer.&lt;/p>
&lt;p>As this is my first book that delves deep into biology, reading it is a real
perspective shifter an a half! I never considered the level of complexity one
has to fight when dealing with biology at such a minuscule level.&lt;/p>
&lt;p>Here is my favorite quote, taken directly from the book:&lt;/p>
&lt;pre tabindex="0">&lt;code>..................................Cells in our retina are filled with
arrays of opsin proteins for sensing light, light that is focused by layers of
eye lens cells packed full of clear crystalling proteins. Cells in our skin
spin enormously long strands of keratin proteins into hairs, and other cells
sense their slightest movement. These and other sensory data are transmitted
and processed by nerve cells that carry electrical currents propagated by
proteins and insulated by con- centric layers of lipid. Fine control of
movement is accomplished by an enormous skeleton of mineralized bone cells,
moved by muscle cells filled with proteins that do nothing but contract, all
glued together by connective tissue cells that built tough layers of sugar and
protein........................................................... 
&lt;/code>&lt;/pre>&lt;p>It is so beautiful how, with some imagination, you can picture the author
taking you to every part of your body. Imagine just how complex that system has
to be to work so well for such a long time and be able to sustain itself while
running. It is also an amazing analogy I remember from the book..&lt;/p>
&lt;pre tabindex="0">&lt;code>...............................................Think about this feat for a
moment-it is remarkable. You can&amp;#39;t take your cells to a shop for repairs, like
you would with a broken clock. Cells must make their repairs in place, without
ever disturbing the ongoing processes of living. Imagine replacing a worn fan
belt on your car, but doing it while driving down the road...................
&lt;/code>&lt;/pre></description></item><item><title>Weekend Reseach</title><link>http://0xdeadbeer.xyz/posts/research-weekend/</link><pubDate>Sun, 12 Nov 2023 11:56:14 +0100</pubDate><guid>http://0xdeadbeer.xyz/posts/research-weekend/</guid><description>&lt;p>If anybody is going through this weekend endlessly searching for purpose, here
is some material your brain might find appealing:&lt;/p>
&lt;ul>
&lt;li>Write about what you learn. It pushes you to understand topics better:
&lt;a href="https://addyosmani.com/blog/write-learn/">addyosmani.com/&amp;hellip;&lt;/a>&lt;/li>
&lt;li>Detecting Exploits - Linux Logging with Auditd:
&lt;a href="https://www.youtube.com/watch?v=lc1i9h1GyMA">youtube.com/&amp;hellip;&lt;/a>&lt;/li>
&lt;li>Reading Linux v0.01:
&lt;a href="https://seiya.me/blog/reading-linux-v0.01">seiya.me/&amp;hellip;&lt;/a>&lt;/li>
&lt;li>Rkhunter - Rootkit Scanner:
&lt;a href="https://wiki.archlinux.org/title/Rkhunter">wiki.archlinux.org/&amp;hellip;&lt;/a>&lt;/li>
&lt;li>Trolling your neighbours using Iptables:
&lt;a href="https://pete.ex-parrot.com/upside-down-ternet.html">ex-parrot.com/&amp;hellip;&lt;/a>&lt;/li>
&lt;li>Algorithms for Modern Hardware:
&lt;a href="https://en.algorithmica.org/hpc/">en.algorithmica.org/&amp;hellip;&lt;/a>&lt;/li>
&lt;li>Miller in 10 minutes:
&lt;a href="https://miller.readthedocs.io/en/6.9.0/10min/">miller.readthedocs.io/&amp;hellip;&lt;/a>&lt;/li>
&lt;li>Hardware Security - Eldritchdata:
&lt;a href="https://eldritchdata.neocities.org/CGFTPU/HardwareSecurity">eldritchdata.neocities.org/&amp;hellip;&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>Wish you a wonderful day!&lt;/p></description></item><item><title>Black Clover &amp; Japanese Language Immersion</title><link>http://0xdeadbeer.xyz/posts/japanese-immersion-with-black-clover/</link><pubDate>Tue, 15 Aug 2023 16:49:55 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/japanese-immersion-with-black-clover/</guid><description>&lt;p>Today I wanted to share my language learning experience of Black Clover. If
you are a fellow learner of the Japanese language and would like to hear some
feedback on this anime, this is the post for you.&lt;/p>
&lt;p>I should point out that this is my first anime I ever fully watched with
Japanese subtitles. And so, big thanks to
&lt;a href="https://github.com/killergerbah/asbplayer">Asbplayer&lt;/a> and
&lt;a href="https://foosoft.net/projects/yomichan/">Yomichan&lt;/a> for making this possible.
Splendid tools for sentence mining.&lt;/p>
&lt;p>If you do not know what they are, in short:&lt;/p>
&lt;ul>
&lt;li>Yomichan is an extension which allows you to highlight Japanese words and
show you their dictionary translations (alongside also provides amazing
shortcuts for adding the word directly into Anki).&lt;/li>
&lt;li>Asbplayer is an extension which allows you to insert custom subtitle files
into a webplayer (also provides handy shortcuts for automatically inserting
audio/screenshots into Anki cards)&lt;/li>
&lt;/ul>
&lt;p>Not only was watching anime with subtitles suddenly much easier, I could
finally do real sentence mining with Anki and extract all the new words I
wanted with the shortcuts that the two extensions provided.&lt;/p>
&lt;p>&lt;img src="http://0xdeadbeer.xyz/images/asbplayer_yomi.png" alt="Asbplayer + Yomichan are based">&lt;/p>
&lt;p>The whole experience was super fun and engaging enough to make me say &amp;ldquo;oh come
on, one more episode. *click*&amp;rdquo; (this is especially true because at some point
I even started getting the jokes)&lt;/p>
&lt;p>With all this said, it is totally possible that not everybody will enjoy the
anime the same way as I did. Given the preferences, knowledge difference, etc.
that we might have. But overall I recommend this anime to anybody who feels
that they are at least N4 or better.&lt;/p>
&lt;p>Now, what did I get from this anime?&lt;/p>
&lt;ul>
&lt;li>Roughly 200-300 new words&lt;/li>
&lt;li>Listening and reading skills improved a lot&lt;/li>
&lt;li>Fun&lt;/li>
&lt;/ul></description></item><item><title>Fun Spaced Repetition</title><link>http://0xdeadbeer.xyz/posts/fun-spaced-repetition/</link><pubDate>Tue, 25 Jul 2023 16:23:26 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/fun-spaced-repetition/</guid><description>&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>In this post I wanted to share some ideas about language learning gamification
with my fellow internet readers. Why? because I think they are worth a thought
or two. I believe they have the potential to improve the language learning
field and make it more fun to learn languages (if done right). But honestly,
not just the language learning field.. any field that can be studied through
spaced repetition in an efficient manner.&lt;/p>
&lt;p>My ideas revolve around an imaginary game that would implement spaced
repetition in a fun and engaging/competitive way. The whole chain of thoughts
about this started a year ago, when I wanted to build a fork of osu!lazer that
would help you study japanese. I did not think of integrating any spaced
repetition at that time though. I merely tried to replace numbers of each
circle with random japanese characters before giving up.&lt;/p>
&lt;p>But 1-2 months ago it struck me: &amp;ldquo;Why is not there still a game for studying
kanji/words?&amp;rdquo;. Think about it, there is &lt;a href="https://www.google.com/search?q=hiragana+katakana+game+&amp;amp;source=hp&amp;amp;ei=Bua_ZP_3Ec_kxc8P9JmWEA&amp;amp;iflsig=AD69kcEAAAAAZL_0Fhj46CgfzQMiCdzipSQwqpw1DRol&amp;amp;ved=0ahUKEwj_kpadkqqAAxVPcvEDHfSMBQIQ4dUDCAk&amp;amp;uact=5&amp;amp;oq=hiragana+katakana+game+&amp;amp;gs_lp=Egdnd3Mtd2l6IhdoaXJhZ2FuYSBrYXRha2FuYSBnYW1lIDIFEAAYgAQyBRAAGIAEMgYQABgWGB4yBhAAGBYYHjIGEAAYFhgeMgYQABgWGB4yCBAAGIoFGIYDMggQABiKBRiGAzIIEAAYigUYhgMyCBAAGIoFGIYDSNQYUABYnBhwAXgAkAEAmAHjAaABhRSqAQY4LjEzLjG4AQPIAQD4AQHCAgsQLhiABBjHARjRA8ICBRAuGIAEwgIIEC4YgAQY1ALCAg4QLhiABBjHARivARiYBcICBxAAGIAEGAo&amp;amp;sclient=gws-wiz">all sorts of games for the two japanese
alphabets&lt;/a>
(katakana and hiragana). Both of them can be learned in a relatively short
period of time. After you learn them you usually move to kanji or vocabulary
building - the step that takes the longest (usually 3-6 years from what I have
heard).&lt;/p>
&lt;p>So why is every developer focusing on those two alphabets, that represent a
mere 2-3% of the whole learning material (excluding grammar, language
immersion, etc.)?&lt;/p>
&lt;p>I say there should be more focus on the other 98% of the language - which is
where the main problem lies.&lt;/p>
&lt;h2 id="ideas">Ideas&lt;/h2>
&lt;p>This is where the fun begins. It is time that we, as people, stand up and build
something that will be fun and engaging.&lt;/p>
&lt;p>It does not have to be osu! level addiction. It just has to be fun and keep the
user coming back. Allow me to (finally) share some examples:&lt;/p>
&lt;ul>
&lt;li>Game similar to Space Invaders where vocabulary words are falling from the
top of the player&amp;rsquo;s screen. The player has to guess their meaning by typing
the correct translation of the word, or picking a choice. If the correct
choice is made, points are awarded. Else the player looses points.&lt;/li>
&lt;li>Multiplayer website where a group of friends can challenge each other by
doing reviews of spaced repetition cards. When a player selects a choice
correctly, they have the freedom to select the question card for the next
person. Whoever fails gets disqualified. Essentially creating a fireball
game.&lt;/li>
&lt;li>2D multiplayer open world game where players get rewarded by doing small
routines like arraging foreign vocabulary with translations, rephrasing
sentences, etc.&lt;/li>
&lt;li>Uno (website) alternative where each card has a (spaced repetition) word
attached to it. Essentially allowing players to match cards together by
vocabulary as well.&lt;/li>
&lt;li>Chess (website) alternative that allows players to combine attacks from
points that they earn by selecting correct translations of foreign words
that popup during gameplay.&lt;/li>
&lt;li>(Feeling inspired yet? &lt;a href="mailto:jerebicakevin@gmail.com">Hit me up!&lt;/a>)&lt;/li>
&lt;/ul>
&lt;p>At this point, the only limit is truly the imagination.&lt;/p>
&lt;h2 id="development">Development&lt;/h2>
&lt;p>I am honestly surprised at the fact that nobody has built something like this so
far. There is of course
&lt;a href="https://learnjapanesepod.com/kana-invaders/">KanaInvaders&lt;/a>, which is where a
good part of my inspiration comes from.. but as I have said earlier, we have to
focus on the other 98%.&lt;/p>
&lt;p>I would be super glad to see more people open up to those ideas, team up, and
create amazing open-source projects that will make learning so much more fun!&lt;/p>
&lt;hr>
&lt;p>At the time of writing this post, I have started working on
&lt;a href="https://github.com/0xdeadbeer/monr">MonR&lt;/a> (spaced repetition backend for
games/apps), &lt;a href="https://github.com/0xdeadbeer/monw">MonW&lt;/a> (the first Unity
example game that implements MonR), and some other projects that are yet to
come on Github.&lt;/p>
&lt;p>At this point, any help is indispensable - because I am afraid I will not be
able to keep it up alone. Therefore, if you want to contribute, and you know
you have some will power within you, I say do not hesitate to spread the word,
&lt;a href="mailto:jerebicakevin@gmail.com">hit me up&lt;/a>, or do some passive contributions
directly on the mentioned repositories.&lt;/p>
&lt;p>Thank you. Cheers&lt;/p></description></item><item><title>Joyfulness With Language Immersion</title><link>http://0xdeadbeer.xyz/posts/joyfulness-with-language-immersion/</link><pubDate>Sun, 28 May 2023 12:59:12 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/joyfulness-with-language-immersion/</guid><description>&lt;p>In this post I would like to talk about one of the most (in my opinion) joyful
moments you will ever get when doing language immersion.&lt;/p>
&lt;p>What exactly inspired me to write this is the fact that I myself have
experienced this 1 day before writing this article. For context, I have been
trying to get a torrent set up on one of my VMs on which I usually host things
temporarily, and decided to listen to some japanese music in the background
since I knew that this was gonna be a long process.&lt;/p>
&lt;p>Most of those songs were songs that I have not listened to in well over a year
and completely forgot about them. But these songs (like any other song) had
specific emotions and memories attached to them and relistening them not only
proved to give me a big hit of nostalgia and flashbacks, but the fact that I
was able to comprehend most of them was so amazing I could not believe what I
was listening to (&lt;a href="https://www.youtube.com/watch?v=VtNgeDxYJzE">Blue Encount from
僕のヒーローアカデミア&lt;/a> being by
far the best example of what I could not understand a year ago).&lt;/p>
&lt;p>For a second it seemed like I unlocked a new area of the song that was once
hidden to me and completely out of discussion. What I was once listening to and
&amp;ldquo;letting it go by, without thinking about it is meaning&amp;rdquo; as to say, was now
being automatically converted in my brain. And this is the experience I am
talking about. The only sign of improvement I ever get is this. And I am so
thankful that I get it from time to time because it really keeps me going like
nothing else.&lt;/p>
&lt;p>&amp;ldquo;Oh,&amp;rdquo; you might say, &amp;ldquo;but surely you can see your progress and advancement over
time as you start to notice that you understand more and more of the content
that you absorb.&amp;rdquo; Well, that is actually quite false, in my opinion. As you
advance in a language and learn new words day after day, the relative
difference between what you knew 5 days ago and what you know now are so slim
that you practically cannot see it. At the beginning though, those differences
are quite large. As Tom Scott put it, &lt;a href="https://www.youtube.com/watch?v=h9j89L8eQQk&amp;amp;t=208s">&amp;ldquo;Going from 201 to 202 feels like a tiny
change, but going from 1 to 2 is a
doubling.&amp;rdquo;&lt;/a> Although the
topic of that video was not language learning, I honestly feel like it applies
to language learning as well. That is why I get so happy and motivated when
this occurence happens. It tells me that whatever I knew about Japanese last
year is completely different to what I know now. Knowing that you are making
progress is way better than having the idea that you are stuck in one place for
the whole time in my opinion.&lt;/p>
&lt;p>Thanks for reading this.&lt;/p></description></item><item><title>TLPI: Linux Signals</title><link>http://0xdeadbeer.xyz/posts/linux-signals/</link><pubDate>Sat, 29 Apr 2023 16:21:24 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/linux-signals/</guid><description>&lt;h2 id="0-introduction">0 Introduction&lt;/h2>
&lt;p>I have started reading The Linux Programming Interface! And throughout the book
I will be writing some cool articles regarding new things I learned. The book
is being read in no particular order, so expect the articles to follow that
non-orderness (if that is even a word). In this article specifically, however,
I will be writing about signals. What are signals? How do they work? How to
implement them inside my own program? and much more.&lt;/p>
&lt;blockquote>
&lt;p>Note: If you want to follow along, this article is based on the 20th chapter
of the book (Signals: Fundamental Concepts). I may add my own tips and
lessons from time to time though.&lt;/p>&lt;/blockquote>
&lt;h2 id="1-signals">1 Signals&lt;/h2>
&lt;p>In short, signals are software interrupts. During the program&amp;rsquo;s execution, if
the program receives a signal, it will stop the program&amp;rsquo;s execution and finish
some new and more important job. That job can depend on which signal was fired
and what the program is set to do after receiving that specific signal.&lt;/p>
&lt;p>&amp;ldquo;Ok, in what context is that useful?&amp;rdquo; you might ask. Well, a simple example
might be killing a program through the shell. If you have worked with Linux for
long enough, you might know that pressing CTRL+C kills any currently pending
program that was executed from the shell. All the shell is really doing is
waiting for keyboard input, and sending a specific kill signal to the program.&lt;/p>
&lt;p>There is more signals than just the kill signal though (i.e. SIGINT or SIGKILL
in many cases)&lt;/p>
&lt;p>Usually, every signal has it is own default action that should be taken after
the program receives it. But guess what, we can change it! That is called
Signal Disposition. And we can change it to: &lt;code>func(int)&lt;/code> &lt;code>SIG_IGN&lt;/code> or
&lt;code>SIG_DFL&lt;/code>&lt;/p>
&lt;ul>
&lt;li>&lt;code>func(int)&lt;/code>: could be a custom function that we want to execute when the
signal is received.&lt;/li>
&lt;li>&lt;code>SIG_IGN&lt;/code>: just ignore the signal (i.e. no action for a specific signal)&lt;/li>
&lt;li>&lt;code>SIG_DFL&lt;/code>: execute default action of the signal (whatever it may be)&lt;/li>
&lt;/ul>
&lt;p>And we can do so, using either:&lt;/p>
&lt;pre>&lt;code>void (signal(int sig, void (func)(int)))(int);
&lt;/code>&lt;/pre>
&lt;p>or a more flexible/complex alternative:&lt;/p>
&lt;pre>&lt;code>int sigaction(int sig, const struct sigaction act, struct sigaction
oldact);
&lt;/code>&lt;/pre>
&lt;p>both of which are defined in &lt;code>&amp;lt;signal.h&amp;gt;&lt;/code>&lt;/p>
&lt;h1 id="2-sending-signals">2 Sending signals&lt;/h1>
&lt;p>Signals can be sent using the following function.&lt;/p>
&lt;pre>&lt;code>int kill(pid_t pid, int sig); // send signal to a process int killpg(int
pgrp, int sig); // send signal to a process group
&lt;/code>&lt;/pre>
&lt;p>Or an alternative (in case you want to send the signal to the same program)&lt;/p>
&lt;pre>&lt;code>int raise(int sig); // literally the same as the line below kill(getpid(),
sig);
&lt;/code>&lt;/pre>
&lt;p>You might be already familiar with the program &lt;code>kill&lt;/code> from the command
line. And in case you are wondering.. well, yeah, they serve practically the
same purpose.&lt;/p>
&lt;blockquote>
&lt;p>Note: Just because they are named kill, it does not mean that they
specifically have to kill a process. It is just called that way because
originally you could in fact, only kill processes. But now you can send
various signals with it (and also check if a PID is in use - more on that
later).&lt;/p>&lt;/blockquote>
&lt;h2 id="3-signal-mask">3 Signal mask&lt;/h2>
&lt;p>What if we want to block a signal? Or just temporarily let the program know
that we do not want to accept certain types of signals? In that case we use
something called a Signal Mask.&lt;/p>
&lt;p>You can use the following function to change/edit the process signal mask.&lt;/p>
&lt;pre>&lt;code>int sigprocmask(int how, const sigset_t set, sigset_t oldset);
&lt;/code>&lt;/pre>
&lt;blockquote>
&lt;p>Note: &lt;code>sigset_t&lt;/code> is a type of data structure that can contain all types
of signals. Imagine it more like a dictionary than a Queue or array where you
can find multiple elements of the same signal type.&lt;/p>&lt;/blockquote>
&lt;blockquote>
&lt;p>Hint: More information can be found
&lt;a href="https://www.gnu.org/software/libc/manual/html_node/Process-Signal-Mask.html">here&lt;/a>&lt;/p>&lt;/blockquote>
&lt;p>If a signal of a specific type is being sent to a process which blocked that
type, it will be marked as pending and will be delivered once the signal mask
unblocks it (if ever).&lt;/p>
&lt;p>If you want to view all the currently pending signals you can do so, using the
following function.&lt;/p>
&lt;pre>&lt;code>int sigpending (sigset_t set);
&lt;/code>&lt;/pre>
&lt;blockquote>
&lt;p>Note: Yes, it does return a signal set, and so no matter how many pending
signals of a blocked type you will send, they will still be counted as one
and sent only once after they are unblocked. As I have said, this is not a
queue, but more like a dictionary.. or.. queue where duplicates do not exist.&lt;/p>&lt;/blockquote>
&lt;h2 id="4-pause">4 Pause&lt;/h2>
&lt;p>If you want to suspend the execution of the program and wait for signals, you
can do so using the following function&lt;/p>
&lt;pre>&lt;code>int pause(void);
&lt;/code>&lt;/pre>
&lt;blockquote>
&lt;p>Note: from what the book said, yes, it is more optimal to use pause than to
use a loop. Although I did not verify this in practice, I am giving it the
benefit of the doubt. You can verify it yourself if you care that much about
program timings.&lt;/p>&lt;/blockquote></description></item><item><title>Reflections Are Fun</title><link>http://0xdeadbeer.xyz/posts/reflections-are-fun/</link><pubDate>Fri, 21 Apr 2023 17:50:05 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/reflections-are-fun/</guid><description>&lt;p>Honestly, I have no idea if I am going to come off as a creep by posing this,
but I think that reflections are &lt;del>fun&lt;/del> scary!&lt;/p>
&lt;p>I am not sure how many people are aware of this, but I am going to share it
anyway because it is a thing I kindof like doing while being bored. One day, I
was on the Internet seeing what new things I can learn and explore. I was
getting bored. And suddenly I see an article titled &lt;a href="https://ioactive.com/glass-reflections-in-pictures-osint-more-accurate-location/">&amp;ldquo;Glass Reflections in
Pictures + OSINT = More Accurate
Location&lt;/a>.
Now that, my friend, is something to fill my boredom with.&lt;/p>
&lt;p>I instantly take a look at it and next thing I know I am amazed by it.
Reflections are just so cool! To be fair, I think I have been using reflections
way before that day even, but this article taught me something new. I have to
pay close attention as well. Not just with pictures, but also real life!&lt;/p>
&lt;p>Some great examples of what I am talking about:&lt;/p>
&lt;ul>
&lt;li>The bus (at this point literally engineered to stalk others lol. Look out
the window and you can see the phone of the person that is right in front of
you.&lt;/li>
&lt;li>My computer whose left side is covered with glass. If you come in my room,
you may catch a frame or two of my monitors because of the reflections from
the monitor to the glass of my computer to your eyes.&lt;/li>
&lt;li>Eyeglasses (I think there was even a study where OSINT experts tried to
recover X% of the user&amp;rsquo;s screen by just looking at the reflection in their
glasses though a video call - was not able to find it unfortunately, but I
remember the percentage was super high in some example rooms)&lt;/li>
&lt;/ul></description></item><item><title>Outfucking All Cloud</title><link>http://0xdeadbeer.xyz/posts/outfucking-all-cloud/</link><pubDate>Mon, 17 Apr 2023 18:29:38 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/outfucking-all-cloud/</guid><description>&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>Lately, I have been facing a serious issue with my backup system. The problem
was the following. I usually keep backups scattered across all of my disks in
order to fulfill some basic availability rule. However, the problem arises when
you notice that all of those disks are always connected to my computer, which
does not have any lightning protection. And since I have been getting quite
cautious about my spendings, I would rather avoid buying a surge protector of some
sort. And so, in case of a lightning strike, all of those backups will be gone.
Parts of the computer included. Therefore, the most elegant solution to this
problem? Rclone!&lt;/p>
&lt;h2 id="outcome">Outcome&lt;/h2>
&lt;p>Let me explain my solution. If you read my &lt;a href="http://0xdeadbeer.xyz/posts/secure-linux-setup/">Secure Linux
Setup&lt;/a> article, you may have noticed I have a
strong will to protect my data. And so, you might expect me to be all against
cloud. And to be fair, I surely am. That is, when I serve them raw data heheee&lt;/p>
&lt;p>Problem is, I cannot afford a server at the moment. And cloud really seems like
the only option to choose for high availability. Therefore, I did exactly what
you would expect from a Linux security-conscious person o.o&lt;/p>
&lt;p>Take my files, zip them, encrypt those fellas like no tomorrow, and finally
send them over to the big tech.&lt;/p>
&lt;p>That is right, I am encrypting all my data before sending it online. Crazy right?
Who would have thought? No but for real, I do not know why I did not start doing it
before. For the ones that want even more security over their data, you may as
well just encrypt it multiple times with different keys before sending it
online.&lt;/p>
&lt;h2 id="binbash">/bin/bash&lt;/h2>
&lt;p>A couple of months ago I saw somebody mention it inside one of the Linux
servers that I am in. I did not give it too much thought at that time, I thought
that local backups were all I needed to stay safe. But after realizing the
problem (two weeks ago), I started digging into the tool and realized how cool
it actually is. All I had to do was create a project inside the Google API
console, create a basic consent screen, generate a client ID &amp;amp; secret, and
BOOM! The dopamine hit I was looking for!&lt;/p>
&lt;p>I was able to mount my Google Drive as a &amp;ldquo;disk&amp;rdquo; onto my Linux filesystem. That
inspired me to create another backup script, which would serve the cloud with
my encrypted data multiple times a day.&lt;/p>
&lt;p>I am not joking when I say that this tool is fucking awesome! Just look at what
it takes to mount my Google Drive to /mnt: &lt;code>rclone mount main_gdrive: /mnt&lt;/code>&lt;/p>
&lt;p>For the curious individuals, &lt;a href="https://rclone.org/drive/">this&lt;/a> is the guide I
followed, and this is my new &lt;a href="https://gist.github.com/0xdeadbeer/be247747968840f3748ffa7a60d0f0be">backup
script&lt;/a>&lt;/p>
&lt;blockquote>
&lt;p>Hint: It is recommended to encrypt your Rclone config
(&lt;code>~/.config/rclone/rclone.conf&lt;/code>) also. Fortunately, that functionality is
already provided by Rclone whenever you use it so you do not have to
encrypt/decrypt it on your own. On the other hand, you may choose to do so to
have more control over what algorithm to use when encrypting the config. But
for more security, please encrypt your configs, since they usually hold all
sorts of sensitive information (especially in Rclone&amp;rsquo;s case)&amp;hellip;&lt;/p>&lt;/blockquote>
&lt;blockquote>
&lt;p>Note: It is likely that I will be forced to change my backup scripts
because of obvious privacy reasons. But I hope you get the idea.&lt;/p>&lt;/blockquote></description></item><item><title>Resources</title><link>http://0xdeadbeer.xyz/pages/resources/</link><pubDate>Fri, 14 Apr 2023 20:46:19 +0200</pubDate><guid>http://0xdeadbeer.xyz/pages/resources/</guid><description>&lt;h2 id="english-youtubers">English Youtubers&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://www.youtube.com/@melodysheep">Melodysheep&lt;/a>
&lt;ul>
&lt;li>Please, really consider watching his content. It is pure gold. No questions asked.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@veritasium">Veritasium&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@SomeOrdinaryGamers">SomeOrdinaryGamers&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@Computerphile">Computerphile&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@numberphile">Numberphile&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@joerogan">PowerfulJRE&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@JordanBPeterson">Jordan B. Peterson&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@lexfridman">Lex Fridman&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@LiveOverflow">LiveOverflow&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@bugswriter_">BugsWriter&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@LukeSmithxyz">Luke Smith&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@NetworkChuck">NetworkChuck&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@MentalOutlaw">Mental Outlaw&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@BenEater">Ben Eater&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@awesomekling">Andreas Kling&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@LinusGroh">Linus Groh&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@jdh">Jdh&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@CQUREAcademy">CQURE Academy&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@Seytonic">Seytonic&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@writeyourownoperatingsystem">Write your own Operating System&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@zanidd">Zanidd&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@GuidedHacking">Guided Hacking&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@TED">TED&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="science">Science&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://www.feynmanlectures.caltech.edu/">Feynman Lectures of Physics, Mathematics and Astronomy&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="favorite-japanese-youtubers">Favorite Japanese Youtubers&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://www.youtube.com/@nihongonomori2013">日本語の森&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@Herusuka">ヘルスカ&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@kun_neet">KUN ニート部&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@hanae0626">花江夏樹&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@ThatJapaneseManYuta">That Japanese Man Yuta&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@Dogen">Dogen&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="it-blogs">IT blogs&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://ohshint.gitbook.io/oh-shint-its-a-blog/">OH SHINT! It&amp;rsquo;s a blog&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://unixsheikh.com">Unix Sheikh&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.a1k0n.net/">Andy Sloane&amp;rsquo;s blog&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://lukesmith.xyz/">Luke Smith&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://marcocetica.com/">Marco Cetica&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.catb.org/esr/writings/">Eric&amp;rsquo;s Random Writings&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://sgfault.com">Segmentation Fault&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://tomverbeure.github.io/">Electronics etc&amp;hellip;&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://computer.rip/archive.html">Computers are bad&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://robertheaton.com/">Robert Heaton&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="old-fashioned-internet">Old-Fashioned Internet&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://yarchive.net/home.html">Yarchive&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://wiby.me/">Wiby&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://search.marginalia.nu/">Marginalia Search&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="linux--unix">Linux &amp;amp; Unix&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://linux.die.net/">Linux Die Documentation&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.gnu.org/manual/manual.html">GNU Manuals&lt;/a>&lt;/li>
&lt;li>&lt;a href="http://linux-training.be">Linux Training&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://makelinux.net">MakeLinux&lt;/a>&lt;/li>
&lt;li>&lt;a href="http://catb.org/esr/writings/taoup/html/">The Art of Unix Programming&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.csl.mtu.edu/cs4411.ck/www/">CS4411 Operating Systems Course&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://elixir.bootlin.com/linux/latest/source">Elixir&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://linux-kernel-labs.github.io/refs/heads/master/">Linux Kernel Teaching&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://0xax.gitbooks.io/linux-insides/content/">Linux Insides&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="research-paper-resources">Research Paper Resources&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://arxiv.org">ArXiv&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://paperswelove.org">Papers we love&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/@TwoMinutePapers">Two Minute Papers&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="psychology">Psychology&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://changingminds.org/">Changing Minds&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="talks">Talks&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://www.youtube.com/watch?v=LBvHI1awWaI">Why comfort will ruin your life | Bill Eckstrom&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.youtube.com/watch?v=esPRsT-lmw8">The most important lesson from 83,000 brain scans | Daniel Amen&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>Secure Linux Setup</title><link>http://0xdeadbeer.xyz/posts/secure-linux-setup/</link><pubDate>Wed, 12 Apr 2023 11:53:13 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/secure-linux-setup/</guid><description>&lt;p>This post is dedicated to the ones that have been in the Linux game for years
now or have just started experimenting, but do not have a very secure system.
But wait, what do I mean by secure? Well, a lot of factors come down to how
secure your system is. And by no means I am claiming that this will be a guide
to perfect security. Let alone perfect anonymity. That is simply because you
cannot be a hundred percent secure and anonymous online. It is a fact. What I
want to teach you with this post, is how to increase your anonymity. How to
increase your security. How to make your life easier in case something bad
happens to your data.&lt;/p>
&lt;p>Throughout the post you may notice how nicely all the security practices
connect. One being dependent of the other. Creating a nice security framework
for your computer.&lt;/p>
&lt;p>First off, you have to understand how important data is. You need to have a
reason to hide or protect it. The reason usually comes after some time when you
realize how much surveillance is happening on a tick-per-tick basis. The
possibility of you giving a shit about your data can go even lower if you are
still a teenager. After you get a job, mature, realize how cruel the world is,
you will start caring much more about freedom in general. And so should you
about Internet freedom, privacy, security, etc.&lt;/p>
&lt;h2 id="1-passwords">1 Passwords&lt;/h2>
&lt;p>Let&amp;rsquo;s talk &lt;del>basics&lt;/del> passwords. They are not that simple to deal with. I know
that. We all do. And so, let&amp;rsquo;s facilitate it to a concept that you are already
familiar with - Password Managers. No, I am not going to be selling you a
Password Manager, or telling you about this awesome service that helped me stay
secure for the past X years. Keeping your credentials on a third-party service
is not even a good option - as you can see
&lt;a href="https://www.youtube.com/watch?v=cRsn0PlnuvM">here&lt;/a>. I am going to give you an
open-source tool that has made my life eaiser when dealing with passwords. You
are free to find alternatives, but for me, this was the best I was able to
find.&lt;/p>
&lt;p>It is called &lt;a href="https://keepassxc.org/">KeePassXC&lt;/a>. It is cross-platform and you
can run it on Linux - which is exactly what we needed. Passwords are stored in
a file called a Database which contains groups. A group can either contain more
groups, or simply passwords. The whole database is by default encrypted with
the industry-standard AES256 and a key provided by the user (make sure it is a
long one that you can remember).&lt;/p>
&lt;p>For more security, the user is advised to distribute passwords across multiple
databases. For example:&lt;/p>
&lt;ul>
&lt;li>VMs database: passwords regarding all VMs on the user&amp;rsquo;s computer (VM&amp;rsquo;s
encrypted disk, users, etc.)&lt;/li>
&lt;li>Hardware database: passwords regarding user&amp;rsquo;s hardware (encrypted USB keys,
hard drives, etc.)&lt;/li>
&lt;li>Social database: passwords regarding social media&lt;/li>
&lt;li>Finance database: passwords regarding finance (bank accounts, crypto
accounts, etc.)&lt;/li>
&lt;li>Work database: passwords regarding your work&lt;/li>
&lt;/ul>
&lt;h2 id="2-vms-virtual-machines">2 VMs (Virtual Machines)&lt;/h2>
&lt;p>Virtual machines are so underrated for desktop usage. And that is sad because
they are so flexible and useful when it comes to security! Example of a VM
security framework:&lt;/p>
&lt;ul>
&lt;li>Gaming VM: strictly use for gaming
(&lt;a href="https://www.youtube.com/watch?v=BNLnTCqUMyY">#moreinfo&lt;/a>)&lt;/li>
&lt;li>Work VM: strictly use for work stuff&lt;/li>
&lt;li>Social VM: strictly use for social media&lt;/li>
&lt;li>&amp;hellip;&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>Hint: notice how password databases can now be isolated across your VMs. So
each VM has only the passwords it needs.&lt;/p>&lt;/blockquote>
&lt;h2 id="3-backups">3 Backups&lt;/h2>
&lt;p>Backing up important information is very important. Especially if your income
depends on it. This might include the password databases I have mentioned
earlier, high importance VMs, pictures, projects, work, presentations, plans,
goals, etc. First, if you have some money to spare, invest 100-200 dollars into
backup disks because you are gonna need them. Else you can simply try to get
them over a longer period of time, or backup your things to USB sticks. After
that, you have two options:&lt;/p>
&lt;ul>
&lt;li>Find some backup tool that does all the hard work&lt;/li>
&lt;li>Script your own tool - giving you more freedom to customize the backup
system&lt;/li>
&lt;/ul>
&lt;p>In my case specifically, I like designing the structure of my computer. And so,
I created &lt;a href="https://gist.github.com/0xdeadbeer/1393329c9d08b858befe384cbf1e2142">my own
script&lt;/a>.
You can use it if you want. With that step done, you have to automate the
process of calling this tool X times per day. X may depend on how you design
your backup system, but for me 3 to 2 times each day is more than enough.&lt;/p>
&lt;blockquote>
&lt;p>Hint: such automation is usually achieved with
&lt;a href="https://victoria.dev/blog/a-cron-job-that-could-save-you-from-a-ransomware-attack/">cronjobs&lt;/a>.&lt;/p>&lt;/blockquote>
&lt;p>Another cool thing you can do is self-host a server and send backups over
there. Or even better, agree with more people to host a server somewhere and
each have your own copies over there. Of course, do not forget about encryption
and access permissions ;)&lt;/p>
&lt;blockquote>
&lt;p>Hint: backups over network can be achieved with
&lt;a href="https://linux.die.net/man/1/rsync">rsync&lt;/a> or &lt;a href="https://rclone.org/">rclone&lt;/a>
as far as I know.&lt;/p>&lt;/blockquote>
&lt;h2 id="4-file-recovery">4 File Recovery&lt;/h2>
&lt;p>Be careful how you delete files. Especially if you are going to be selling your
disk or something. Data may not be 100% deleted like you think it might be.
That is why I never buy/sell used disks. Because it is just not worth it. For
the sake of security, whenever you delete a file, it usually just gets flagged
as &amp;ldquo;NEW DATA, OVERWRITE ME PLEASE&amp;rdquo;. And so you have not actually deleted the
contents, you have just removed it from the filesystem&amp;rsquo;s structure and told it
that what was once a file is now usable space waiting to be overwritten.&lt;/p>
&lt;p>And guess what, that data which has not been yet overwritten can be read. And
pretty easily I might add.
&lt;a href="https://www.youtube.com/watch?v=0WcrgvhO_mw">#moreinfo1&lt;/a>
&lt;a href="https://wiki.archlinux.org/title/file_recovery">#moreinfo2&lt;/a>&lt;/p>
&lt;p>But how do you make sure it is actually deleted? Well, a good tool to look into
is &lt;a href="https://wiki.archlinux.org/title/Securely_wipe_disk">shred&lt;/a> (Securely Wipe
Disk)&lt;/p>
&lt;blockquote>
&lt;p>Hint: a cool one-liner I have learned recently from &lt;a href="https://www.youtube.com/channel/UC2eYFnH61tmytImy1mTYvhA">Luke
Smith&lt;/a> is &lt;code>dd if=/dev/random of=/tmp/erase_secrets; rm -rf /tmp/erase_secrets&lt;/code>. The
command fills the disk with random data (overwriting all the
not-fully-deleted-data and then deallocates the file from the file-system).&lt;/p>&lt;/blockquote></description></item><item><title>Books</title><link>http://0xdeadbeer.xyz/posts/books/</link><pubDate>Sun, 09 Apr 2023 00:46:11 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/books/</guid><description>&lt;p>Everything started with walking, understanding what people around me were
saying, recognizing the dangers that are out there, learning cultures, to
eventually being broad to an institution that is supposed to teach me about
&lt;em>life&lt;/em> - school. That is where I was forced to read. Everyday, non stop, till I
reached that deadline and had to write a summary of what I learned during that
period. &amp;ldquo;Is this what life is all about?&amp;rdquo; I asked myself. &amp;ldquo;So I will be forced
to read books and study topics that I have never seen being used in real life for
the next 9 years (minimum)?&amp;rdquo;&lt;/p>
&lt;p>I have passed the first 9 grades studying my state, basic algebra, sociology,
basic law, making a small website, biology, etc. etc. Yet if I was to be tasked
with a minor issue in real life, I would find an excuse that would delay my action
or completely throw the problem out of my life altogether. How is it, that most
kids nowadays hate learning? The second they hear the word &lt;em>math&lt;/em> their first
emotions are suffering, pain, and boredom.&lt;/p>
&lt;p>We went from encouraging the contributions to humanity to making it seem like
it is the dullest activity someone could be doing to keep themselves busy. In my
opinion, we have created that by constructing a wrong educational system over
time and letting social media companies get away with selling their social
platforms to us. &amp;ldquo;What does social media have to do with learning?&amp;rdquo; you might
ask. Let me reply to that with &amp;ldquo;When iss the last time you were in the middle of
studying something very important, got frusturated at it, and decided to
distract yourself for a little while?&amp;rdquo;&lt;/p>
&lt;p>The majority of us does that on a daily basis and we cannot deny the
uselessness of social media. No matter how much you try to hide it, you will know
that most of it does not provide any sort of value whatsoever and is just a
time killer engineered in a specific way to extrapolate as many minutes of your
attention as possible.&lt;/p>
&lt;p>&amp;ldquo;Oh, but you can educate yourself through social media&amp;rdquo; - Ignoring sites like
Youtube, how in world do you think that those 200 characters that you can fit
into your post will give anyone a good understanding of any topic.&lt;/p>
&lt;p>&amp;ldquo;Oh, but I need to talk to my friends&amp;rdquo; - Yup, ever heard of SMS before? Look, I
would totally understand.. if it was just ONE application. Why the fuck does
the majority have 4 platforms that all provide the same god damn service. Some
alternatives to SMS may include email, IRC, self-hosted chat server (if you
know what you are doing), matrix, etc.&lt;/p>
&lt;p>Over the course of my teenagehood I realized how strongly this can impact one&amp;rsquo;s
thinking abilities. In just a span of a year I turned my brain upside down and
had completely the opposite opinions from what I used to have before. How did
that happen though? Well, I deleted a good part of the social media I used to
use, I started investing more time in myself, I started talking and listening
to myself, I started seeing failure as the potential to grow rather than what I
was taught at school (failure = failed individual), and what I noticed in the
last 2 to 4 months was what I now call &lt;em>The Deception of Everything&lt;/em>.&lt;/p>
&lt;p>Biology, Sociology, Psychology, Mathematics, Physics!! They are all connected
with what I initially thought was the only field I would ever truly admire and
love! Computers! They are all interconnected subjects! A firing of neurons
finally made sense! What is so special about all of those subjects, and.. any
subject for that matter!! There will always be a reason people have invented it
and if I had to study it in school, there was probably a good reason. Because
it is all just connected and interesting! &amp;ldquo;No shit&amp;rdquo; you might think, but you
see, that is the problem. The fact that most of the people around me have not
realized it by now scares the shit out of me. Or at least.. that is how it
seems.&lt;/p>
&lt;p>The mentioned event also occured in the most perfect timing it could have. As I
realized it, I was also in the middle of figuring out that books are way more
interesting than what I was taught at school. Here, I am not forced to learn
anything, I do not explore because I have to. I am doing it because it is so fun
it makes me start laughing by just thinking of it. I felt such an idiot to
finally realize how stupidy interesting it actually is I stayed there in my
dark room for 5 minutes laughing. And as I am now scrolling through the Amazon&amp;rsquo;s
homepage of books, I cannot help myself but to smile everytime I see a book that
sparkles my interest.&lt;/p></description></item><item><title>About &amp; Contact</title><link>http://0xdeadbeer.xyz/pages/about-me/</link><pubDate>Sat, 08 Apr 2023 19:24:58 +0200</pubDate><guid>http://0xdeadbeer.xyz/pages/about-me/</guid><description>&lt;p>I am Kevin Jerebica. I live in Slovenia and I have a strong passion for
programming, cyber security, data protection, languages, reading and learning about the world.
I study Japanese (or at least I like to think so). I deeply care about software
freedom and so I primarily like to deal with free and open-source software
solutions, though I do believe in healthy business practices as well.
Many of my ideas and goals come from my love towards space. I cannot
stop dreaming about it. I have a general appreciation for art and literature.&lt;/p>
&lt;p>Public Knowledge Archive: &lt;a href="http://archive.0xdeadbeer.xyz/">http://archive.0xdeadbeer.xyz/&lt;/a> &lt;br>
Public Key: &lt;a href="http://archive.0xdeadbeer.xyz/public-key.txt">http://archive.0xdeadbeer.xyz/public-key.txt&lt;/a> &lt;br>
Email: &lt;a href="emailto://jerebicakevin@gmail.com">jerebicakevin@gmail.com&lt;/a> &lt;br>
YouTube: &lt;a href="https://youtube.com/@0xdeadbeer">@0xdeadbeer&lt;/a> &lt;br>
Github: &lt;a href="https://github.com/0xdeadbeer">@0xdeadbeer&lt;/a>&lt;/p></description></item><item><title>Switching to Linux</title><link>http://0xdeadbeer.xyz/posts/switching-to-linux/</link><pubDate>Sat, 08 Apr 2023 15:44:15 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/switching-to-linux/</guid><description>&lt;p>Going from hearing about this word &amp;ldquo;Linux&amp;rdquo; from one of my computer geek
friends, to installing it as my first VM, to making the switch, to then spread
the word about how cool it is and the practical benefits that it can provide. I
love Linux! And I got tied into it is ecosystem so hard that going back to
Windows would instantly harm my productivity and make everything much more
difficult. Ignoring the war of Windows - MacOS - Linux, I am going to talk about
my switch. How did I switch to Linux? How can YOU switch to Linux? What is the
safest way to switch without losing all of your data that you accumulated over
the years?&lt;/p>
&lt;p>Before switching, here is something you have to know. Linux will be different
than Windows and even if you think you wll be okay without Windows because of
XYZ (say for example: you are a software engineer or something and know your
way around computers), you must accept the fact that there will be a learning
process lying ahead of you. And if you wll skip it, it will most likely end
badly. Keep your curiosity and goals up and you might just make it passed the 5
reinstalls you are most likely going to do before getting quite comfortable with
Linux.&lt;/p>
&lt;p>Much of the applications you used on Windows will have different names on
Linux, and at some point or another, you will have to get familiar with the
terminal. So the sooner you get used to CLI (Command Line Interface), the
better. Watch out for the commands you copy-paste into your terminal,
especially at the beginning. Not just because someone might want to steal your
data, but also because you might end up breaking your computer accidentally.
Acknowledge that you are going to make mistakes in the future and start making
backups of your files as soon as you know you are storing valuable information
into your disk. That was (and still is) one of the most fun challenges for me
personally. I love designing a whole backup system for my Linux and I am
constantly updating it as my demands are slowly shifting. For example: recently
I have been introduced the idea of file recovery - and even though I knew you
could technically read deleted files off the disk it did not scare me that much.
But now that I know how easy it is, I am paying a lot more attention to how my
backup scripts copy files from one disk to another. And that is the beauty!
Using Linux will be so cool you cannot even imagine! The deeper you will go the
more interesting it will get!&lt;/p>
&lt;p>With that said, you might think that my switch was flawless? Pfttt, do not make
me laugh. Did I ever tell you about that one time when I selected the wrong
disk for installation and ended up losing 1TB of data? Not to mention all the
hiccups I had to deal with, such as dependency hell, grub booting me into a
shell rather than a display manager, Windows deciding to fuck up my Linux
installation (that is when I was still dual booting it), and so on. In short,
it was a pain to get where I am today. And that is what taught me Linux. Making
mistakes is the key to learning.&lt;/p>
&lt;p>Thankfully, after 2-3 solid years of experimenting with Linux, I can say that
I am pretty stable. I know my way around Arch quite well, but I am not negating
the fact, that I still have a lot to learn. There is probably tens of thousands
of tools in the Arch Wiki that I have not heard of. And if you happen to know
some cool tools, for crying out loud do not hesitate to share them online.
Linux-passionates will love you for sharing those incredible resources, or for
just having the thought of sharing. And so, that is what I want to achieve with
this blog. Sharing is carying.&lt;/p></description></item><item><title>Good Content</title><link>http://0xdeadbeer.xyz/posts/how-to-find-good-content/</link><pubDate>Sat, 08 Apr 2023 00:33:53 +0200</pubDate><guid>http://0xdeadbeer.xyz/posts/how-to-find-good-content/</guid><description>&lt;p>These days finding good content on the internet is a real challenge. A lot of
the times I find myself staring at the monitor wondering what I should search
for, just to find that juicy content that goes into the detail of how something
works, and also does not annoy me with advertisements, newsletters, and the
like.&lt;/p>
&lt;p>The original idea for the internet was really simple, a place for folks to
share, store, and find information. It was no more than static websites serving
HTML and CSS. Now that we have big tech tracking us on practically every corner
of the Internet, it is really difficult to find a clean resource you could say.
Search algorithms prefer clicks, revenue, advertisements, and beauty over
simplistic but gold content.&lt;/p>
&lt;p>If you are a fellow searching for structured content and want answers RIGHT NOW
rather than in the next 10 minutes, here is what you have to know. Unless you
are a person with serious mental diseases, the following applies to you. Your
brain is made to be flexible, to adapt to new environments. Whether they are
filled with Netflix &amp;amp; Chill, reading books, doing fun activities, interacting
with people, or anything else. And your brain may well have a favorite learning
style, but that does not mean that you should limit yourself to just that
learning style. In fact, you have to challenge your brain to step out of its
comfort zone and learn, think, adapt, and consider. This is why I think
learning styles are nothing more than temporary classification of how your
brain is preferenced to devour information from the outside world.&lt;/p>
&lt;p>I only realized this after coming into IT, at the beginning I thought that
learning was going to be as simple as a watch &amp;amp; learn process. Well, after 5
years of being into IT, I can safely say that I was wrong. Most learning
requires the will to read, explore, dig deeper, and most importantly..
experiment!&lt;/p>
&lt;p>If this seems new to you, or even strange, know that it will show up sooner or
later in your career and the sooner you start experimenting, the easier and
more fun it will be! So why not start today? Get yourself a damn book, go read
some research papers online, share, learn, adapt, wonder, and grow.&lt;/p>
&lt;p>I wll be leaving you with some good resources that I accumulated over the last
year.&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://search.marginalia.nu/">Marginalia Search&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://neocities.org/browse">Neocities&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://searx.thegpm.org/">SearX&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://wiby.me">Wiby.me&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://paperswelove.org/">Papers we love&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://linux.die.net/">Linux Documentation&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.gnu.org/manual/manual.en.html">GNU Manuals&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>More resources are available in the resources page.&lt;/p></description></item></channel></rss>