Grant Hernandez Security researcher of embedded firmware and mobile devices. https://hernan.de/ Thu, 18 Sep 2025 13:16:42 -0400 Thu, 18 Sep 2025 13:16:42 -0400 Jekyll v3.8.3 Virtualizing a Fan Controller with GNU Radio <p>I recently purchased a BladeRF for cellular security research with <a href="/blog/creating-a-cellular-testbed-with-yatebts-and-srslte/">srsRAN and YateBTS</a>. Jumping straight into using these programs without a strong background in software defined radio (SDR) can feel like trying to run before you can walk – especially when debugging PHY layer issues. Today I will brush up on the fundamentals by exploring a much easier target: my fan remote. Projects like srsRAN use SDRs as an physical interface to the air. More specifically they use a SDR’s library bindings to send and receive <a href="https://www.youtube.com/watch?v=h_7d-m1ehoY">I/Q data</a> (YouTube link) on select frequencies in order to synthesize and receive arbitrary signals. For simpler projects, its best to use software that abstracts away from these bindings and gives a friendly set of libraries and tools to explore with. In this blog I show how I used <a href="https://www.gnuradio.org/">GNU Radio</a>, <a href="https://gqrx.dk/">GQRX</a> and <a href="https://github.com/miek/inspectrum">Inspectrum</a> to identify, capture, replay, decode, synthesize, and virtualize the signals coming from my remote.</p> Sun, 29 Aug 2021 00:00:00 -0400 https://hernan.de/blog/virtualizing-a-fan-controller-with-gnu-radio/ https://hernan.de/blog/virtualizing-a-fan-controller-with-gnu-radio/ Reverse Engineering SDR Creating a Cellular Testbed with YateBTS and srsLTE <p>Have you ever wondered how your smartphone communicates over-the-air? How calls and SMSs reach your phone from across the world? What about how your phone decodes over-the-air messages? Does it do it correctly and what happens if it doesn’t? Well these answers and more lie within the 2 - 5G cellular protocols and their implementations. Understanding and setting up a cellular testbed for this kind of exploration can be a difficult and frustrating process. Without a background in signal processing, cellular protocol conventions, or the right equipment, debugging why a cellular testbed isn’t working can be a pain, to say the least. In this tutorial we’re going to detail the exact steps my guest author <a href="https://www.cise.ufl.edu/~tucker/">Tyler Tucker</a> and I took to get a 2G (GSM) and 4G (LTE) testbed up and running. In cellular terminology these are known as the <a href="https://en.wikipedia.org/wiki/Base_transceiver_station">BTS</a> and <a href="https://en.wikipedia.org/wiki/ENodeB">eNodeB</a> for GSM and LTE respectively, but throughout we’ll stick with base station. To get a base station up and running you need two things: a software defined radio (SDR) for the radio frontend and a software station implementation that can talk to your SDR.</p> Tue, 04 Aug 2020 00:00:00 -0400 https://hernan.de/blog/creating-a-cellular-testbed-with-yatebts-and-srslte/ https://hernan.de/blog/creating-a-cellular-testbed-with-yatebts-and-srslte/ Cellular YateBTS srsLTE SDR From Competitor to Captain: My CCDC Journey <p><em>This article documents my personal experiences with CCDC. The opinions expressed are my own.</em></p> <p>I’ve had the privilege of participating four times in the <a href="http://www.nationalccdc.org">Collegiate Cyber Defense Competition</a> across five years. During my time as a competitor, I learned volumes about system administration and working together with a team. My primary role was Linux administration and hardening, but other roles rubbed off along the way giving me a broad view of the competition.</p> <p>If you are not too familiar with CCDC, here is the overview: CCDC is a <em>blue-team</em> network and business simulation run in the United States, which fills a distinct niche compared to more traditional security competitions like CTFs by focusing on network fundamentals, service management, incident detection &amp; response, and communication. Universities from around the nation compete in this yearly event with the hope of winning the National title. The gist of the competition is as follows: you are a newly hired IT team tasked to bring a business’ network into a secure and known state as quickly as possible. The catch is that you have multiple bosses breathing down your neck, assigning you business tasks (known as injects) quicker than you can complete and an active <em>red-team</em> (professional penetration testers) breaking down the doors of your network and trying to keep your services down. Teams are thrust into this overflow of tasks and events and scored on their performance. Although it may sound like volunteering to become a piñata, playing in CCDC is some of the most stressful fun you can have. You have to experience it for yourself to truly understand the continual adrenaline rush of jumping into an unknown, broken, red-team infested, network of machines.</p> <p><em>Sound fun</em>? Great! So how do you get started? In my case, my undergraduate university, the <a href="https://ucf.edu">University of Central Florida</a>, started its own security club, <a href="https://www.hackucf.org/">Hack@UCF</a>, also known as the Collegiate Cyber Defense Club on paper. The club’s primary directive was to form a team to play in CCDC. I joined the club immediately given my interest in cyber security and I decided to give CCDC a go. This turned out to be one of the best decisions of my undergraduate career.</p> Fri, 22 May 2020 00:00:00 -0400 https://hernan.de/blog/bootstrapping-a-ccdc-team/ https://hernan.de/blog/bootstrapping-a-ccdc-team/ CCDC Leadership University Tailoring CVE-2019-2215 to Achieve Root <p>When I heard about the emergency <a href="https://bugs.chromium.org/p/project-zero/issues/detail?id=1942">disclosure of CVE-2019-2215 by Project Zero</a>, I decided to replicate the exploit on my local device to see it in action. I so happened to have a vulnerable Pixel 2 with the exact kernel version as my main device (don’t hack me). All I needed to do was compile the exploit and run it over ADB. I downloaded the latest <a href="https://developer.android.com/ndk/downloads">Android NDK</a> and compiled the proof of concept:</p> <div class="highlight"><pre><code>[grant ~/Downloads/android-ndk-r20 &gt;&gt; ./toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android29-clang -o poc ../poc.c [grant ~/Downloads/android-ndk-r20 &gt;&gt; adb push poc /data/local/tmp/poc poc: 1 file pushed. 0.8 MB/s (22528 bytes in 0.026s) </code></pre></div> <p>I ran it on my device and confirmed that I was able to reproduce <a href="https://bugs.chromium.org/p/project-zero/issues/attachment?aid=414886&amp;signed_aid=W6S1GtTOG9xXGjwwVa_5hw==&amp;inline=1">Maddie Stone’s screenshot</a> exactly.</p> <p>The base PoC left us with a full kernel read/write primitive, essentially game over for the systems’ security, but left achieving root as an exercise for the reader. This raises the question, what does “root” really mean for a modern Android system? To answer this, we must first understand how Android enforces its security policies.</p> Tue, 15 Oct 2019 00:00:00 -0400 https://hernan.de/blog/tailoring-cve-2019-2215-to-achieve-root/ https://hernan.de/blog/tailoring-cve-2019-2215-to-achieve-root/ Untagged Vulnerability Research Super Hexagon: A Journey from EL0 to S-EL3 <p>Welcome to a journey of AArch64 kernel exploitation, from the least privileged, to the most secure privilege level on the ARMv8 platform. For this year’s HITCON CTF, I played with my academic team, <a href="https://ctftime.org/team/397">Kernel Sanders</a>. When scanning through the problems, I quickly latched on to the <strong>Super Hexagon</strong> challenge once I heard it involved ARM exploitation. Here is the challenge prompt:</p> <blockquote> <p><strong>Super Hexagon</strong><br /> Escape each level for your six flags.</p> <p>EL0 - Hard<br /> EL1 - Harder<br /> EL2 - Hardest<br /> S-EL0 - Hardester<br /> S-EL1 - Hardestest<br /> S-EL3 - Hardestestest</p> <p><code>nc 54.64.96.126 6666</code><br /> Author: sean, atdog</p> <p>Super Hexagon - 1: 39 Teams solved.<br /> Super Hexagon - 2: 9 Teams solved.<br /> Super Hexagon - 3: 4 Teams solved.<br /> Super Hexagon - 4: 2 Teams solved.<br /> Super Hexagon - 5: 1 Team solved.<br /> Super Hexagon - 6: 1 Team solved.</p> </blockquote> Tue, 30 Oct 2018 00:00:00 -0400 https://hernan.de/blog/super-hexagon-a-journey-from-el0-to-s-el3/ https://hernan.de/blog/super-hexagon-a-journey-from-el0-to-s-el3/ Kernel Sanders HITCON CTF 2018 Python Kernel Exploitation ARM Exploitation CTF Moving a VMWare Fusion VM to a FAT32 External Hard Disk <p>Backing up or moving a VMWare Fusion VM to an external hard drive is <a href="https://pubs.vmware.com/fusion-4/index.jsp?topic=%2Fcom.vmware.fusion.help.doc%2FGUID-50863728-C156-47B7-B79F-F341FF5E5C9A.html">usually no problem</a> - except when your destination filesystem is FAT-32.</p> <p class="center"><img src="/assets/posts/moving-a-vmware-fusion-vm-to-a-fat32-external-hard-disk/disk-info.png" alt="Disk information" width="220px" /></p> <p>I use FAT-32 on my external drives for maximum compatibility between Mac, Windows and Linux. Unfortunately, FAT-32 is quite dated and doesn’t allow any file larger than 4GiB.</p> Tue, 05 Dec 2017 00:00:00 -0500 https://hernan.de/blog/moving-a-vmware-fusion-vm-to-a-fat32-external-hard-disk/ https://hernan.de/blog/moving-a-vmware-fusion-vm-to-a-fat32-external-hard-disk/ VMWare Mac OSX Tech Support Lock and Load: Exploiting Counter Strike via BSP Map Files <p>One night while playing Counter Strike: Condition Zero (CZ), I decided to take a break and challenge myself to find an exploitable bug in the old engine known as GoldSrc. Condition Zero, Half-Life 1, and CS 1.6 all run on the GoldSrc engine, which was created by Valve and is based upon the original Quake engine.</p> <p>What makes Counter Strike an interesting target is that it relies on a game lobby for players to find and select servers to play on. Upon connecting to the server, the game client will automatically download any required resources (maps, textures, sounds, etc.). Once all of the resources have been downloaded, they have to be loaded and parsed from disk into memory. Only then will the client begin receiving commands and entity updates from the server.</p> <p>This automatic resource fetching looked like the ticket to a remotely exploitable vulnerability via a local file.</p> <p>The vulnerability discussed in this article has been disclosed to Valve Security and the <a href="https://steamcommunity.com/games/70/announcements/detail/1439314053820431619">patch publicly deployed on July 10th</a>.</p> <p>I would like to extend my thanks to the Valve Security team and specifically to Alfred Reynolds who was my liaison during the disclosure process. The whole process, from initial email to fix, lasted less than 30 days. I certainly look forward to disclosing to Valve in the future.</p> Fri, 07 Jul 2017 00:00:00 -0400 https://hernan.de/blog/lock-and-load-exploiting-counter-strike-via-bsp-map-files/ https://hernan.de/blog/lock-and-load-exploiting-counter-strike-via-bsp-map-files/ Fuzzing Exploitation ROP Buffer Overflow Shellcode Mona WinDBG BFF Vulnerability Research CRC-32 VLSI Design Die Shots <style type="text/css"> div.gallery { margin-left: auto; margin-right: auto; text-align: center; } .gallery-item { float: left; display: block; width: 40%; padding: 0 5%; } </style> <p><em>This is a follow up to my <a href="/blog/vlsi-final-project/">previous post on creating a CRC-32 chip</a> from scratch using Cadence. Check it out as it goes over the design details.</em></p> <p><strong>tl;dr:</strong> <a href="/blog/crc-32-vlsi-design-die-shots/#images">see die shot images</a></p> <p>After submitting my CRC-32 design to MOSIS for fabrication, I had to wait quite a while for the results (over 6 months), but considering it was</p> <ol> <li>Free</li> <li>An <em>actual</em> chip that I can physically hold in my hands</li> <li>Something I designed myself from scratch</li> </ol> <p>I was willing to wait. The wait was finally over in late December of 2015.</p> Fri, 24 Jun 2016 00:00:00 -0400 https://hernan.de/blog/crc-32-vlsi-design-die-shots/ https://hernan.de/blog/crc-32-vlsi-design-die-shots/ UCF VLSI Cadence University Hardware Google CTF 2016 - For2 <p>We are <a href="https://capturetheflag.withgoogle.com/attachment/ba5dc6e166469130afe6416e84386e11bce4f14793e5fa2f5d6f412ebad4b9d9">given a PCAPNG file</a> with a bunch of USB packets. By scanning through the PCAP, I noticed that there appears to be a large amount of <code>URB_INTERRUPT</code> packets after some initial configuration and setup. On a hunch, I immediately suspected either a USB keyboard or mouse due to the amount of data and the fact that all incoming packets were created from interrupts (i.e some kinda of slow I/O device driven by a human).</p> <p>While looking at the packets, I initially assumed this was a keyboard as it would be straight forward to hide a flag in keyboard data. I tried the obvious choice and googled for some Python that already solved this problem and I came across this <a href="https://blog.lse.epita.fr/articles/32-csaw-ctf-2012-donglepcap-net300.html">keyboard PCAP parser</a>. I noticed that the offsets used in the file were not close to the size of the packets I was seeing, so I did some more research on USB HID devices and I came across this <a href="http://eleccelerator.com/tutorial-about-usb-hid-report-descriptors/">great page on USB mice packets</a>.</p> <p>The packet structure described here matched what I was seeing in the PCAP data. I confirmed this by looked for a USB descriptor packet from the device. I found the right packet at number 84 (below).</p> <pre> No. | Time | Source | Dest | Protocol | Length | Info ----+----------+--------+------+----------+--------+------------------------------ 84 | 6.505211 | 1.3.0 | host | USB | 46 | GET DESCRIPTOR Response DEVICE </pre> <p>The device descriptor decoding showed that this was definitely a mouse.</p> Fri, 29 Apr 2016 00:00:00 -0400 https://hernan.de/blog/google-ctf-2016-for2/ https://hernan.de/blog/google-ctf-2016-for2/ Kernel Sanders Google CTF 2016 Python PCAP CTF CRC-32 VLSI Design using Cadence's Virtuoso <p>This semester at UCF I enrolled in a 5000 level (graduate level) <a href="https://en.wikipedia.org/wiki/Very-large-scale_integration">Very Large Scale Integration</a> (VLSI) class entitled EEE5390 <a href="http://www.eecs.ucf.edu/~jinyier/courses/EEE5390/">“Full-Custom VLSI Design”</a>. It caught my eye back in the Spring of 2014 when I noticed another student’s screen as they designed a chip. The mash-up of colored rectangles and wiring intrigued me. Later I learned that the best designs would actually be fabricated through <a href="https://www.mosis.com/">MOSIS</a>, a university chip fabrication service. This was a big pull in my decision to take the class – how often do you get to say your design is baked in to a working piece of silicon?</p> <p>With that, I decided to give it a shot this spring.</p> Tue, 16 Jun 2015 00:00:00 -0400 https://hernan.de/blog/vlsi-final-project/ https://hernan.de/blog/vlsi-final-project/ UCF Cadence VLSI University Hardware