<?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: Siddharthrane07</title>
    <description>The latest articles on DEV Community by Siddharthrane07 (@siddharthrane07).</description>
    <link>https://dev.to/siddharthrane07</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1605450%2F8a02b0b6-5a6d-4c09-9e2e-0b7103fc0a75.png</url>
      <title>DEV Community: Siddharthrane07</title>
      <link>https://dev.to/siddharthrane07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/siddharthrane07"/>
    <language>en</language>
    <item>
      <title>Building ScamShield AI: Week 3 — The Dual-Network Trap: Locking Down a Headless Browser Sandbox</title>
      <dc:creator>Siddharthrane07</dc:creator>
      <pubDate>Sat, 21 Nov 2026 11:52:26 +0000</pubDate>
      <link>https://dev.to/siddharthrane07/building-scamshield-ai-week-3-the-dual-network-trap-locking-down-a-headless-browser-sandbox-1j31</link>
      <guid>https://dev.to/siddharthrane07/building-scamshield-ai-week-3-the-dual-network-trap-locking-down-a-headless-browser-sandbox-1j31</guid>
      <description>&lt;h2&gt;
  
  
  🛡️ ScamShield AI: Week 3 Build Log
&lt;/h2&gt;
&lt;h3&gt;
  
  
  The Dual-Network Trap: Building an Adversarially Verified Browser Sandbox
&lt;/h3&gt;




&lt;h3&gt;
  
  
  🚨 The Mission This Week
&lt;/h3&gt;

&lt;p&gt;In &lt;a href="https://dev.to/"&gt;Week 2&lt;/a&gt;, we tackled &lt;strong&gt;Stage 1&lt;/strong&gt;: hardening our inspection proxy with fail-closed &lt;code&gt;iptables&lt;/code&gt; and SSRF prevention.&lt;/p&gt;

&lt;p&gt;This week was all about &lt;strong&gt;Stage 2 &amp;amp; Stage 3: The Browser Container &amp;amp; Orchestration&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The goal: &lt;strong&gt;Run an automated Headless Chromium browser to visit live, weaponized scam URLs (fake bank KYC portals, malicious APK delivery pages, phishing sites) without allowing the attacker to attack our infrastructure.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If an exploited page escapes Chromium, it must find itself trapped in an isolated network with &lt;strong&gt;zero default gateway, zero direct internet, and zero ambient privileges&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here is how we designed a dual-network sandbox, killed covert egress channels (WebRTC, QUIC, DoH), preserved Chromium's internal sandbox, and verified it against a &lt;strong&gt;25-checkpoint adversarial test matrix&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  🏛️ Architecture: The "Air-Gapped" Dual-Network Model
&lt;/h3&gt;

&lt;p&gt;Most Docker setups connect containers to a single shared bridge network. If you run a browser that visits malicious URLs on a standard Docker bridge:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It has a default gateway to the public internet.&lt;/li&gt;
&lt;li&gt;It can directly query Docker's embedded DNS server (&lt;code&gt;127.0.0.11&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;An attacker can bypass your inspection proxy simply by using unproxied UDP sockets, direct IP connections, or raw sockets.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To prevent this, we created a &lt;strong&gt;Dual-Network Architecture&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;       [ Malicious URL / External Web ]
                      ▲
                      │ (Public Traffic Only)
                      ▼
        ┌───────────────────────────┐
        │   scamshield_external     │ (Standard Docker Bridge with Internet)
        └─────────────┬─────────────┘
                      │ eth1
                      ▼
        ┌───────────────────────────┐
        │  Track C Inspection Proxy │ (Dual-Homed: eth0 + eth1)
        │   (mitmdump + iptables)   │ - Forwarding DISABLED in kernel
        └─────────────▲─────────────┘ - Strict boundary between doors
                      │ eth0 (172.28.10.2)
                      ▼
        ┌───────────────────────────┐
        │  scamshield_internal      │ (INTERNAL ISOLATED NETWORK)
        └─────────────┬─────────────┘ - NO Gateway (gateway: null)
                      │               - NO External DNS
                      ▼ eth0 (172.28.10.3)
        ┌───────────────────────────┐
        │ Browser Sandbox Container │ (Zero ambient capabilities)
        │  (Chromium / Playwright)  │ - CapDrop=ALL, NoNewPrivs=true
        └───────────────────────────┘ - CAN ONLY TALK TO 172.28.10.2:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  The Rules of the Sandbox:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Browser Container&lt;/strong&gt; sits exclusively on &lt;code&gt;scamshield_internal&lt;/code&gt;. It has &lt;strong&gt;no default route&lt;/strong&gt; to the internet. If it tries to send a packet directly to &lt;code&gt;8.8.8.8&lt;/code&gt; or &lt;code&gt;169.254.169.254&lt;/code&gt;, the kernel immediately raises &lt;code&gt;ENETUNREACH&lt;/code&gt; (Network is unreachable).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Proxy Container&lt;/strong&gt; is dual-homed. It listens on &lt;code&gt;eth0&lt;/code&gt; (internal door) and fetches outbound traffic through &lt;code&gt;eth1&lt;/code&gt; (external door).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kernel IP Forwarding is Disabled&lt;/strong&gt;: The proxy container is explicitly forbidden from routing packets between interfaces (&lt;code&gt;net.ipv4.ip_forward = 0&lt;/code&gt;). It operates purely at the application layer via our vetted inspection addon.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🧠 Lesson 1: The "Lazy Docker" Anti-Pattern (&lt;code&gt;--no-sandbox&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;Search for "Playwright inside Docker" on StackOverflow or GitHub, and almost every tutorial tells you to launch Chromium like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# ❌ THE DANGEROUS WAY&lt;/span&gt;
&lt;span class="n"&gt;browser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;playwright&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chromium&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;launch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"--no-sandbox"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"--disable-setuid-sandbox"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Never do this in a security system.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;--no-sandbox&lt;/code&gt; completely disables Chromium’s multi-process defense-in-depth isolation. If a malicious web page uses a zero-day exploit to trigger a heap overflow in the V8 JavaScript engine or Blink rendering engine, the attacker instantly gets arbitrary code execution inside the container.&lt;/p&gt;

&lt;h4&gt;
  
  
  🛠️ How We Kept the Native Sandbox Enabled:
&lt;/h4&gt;

&lt;p&gt;Instead of running as &lt;code&gt;root&lt;/code&gt; and disabling the sandbox, we:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Created an unprivileged user (&lt;code&gt;UID 1001&lt;/code&gt;, &lt;code&gt;browseruser&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Dropped all ambient Linux capabilities (&lt;code&gt;--cap-drop=ALL&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;no-new-privileges:true&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Allocated sufficient shared memory (&lt;code&gt;shm_size: 1gb&lt;/code&gt;) to prevent renderer crashes.&lt;/li&gt;
&lt;li&gt;Allowed Chromium to leverage Linux unprivileged user namespaces (&lt;code&gt;kernel.unprivileged_userns_clone=1&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The result: &lt;strong&gt;Chromium's internal process sandbox remains fully active.&lt;/strong&gt; An attacker must break out of Chromium's sandbox &lt;em&gt;first&lt;/em&gt;, and even then, they are trapped in a capability-stripped container with no network route.&lt;/p&gt;




&lt;h3&gt;
  
  
  🥷 Lesson 2: Covert Egress Leaks (WebRTC, QUIC, and DoH)
&lt;/h3&gt;

&lt;p&gt;Modern browsers are designed to bypass restrictive networks to deliver real-time communication and low latency. When designing a sandbox, these features become &lt;strong&gt;critical data exfiltration and proxy-bypass vectors&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;WebRTC STUN/TURN Requests&lt;/strong&gt;: WebRTC attempts to establish direct peer-to-peer UDP connections. If an attacker puts a WebRTC script on their page, Chromium will send raw UDP packets containing local network IPs to external STUN servers, completely bypassing HTTP proxies!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;QUIC (HTTP/3) over UDP/443&lt;/strong&gt;: Modern web servers negotiate QUIC over UDP. Because traditional proxies operate on TCP, unmediated QUIC requests can slip past inspection or fail unpredictable connections.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DNS-over-HTTPS (DoH)&lt;/strong&gt;: If the browser resolves domain names over encrypted HTTPS directly to Cloudflare (&lt;code&gt;1.1.1.1&lt;/code&gt;) or Google (&lt;code&gt;8.8.8.8&lt;/code&gt;), your proxy never gets to evaluate DNS rebinding or domain reputation!&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  🛠️ Hardened Runtime Flags:
&lt;/h4&gt;

&lt;p&gt;In our browser worker launcher (&lt;code&gt;run_scan.py&lt;/code&gt;), we explicitly locked down Chromium's engine flags:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="no"&gt;HARDENED_CHROMIUM_FLAGS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="c1"&gt;# Force ALL traffic through the inspection proxy&lt;/span&gt;
    &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"--proxy-server={PROXY_HOST}:{PROXY_PORT}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

    &lt;span class="c1"&gt;# Kill covert UDP/STUN leaks&lt;/span&gt;
    &lt;span class="s2"&gt;"--disable-webrtc"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"--webrtc-ip-handling-policy=disable_non_proxied_udp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"--enforce-webrtc-ip-permission-check"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

    &lt;span class="c1"&gt;# Block QUIC / HTTP/3 evasion (forces standard HTTP/1.1 &amp;amp; HTTP/2 over proxy tunnel)&lt;/span&gt;
    &lt;span class="s2"&gt;"--disable-quic"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

    &lt;span class="c1"&gt;# Disable internal DNS-over-HTTPS &amp;amp; asynchronous background resolvers&lt;/span&gt;
    &lt;span class="s2"&gt;"--disable-features=DnsOverHttps,AsyncDns"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

    &lt;span class="c1"&gt;# Block background sync, metrics, and cloud communications&lt;/span&gt;
    &lt;span class="s2"&gt;"--disable-background-networking"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"--disable-component-update"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"--disable-default-apps"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"--disable-sync"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🛑 Lesson 3: What Happens When the Proxy Dies? (Testing the Fail-Closed Boundary)
&lt;/h3&gt;

&lt;p&gt;A core principle of secure architecture is: &lt;strong&gt;A failure must never degrade security.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What happens if our proxy container runs out of memory, segfaults, or gets killed by Docker? Does the browser fall back to direct connections?&lt;/p&gt;

&lt;p&gt;To verify this, we wrote an automated adversarial test:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Spin up the browser and proxy stack.&lt;/li&gt;
&lt;li&gt;In the middle of an active scan, execute &lt;code&gt;docker kill scamshield-track-c-proxy&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Attempt to trigger page navigations from the browser.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  The Result:
&lt;/h4&gt;

&lt;p&gt;Because the browser container has &lt;strong&gt;no gateway&lt;/strong&gt; on &lt;code&gt;scamshield_internal&lt;/code&gt;, any attempt to navigate immediately throws &lt;code&gt;ERR_PROXY_CONNECTION_FAILED&lt;/code&gt;. It cannot fall back to direct internet because the host kernel simply has no physical route for it. &lt;strong&gt;Fail-Closed guaranteed.&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🧪 The 25-Checkpoint Adversarial Matrix
&lt;/h3&gt;

&lt;p&gt;To ensure our security claims are mathematically sound and verifiable on every git commit, we implemented a full live adversarial test suite (&lt;code&gt;test_track_c_compose_security.py&lt;/code&gt;).&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Checks&lt;/th&gt;
&lt;th&gt;Adversarial Scenario Tested&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;1. Direct Egress Blocks&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Checkpoints 1–8&lt;/td&gt;
&lt;td&gt;Attempting direct TCP/UDP connections to Public IPs (&lt;code&gt;1.1.1.1&lt;/code&gt;), AWS Metadata (&lt;code&gt;169.254.169.254&lt;/code&gt;), RFC1918 subnets (&lt;code&gt;10.0.0.0/8&lt;/code&gt;, &lt;code&gt;172.16.0.0/12&lt;/code&gt;, &lt;code&gt;192.168.0.0/16&lt;/code&gt;), and IPv6 (&lt;code&gt;::1&lt;/code&gt;, &lt;code&gt;fc00::1&lt;/code&gt;).&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;&lt;code&gt;ENETUNREACH&lt;/code&gt; (Blocked)&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;2. DNS Leakage &amp;amp; Rebinding&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Checkpoints 9–15&lt;/td&gt;
&lt;td&gt;Direct port 53 UDP/TCP queries, Docker embedded DNS resolution of external hostnames, DNS rebinding to internal infrastructure.&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;NXDOMAIN / 502 Bad Gateway&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;3. Complex Web Attack Vectors&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Checkpoints 16–23&lt;/td&gt;
&lt;td&gt;Cross-origin &lt;code&gt;302&lt;/code&gt; redirects to prohibited IPs, subresource injection (&lt;code&gt;&amp;lt;img src="http://127.0.0.1:port"&amp;gt;&lt;/code&gt;), iframe smuggling, WebSocket tunnels, and WebRTC STUN leaks.&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Refused / Blocked by Proxy&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;4. Confinement &amp;amp; Crash Testing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Checkpoints 24–25&lt;/td&gt;
&lt;td&gt;Hard proxy termination (&lt;code&gt;docker kill&lt;/code&gt;) fail-closed verification, non-root user verification (&lt;code&gt;UID 1001&lt;/code&gt;), capability verification (&lt;code&gt;CapEff=0&lt;/code&gt;), and Chromium sandbox state.&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Strictly Confined &amp;amp; Fail-Closed&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  📊 Project Status: Sandbox Frozen! 🧊
&lt;/h3&gt;

&lt;p&gt;With this week's sprint completed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;All 143 Track C integration, regression, and Docker security tests are 100% green.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Track C Sandbox Architecture is officially FROZEN.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We now have a bulletproof, isolated environment capable of receiving hostile, weaponized URLs, following redirects, taking screenshots, and inspecting DOM structures without exposing our backend servers, cloud keys, or internal network.&lt;/p&gt;




&lt;h3&gt;
  
  
  🚀 What's Up Next?
&lt;/h3&gt;

&lt;p&gt;Now that the sandbox is secure and locked down, we move to &lt;strong&gt;Pipeline Integration&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Wire the FastAPI backend directly to our Docker Compose runner via an asynchronous worker queue.&lt;/li&gt;
&lt;li&gt;Structure the returned forensic artifacts (redirect chains, DOM password/OTP inputs, screenshot buffers) for the &lt;strong&gt;Deterministic Risk Aggregation Engine&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Begin baseline dataset curation for &lt;strong&gt;Track D (The Multilingual Transformer Model)&lt;/strong&gt; on our local RTX 5050 GPU.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  💬 Discussion
&lt;/h3&gt;

&lt;p&gt;How do you prevent DNS leaks and WebRTC bypasses when running headless browsers for crawling or threat intelligence? Have you ever had a container escape or SSRF bypass slip past unit tests?&lt;/p&gt;

&lt;p&gt;Let's discuss in the comments below! 👇&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Follow our build-in-public journey on GitHub: &lt;a href="https://github.com/Siddharthrane07/scamshield" rel="noopener noreferrer"&gt;github.com/Siddharthrane07/scamshield&lt;/a&gt;&lt;/em&gt;`&lt;/p&gt;

</description>
      <category>docker</category>
      <category>ai</category>
      <category>security</category>
      <category>sandbox</category>
    </item>
    <item>
      <title>Building ScamShield AI: Week 2 — Docker Security, Firewall Bypasses, and Fail-Closed Architecture</title>
      <dc:creator>Siddharthrane07</dc:creator>
      <pubDate>Tue, 03 Nov 2026 18:49:33 +0000</pubDate>
      <link>https://dev.to/siddharthrane07/building-scamshield-ai-week-2-docker-security-firewall-bypasses-and-fail-closed-architecture-aka</link>
      <guid>https://dev.to/siddharthrane07/building-scamshield-ai-week-2-docker-security-firewall-bypasses-and-fail-closed-architecture-aka</guid>
      <description>&lt;h2&gt;
  
  
  🛡️ ScamShield AI: Week 2 Build Log
&lt;/h2&gt;
&lt;h2&gt;
  
  
  Hardening Container Boundaries: iptables, SSRF Mitigations &amp;amp; Fail-Closed Sandboxes
&lt;/h2&gt;




&lt;h3&gt;
  
  
  🚨 The Journey So Far
&lt;/h3&gt;

&lt;p&gt;If you caught Week 1, you know I'm building &lt;strong&gt;ScamShield AI&lt;/strong&gt; — an evidence-grounded threat intelligence platform designed to safely analyze Indian scam SMS messages and WhatsApp forwards (fake KYC alerts, electricity cut-off threats, UPI traps).&lt;/p&gt;

&lt;p&gt;To safely "click" a scammer's link without letting them compromise our backend infrastructure, we are building an isolated Docker sandbox using &lt;strong&gt;Playwright (Headless Chromium)&lt;/strong&gt; and &lt;strong&gt;Mitmproxy (The Network Guard)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This week was entirely about &lt;strong&gt;hardening Stage 1: The Proxy Container&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;I learned the hard way that &lt;em&gt;building&lt;/em&gt; a Docker container is trivial, but &lt;em&gt;securing&lt;/em&gt; it against a determined attacker probing from the inside is a completely different engineering challenge.&lt;/p&gt;

&lt;p&gt;Here are my biggest technical takeaways, bugs, and architectural wins from Week 2.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧠 Lesson 1: &lt;code&gt;iptables&lt;/code&gt; Rule Ordering is a Strict Security Boundary
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;iptables&lt;/code&gt; (the Linux kernel packet filter), rules are evaluated sequentially from top to bottom. &lt;strong&gt;The first match wins.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I originally wrote my firewall rules in this intuitive order:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Allow loopback (lo)
2. Allow ESTABLISHED, RELATED traffic
3. DROP private IPs (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.169.254)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  💥 The Vulnerability:
&lt;/h4&gt;

&lt;p&gt;An attacker exploiting a network connection could potentially match an existing state or craft packets that trigger state-tracking rules prematurely. Because the &lt;code&gt;ESTABLISHED, RELATED&lt;/code&gt; rule was placed at &lt;code&gt;#2&lt;/code&gt;, any connection matching that condition is accepted immediately. It never reaches the &lt;code&gt;DROP&lt;/code&gt; rules sitting at &lt;code&gt;#3&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;On a threat-intelligence scanner inspecting hostile URLs, this is a dangerous bypass that risks &lt;strong&gt;Server-Side Request Forgery (SSRF)&lt;/strong&gt; against cloud metadata endpoints (&lt;code&gt;169.254.169.254&lt;/code&gt;).&lt;/p&gt;

&lt;h4&gt;
  
  
  🛠️ The Fix:
&lt;/h4&gt;

&lt;p&gt;We refactored the firewall initialization into &lt;strong&gt;6 strict phases&lt;/strong&gt;. All prohibited destination drops are enforced in &lt;strong&gt;Phase 1&lt;/strong&gt;, before stateful connection acceptance is even evaluated.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Phase 1: DROP 169.254.169.254/32 (AWS/Cloud Metadata)
         DROP 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 (RFC1918 Private Ranges)
         DROP 100.64.0.0/10 (CGNAT)
...
Phase 4: ACCEPT ESTABLISHED, RELATED
Phase 5: DROP ALL (Default Policy Fallback)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a packet targets an internal address, the kernel drops it immediately on line 1. No connection tracking rule can resurrect it.&lt;/p&gt;




&lt;h3&gt;
  
  
  🛑 Lesson 2: Fail-Closed vs. Fail-Open Architecture
&lt;/h3&gt;

&lt;p&gt;My original container &lt;code&gt;entrypoint.sh&lt;/code&gt; had logic that looked roughly like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="nb"&gt;command&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; iptables &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null 2&amp;gt;&amp;amp;1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;apply_firewall_rules
&lt;span class="k"&gt;else
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Warning: iptables not found, continuing anyway..."&lt;/span&gt;
&lt;span class="k"&gt;fi

&lt;/span&gt;&lt;span class="nb"&gt;exec &lt;/span&gt;run_proxy &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$@&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the container was accidentally started without the &lt;code&gt;NET_ADMIN&lt;/code&gt; Linux capability, or if a base image update broke &lt;code&gt;iptables&lt;/code&gt;, the script simply printed a warning to stdout and happily booted the proxy without a firewall.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is classic "Fail-Open" design, and in security software, it is fatal.&lt;/strong&gt; A security boundary that silently degrades to unprotected execution is worse than no boundary at all, because it gives you false confidence.&lt;/p&gt;

&lt;h4&gt;
  
  
  🛠️ The Refactor:
&lt;/h4&gt;

&lt;p&gt;We rewrote the entire initialization script to be strictly &lt;strong&gt;Fail-Closed&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-euo&lt;/span&gt; pipefail

&lt;span class="c"&gt;# Fail immediately if NET_ADMIN is missing&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; iptables &lt;span class="nt"&gt;-L&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null 2&amp;gt;&amp;amp;1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[FATAL] iptables unavailable or insufficient permissions (missing NET_ADMIN?). Aborting."&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&amp;amp;2
    &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="c"&gt;# Apply rules and verify every single one with iptables -C&lt;/span&gt;
apply_firewall_rules &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[FATAL] Failed to enforce firewall policy. Aborting startup."&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&amp;amp;2
    &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, if a single firewall rule fails to apply, the container terminates immediately with exit code &lt;code&gt;1&lt;/code&gt;. The sandbox refuses to run without its armor.&lt;/p&gt;




&lt;h3&gt;
  
  
  🐛 Lesson 3: The Deprecation Bug That Fooled 56 Unit Tests
&lt;/h3&gt;

&lt;p&gt;During a full Docker rebuild, our proxy container suddenly crashed on boot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mitmdump: error: unrecognized arguments: --termlog-verbosity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We had updated to &lt;code&gt;mitmproxy 10.4.2&lt;/code&gt;, which completely deprecated the &lt;code&gt;--termlog-verbosity&lt;/code&gt; CLI flag in favor of options syntax: &lt;code&gt;--set termlog_verbosity=info&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Why didn't our 56 passing tests catch this?
&lt;/h4&gt;

&lt;p&gt;Because our test suite was testing startup shell logic using &lt;strong&gt;mocked binaries&lt;/strong&gt;. Our test mock for &lt;code&gt;mitmdump&lt;/code&gt; was a dummy script that recorded incoming flags and exited &lt;code&gt;0&lt;/code&gt; without validating whether those flags were actually accepted by the real &lt;code&gt;mitmproxy&lt;/code&gt; CLI!&lt;/p&gt;

&lt;p&gt;Our tests were &lt;strong&gt;falsely green&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  💡 The Takeaway:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unit tests with mocks&lt;/strong&gt; verify your control flow, but they do not prove third-party tool compatibility.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration tests with real container binaries&lt;/strong&gt; are non-negotiable for infrastructure and security harnesses.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We updated the configuration to the modern &lt;code&gt;--set&lt;/code&gt; syntax, added negative assertions to the mocks to disallow deprecated arguments, and verified startup against the real binary.&lt;/p&gt;




&lt;h3&gt;
  
  
  🥷 Lesson 4: The Sneaky "Imposter" User in Debian Images
&lt;/h3&gt;

&lt;p&gt;To adhere to the principle of least privilege, our proxy container must drop root privileges after configuring &lt;code&gt;iptables&lt;/code&gt; and run the worker process as an unprivileged user named &lt;code&gt;proxy&lt;/code&gt; with explicit UID &lt;code&gt;1002&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In our Dockerfile, we had:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;RUN &lt;/span&gt;groupadd &lt;span class="nt"&gt;-g&lt;/span&gt; 1002 proxy &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    useradd &lt;span class="nt"&gt;-u&lt;/span&gt; 1002 &lt;span class="nt"&gt;-g&lt;/span&gt; proxy proxy &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When checking running processes inside the container with &lt;code&gt;docker top&lt;/code&gt;, something looked wrong:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;docker top scamshield-proxy
&lt;span class="go"&gt;UID     PID     PPID    CMD
13      14820   14798   mitmdump -s /app/addon.py ...
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The process wasn't running as UID &lt;code&gt;1002&lt;/code&gt;. It was running as &lt;strong&gt;UID 13&lt;/strong&gt;!&lt;/p&gt;

&lt;h4&gt;
  
  
  🕵️ What happened?
&lt;/h4&gt;

&lt;p&gt;The official &lt;code&gt;python:3.11-slim&lt;/code&gt; image is built on Debian. Debian has shipped with a built-in system user named &lt;code&gt;proxy&lt;/code&gt; (UID &lt;code&gt;13&lt;/code&gt;) since the 1990s (originally for Squid/inn). &lt;/p&gt;

&lt;p&gt;When our Dockerfile executed &lt;code&gt;groupadd ... || true&lt;/code&gt;, it failed silently because group &lt;code&gt;proxy&lt;/code&gt; already existed, and &lt;code&gt;useradd&lt;/code&gt; skipped creation. The container fell back to the system user UID &lt;code&gt;13&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  🛠️ The Fix:
&lt;/h4&gt;

&lt;p&gt;Never rely on implicit user creation in base images. We explicitly modify existing system users or pick a collision-free name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;RUN if &lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="s2"&gt;"proxy"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null 2&amp;gt;&amp;amp;1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;        userdel &lt;span class="nt"&gt;-f&lt;/span&gt; proxy &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; groupdel proxy &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="k"&gt;fi&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    groupadd &lt;span class="nt"&gt;-g&lt;/span&gt; 1002 proxy &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    useradd &lt;span class="nt"&gt;-u&lt;/span&gt; 1002 &lt;span class="nt"&gt;-g&lt;/span&gt; proxy &lt;span class="nt"&gt;-s&lt;/span&gt; /usr/sbin/nologin &lt;span class="nt"&gt;-d&lt;/span&gt; /nonexistent proxy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Always inspect &lt;code&gt;docker top&lt;/code&gt; and &lt;code&gt;/proc/&amp;lt;pid&amp;gt;/status&lt;/code&gt; in the running container to verify that your process is actually running with the exact UID/GID you intended.&lt;/p&gt;




&lt;h3&gt;
  
  
  📊 Current Project Status
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;Details&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Regression Test Suite&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Passing&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;57/57 tests green across entrypoint logic, proxy addons, and preflight gates.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Firewall Startup&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Verified&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Container boots as root, sets 19 &lt;code&gt;iptables&lt;/code&gt; rules, verifies with &lt;code&gt;iptables -C&lt;/code&gt;, drops to UID &lt;code&gt;1002&lt;/code&gt;, and starts &lt;code&gt;mitmdump&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CLI Arguments&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Verified&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Migrated to &lt;code&gt;mitmproxy 10.x&lt;/code&gt; options syntax (&lt;code&gt;--set&lt;/code&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Live Network Egress Tests&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;🟡 &lt;strong&gt;In Progress&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Writing integration tests to confirm traffic to forbidden IPs actually drops at the packet level.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  ⚠️ Documented Constraints &amp;amp; Next Steps:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;IPv6 Hardening&lt;/strong&gt;: Current rules target IPv4 (&lt;code&gt;iptables&lt;/code&gt;). We need matching &lt;code&gt;ip6tables&lt;/code&gt; policies to prevent IPv6 leak bypasses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DNS Egress Restriction&lt;/strong&gt;: Port 53 UDP/TCP traffic needs to be constrained to trusted resolvers rather than unrestricted outbound access.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  🚀 What's Up Next
&lt;/h3&gt;

&lt;p&gt;This week, I am executing our &lt;strong&gt;Network Gate Verification Suite&lt;/strong&gt;. Starting a container cleanly is not proof that packets are blocked; proof requires testing real network requests from inside the sandbox:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Confirm &lt;code&gt;curl -m 2 http://169.254.169.254&lt;/code&gt; &lt;strong&gt;drops and times out&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;[ ] Confirm &lt;code&gt;curl -m 2 http://10.0.0.1&lt;/code&gt; &lt;strong&gt;is rejected by the kernel&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;[ ] Confirm &lt;code&gt;curl https://example.com&lt;/code&gt; &lt;strong&gt;traverses the proxy cleanly&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once the network gate passes, we begin &lt;strong&gt;Stage 2: The Browser Container&lt;/strong&gt; (locking down Headless Chromium with Playwright).&lt;/p&gt;




&lt;h3&gt;
  
  
  💬 Discussion
&lt;/h3&gt;

&lt;p&gt;Have you ever had a unit test suite stay completely green while your production container was fundamentally broken due to mocked tools? How do you structure your egress firewall rules for scraping or threat intelligence workloads?&lt;/p&gt;

&lt;p&gt;Drop your thoughts in the comments below! 👇&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Follow the project on GitHub: &lt;a href="https://github.com/Siddharthrane07/scamshield" rel="noopener noreferrer"&gt;github.com/Siddharthrane07/scamshield&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>docker</category>
      <category>devops</category>
      <category>python</category>
    </item>
    <item>
      <title>Building ScamShield AI: An Evidence-Grounded, Multimodal Threat Intelligence System for Indian Mobile Scams</title>
      <dc:creator>Siddharthrane07</dc:creator>
      <pubDate>Sat, 24 Oct 2026 11:58:32 +0000</pubDate>
      <link>https://dev.to/siddharthrane07/building-scamshield-ai-an-evidence-grounded-multimodal-threat-intelligence-system-for-indian-879</link>
      <guid>https://dev.to/siddharthrane07/building-scamshield-ai-an-evidence-grounded-multimodal-threat-intelligence-system-for-indian-879</guid>
      <description>&lt;h3&gt;
  
  
  🚨 The Problem: The Epidemic of Mobile Smishing in India
&lt;/h3&gt;

&lt;p&gt;If you live in India or follow digital fraud trends, you already know the story:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;"Dear SBI user, your YONO account is blocked. Update KYC immediately at [bit.ly/fake-link]."&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"Electricity bill unpaid. Power will be disconnected tonight at 9:30 PM. Call officer at 98xxxxxx."&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Unsolicited courier APKs, fake part-time job offers on WhatsApp, and malicious UPI "refund" links.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These attacks target millions every single day. But from a cybersecurity and machine learning perspective, detecting them accurately is deceptively hard:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Linguistic Code-Mixing&lt;/strong&gt;: Messages are frequently written in &lt;strong&gt;Hinglish&lt;/strong&gt; (Romanized Hindi), Devanagari Hindi, English, or a chaotic mix of both. Generic spam filters trained on Western datasets fall flat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multimodal Delivery&lt;/strong&gt;: Half the time, users receive messages as notification screenshots or forward compressed images over WhatsApp. A single OCR character error on a suspicious domain name completely breaks security analysis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Active Threat Problem&lt;/strong&gt;: You cannot just "curl" or inspect a hostile link from a local server without exposing internal networks to exploitation (SSRF, malvertising, browser-fingerprinting exploits).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Hallucination Trap&lt;/strong&gt;: Slapping a generic generative LLM onto fraud detection often leads to hallucinated reasons and inconsistent risk scores. Security demands &lt;strong&gt;ground-truth evidence&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To solve this, I am building &lt;strong&gt;ScamShield AI&lt;/strong&gt; — a portfolio-grade, evidence-grounded scam intelligence platform designed to analyze suspicious text messages and mobile screenshots.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏗️ High-Level System Architecture
&lt;/h2&gt;

&lt;p&gt;ScamShield is designed around a single core tenet: &lt;strong&gt;Evidence over intuition.&lt;/strong&gt; The system does not guess; it analyzes structured signals across parallel intelligence tracks before computing a calibrated risk score.&lt;/p&gt;

&lt;p&gt;🔍 How the 4 Intelligence Tracks Work&lt;/p&gt;

&lt;p&gt;When a message contains an external URL, the backend fans out independent operations asynchronously:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Track A — URL Intelligence:&lt;/strong&gt; Parses the URL, calculates Levenshtein distances for typosquatting against known Indian banking and utility targets (SBI, HDFC, ICICI, India Post, Paytm, etc.), inspects Unicode homoglyphs, and checks historical VirusTotal reputation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track B — Domain Intelligence:&lt;/strong&gt; Evaluates registration age and domain metadata via WhoisXML without letting the host establish direct active connections to hostile infrastructure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track C — Isolated Remote Sandbox (AWS ECS/Fargate + Playwright):&lt;/strong&gt; Dangerous URLs are routed into an ephemeral, headless Playwright browser inside a disposable cloud container. The worker collects redirect chains, final destinations, DOM elements (fake OTP forms, credential harvesting fields, payment inputs), and full-page screenshots.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track D — Multilingual Scam Transformer:&lt;/strong&gt; A shared multilingual transformer head predicting:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scam Intent&lt;/strong&gt; (Multi-class: Fake KYC, Electricity Fraud, UPI/Payment Trap, Job Scam, Benign, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Social Engineering Tactics&lt;/strong&gt; (Multi-label: Urgency, Fear, Authority Impersonation, Reward Bait, Financial Pressure)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;📊 Project Status: How Much is Completed?&lt;/p&gt;

&lt;p&gt;I believe in radical transparency in engineering. Here is the exact breakdown of what is running, what is in flight, and what is up next:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component / Layer&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;Implementation Details&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;API &amp;amp; Routing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;🟢 100% Done&lt;/td&gt;
&lt;td&gt;FastAPI backend with structured &lt;code&gt;/scan/text&lt;/code&gt; and &lt;code&gt;/scan/image&lt;/code&gt; endpoints, validation, and scan context tracing.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Persistence &amp;amp; Caching&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;🟢 100% Done&lt;/td&gt;
&lt;td&gt;Primary PostgreSQL persistence with SQLite fallback; SHA-256 fingerprinting for near-instant (&amp;lt;50ms) cache retrieval.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Entity Extraction&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;🟢 100% Done&lt;/td&gt;
&lt;td&gt;Regex and heuristic engine extracting UPI handles, phone numbers, OTP patterns, rupee amounts, and URLs.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Explainability Engine&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;🟢 100% Done&lt;/td&gt;
&lt;td&gt;Deterministic English &amp;amp; Hindi explanation generator. (Zero hallucination: only reports evidence actually returned by tracks).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Track C Security Harness&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;🟢 100% Done&lt;/td&gt;
&lt;td&gt;Strict preflight gatekeeper preventing SSRF, IPv4-mapped IPv6 bypasses, and AWS metadata leaks, paired with browser proxy integration testing.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Frontend Portal&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;🟢 90% Done&lt;/td&gt;
&lt;td&gt;Modern React (Vite) interface with risk score gauges, evidence cards, and bilingual report viewing.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Multilingual OCR&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;🟡 75% In Progress&lt;/td&gt;
&lt;td&gt;Dual-pass PaddleOCR + OpenCV pipeline for English and Hindi/Devanagari screenshots. Building the benchmark harness to measure CER/WER and entity preservation.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;External Threat Adapters&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;🟡 70% In Progress&lt;/td&gt;
&lt;td&gt;Track A (VirusTotal) and Track B (WhoisXML) connectors with graceful fallback and quota management.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Track C Cloud Sandbox&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;🟡 65% In Progress&lt;/td&gt;
&lt;td&gt;Local mock/proxy integration tested; AWS Fargate task dispatcher integration underway.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Track D (ML Transformer)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;🔵 Architecture Ready&lt;/td&gt;
&lt;td&gt;Multi-task architecture finalized; dataset curation, deduplication, and training pipeline targeting our dedicated local GPU (RTX 5050).&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;🛡️ Key Architectural Decision: Zero-Trust Security for the Scanner&lt;/p&gt;

&lt;p&gt;A major lesson in building cybersecurity tooling: &lt;strong&gt;Your scanner is a target.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If an attacker sends a message containing &lt;code&gt;http://169.254.169.254/latest/meta-data/&lt;/code&gt; or a local loopback link disguised inside an IPv4-mapped IPv6 address, a naive crawler will execute an &lt;strong&gt;SSRF (Server-Side Request Forgery)&lt;/strong&gt; exploit against your cloud infrastructure.&lt;/p&gt;

&lt;p&gt;To lock this down for Track C, I built a strict &lt;strong&gt;URL Preflight &amp;amp; Proxy Gatekeeper&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Address Validation:&lt;/strong&gt; Unwraps IPv4-mapped IPv6 addresses (e.g., &lt;code&gt;::ffff:10.0.0.1&lt;/code&gt;) and enforces strict CIDR blocking on CGNAT, private RFC1918 ranges, test nets, and cloud instance metadata endpoints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DNS Pinning &amp;amp; MITM Proxy Integration:&lt;/strong&gt; Mitigates DNS rebinding attacks by ensuring the IP resolved at preflight time matches the connection accepted by our downstream sandbox proxy.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;🧠 My Weekly Learnings &amp;amp; Technical Takeaways&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SSRF and Address Space Normalization:&lt;/strong&gt; Learned that standard string-based URL checks are useless against bypasses like decimal IPs, octal representations, and IPv4-mapped IPv6 strings. Python's &lt;code&gt;ipaddress&lt;/code&gt; module with explicit socket resolution is mandatory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why DNS Time-of-Check != Time-of-Use:&lt;/strong&gt; A domain can return a clean public IP during validation, then resolve to &lt;code&gt;127.0.0.1&lt;/code&gt; 10 milliseconds later when Playwright navigates (&lt;strong&gt;DNS Rebinding&lt;/strong&gt;). Protecting against this requires tying DNS resolution to the browser's HTTP proxy layer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Entity Preservation over Pure OCR Accuracy:&lt;/strong&gt; In typical document OCR, 96% accuracy sounds great. But in scam detection, if an OCR engine misrecognizes &lt;code&gt;sbi.co.in.pay-alert.top&lt;/code&gt; as &lt;code&gt;sbi.co.in pay-alert top&lt;/code&gt;, the entire URL track fails to trigger. We must score OCR based on &lt;strong&gt;entity extraction recall&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;🏆 Major Accomplishments This Week&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;SSRF Preflight Validator:&lt;/strong&gt; Built and verified &lt;code&gt;URLPreflightValidator&lt;/code&gt; covering private IPs, AWS metadata endpoints, and reserved ranges.&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Browser Proxy Integration Test Suite:&lt;/strong&gt; Developed TLS echo servers and proxy harnesses to validate Track C network interception under adversarial conditions.&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Smart IP Normalization:&lt;/strong&gt; Implemented multi-IP domain resolution comparison to handle modern CDNs without triggering false-positive network alerts.&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;End-to-End Orchestration:&lt;/strong&gt; Verified graceful degradation — if external APIs or sandbox tracks timeout, the fan-in aggregator marks the evidence as unavailable rather than crashing the scan.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;🚀 What's Next?&lt;/p&gt;

&lt;p&gt;Over the coming weeks, I will be focusing on:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Containerizing Track C:&lt;/strong&gt; Moving the local Playwright/mitmproxy integration into a locked-down Docker environment using Linux network namespaces and &lt;code&gt;iptables&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Training the Transformer:&lt;/strong&gt; Kicking off the multi-task training pipeline on the RTX 5050 for Track D.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OCR Benchmarking:&lt;/strong&gt; Running CER/WER benchmarks on real-world Indian scam screenshots to tune the PaddleOCR pipeline.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;Follow the Journey:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I am building ScamShield AI entirely in public. If you are interested in cybersecurity, Python, or Indian fintech security, connect with me.&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/Siddharthrane07/scamshield" rel="noopener noreferrer"&gt;github.com/Siddharthrane07/scamshield&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Have you ever had to defend a backend against SSRF? How did you handle DNS rebinding in your architecture? Let me know in the comments!&lt;/em&gt;&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
text

                  +--------------------------------+
                  |  React (Vite) Frontend Portal  |
                  +---------------+----------------+
                                  |
                                  v
                  +--------------------------------+
                  |        FastAPI Backend         |
                  +---------------+----------------+
                                  |
       +--------------------------+--------------------------+
       |                                                     |
  [Raw Text]                                          [Mobile Screenshot]
       |                                                     |
       v                                                     v
[Normalization]                                    [Multilingual OCR Engine]
       |                                           (PaddleOCR + OpenCV passes)
       +--------------------------+--------------------------+
                                  |
                                  v
                  +--------------------------------+
                  |      Entity Extraction         |
                  | (URLs, UPI IDs, Phones, OTPs)  |
                  +---------------+----------------+
                                  |
                                  v
                  +--------------------------------+
                  |     SHA-256 Cache Gatekeeper   |
                  |    (PostgreSQL / 24-hr TTL)    |
                  +-------+----------------+-------+
                          |                |
                     [Cache Hit]      [Cache Miss]
                          |                |
                          |                v
                          |     ===========================
                          |        PARALLEL INTELLIGENCE   
                          |     ===========================
                          |     ├── Track A: URL Static Intelligence (Typosquatting/VT)
                          |     ├── Track B: Domain Intelligence (WhoisXML/DNS)
                          |     ├── Track C: Isolated Browser Sandbox (AWS Fargate)
                          |     └── Track D: Multilingual Multi-Task Transformer
                          |                |
                          +&amp;lt;-------[Fan-In Aggregator]
                                           |
                                           v
                          +--------------------------------+
                          |   Deterministic Risk Engine    |
                          +---------------+----------------+
                                          |
                                          v
                          +--------------------------------+
                          |  Evidence-Grounded Explainer   |
                          |       (English &amp;amp; Hindi)        |
                          +---------------+----------------+
                                          |
                                          v
                          +--------------------------------+
                          |  Interactive Result in Web UI  |
                          +--------------------------------+


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>cybersecurity</category>
      <category>security</category>
    </item>
    <item>
      <title>Connecting GitHub with AWS: What I Learned in This Legendary Experience</title>
      <dc:creator>Siddharthrane07</dc:creator>
      <pubDate>Wed, 29 Jan 2025 21:37:10 +0000</pubDate>
      <link>https://dev.to/siddharthrane07/connecting-github-with-aws-what-i-learned-in-this-legendary-experience-47aj</link>
      <guid>https://dev.to/siddharthrane07/connecting-github-with-aws-what-i-learned-in-this-legendary-experience-47aj</guid>
      <description>&lt;p&gt;After successfully setting up my first Java web application on AWS EC2, I decided to take the next step in my cloud journey by integrating GitHub with AWS. In this article, I'll share my experience and what I learned during this 90-minute project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Overview&lt;/strong&gt;&lt;br&gt;
This project focused on establishing a connection between a GitHub repository and AWS, setting up version control, and managing code changes effectively. It's part of a larger DevOps pipeline I'm building, which will eventually include CodeBuild, S3, CodeDeploy, and CodePipeline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Components and Learning Points&lt;/strong&gt;&lt;br&gt;
Git and GitHub Setup&lt;br&gt;
The first major learning was understanding Git's distributed version control system.&lt;/p&gt;

&lt;p&gt;Setting up my local repository involved three crucial steps:&lt;br&gt;
Initializing the repository with git init&lt;br&gt;
Adding files to the staging area with git add&lt;br&gt;
Committing changes with descriptive messages using git commit -m&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authentication and Security&lt;/strong&gt;&lt;br&gt;
One interesting challenge I encountered was GitHub's authentication system. I learned that password authentication is no longer supported (as of August 2021), and instead, I needed to use Personal Access Tokens. This taught me about modern security practices in DevOps.&lt;br&gt;
To set this up, I:&lt;br&gt;
Navigated to GitHub Settings &amp;gt; Developer settings &amp;gt; Personal access tokens&lt;br&gt;
Generated a new token with appropriate scopes&lt;br&gt;
Used this token for authentication instead of my password&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The project helped me understand the Git workflow:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Making local changes to files&lt;br&gt;
Staging changes with git add&lt;br&gt;
Committing with meaningful messages&lt;br&gt;
Pushing to GitHub using git push -u origin master&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Future Pipeline Plans&lt;/strong&gt;&lt;br&gt;
This project is just the beginning. Looking ahead, I plan to implement:&lt;br&gt;
AWS CodeBuild for automated building&lt;br&gt;
S3 for artifact storage&lt;br&gt;
CodeDeploy for automated deployment&lt;br&gt;
CloudFormation for infrastructure as code&lt;br&gt;
A complete CI/CD pipeline using AWS CodePipeline&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaways&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Version control is fundamental to modern software development&lt;br&gt;
Security best practices are crucial in DevOps&lt;br&gt;
Understanding Git commands and their purposes is essential&lt;br&gt;
Planning for future pipeline expansion is important&lt;/p&gt;

&lt;p&gt;Looking Forward&lt;br&gt;
This project has laid the groundwork for a more comprehensive DevOps pipeline. The next steps involve implementing automated building and deployment processes, which will further streamline the development workflow.&lt;br&gt;
For those starting their DevOps journey, I recommend:&lt;br&gt;
Start with basic Git commands&lt;br&gt;
Understand authentication and security&lt;br&gt;
Plan your pipeline architecture&lt;br&gt;
Take it step by step&lt;/p&gt;

&lt;p&gt;Remember, DevOps is a journey of continuous learning and improvement. Each component you add to your pipeline brings new challenges and learning opportunities.&lt;br&gt;
What's your experience with DevOps? Are you building a similar pipeline? Share your thoughts in the comments below!&lt;/p&gt;

&lt;h1&gt;
  
  
  aws #github #devops #beginners #tutorial
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Setting Up Your First Web App in the Cloud with AWS</title>
      <dc:creator>Siddharthrane07</dc:creator>
      <pubDate>Wed, 22 Jan 2025 20:09:22 +0000</pubDate>
      <link>https://dev.to/siddharthrane07/setting-up-your-first-web-app-in-the-cloud-with-aws-2jfj</link>
      <guid>https://dev.to/siddharthrane07/setting-up-your-first-web-app-in-the-cloud-with-aws-2jfj</guid>
      <description>&lt;p&gt;Embarking on the journey to deploy a web app in the cloud can be both exciting and challenging. This post walks you through the foundational steps of connecting to an AWS EC2 instance and preparing for a full-fledged web app deployment. We'll use AWS, EC2, and Remote - SSH in VS Code for this .&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Initial Setup Steps - *&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Prerequisites&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Ensure you have the following:&lt;/p&gt;

&lt;p&gt;IAM User: Created with programmatic access.&lt;/p&gt;

&lt;p&gt;Key Pair: Downloaded .pem file for secure access.&lt;/p&gt;

&lt;p&gt;VS Code: Installed with the Remote - SSH extension.&lt;/p&gt;

&lt;p&gt;AWS EC2 Instance: Launched with the necessary configuration.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Connect to Your EC2 Instance&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Follow these steps to set up the connection between your local machine and the EC2 instance:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Step 1: Install the Remote - SSH Extension&lt;/p&gt;

&lt;p&gt;Open VS Code.&lt;/p&gt;

&lt;p&gt;Go to the Extensions view by clicking on the square icon in the sidebar or pressing Ctrl+Shift+X.&lt;/p&gt;

&lt;p&gt;Search for "Remote - SSH" and install it.&lt;/p&gt;

&lt;p&gt;Step 2: Add Your SSH Host&lt;/p&gt;

&lt;p&gt;Click the double arrow icon in the bottom-left corner of the VS Code window.&lt;/p&gt;

&lt;p&gt;Select Remote-SSH: Connect to Host... &amp;gt; + Add New SSH Host....&lt;/p&gt;

&lt;p&gt;Enter your SSH command in the format:&lt;br&gt;
ssh -i [PATH TO YOUR .PEM FILE] ec2-user@[YOUR PUBLIC IPV4 DNS]&lt;/p&gt;

&lt;p&gt;Replace [PATH TO YOUR .PEM FILE] with the location of your .pem file (e.g., ~/Desktop/devops-keypair.pem) and [YOUR PUBLIC IPV4 DNS] with the EC2 instance's public DNS.&lt;/p&gt;

&lt;p&gt;Select the configuration file (e.g., /Users/username/.ssh/config) to save this host.&lt;/p&gt;

&lt;p&gt;Step 3: Open the EC2 Instance in VS Code&lt;/p&gt;

&lt;p&gt;Open the Remote Explorer view from the left sidebar.&lt;/p&gt;

&lt;p&gt;Locate your added SSH Host and click on it to connect.&lt;/p&gt;

&lt;p&gt;If successful, you’ll see the EC2 file system in your VS Code workspace.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Verify Your Configuration&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Ensure that your .ssh/config file contains the correct details:&lt;br&gt;
Host your-ec2-instance&lt;br&gt;
    HostName [YOUR PUBLIC IPV4 DNS]&lt;br&gt;
    User ec2-user&lt;br&gt;
    IdentityFile [PATH TO YOUR .PEM FILE]&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Preparing for Next Steps&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once connected, you can now:&lt;/p&gt;

&lt;p&gt;Upload files (e.g., index.jsp) to your EC2 instance.&lt;/p&gt;

&lt;p&gt;Run commands to configure your server environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's Next?&lt;/strong&gt;&lt;br&gt;
GitHub Integration: Push your project files to a GitHub repository.&lt;/p&gt;

&lt;p&gt;CodeBuild &amp;amp; CodeDeploy: Automate the deployment process.&lt;/p&gt;

&lt;p&gt;EC2-Web-App: Deploy the application using AWS services like CodePipeline and CloudFormation.&lt;/p&gt;

&lt;p&gt;Stay tuned as we move forward to deploy a Java web application, completing this project!&lt;/p&gt;

&lt;p&gt;Key Learnings from This Step&lt;/p&gt;

&lt;p&gt;Setting up a secure connection to an EC2 instance is crucial for remote development.&lt;/p&gt;

&lt;p&gt;Configuring SSH access correctly saves time and avoids common errors.&lt;/p&gt;

&lt;p&gt;AWS provides powerful tools to streamline cloud deployments.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Build a Chatbot with Amazon Lex</title>
      <dc:creator>Siddharthrane07</dc:creator>
      <pubDate>Mon, 20 Jan 2025 14:32:01 +0000</pubDate>
      <link>https://dev.to/siddharthrane07/build-a-chatbot-with-amazon-lex-l5f</link>
      <guid>https://dev.to/siddharthrane07/build-a-chatbot-with-amazon-lex-l5f</guid>
      <description>&lt;p&gt;** Introducing Today's Project!**&lt;/p&gt;

&lt;p&gt;What is Amazon Lex?&lt;br&gt;
 Amazon Lex is a service provided by AWS (Amazon Web Services) that &lt;br&gt;
 allows&lt;br&gt;
 developers to build conversational interfaces into applications using &lt;br&gt;
 voice and&lt;br&gt;
 text. It leverages the same deep learning technologies that power &lt;br&gt;
 Amazon Alexa.&lt;br&gt;
 How I used Amazon Lex in this project&lt;br&gt;
 In today's project, we utilized Amazon Lex to build the BankerBot, a &lt;br&gt;
 chatbot designed to assist customers with banking tasks like checking &lt;br&gt;
 their account balance and transferring money between accounts.&lt;br&gt;
 One thing I didn't expect in this project was...&lt;br&gt;
 I didnt expected that it would be so simple to create bots like this &lt;br&gt;
 .AWS services offers great thinngs which make it simple for &lt;br&gt;
 industries to use.&lt;br&gt;
 This project took me...&lt;br&gt;
 it took me around 40 minutes to complete and to understand it &lt;br&gt;
 properly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setting up a Lex chatbot&lt;/strong&gt;&lt;br&gt;
 it just took few minutes...&lt;br&gt;
 While creating my chatbot, I also created a role with basic &lt;br&gt;
 permissions because it is essential for enabling the chatbot to &lt;br&gt;
 interact effectively with various AWS services. These permissions &lt;br&gt;
 allow the chatbot to access necessary resources.In terms of the &lt;br&gt;
 intent classification confidence score, I kept the default value of&lt;br&gt;
 0.40. This means that the model assigns a confidence level of 40% to &lt;br&gt;
 its prediction about the user's intent based on the input data. &lt;/p&gt;

&lt;p&gt;Intents are representations of the goals or purposes behind a user's &lt;br&gt;
 input in a conversational interface, such as a chatbot or voice &lt;br&gt;
 assistant. They help the system understand what the user wants to &lt;br&gt;
 achieve or communicate so it can provide the appropriate answers.&lt;br&gt;
 I created my first intent, WelcomeIntent, to handle user greetings &lt;br&gt;
 and initiate friendly interactions.&lt;/p&gt;

&lt;p&gt;FallbackIntent :&lt;br&gt;
  My chatbot returned the error message 'Intent FallbackIntent is &lt;br&gt;
  fulfilled' when I entered a query that it couldn't understand or &lt;br&gt;
  recognize. This error message occurred because the input did not &lt;br&gt;
  match any predefined intents within the system .&lt;/p&gt;

&lt;p&gt;Variations :&lt;br&gt;
  To configure FallbackIntent, I started by accessing the intent &lt;br&gt;
  management section of my conversational AI platform, such as &lt;br&gt;
  Dialogflow or a similar tool. I created a new intent specifically &lt;br&gt;
  labeled as FallbackIntent.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Exciting Milestone: Completing AWS Academy Cloud Foundations and Earning My Digital Badge!</title>
      <dc:creator>Siddharthrane07</dc:creator>
      <pubDate>Sun, 12 Jan 2025 06:19:32 +0000</pubDate>
      <link>https://dev.to/siddharthrane07/exciting-milestone-completing-aws-academy-cloud-foundations-and-earning-my-digital-badge-4207</link>
      <guid>https://dev.to/siddharthrane07/exciting-milestone-completing-aws-academy-cloud-foundations-and-earning-my-digital-badge-4207</guid>
      <description>&lt;p&gt;Exciting Milestone: Completing AWS Academy Cloud Foundations and Earning My Digital Badge!&lt;br&gt;
I'm thrilled to share that I've successfully completed the AWS Academy Cloud Foundations course and earned a digital badge from Amazon Web Services Training and Certification! This journey has been an incredible experience, packed with learning opportunities, hands-on labs, and deep dives into AWS services and concepts. Here’s an overview of the modules I explored:&lt;/p&gt;

&lt;p&gt;Modules Covered:&lt;br&gt;
Module 1 - Cloud Concepts Overview&lt;br&gt;
Introduction to cloud computing&lt;/p&gt;

&lt;p&gt;Advantages of the cloud&lt;/p&gt;

&lt;p&gt;I'm thrilled to share that I've successfully completed the AWS Academy Cloud Foundations course and earned a digital badge from Amazon Web Services Training and Certification! This journey has been an incredible experience, packed with learning opportunities, hands-on labs, and deep dives into AWS services and concepts. Here’s an overview of the modules I explored:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Modules Covered:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Module 1 - Cloud Concepts Overview&lt;/strong&gt;&lt;br&gt;
Introduction to cloud computing&lt;br&gt;
Advantages of the cloud&lt;br&gt;
Introduction to AWS and moving to the AWS Cloud&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Module 2 - Cloud Economics and Billing&lt;/strong&gt;&lt;br&gt;
Fundamentals of pricing&lt;br&gt;
Total Cost of Ownership and case studies&lt;br&gt;
AWS Organizations and Billing Dashboard demo&lt;br&gt;
Technical support models&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Module 3 - AWS Global Infrastructure Overview&lt;/strong&gt;&lt;br&gt;
AWS Global Infrastructure and services overview&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Module 4 - AWS Cloud Security&lt;/strong&gt;&lt;br&gt;
AWS Shared Responsibility Model&lt;br&gt;
Introduction to AWS Identity and Access Management (IAM)&lt;br&gt;
Securing AWS accounts and data&lt;br&gt;
Compliance measures&lt;/p&gt;

&lt;p&gt;Lab: Introduction to AWS IAM&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Module 5 - Networking and Content Delivery&lt;/strong&gt;&lt;br&gt;
Networking basics and Amazon Virtual Private Cloud (VPC)&lt;br&gt;
Route 53, CloudFront, and VPC security&lt;/p&gt;

&lt;p&gt;Lab: Build your VPC and Launch a Web Server&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Module 6 - Compute&lt;/strong&gt;&lt;br&gt;
Amazon EC2 (Introduction, Cost Optimization, and Console Demo)&lt;br&gt;
AWS Lambda and Elastic Beanstalk overview&lt;/p&gt;

&lt;p&gt;Lab: Introduction to Amazon EC2&lt;br&gt;
Activities: AWS Lambda and Elastic Beanstalk&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Module 7 - Storage&lt;/strong&gt;&lt;br&gt;
AWS EBS, S3, and EFS&lt;br&gt;
S3 Glacier for data archiving&lt;/p&gt;

&lt;p&gt;Lab: Working with EBS&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Module 8 - Databases&lt;/strong&gt;&lt;br&gt;
Amazon RDS, DynamoDB, Redshift, and Aurora&lt;/p&gt;

&lt;p&gt;Lab: Build a Database Server&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Module 9 - Cloud Architecture&lt;/strong&gt;&lt;br&gt;
AWS Well-Architected Framework design principles&lt;br&gt;
Operational excellence, security, reliability, and cost optimization&lt;br&gt;
AWS Trusted Advisor&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Module 10 - Auto Scaling and Monitoring&lt;/strong&gt;&lt;br&gt;
Elastic Load Balancing, Amazon CloudWatch, and EC2 Auto Scaling&lt;/p&gt;

&lt;p&gt;Lab: Scale &amp;amp; Load Balance your Architecture&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Achievements:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Successfully completed all modules and labs.&lt;/li&gt;
&lt;li&gt;Earned the AWS Academy Cloud Foundations digital badge.&lt;/li&gt;
&lt;li&gt;Gained access to AWS Educate, a platform offering free online training resources, hands-on practice with AWS Console, and opportunities to earn learner badges.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Next Steps:&lt;br&gt;
I’m looking forward to leveraging these skills to dive deeper into cloud computing and AWS technologies. The hands-on labs have provided invaluable practical experience, and the AWS Educate platform will enable me to continue my learning journey at my own pace.&lt;/p&gt;

&lt;p&gt;If you're considering starting your cloud journey, I highly recommend AWS Academy Cloud Foundations. It’s an excellent stepping stone for beginners and those looking to solidify their understanding of AWS fundamentals.&lt;/p&gt;

&lt;p&gt;Feel free to connect with me if you’re interested in discussing AWS, cloud technologies, or anything tech-related. Let’s learn and grow together! 🚀&lt;/p&gt;

&lt;h1&gt;
  
  
  AWS #CloudComputing #AWSAcademy #AWSBadge #CloudJourney
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Migrating from AWS Cloud9 to AWS CloudShell: A Step-by-Step Guide</title>
      <dc:creator>Siddharthrane07</dc:creator>
      <pubDate>Sun, 11 Aug 2024 08:22:16 +0000</pubDate>
      <link>https://dev.to/siddharthrane07/migrating-from-aws-cloud9-to-aws-cloudshell-a-step-by-step-guide-pnm</link>
      <guid>https://dev.to/siddharthrane07/migrating-from-aws-cloud9-to-aws-cloudshell-a-step-by-step-guide-pnm</guid>
      <description>&lt;p&gt;With AWS discontinuing Cloud9 services for certain accounts as of July 25th, it's crucial to find an alternative way to continue your work. AWS CloudShell offers a powerful, browser-based shell environment that integrates well with AWS services. In this guide, I'll walk you through how to perform the same tasks you previously did in Cloud9 using CloudShell.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Setting Up Your Environment in CloudShell
Open AWS Management Console: Navigate to AWS CloudShell.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Launch CloudShell: Click on the CloudShell icon in the AWS Management Console. This opens a terminal directly in your browser, preconfigured with the AWS CLI.&lt;/p&gt;

&lt;p&gt;Create a Working Directory: Use mkdir to create a new directory for your project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;mkdir my-project&lt;br&gt;
cd my-project&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Configuring IAM Users
Access IAM: In another browser tab, go to the AWS Management Console and search for IAM.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Create a New IAM User:&lt;/p&gt;

&lt;p&gt;Go to Users and click on Add User.&lt;br&gt;
Provide a username, select Custom Password, and set the password.&lt;br&gt;
Click on Next: Permissions.&lt;br&gt;
Create a User Group:&lt;/p&gt;

&lt;p&gt;Click on Create Group, name the group, and attach the necessary policies.&lt;br&gt;
Finish the setup by clicking on Next: Tags, then Next: Review, and finally Create User.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Writing and Sharing an HTML File in CloudShell
Create an HTML File:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In CloudShell, use a text editor like vi, nano, or even the CloudShell editor to create a new HTML file.&lt;/p&gt;

&lt;p&gt;For example, to use nano:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;nano index.html&lt;/strong&gt;&lt;br&gt;
Write your HTML code inside the file, save, and exit the editor.&lt;/p&gt;

&lt;p&gt;Share the File:&lt;/p&gt;

&lt;p&gt;Sharing isn’t as straightforward as Cloud9, but you can upload your file to an S3 bucket and set permissions for the IAM user to access it.&lt;/p&gt;

&lt;p&gt;Use the following command to upload the file to S3:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;aws s3 cp index.html s3://your-bucket-name/index.html&lt;/strong&gt;&lt;br&gt;
Grant the IAM user access to the S3 bucket by attaching the appropriate S3 policies to the user group.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Accessing the Shared File
Incognito Window:
Open an incognito window and log in to the AWS Management Console as the IAM user.
Navigate to the S3 bucket where the HTML file was uploaded.
The IAM user will now be able to access the file, simulating the shared editing experience previously available in Cloud9.
Conclusion
While AWS CloudShell doesn’t yet offer all the collaborative features of Cloud9, it provides a powerful alternative for managing and running AWS CLI commands in a secure, browser-based environment. By following the steps outlined above, you can smoothly transition your workflow 
from Cloud9 to CloudShell.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Above is the overview,you can view the image&lt;br&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%2Fx5x7ea5gotgayvld9d2e.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%2Fx5x7ea5gotgayvld9d2e.png" alt=" "&gt;&lt;/a&gt; for the detailed commands.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Discovering AWS: My Journey Into Cloud Computing and DevOps</title>
      <dc:creator>Siddharthrane07</dc:creator>
      <pubDate>Tue, 16 Jul 2024 14:05:17 +0000</pubDate>
      <link>https://dev.to/siddharthrane07/discovering-aws-my-journey-into-cloud-computing-and-devops-4ln0</link>
      <guid>https://dev.to/siddharthrane07/discovering-aws-my-journey-into-cloud-computing-and-devops-4ln0</guid>
      <description>&lt;p&gt;Discovering AWS: My Journey Into Cloud Computing and DevOps&lt;/p&gt;

&lt;p&gt;Hey everyone! 👋 I'm Siddharth, and recently I embarked on a journey to explore Amazon Web Services (AWS) through their fundamentals course. It's been an eye-opening experience, and I can't wait to share how it's shaping my future in technology, particularly in AWS and DevOps.&lt;/p&gt;

&lt;p&gt;Embracing the AWS Universe&lt;br&gt;
From day one, AWS fascinated me with its promise of limitless possibilities in the cloud. Learning about its scalability, cost-efficiency, and the freedom to innovate without worrying about infrastructure limitations has been truly inspiring. It's not just about learning a platform; it's about unlocking the potential to build the future of technology.&lt;/p&gt;

&lt;p&gt;Riding the Cloud with AWS Compute&lt;br&gt;
One of the first things I dove into was Amazon EC2, AWS's virtual servers in the cloud. Understanding how I could spin up instances tailored to my needs, whether for basic computing tasks or intensive applications, was empowering. Learning about features like auto-scaling and load balancing showed me how AWS ensures applications stay responsive even during peak times.&lt;/p&gt;

&lt;p&gt;Navigating AWS's Global Reach&lt;br&gt;
AWS's global infrastructure blew my mind. The concept of Availability Zones ensuring high availability and reliability, combined with services like Amazon CloudFront speeding up content delivery globally, made me realize the sheer scale and robustness of AWS's infrastructure.&lt;/p&gt;

&lt;p&gt;Securing the Cloud&lt;br&gt;
Security was another crucial aspect. AWS's shared responsibility model, where they manage the security of the cloud while users secure their applications and data, gave me confidence in deploying applications securely. Features like IAM for managing access and multi-factor authentication added layers of protection to my AWS resources.&lt;/p&gt;

&lt;p&gt;Data Storage and Management Made Easy&lt;br&gt;
Learning about Amazon S3 for scalable object storage and Amazon RDS for managed relational databases simplified how I could store, retrieve, and manage data efficiently. These services are not just about storage but about ensuring data integrity and availability, critical for any modern application.&lt;/p&gt;

&lt;p&gt;Monitoring, Analyzing, and Optimizing with AWS&lt;br&gt;
Monitoring my AWS environment with Amazon CloudWatch, tracking changes with AWS CloudTrail, and receiving actionable insights from AWS Trusted Advisor showed me how AWS empowers users to monitor, analyze, and optimize their cloud resources effectively.&lt;/p&gt;

&lt;p&gt;Cost Management and Support&lt;br&gt;
Understanding AWS pricing models, leveraging the AWS Free Tier for experimentation, and using tools like AWS Cost Explorer and Budgets to manage costs effectively was eye-opening. It's not just about using AWS but doing so in a cost-effective manner.&lt;/p&gt;

&lt;p&gt;Embracing Innovation with AWS&lt;br&gt;
AWS's focus on innovation through services like AWS Snowcone, Snowball, and Snowmobile for large-scale data migrations and the AWS Well-Architected Framework for designing reliable and efficient cloud architectures showed me how AWS is at the forefront of technological innovation.&lt;/p&gt;

&lt;p&gt;The Future with AWS and DevOps&lt;br&gt;
As I look ahead, AWS has equipped me with skills that are not just relevant today but essential for tomorrow's tech landscape. Whether it's advancing my career in cloud computing or diving deeper into DevOps practices, AWS has laid a solid foundation for continuous learning and growth.&lt;/p&gt;

&lt;p&gt;Join Me on This Exciting Journey!&lt;br&gt;
AWS isn't just a platform; it's a community of innovators, builders, and problem-solvers. Whether you're starting your career in tech, looking to upskill, or simply curious about cloud computing, AWS offers endless opportunities. Let's explore, learn, and innovate together in the AWS ecosystem!&lt;/p&gt;

</description>
      <category>aws</category>
    </item>
  </channel>
</rss>
