<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Security on Dhiru's Notebook</title><link>https://rfcorner.in/tags/security/</link><description>Recent content in Security on Dhiru's Notebook</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 14 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://rfcorner.in/tags/security/index.xml" rel="self" type="application/rss+xml"/><item><title>Porting PVM to Linux 7.2</title><link>https://rfcorner.in/posts/porting-pvm-to-linux-7.2/</link><pubDate>Fri, 14 Aug 2026 00:00:00 +0000</pubDate><guid>https://rfcorner.in/posts/porting-pvm-to-linux-7.2/</guid><description>&lt;p&gt;The original PVM kernel tree was based on Linux 6.12.x, while current Linux
&lt;code&gt;master&lt;/code&gt; had reached 7.2. This note records the commands I used to build,
package, and boot the forward port. The resulting tree is available in the
&lt;a href="https://github.com/kholia/linux/tree/pvm-720"&gt;&lt;code&gt;pvm-720&lt;/code&gt; branch&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="pvm-in-short"&gt;PVM in short&lt;/h2&gt;
&lt;p&gt;PVM (Pagetable-based Virtual Machine) is a KVM guest hypervisor designed for
running nested workloads without requiring VMX or SVM. Essentially native or
nested virtualization HW functionality is NOT required! It uses a small shared
region for privilege transitions and efficient shadow page tables for memory
virtualization. The design is described in the SOSP '23 paper &lt;a href="https://doi.org/10.1145/3600006.3613158"&gt;&lt;em&gt;PVM: Efficient
Shadow Paging for Deploying Secure Containers in Cloud-native
Environments&lt;/em&gt;&lt;/a&gt;. The original code is
in the &lt;a href="https://github.com/virt-pvm/linux"&gt;&lt;code&gt;virt-pvm/linux&lt;/code&gt;&lt;/a&gt; repository.&lt;/p&gt;</description></item><item><title>Minimal Kernels, Reduced Attack Surface, and Why Linux Optimization Still Matters</title><link>https://rfcorner.in/posts/minimal-kernels-attack-surface/</link><pubDate>Sun, 10 May 2026 00:00:00 +0000</pubDate><guid>https://rfcorner.in/posts/minimal-kernels-attack-surface/</guid><description>&lt;blockquote&gt;
&lt;p&gt;"While minimal kernels cannot prevent every vulnerability, reducing attack surface by removing unnecessary kernel features, drivers, and services can proactively mitigate many classes of security issues and reduce exploitability."&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For a long time, Linux optimization work was seen mostly as a performance
exercise.&lt;/p&gt;
&lt;p&gt;Faster boot times. Smaller images. Lower RAM usage. Better cache behavior.&lt;/p&gt;
&lt;p&gt;But over the years, something interesting became increasingly obvious:&lt;/p&gt;
&lt;p&gt;Optimization and security are often deeply related.&lt;/p&gt;</description></item><item><title>Voltage Glitching for Fun and Profit (MCU Fault Injection)</title><link>https://rfcorner.in/posts/voltage-glitching-for-fun-and-profit/</link><pubDate>Sun, 08 Mar 2026 00:00:00 +0000</pubDate><guid>https://rfcorner.in/posts/voltage-glitching-for-fun-and-profit/</guid><description>&lt;h2 id="why-this-post-exists"&gt;Why This Post Exists&lt;/h2&gt;
&lt;p&gt;I wanted to learn practical voltage fault injection on low-cost MCUs like &lt;strong&gt;WCH
CH32V003&lt;/strong&gt; and &lt;strong&gt;Puya PY32F003&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="CH32V003 SOP-8 chip" loading="lazy" src="https://rfcorner.in/images/ch32v003-sop8.webp"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="CH32V003 SOP-8 pinout" loading="lazy" src="https://rfcorner.in/images/ch32v003j4m6.svg"&gt;&lt;/p&gt;
&lt;h2 id="what-is-voltage-glitching"&gt;What is Voltage Glitching?&lt;/h2&gt;
&lt;p&gt;Voltage glitching is a form of hardware fault injection where very short
disturbances are introduced into a device's power supply. These disturbances
can cause the CPU to skip instructions, misread memory, or bypass security
checks. Researchers commonly use voltage glitching to study the robustness of
microcontrollers and secure boot implementations.&lt;/p&gt;</description></item><item><title>Supporting HOPERF CMT2300A on Linux</title><link>https://rfcorner.in/posts/supporting-cmt2300a-on-linux/</link><pubDate>Tue, 23 Dec 2025 00:00:00 +0000</pubDate><guid>https://rfcorner.in/posts/supporting-cmt2300a-on-linux/</guid><description>&lt;h2 id="what-this-article-covers"&gt;What This Article Covers&lt;/h2&gt;
&lt;p&gt;This article presents a practical journey to add Linux support for the HOPERF CMT2300A Sub-GHz RF transceiver - starting from extracting register configuration tables out of vendor firmware, to building and testing a Linux driver on real hardware.&lt;/p&gt;
&lt;p&gt;You'll learn:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How TP-Link's driver situation motivated this effort&lt;/li&gt;
&lt;li&gt;How firmware was extracted and analyzed&lt;/li&gt;
&lt;li&gt;How to build and load the custom driver on Raspberry Pi&lt;/li&gt;
&lt;li&gt;How to verify real on-air packet RX&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is aimed at embedded Linux developers, reverse engineers, and RF hackers. It is &lt;em&gt;not&lt;/em&gt; a beginner Linux kernel tutorial nor a full CMT2300A datasheet walkthrough; the focus is on practical bring-up and reproducibility.&lt;/p&gt;</description></item><item><title>Debugging/Reversing Firebase gRPC Traffic with mitmproxy</title><link>https://rfcorner.in/posts/debugging-grpc-traffic-with-mitmproxy/</link><pubDate>Wed, 16 Apr 2025 00:00:00 +0000</pubDate><guid>https://rfcorner.in/posts/debugging-grpc-traffic-with-mitmproxy/</guid><description>&lt;p&gt;Recently, I was stuck trying to understand how Firebase gRPC calls worked and
how I could generate, modify, and replay them. Trapping and modifying existing
gRPC traffic was not working well. Finally, I took a step back and spent some
time learning how to build and debug simple Firebase applications. This
approach helped me tremendously, and I was able to make further progress with
my original task quickly.&lt;/p&gt;
&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;
&lt;p&gt;You may find the following code sample useful when reversing/debugging Firebase
applications.&lt;/p&gt;</description></item><item><title>Easily verifying certificate chains</title><link>https://rfcorner.in/posts/verifying-certificate-chain/</link><pubDate>Mon, 14 Apr 2025 00:00:00 +0000</pubDate><guid>https://rfcorner.in/posts/verifying-certificate-chain/</guid><description>&lt;p&gt;Here is a quick script to verify that the certificate chain is valid and will work.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;% cat verify-cert-key.sh
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;certFile&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;keyFile&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;caFile&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;3&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;certPubKey&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;openssl x509 -noout -pubkey -in &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;certFile&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;keyPubKey&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;openssl pkey -pubout -in &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;keyFile&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;certPubKey&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;keyPubKey&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;PASS: key and cert match&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;FAIL: key and cert DO NOT match&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;openssl verify -CAfile &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;3&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Easy Taint Tracking - Finding Heartbleed in 2024</title><link>https://rfcorner.in/posts/taintanalysis/</link><pubDate>Fri, 01 Nov 2024 00:00:00 +0000</pubDate><guid>https://rfcorner.in/posts/taintanalysis/</guid><description>&lt;h2 id="aim"&gt;Aim&lt;/h2&gt;
&lt;p&gt;Finding 'Heartbleed' class of bugs with taint analysis.&lt;/p&gt;
&lt;p&gt;Background reading: &lt;a href="https://heartbleed.com/"&gt;https://heartbleed.com/&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="motivation"&gt;Motivation&lt;/h2&gt;
&lt;p&gt;While &lt;code&gt;Coverity&lt;/code&gt; is now able to detect this bug, we wanted to evaluate the
state of open-source security tooling in 2024.&lt;/p&gt;
&lt;p&gt;Have we been able to reduce the cost of finding such bugs after all these
years?&lt;/p&gt;
&lt;h2 id="the-idea"&gt;The Idea&lt;/h2&gt;
&lt;p&gt;Can we find an &lt;code&gt;execution path&lt;/code&gt; from the tainted data in the &lt;code&gt;n2s&lt;/code&gt; function to
sensitive functions?&lt;/p&gt;
&lt;p&gt;Since &lt;code&gt;n2s&lt;/code&gt; typically operates on network received bytes, it can serve as a
taint source.&lt;/p&gt;</description></item></channel></rss>