<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mj Gealogo</title>
    <description>The latest articles on DEV Community by Mj Gealogo (@mj_gealogo).</description>
    <link>https://dev.to/mj_gealogo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2902172%2F9cc83c14-68c4-49ca-862d-e37b95b70426.png</url>
      <title>DEV Community: Mj Gealogo</title>
      <link>https://dev.to/mj_gealogo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mj_gealogo"/>
    <language>en</language>
    <item>
      <title>Unmasking the Man in the Middle – The Secrets of Secure Connections</title>
      <dc:creator>Mj Gealogo</dc:creator>
      <pubDate>Sat, 05 Jul 2025 01:05:00 +0000</pubDate>
      <link>https://dev.to/mj_gealogo/unmasking-the-man-in-the-middle-the-secrets-of-secure-connections-2128</link>
      <guid>https://dev.to/mj_gealogo/unmasking-the-man-in-the-middle-the-secrets-of-secure-connections-2128</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;After stumbling upon the powerful Burp Suite tool, I became fascinated by how "Man-in-the-Middle (MITM) attacks" actually work. It's not just movie magic; it's a real threat that highlights the cleverness behind our everyday internet security. This post will pull back the curtain on how secure connections are established, where attackers try to sneak in, and some of the surprising questions that popped up during my research.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Padlock's Promise: How Your Browser Stays Safe with HTTPS
&lt;/h2&gt;

&lt;p&gt;Ever wonder how that little padlock icon appears in your browser, assuring you your connection is safe? It all comes down to a clever cryptographic dance between your browser and the website, powered by something called HTTPS. Here's how it works:&lt;/p&gt;

&lt;p&gt;The Handshake Begins: When you type in a website address starting with https://, your browser politely sends a "hello" message to the website's server. The server responds by handing over its digital certificate – essentially, its official ID card, confirming its identity.&lt;/p&gt;

&lt;p&gt;The Identity Check: Your Browser's Trusty Detectives (The CA's Role): This is where the magic of online trust happens! Think of your browser as having a built-in "trusted contacts" list of special organizations called Certificate Authorities (CAs). Your browser immediately performs a series of crucial checks on the website's certificate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Is it from a trusted CA? Your browser ensures the certificate was issued by one of the CAs on its pre-installed trusted list. If not, alarm bells start ringing immediately!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is it authentic and untampered? This is the heart of the security. The CA doesn't just issue the certificate; they put their digital signature on it. Your browser then performs a cryptographic verification: it calculates a unique "fingerprint" (a hash) of the certificate's content and then uses the CA's public key (from its trusted list) to decrypt the CA's digital signature. If the decrypted signature matches the fingerprint your browser just calculated, it's a cryptographic guarantee! This proves the certificate is genuine, hasn't been altered, and truly belongs to the website it claims to be. It's like checking a government official's tamper-proof seal on a passport – if it checks out, you know it's legitimate.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is it valid? Your browser also quickly checks if the certificate hasn't expired or been revoked, ensuring it's still current.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Secret Key Exchange: Building the Private Line: Once your browser has thoroughly trusted the website's ID, it finds the website's public key hidden inside the verified certificate. Your browser then creates a brand new, super-secret, random session key. It uses the website's public key to "lock" this session key inside a digital "lock box" and sends it securely back to the server.&lt;/p&gt;

&lt;p&gt;The Private Conversation: Data Flows Securely: The website server is the only one with the matching private key that can unlock that digital box and retrieve the session key. Now, both your browser and the server possess the exact same secret session key. From this point on, all communication – your passwords, banking details, every click and keystroke – is rapidly encrypted and decrypted using this shared, symmetric session key. This method is incredibly fast and keeps your data private throughout your entire visit.&lt;/p&gt;

&lt;h2&gt;
  
  
  When Trust is Broken: How Man-in-the-Middle Attacks Work
&lt;/h2&gt;

&lt;p&gt;Despite the robust HTTPS process, attackers are always looking for weaknesses. Here’s a simplified look at how an attacker might attempt to intercept your "secure" connection, often by exploiting human trust:&lt;/p&gt;

&lt;p&gt;The Impersonation: The attacker positions themselves between you and the legitimate website. When you try to connect, they intercept your request and immediately present your browser with a fraudulent digital certificate instead of the real one.&lt;/p&gt;

&lt;p&gt;Breaking the Trust Chain: Your browser, diligently following its security protocols, receives this fake certificate and attempts to validate it against its list of trusted CAs. Crucially, because this certificate is not signed by a legitimate, trusted CA (or its signature is invalid/tampered), your browser's security checks fail. This triggers a prominent security warning, loudly alerting you that "Your connection is not private" or similar.&lt;/p&gt;

&lt;p&gt;The User Deception: This is often the attacker's golden opportunity. The success of many MITM attacks hinges on you, the user, ignoring these critical warnings and choosing to "proceed anyway." Attackers sometimes use social engineering or create seemingly urgent pop-ups to trick you into bypassing these warnings.&lt;/p&gt;

&lt;p&gt;The Silent Interception: If you proceed despite the warning, your browser will unknowingly use the attacker's public key (from their fake certificate) to encrypt the session key. The attacker can then use their own corresponding private key to decrypt all traffic sent from your browser. They can read it, modify it (e.g., change transaction details), and then re-encrypt it using the legitimate website's public key to forward it to the actual server. The user and the server remain completely unaware that their communication is being silently intercepted and potentially manipulated.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deep Dive: Unraveling the "Cracking" Question and Key Agreement
&lt;/h2&gt;

&lt;p&gt;Are CA Public Keys Vulnerable? (And Why They Last So Long)&lt;br&gt;
"Since CAs publish their public keys, shouldn't they be rotated frequently to prevent them from being 'cracked'?" This is an excellent question!&lt;/p&gt;

&lt;p&gt;If an attacker could obtain a CA's private key, they could issue fraudulent certificates for any website, allowing them to perform devastating Man-in-the-Middle attacks that your browser would trust. However, CA public keys themselves are astronomically hard to "crack" by brute force, designed with lifespans of 20-30 years or more.&lt;/p&gt;

&lt;p&gt;The reason for this long lifespan is because of the logistical nightmare:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Imagine if every few years, all CAs changed their root keys. Every single computer, phone, and smart device would need an immediate update to trust the new keys, or suddenly, almost the entire internet would show security warnings! This logistical nightmare ensures stability for the entire web.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The CA's Role: Validation and Signing (Revisited)
&lt;/h2&gt;

&lt;p&gt;Before issuing a certificate, the website owner first creates a Certificate Signing Request (CSR). This CSR contains the website's public key and identifying information like its domain name. This is the only point at which the CA directly handles the public key.&lt;/p&gt;

&lt;p&gt;The CA's crucial job is to act as a trusted third party. They perform a rigorous validation process to ensure the entity requesting the certificate legitimately controls the domain. Once validated, the CA uses its own highly protected private key to digitally sign the CSR, transforming it into the public certificate your browser receives. This signature is the CA's cryptographic guarantee that the public key within the certificate genuinely belongs to the verified website, giving your browser the ultimate seal of approval.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Session Key: The True Indicator of a Secure Connection
&lt;/h2&gt;

&lt;p&gt;A truly secure connection is established through the successful completion of the TLS Handshake. In the final step of this handshake, both your browser (the client) and the server send a "Finished" message, confirming that the handshake was successful and that they have both secretly agreed upon the exact same session key. But how is this shared secret session key actually agreed upon?&lt;/p&gt;

&lt;h3&gt;
  
  
  RSA Key Exchange:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Client Encrypts Key: After successfully verifying the server's certificate, your browser generates a random session key. It then uses the server's public key (from the trusted certificate) to encrypt this session key.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Server Decrypts Key: The server receives the encrypted data and uses its unique private key to decrypt it, instantly revealing the session key. Now, both sides have the same secret.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Diffie-Hellman Key Exchange (Often with "Perfect Forward Secrecy"):
&lt;/h3&gt;

&lt;p&gt;This method is more common today and offers stronger security, particularly "Perfect Forward Secrecy" (PFS), meaning even if the server's private key is compromised later, past conversations remain secure. Let's use the classic paint mixing analogy to understand Diffie-Hellman:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Publicly Agreed Base Color: First, you (the client) and the server publicly agree on a common starting paint color that everyone can see. Let's say it's Yellow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Secret Private Colors: Both you and the server secretly choose your own private colors. Let's say yours is Blue and the server's is Red. Neither reveals their private color.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;First Mix &amp;amp; Exchange: You mix the public Yellow with your secret Blue to get Green. The server mixes the public Yellow with its secret Red to get Orange. You then publicly send each other your mixed colors (Green and Orange).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Second Mix &amp;amp; The Magic: Now for the magic part! You take the Orange paint you received from the server and mix in your own original secret color, Blue. The server takes the Green paint it received from you and mixes in its own original secret color, Red.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Shared Secret Achieved! Magically, both of you have created the exact same final color (e.g., "Muddy Brown")! An eavesdropper only saw the initial Yellow and the intermediate Green and Orange mixes, but could never derive the final "Muddy Brown" without knowing one of the original secret colors (Blue or Red). This "Muddy Brown" is your shared session key!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Understanding the intricacies of HTTPS, from the initial handshake to the secure session key exchange, reveals the sophisticated layers of protection that keep our online activities private. It also highlights why paying attention to those browser security warnings is so critical – they're often the only line of defense against a "Man-in-the-Middle" attack. Stay safe out there!&lt;/p&gt;

</description>
      <category>security</category>
      <category>cybersecurity</category>
      <category>networking</category>
      <category>learning</category>
    </item>
    <item>
      <title>I Built a Game in Under an Hour with Amazon Q CLI (and Here's What Happened)</title>
      <dc:creator>Mj Gealogo</dc:creator>
      <pubDate>Tue, 27 May 2025 10:16:26 +0000</pubDate>
      <link>https://dev.to/mj_gealogo/i-built-a-game-in-under-an-hour-with-amazon-q-cli-and-heres-what-happened-3gp9</link>
      <guid>https://dev.to/mj_gealogo/i-built-a-game-in-under-an-hour-with-amazon-q-cli-and-heres-what-happened-3gp9</guid>
      <description>&lt;h2&gt;
  
  
  The challenge was set:
&lt;/h2&gt;

&lt;p&gt;Build a game using the Amazon Q CLI for a shot at scoring a coveted T-shirt. As a developer always up for a new challenge, I dove in headfirst. My goal? To create a functional shooting game in under an hour, relying solely on the command line and Amazon's new AI assistant. The result was a whirlwind of rapid development, unexpected hurdles, and a revealing glimpse into the future of coding.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fymajgcezbgy6odsa4mxd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fymajgcezbgy6odsa4mxd.png" alt="Image description" width="756" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting the Stage: From Docker to Local Dev
&lt;/h2&gt;

&lt;p&gt;My initial thought was to keep my development environment clean and containerized using Docker. However, I quickly hit a roadblock. The game I envisioned, a dynamic shooter, would be built with Pygame, a popular Python library for game development. Pygame, by its nature, requires a graphical interface to render the game window, something my Docker setup wasn't configured for.&lt;/p&gt;

&lt;p&gt;Pivoting quickly, I decided to set up Amazon Q and the necessary dependencies locally on my machine. A few commands later, I had the Amazon Q CLI installed and was ready to roll. The setup was surprisingly straightforward. A simple &lt;code&gt;q login&lt;/code&gt; authenticated me, and &lt;code&gt;q chat&lt;/code&gt; threw me right into an interactive session with the AI.&lt;/p&gt;

&lt;p&gt;One of the most intriguing aspects of the Amazon Q CLI is its interactive nature. It doesn't just spit out code; it asks for permission to write files, make edits, and even run commands to install dependencies or test the application. This collaborative approach felt less like using a tool and more like pair programming with an incredibly fast partner.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Vague Idea to Concrete Game
&lt;/h2&gt;

&lt;p&gt;With the clock ticking, I started with a broad prompt:&lt;/p&gt;

&lt;p&gt;"I want to create a shooting type game like gun mayhem"&lt;/p&gt;

&lt;p&gt;Amazon Q responded with a foundational Pygame structure. It was a good start, but I needed to be more specific to get the game I had in mind. My next prompt drilled down into the core gameplay loop:&lt;/p&gt;

&lt;p&gt;"I want to verse an enemy where each level it gets more difficult to beat"&lt;/p&gt;

&lt;p&gt;This is where the AI started to shine. It began to scaffold out the game logic, introducing concepts of player and enemy characters, and a basic level structure. To add more flavour and strategic depth, I then requested:&lt;/p&gt;

&lt;p&gt;"Include power ups such as health, speed, rapid fire, damage boost"&lt;/p&gt;

&lt;p&gt;Amazon Q integrated these features, creating the code for power-up items that would randomly spawn on the screen. The game was starting to take shape, and all within the first half-hour.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Inevitable Bugs and a Helping Hand
&lt;/h2&gt;

&lt;p&gt;No development process is without its bumps, and working with an AI is no exception. A significant issue arose with the game's platforms; they were generated at a height that was impossible for the player to jump onto. I pointed this out to Amazon Q, and after a bit of back and forth, it adjusted the parameters to create accessible platforms.&lt;/p&gt;

&lt;p&gt;I also encountered a few runtime errors. Instead of spending precious minutes debugging the code myself, I simply fed the error messages back to my AI partner. In most cases, Amazon Q was able to identify the issue and propose a fix, which it would then apply with my permission. This rapid, iterative cycle of prompting, testing, and AI-assisted debugging was the key to making progress so quickly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fihzhohj25asi3j527oy5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fihzhohj25asi3j527oy5.png" alt="Image description" width="628" height="124"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The AI's Limits: A Glimpse of the Future's Challenges
&lt;/h2&gt;

&lt;p&gt;As the codebase grew, a noticeable pattern emerged. Amazon Q, which had been lightning-fast with the initial scaffolding, began to slow down. Its responses took longer, and the accuracy of its code suggestions started to decline. It was as if the increasing complexity of the project was taxing its ability to maintain context and generate precise, error-free code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkf6j3v7hcl063lih2mc8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkf6j3v7hcl063lih2mc8.png" alt="Image description" width="717" height="175"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Time's Up: The Final Product
&lt;/h2&gt;

&lt;p&gt;When the hour was up, I had a functioning, if not perfectly polished, shooting game. There was a player character, levels that became more challenging, and a variety of power-ups to collect. It wasn't "Gun Mayhem," but it was a playable game, created from scratch in under 60 minutes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExbHA5OWFjdThnbDc0N2RrcnlubGdsbTRncDdodXJqYmpnMnkzdGlicCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F89VJuxlpAjNWbeSKLJ%2Fgiphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExbHA5OWFjdThnbDc0N2RrcnlubGdsbTRncDdodXJqYmpnMnkzdGlicCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F89VJuxlpAjNWbeSKLJ%2Fgiphy.gif" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My journey with the Amazon Q CLI was a fascinating one. It demonstrated the incredible potential of AI to accelerate the development process, especially in the initial stages of a project. The ability to rapidly prototype ideas and get a working foundation in minutes is a game-changer. However, it also underscored the current limitations of the technology. As projects grow in complexity, the reliance on a human developer's expertise to guide, correct, and optimize the AI's output becomes even more critical.&lt;/p&gt;

&lt;p&gt;For now, I've got a cool little game and a great story to tell. And who knows, maybe I'll even get that T-shirt.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>awschallenge</category>
      <category>ai</category>
      <category>gamedev</category>
    </item>
  </channel>
</rss>
