<?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 SerialHacker on Medium]]></title>
        <description><![CDATA[Stories by SerialHacker on Medium]]></description>
        <link>https://medium.com/@serialhacker?source=rss-e8b87fb4e5e0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*LopeRo-YZhA4sI1HJ9Amhg.jpeg</url>
            <title>Stories by SerialHacker on Medium</title>
            <link>https://medium.com/@serialhacker?source=rss-e8b87fb4e5e0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 16:38:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@serialhacker/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[bletool v1.1: Improving BLE Notification Analysis]]></title>
            <link>https://medium.com/@serialhacker/bletool-v1-1-improving-ble-notification-analysis-663b2ed485a4?source=rss-e8b87fb4e5e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/663b2ed485a4</guid>
            <category><![CDATA[iot-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bluetooth-hacking]]></category>
            <category><![CDATA[ble]]></category>
            <dc:creator><![CDATA[SerialHacker]]></dc:creator>
            <pubDate>Wed, 17 Jun 2026 22:25:23 GMT</pubDate>
            <atom:updated>2026-06-17T22:28:14.183Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Since releasing <a href="https://github.com/serial-hacker-yt/bletool">bletool </a>v1.0, I’ve continued using it during real-world BLE reverse engineering sessions and have quickly identified several areas where the notification workflow could be improved.</p><p>Notifications are one of the most important parts of BLE analysis. Many devices communicate primarily through notifications rather than characteristic reads, making them critical when attempting to understand how a device operates.</p><p>Version 1.1 focuses on improving the visibility, usability, and overall handling of notifications during BLE research.</p><h3>Why Notifications Matter</h3><p>Notifications are one of the primary mechanisms BLE devices use to asynchronously send data to connected clients. When you connect your phone to a smart lock, controller, scale, or any other smart device, it listens to the data being streamed to your device through the notifications.</p><p>Analyzing these notifications is a great way to understand the inner workings of the device and to snoop on communication that may have only been intended for users with an app connected to the device. Depending on how a device is configured, BLE traffic may be transmitted without encryption. Many consumer devices do not enforce encryption for all characteristics, making passive analysis and reverse engineering easier.</p><h3>Problems I Encountered in v1.0</h3><p>After I had created v1.0, I got to work trying to reverse-engineer notification data from a smart scale. It was easy enough to see when data had changed on the scale; no data was sent until weight was put on it, and the data changed until it had the exact weight, and then it stopped the notification. V1.0 worked great for this, so I then tried it on a BLE temperature controller, and this is where it started to show limitations.</p><p>The device emitted notifications every second, but the temperature itself changed only occasionally. This meant I had to visually scan a continuous stream of nearly identical hexadecimal data to identify the few bytes that actually changed. I knew I needed to make some changes to make it easier for me to spot these small changes and to also make it easier on my eyes to look at the terminal with all that data.</p><h3>What’s New in v1.1</h3><h4>Improved Notification Handling</h4><p>Version 1.1 focused on reverse engineering BLE notifications and the ability to customize the display for the BLE notifications.</p><p>The biggest addition for the notification display is the diffs setting. When enabled, the values that have been changed since the last notification will be highlighted in red text, so it is much easier to spot the changing fields. The goal of this is to help spot changing fields to make reverse engineering quicker.</p><p>The next two useful settings you can enable are counters and timestamps. Packet counters prepend a sequential number to every notification, making it easier to reference specific packets and verify that no notifications were missed during capture. Timestamps add a timestamp for each notification so you know exactly when it was sent.</p><p>Lastly, the colors setting is a setting that, when enabled, will alternate the colors of the rows in order to make it easier on your eyes when looking at a lot of notification data from a device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mE_iiIMeJg-FXTSb0m1QsQ.png" /><figcaption>Default display for notifications</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wvWeA-XQBJ7sh-XzknPZnA.png" /><figcaption>Display with all new features enabled</figcaption></figure><h3>Real-World Example</h3><p>This is a quick demonstration of the new update in action. The first step is to connect to the device and enumerate the handles for the device. Now that I know what handle I want to subscribe to, I can turn on the diffs setting to better visualize the changing data that will come from the notifications.</p><p>With diff highlighting enabled, only the bytes that change between successive notifications are colored differently. In the example below, it becomes immediately obvious which fields vary as the temperature changes, allowing me to quickly identify candidate values for further analysis.</p><p>Now I can just subscribe to the notification handler and see how the data changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lXahbpnbfQkNzKKxuRebzA.png" /><figcaption>View of notification diffs turned on in bletool</figcaption></figure><p>In this specific example, this data is from a temperature sensor, and we can take some of the hex data and see that it converts to the current temperature in Celsius.</p><p>0b48 = 2888 or 28.88c</p><h3>Conclusion</h3><p>bletool v1.1 is focused on making notification analysis more practical and efficient during real-world BLE reverse engineering.</p><p>While the core functionality remains the same, these improvements significantly improve the day-to-day workflow of exploring and understanding BLE devices.</p><p>Try it out and let me know of any feedback or features you may want added.</p><p><a href="https://github.com/serial-hacker-yt/bletool">https://github.com/serial-hacker-yt/bletool</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=663b2ed485a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gatttool Is Dead. So I Built bletool]]></title>
            <link>https://medium.com/@serialhacker/gatttool-is-dead-so-i-built-bletool-a9b4141f27fd?source=rss-e8b87fb4e5e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9b4141f27fd</guid>
            <category><![CDATA[ble]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[SerialHacker]]></dc:creator>
            <pubDate>Sat, 06 Jun 2026 16:03:31 GMT</pubDate>
            <atom:updated>2026-06-06T16:03:31.406Z</atom:updated>
            <content:encoded><![CDATA[<p>I had just received a new smart scale in the mail that I wanted to do BLE security research on.</p><p>I went through my normal process of scanning for the device’s MAC address with hcitool and then connecting to the device using gatttool. This is where my problems arose, which led me down the rabbit hole of creating my own BLE research tool.</p><p>Gatttool refused to connect.</p><p>I checked my adapter, restarted Kali, connected to the device with nRFConnect and bluetoothctl, but gatttool was still unable to connect. I was disappointed, but not surprised. Gatttool had been deprecated for years, yet it remained one of my favorite tools for interacting with BLE devices.</p><p>I switched over to bluetoothctl and quickly realized I preferred the interface and workflow of gatttool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gjUeMpNp0Da3MK-p3wIWAg.png" /></figure><h3>Why BLE Research Can Be Frustrating</h3><p>BLE can be a frustrating protocol to deal with as a researcher. The whole goal of BLE is to be energy efficient, so information that is not required is often omitted. It was never designed to be particularly human-friendly.</p><p>Gatttool did a good job of abstracting BLE and allowing users to interact with handles instead of long UUIDs. Paired with Wireshark, it became a useful tool for quickly reading and writing commands on BLE devices.</p><p>Bluetoothctl traded that simplicity for a much more general and low-level interface. While extremely powerful, it can feel cumbersome when performing repetitive BLE research tasks.</p><h3>Enter bletool</h3><p>This is where bletool comes in.</p><p>Heavily inspired by the gatttool interface, I set out to create a tool using the Bleak library that would be simple to use, modern, and focused on BLE research workflows.</p><p>My goals were straightforward:</p><ul><li>Interactive workflow</li><li>Handle-based interaction</li><li>Multiple notification support</li><li>Session awareness</li><li>Quality-of-life features for researchers</li></ul><p>On top of reading and writing characteristics, bletool includes support for multiple simultaneous notifications, replay functionality, session tracking, and keep-alive commands to prevent devices from sleeping during testing.</p><h3>Design Philosophy</h3><p>Gatttool was my go-to tool because of how quickly I could interact with devices.</p><p>The interactive CLI allowed me to connect, enumerate, and manually test characteristics with minimal effort. One of the features I missed most in bluetoothctl was direct handle-based interaction.</p><p>Because of this, bletool allows UUIDs and handles to be used interchangeably throughout the interface. Whether reading, writing, or subscribing to notifications, researchers can use whichever identifier is most convenient.</p><p>bletool is built using the Python Bleak library, which provides a modern cross-platform interface for interacting with BLE devices. One of the more interesting challenges was mapping handles to characteristics while maintaining a workflow that felt familiar to long-time gatttool users.</p><h3>bletool Features</h3><h3>Discovery</h3><p>bletool can scan for nearby BLE devices and return:</p><ul><li>Device name</li><li>MAC address</li></ul><p>This allows researchers to discover and connect to devices without needing additional tools.</p><p>bletool also supports two enumeration views:</p><ul><li>Characteristics</li><li>Handles</li></ul><p>Both provide the same underlying information, but the handle view makes it easier to map handles to UUIDs for manual testing.</p><h3>Interaction</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U5J-WiUP6c0Kv_qqWd_LYQ.png" /></figure><p>bletool supports:</p><ul><li>Connect</li><li>Disconnect</li><li>Read</li><li>Write</li><li>Select</li><li>Notifications</li></ul><p>Write requests can be sent directly to a handle or UUID, or through a previously selected characteristic.</p><p>Reading follows the same workflow, allowing rapid interaction during device analysis.</p><h3>Notifications</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8ovilIfQk_56yN5ort0fmQ.png" /></figure><p>One of my favorite features is the standalone notification command.</p><p>Unlike my experience with gatttool, bletool allows multiple notifications to be enabled simultaneously and managed independently throughout a session.</p><h3>Research Features</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ot2EOfihMbx7TVvdHUwzCA.png" /></figure><h3>Replay</h3><p>Replay the previous write command with a single command. This is particularly useful when testing replay attacks or repeatedly triggering functionality on a target device.</p><h3>Keep Alive</h3><p>Many BLE devices aggressively enter low-power states.</p><p>The keep-alive command periodically sends data to a selected characteristic to help maintain a connection during long research sessions.</p><h3>Session Information</h3><p>The info command displays:</p><ul><li>Active and stopped notifications</li><li>Selected characteristic</li><li>Previous write operations</li><li>Session state</li></ul><h3>JSON Dumps</h3><p>The dump command exports discovered characteristics and related information to a JSON file for later analysis.</p><h3>Example Workflow</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TGHPVT_ARZUfW6e9TN6VqA.png" /></figure><p>This workflow can be performed without switching tools, allowing researchers to focus on understanding device behavior rather than managing BLE tooling.</p><h3>Future Improvements</h3><p>Planned improvements include:</p><ul><li>Session save/load support</li><li>Automation mode</li><li>Better replay timing controls</li><li>Additional export options</li></ul><h3>Final Thoughts</h3><p>bletool was built to reduce friction during BLE security research.</p><p>If you’re interested in BLE security research, I’d love feedback, bug reports, and feature requests. The project is available on GitHub. Give it a try and let me know what would make it more useful.</p><p>Happy hacking.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9b4141f27fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lack of Secure Update Mechanism]]></title>
            <link>https://medium.com/@serialhacker/31093lack-of-secure-update-mechanism-adbd86245a75?source=rss-e8b87fb4e5e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/adbd86245a75</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[iot-security]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[SerialHacker]]></dc:creator>
            <pubDate>Wed, 07 Jan 2026 14:32:45 GMT</pubDate>
            <atom:updated>2026-01-07T17:47:26.412Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*zLHL0Puc0DFLqEJ32PEzbA.jpeg" /><figcaption>TP-Link Router</figcaption></figure><p>Context: Independent IoT security research conducted on personally owned hardware for educational and defensive security purposes</p><p>When OWASP made a top 10 list of IoT vulnerabilities, Lack of Secure Update Mechanism came in at number 4. This vulnerability encompasses a device’s inability to verify the integrity and source of an update, prevent downgrades to older versions of firmware, and an insecure method of delivery, such as unencrypted transmission of the firmware to the device. The impact of this vulnerability could be devastating as it could allow malicious actors to install back doors on devices without users knowing and aid in gathering sensitive information from a target or build a botnet army.</p><p>I encountered this vulnerability firsthand when doing some research on a fairly popular travel WiFi router, and how this could be used as a tool for malicious intent. I was initially comparing the different versions of firmware on the device to see if other vulnerabilities I had found in the older versions had been patched to make the device more secure. After updating to the most recent available firmware version and testing out what the previous vulnerabilities were, I wondered if I was ever going to be able to get the old vulnerable firmware on the device, or even better, get firmware that I modified onto the device.</p><p>My first goal was to get the device’s firmware rolled back so that I could put the device on a more vulnerable version, and I would have fewer restrictions to worry about when testing the device. After doing some research, I came across a post on TP-Link’s support page explaining how to recover a device after it had been bricked. The method relied on a local TFTP that is hooked up to the router via an Ethernet cable. Then, when the device was booted into recovery mode, it would grab the file that was being hosted on TFTP. After initial testing, I was able to upload the earliest version of the firmware available onto the device by just renaming the file tp_recovery.bin and going through the recovery process.</p><p>This initial finding in itself is a security issue because the older firmware versions are vulnerable to an RCE, and being able to downgrade these devices to that vulnerable version should not be possible. I wanted to see if uploading my own modified firmware to the device would be possible, so I used the firmware mod kit to add a back door to the device and went through the same process I had previously. As I thought, this went through no problem, as it seems this device does not check the firmware that is being installed on it and allows any firmware to be uploaded to the device. In this case, I was able to install a remote back door onto the device, and now if I wanted to, I could resell this device to someone else and have the ability to remotely access their network.</p><p>Overall, this experiment clearly demonstrated why a lack of secure update mechanisms is such a serious IoT vulnerability. The ability to freely downgrade firmware or install modified firmware without any form of validation shows how easily an attacker could compromise a device and its users without their knowledge. In real-world scenarios, this could lead to widespread exploitation, including persistent backdoors, data theft, and large-scale botnet creation. This vulnerability highlights the importance of proper firmware signing, version enforcement, and source delivery methods in IoT devices, as well as the responsibility manufacturers have to protect users from both known and preventable security risks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adbd86245a75" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Phishing Scams Are Evolving — Here’s How to Stay Ahead]]></title>
            <link>https://medium.com/@serialhacker/phishing-scams-are-evolving-heres-how-to-stay-ahead-fbfac93bb20f?source=rss-e8b87fb4e5e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbfac93bb20f</guid>
            <category><![CDATA[phishing]]></category>
            <category><![CDATA[phishing-awareness]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[SerialHacker]]></dc:creator>
            <pubDate>Mon, 18 Aug 2025 02:35:35 GMT</pubDate>
            <atom:updated>2025-08-18T02:35:35.249Z</atom:updated>
            <content:encoded><![CDATA[<h3>Phishing Scams Are Evolving — Here’s How to Stay Ahead</h3><p>Everyone has received an email asking you to verify a payment of hundreds of dollars for an item you never ordered, sent from abunchofletters@hotmail.com or a similar address. This is called a phishing email, and its goal is to trick you into performing actions that bad actors can exploit. These emails are usually easy enough to spot, with terrible grammar, strange email addresses, and context that does not relate to you at all, but as AI becomes more popular, these attacks can easily become more complex and blend in more seamlessly with normal mail than you would expect.</p><p>To show how easy it is to get AI like ChatGPT to write a much more convincing phishing email than most people see daily, I did just that, and here is what it gave me:</p><h3>🛑 Example Phishing Email</h3><p><strong>Subject:</strong> [Action Required] Unusual Login Attempt Detected on Your Account</p><p><strong>From:<br></strong> Security Team &lt;no-reply@secure-notice.com&gt;<br> <strong>To:<br></strong> you@example.com</p><p><strong>Dear Customer,</strong></p><p>We detected an unusual login attempt from an unknown device on your account. For your security, we have temporarily locked access until we can verify this activity.</p><p><strong>Date:</strong> August 16, 2025<br> <strong>Location:</strong> Warsaw, Poland<br> <strong>IP Address:</strong> 185.11.213.7</p><p>If this was you, please confirm your identity immediately by following the link below:</p><p>🔒 <strong>Verify My Account Now</strong></p><p>Failure to respond within 24 hours may result in permanent suspension of your account to protect your information.</p><p>Thank you for helping us keep your account safe.<br> — The Security Team</p><p>This email has none of the usual tells that a normal phishing email has; there are no grammar mistakes, the context is vague, and related to anyone who has ever made an account on the internet. And with a simple website, we can spoof an email address and make it look like a real security notice.</p><p>Here is an image of what the email would look like to a user. Thankfully, Proton detected the spoofed email and gave a warning, but most people are quick to ignore warnings and may still fall for the attack:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nAFLXwy-1sP703A6" /></figure><p>So, now, how could we detect this as a phishing email? We definitely do not want to click any links or attachments until we are able to verify the sender, so our first step would be looking at the email headers to see where the email is really coming from. To do this in Gmail, we can click the 3 vertical dots and select Show original from the drop-down. In Proton, we click the 3 horizontal dots and click Show HTML or Show header.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/0*HrV4I44rgjALiG_J" /></figure><p>Here is what we would see when clicking to see the headers on Proton. The highlighted parts show where the email was really received from. If we notice that this is something strange and not affiliated with the company that claims to be emailing us, we can assume it is a phishing email. This is one of the best ways to detect a phishing email with a spoofed email address.</p><p>Here we can also see what the link is. There are ways to hyperlink text so it looks like you are clicking on one link, but it is actually a different link. By viewing the HTML, we can see what the real link is, and it’s easier to see than when you are just hovering over the link.</p><p>If, after looking at the header information and checking the email servers, you are still uncertain, we can use the AI that is being leveraged against us to help add a layer of certainty. If we just copy and paste the header into ChatGPT and ask it if it thinks this is a phishing email, it gives us a response like this:</p><p>Yes, <strong>this email appears to be a phishing attempt</strong>. There are multiple red flags in the email headers and content that strongly suggest malicious intent.</p><h3>🔥 Major Red Flags:</h3><h3>1. Spoofed Domain and From Address</h3><ul><li><strong>From</strong>: “Medium Security Team” &lt;no-reply@secure-notice.com&gt;</li><li>The domain secure-notice.com is <strong>not associated with Medium</strong> (as in the blogging platform) or any major online service. It’s likely a fake or parked domain used for phishing.</li></ul><h3>2. Failed Authentication Checks</h3><ul><li><strong>DMARC: fail</strong></li><li><strong>SPF: fail</strong></li><li><strong>DKIM: none</strong></li><li>These authentication failures indicate that the sender is <strong>not authorized</strong> to send email on behalf of secure-notice.com.</li></ul><h3>3. Suspicious Sending Server</h3><ul><li><strong>Received from: emkei.cz</strong></li><li>emkei.cz is a <strong>well-known fake mailer site</strong> that lets people spoof emails for testing (or abuse).</li><li>Legitimate organizations would not send email through this domain.</li></ul><p>Now this gives us another reason to be suspicious of the email, but I would highly recommend we use multiple methods to verify the email because the AI could give false positives/negatives, or it could be poisoned with characters that can not be rendered by the email service.</p><p>Lastly, if you still unable to figure out if the email is a phishing email, you can attempt to open up the link. Only do this in a safe environment because you could end up with malware on your machine. Also, you can use a disposable virtual machine or even websites that have virtual browsers, so that if the browser does get infected, it does not infect your machine.</p><p>Stay safe out there and always verify before you trust anything, you never know who or what is trying to steal your information.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbfac93bb20f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ESP32 Firmware Extraction]]></title>
            <link>https://medium.com/@serialhacker/esp32-firmware-extraction-18aff8378546?source=rss-e8b87fb4e5e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/18aff8378546</guid>
            <category><![CDATA[iot-security]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[esp32]]></category>
            <dc:creator><![CDATA[SerialHacker]]></dc:creator>
            <pubDate>Wed, 25 Jun 2025 00:24:18 GMT</pubDate>
            <atom:updated>2025-06-25T00:24:18.899Z</atom:updated>
            <content:encoded><![CDATA[<p>ESP32s are an extremely popular microcontroller used in IoT devices, and with more and more IoT devices being made each year, encountering an ESP32 is not uncommon, while hacking is also not uncommon. These little microcontrollers make integrating BLE and WIFI easy in embedded devices. In this article, I will discuss the tools and techniques needed to extract firmware embedded in these ESP32 devices, which you are likely to encounter when hacking IoT devices.</p><p>Our first task is to identify the ESP32 device and determine how we can interact with it. In my case, the ESP32 uses UART to communicate with the rest of the board. Below is an image that shows the UART pads and the ESP32 on the specific device I am targeting.</p><figure><img alt="A close-up of a circut board with an ESP32 and UART pads" src="https://cdn-images-1.medium.com/max/1024/1*GuxL7lKVqS6TIlGUPx5L6A.jpeg" /><figcaption>Figure 1: ESP32 and UART pads</figcaption></figure><p>So, in the image, we can see that our ESP32 is an ESP32-S3-WROOM-1. The great thing about the popularity of these devices is that they are very well documented, and we can easily find more information about them. A quick Google search of “<a href="https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf">ESP32-S3-WROOOM data sheet</a>” gives us all the information we need to prepare for the firmware extraction. We also see the UART interface, which I tried to highlight in blue. We see the usual RX, TX, and GND, but if you notice, there is also a pad for the boot. Looking into the documentation will tell us what we can use this for.</p><p>The data sheet has two main sections that concern us, and that would be the pin layout and boot configurations. We need the pin layout to see which GPIO the boot pad is hooked up to, so we know what exactly that does on the ESP32 device. Below is an image of the specific ESP32 pin layout.</p><figure><img alt="Pin layout of the ESP32" src="https://cdn-images-1.medium.com/max/776/1*_MiNknk3wagNbii4C7bW9A.png" /><figcaption>Figure 2: ESP32 pin layout — Credit: <a href="https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf">espressif</a></figcaption></figure><p>The highlighted pins are the pins that are connected to pads on the device. We see that RX, TX, GND, and GPIO0 are connected to pads. GND is the ground, TX allows the UART to transmit data, and RX allows the UART to receive data. Now we need to look into what exactly GPIO0 does.</p><p>The labelling on the board gives us a hint, as this pin is labeled as boot, so we should probably look into the boot information for this specific device. Checking the same data sheet that we found earlier, we see this about GPIO0 and boot configurations.</p><figure><img alt="Information from espressif about ESP32 boot configurations" src="https://cdn-images-1.medium.com/max/806/1*xxoP7NoqBGiVo1d5yDxhlg.png" /><figcaption>Figure 3: Boot configuration — Credit: <a href="https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf">espressif</a></figcaption></figure><p>We see that GPIO0 is used to put the chip into boot mode, and that by default, the chip value is one. In order to put the chip into boot mode, we would have to pull the value down to zero, which we can achieve by connecting the pad up to a ground. In an ideal world, we have probes that make our lives easy and allow us to connect to these pads, but these probes are relatively expensive and not as easily accessible as the humble paperclip. My theory was to get a paper clip bent into shape to rest on the pad and sit in a pin hole of the ground on another interface on the device. Below is the setup that allowed me to put the device into boot mode.</p><figure><img alt="UART hooked up to the target device with ESP32" src="https://cdn-images-1.medium.com/max/348/0*pKIIMRxDfz-GdMHX.jpg" /><figcaption>Figure 4: Boot configuration set up</figcaption></figure><p>This setup now allowed me to interface with the device while in boot mode and quickly switch to normal UART mode by just moving the paperclip a little bit so it no longer contacted the boot pad. Once we connect the jumper wires to our USB to UART adapter, we can interface with the ESP32 and see what information it gives us. Below is an image confirming that it is in boot mode, and we can download the firmware.</p><figure><img alt="Boot ready to download" src="https://cdn-images-1.medium.com/max/1024/1*zTyyU7yNLWaB4pKlm_KfRg.png" /><figcaption>Figure 5: Boot ready</figcaption></figure><p>Now that we know we have the device in boot mode, we need just one more piece of information to extract the data from it, and this is the partition table. Thankfully, most devices share this data through UART when booting, so that is our best bet to grab that information. We can just shift the paperclip over and power cycle the device, and see what it outputs when booting back up. Once we do that, we get this output from the ESP32&#39;s UART interface.</p><figure><img alt="UART output containing partition table" src="https://cdn-images-1.medium.com/max/1024/1*lKHLziqjTazwx0WpXEBiEg.png" /><figcaption>Figure 6: Partition table</figcaption></figure><p>Now that we have all the information we need, we can proceed to extract the firmware from the ESP32. We could use this information to grab specific data off the device, or we can grab the whole flash and then dissect it once we have it all downloaded. In order to do this, we use a tool called <a href="https://github.com/espressif/esptool">esptool</a>. This tool was built to interact with ESP devices, so it gives us the capability of downloading the firmware from UART. The command below is what I ran to extract the firmware from this device.</p><pre>esptool --chip esp32s3 --port /dev/ttyUSB0 read-flash 0x000000 0x1000000 fw.bin</pre><p>To explain the command about we first supply it with the chip type that we found earlier in our recon. Next, we tell it what port we have the UART hooked up to on our machine. From there, we tell it to read the flash and what parts of the flash to read. I just read the entire flash, so I do not have to go back and grab any more information off the chip. Lastly, we tell it what file it should output this data to.</p><p>This firmware extraction takes quite a while because UART was not meant for high-speed communication, but it surely gets the job done. Now, hopefully, if all went well, the firmware and more should be on your machine, and you can analyze it to develop attacks or reverse engineer the device. Hope this was helpful, and if you want more visuals and to learn more about IOT hacking, check out my YouTube channel at <a href="https://www.youtube.com/@Serial-Hacker">serialhacker</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18aff8378546" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>