<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="http://www.trevorkems.com/feed.xml" rel="self" type="application/atom+xml" /><link href="http://www.trevorkems.com/" rel="alternate" type="text/html" /><updated>2024-09-11T05:52:39+00:00</updated><id>http://www.trevorkems.com/feed.xml</id><title type="html">Trevor Kems</title><subtitle>Trevor Kems&apos; personal site</subtitle><author><name>Trevor Kems</name></author><entry><title type="html">Operation Big Brother - Unmasking Vulnerabilities in Cheap IoT Cameras from One Chinese Manufacturer</title><link href="http://www.trevorkems.com/operation-big-brother-iot-camera/" rel="alternate" type="text/html" title="Operation Big Brother - Unmasking Vulnerabilities in Cheap IoT Cameras from One Chinese Manufacturer" /><published>2024-09-05T00:00:00+00:00</published><updated>2024-09-05T00:00:00+00:00</updated><id>http://www.trevorkems.com/operation-big-brother-iot-camera</id><content type="html" xml:base="http://www.trevorkems.com/operation-big-brother-iot-camera/"><![CDATA[<h1 id="presentation">Presentation</h1>
<p>I gave a presentation based on this work at the September 2024 SecDSM meeting. A recording of which can be found here: <a href="https://www.youtube.com/watch?v=HnuIjPVKBew">https://www.youtube.com/watch?v=HnuIjPVKBew</a></p>

<h1 id="intro">Intro</h1>

<p><img src="/images/victure-iot/victure-camera.png" width="450" height="600" /></p>

<p>I found my Victure PC420 Baby Monitor (Wi-Fi Camera) while out thrifting and brought it home with me. I like to collect older or disused IoT devices to experiment with as it prevents me from risking expensive, new devices unless I absolutely have to. In this case, the camera retails for only $30 on the Victure website, making it a reasonable choice for consumers and hackers alike.</p>

<p>The camera is a basic design with an adjustable base holding up the camera body. The design is similar to the <a href="https://www.ifixit.com/Device/Nest_Dropcam_Pro">Nest Dropcam</a> but I have seen many similar designs in other similarly priced IoT cameras. There is a micro-SD card slot on the side and a USB micro-B port on the back for power. It seems that the camera also has some IR LEDs, a microphone, and speaker. A recessed reset button is also on the back next to the speaker.</p>

<p>The firmware version of my camera was 1.1.39</p>

<h1 id="hardware-teardown">Hardware Teardown</h1>

<p>After some failed attempts at getting into the plastic shell of the device from the bottom, I found that several small plastic clips held the two halves together. With enough force, they did pop out of place and the mainboard of the camera was attached to the front section. I disconnected the speaker cable and began the process of removing the internals to get a look at the mainboard and any secrets that it may hold.</p>

<p><img src="/images/victure-iot/victure-pcb-front.jpg" width="400" height="300" />
<img src="/images/victure-iot/victure-pcb-back.jpg" width="400" height="300" /></p>

<p>The main system-on-a-chip (SoC) of the camera is covered with a heatsink which I think is epoxied to the SoC. I also took a look and found the flash IC on the back of the board. I quickly grabbed by hot air station to desolder it and decided that I wanted to try to dump the contents using SPI. I also noted a potential UART or serial interface.</p>

<p><img src="/images/victure-iot/victure-SOIC8.jpg" alt="" /></p>

<p>After I removed the flash IC, I found the datasheet online and found the SPI interface pinout. This is critical as the wrong pinout can damage or destroy a IC. After finding out the IC was 3.3V and connecting up my <a href="https://www.pomonaelectronics.com/products/test-clips/soic-clip-8-pin">Pomona “Chip Clip”</a> following the pinout, I connected it to my <a href="https://www.sparkfun.com/products/12942">BusPirate</a>. The BusPirate is a handy tool that supports a variety of protocols, but SPI is what I am using it for here.</p>

<p>Using the tool <a href="https://www.flashrom.org/">flashrom</a>, I was able to, with a little bit of fiddling with the connection, dump the contents of the flash. The result was a .bin file that contained the raw firmware of the camera. I used <a href="https://github.com/ReFirmLabs/binwalk">binwalk</a> to see that a valid filesystem was found in the .bin file. Now we can start reverse engineering!</p>

<h1 id="reverse-engineering">Reverse Engineering</h1>

<p>My first step when reverse engineering is to use binwalk to see if there are any known images, filesystems, or other data and then extracting it. In this case, it was a simple unencrypted JFFS2 filesystem and I used <code class="language-plaintext highlighter-rouge">binwalk -e &lt;name&gt;</code> to extract it to get the directory structure and binaries out of the .bin file.</p>

<p>Because I used a raw flash dump of the firmware and not a firmware update file, I was able to see the configuration files as they are stored on the camera during normal use. This was due to this camera being used previously, I did find the previous user’s Wi-Fi information, UID value, and UUID of the camera. This could pose a risk to user’s who discard or donate devices where a dedicated attacker can then get access to even the most secure Wi-Fi password. Making sure to fully reset devices before getting rid of them can help prevent attacks from happening.</p>

<p>I began the process of exploring the system files. I mainly just randomly poke around the firmware in places I think would be interesting. /etc/ is a good place to start, along with /bin/, /usr/, and /var/. Vendors put binaries and config files in lots of different places. I noticed that /etc/passwd contained a salted password hash that I noted down to attempt to crack with Hashcat. I also noticed a large amount of references to the company Anyka and Nooie. Anyka is the SoC manufacture and Nooie sells similar IoT cameras (more about them later). After some poking around in /etc/, I found several start-up scripts that launched the anyka_ipc binary. Another hint that this was the main binary was the size, at 1.9MB, it must have something interesting inside. I then decided to launch Hashcat while I loaded up the anyka_ipc binary in Ghidra and was surprised when I got a hit after only 20 seconds!</p>

<p><img src="/images/victure-iot/hashcat-cracked-password.png" alt="" /></p>

<h2 id="cve-2023-41610">CVE-2023-41610</h2>
<h3 id="use-of-hardcoded-root-password">Use of hardcoded root password</h3>

<p>The PC420 uses a hardcoded root password of <code class="language-plaintext highlighter-rouge">nooie2019</code>. This was cracked fairly quickly with Hashcat and a custom wordlist of the company names and model numbers and run with the dive ruleset. I will expand on the impact of the vulnerability later, but by default there is no way to use the root password as no telnet, SSH, or other shell is exposed from the camera.</p>

<h2 id="ghidra">Ghidra</h2>

<p>Moving on, I started looking into the anyka_ipc binary in Ghidra.</p>

<p>The anyka_ipc binary has functions for all kinds of tasks and almost serves as a BusyBox or RTOS function on the camera. This is common on IoT devices to save space and resources. To save time, I am going to only focus on only the functions related to the disclosed vulnerabilities.</p>

<p>While poking around the main function, I noticed some odd calls right away to load something from /mnt/.</p>

<p><img src="/images/victure-iot/sd-card-code-1.png" alt="Ghidra code showing a file being read from the SD card and sending it to 3DES decryption" /></p>

<p>After some more digging, I was able to fairly easily reverse engineer what was going on.</p>

<h2 id="cve-2023-41612">CVE-2023-41612</h2>
<h3 id="hardcoded-encryption-key-allowing-for-code-execution-from-the-micro-sd-card-on-boot">Hardcoded encryption key allowing for code execution from the micro-SD card on boot</h3>

<p>The main function within anyka_ipc checks for the mounted micro-SD card and a file named <code class="language-plaintext highlighter-rouge">enable_telnetd.dat</code>. It then attempts to decrypt the file using 3DES with a hardcoded key of <code class="language-plaintext highlighter-rouge">123</code> padded with null bytes (zeros) to the required key length of 24 bytes. It then moves the decrypted data to <code class="language-plaintext highlighter-rouge">/tmp/autoexec.sh</code> where it is run with root permissions before any other function in the binary. This gives anyone with access to the micro-SD card the ability to run code with root privileges. In the spirit of the hardcoded filename, I used this feature to enable telnetd on the camera and login using the root password I had cracked earlier. I used CyberChef to generate the file with the hardcoded 3DES key and IV values and ta-da! Telnet was open on port 23 and allowed me to login with the <code class="language-plaintext highlighter-rouge">root:nooie2019</code> credentials I cracked using HashCat.</p>

<p><img src="/images/victure-iot/sd-card-code-2.png" alt="" /></p>

<p><img src="/images/victure-iot/cyberchef-sdcard-3DES-key.png" alt="" /></p>

<p><img src="/images/victure-iot/victure-telnet-enabled.png" alt="" /></p>

<p>I was also able to abuse this to create a reverse shell from the camera.</p>

<p><img src="/images/victure-iot/victure-nc-reverse-shell.png" alt="" /></p>

<p>The final vulnerability I discovered took the most amount of effort to find as it is related to the encryption of certain network traffic of the camera and uses a custom encryption scheme.</p>

<h2 id="cve-2023-41611">CVE-2023-41611</h2>
<h3 id="weak-and-partially-hardcoded-encryption-key-used-to-encrypt-sensitive-data-such-as-username-password">Weak and partially hardcoded encryption key used to encrypt sensitive data such as username, password.</h3>

<p>In addition to this, video and audio data from the camera is completely unencrypted. This means that anyone on the same Wi-Fi as the camera, or in a man-in-the-middle (MITM) position on the network, can view this data.</p>

<h1 id="the-protocol---protobuf-and-udp">The Protocol - ProtoBuf and UDP</h1>

<p>After looking at the camera’s anyka_ipc binary, I found several methods referencing an RPCHeader that matched the plaintext data I saw on the network. This data was nested and used the TwoFish encryption scheme to protect the data. After finding the encoding function names, I found that the camera most likely uses the NanoPB library to encode the data using a ProtoBuf-like structure. Having never seen ProtoBuf encoding before, it took me a while to figure out how to decode the data.</p>

<p>ProtoBuf uses fields and types to tell the user what the content being sent is. Using an online decoder, I was able to see the field number, type, and content of a captured message.</p>

<p><img src="/images/victure-iot/protobuf-decoded-online.png" alt="" /></p>

<p>Field 11, while unreadable, contains the data encrypted with TwoFish.</p>

<h2 id="twofish-encryption-key-generation">TwoFish Encryption Key Generation</h2>

<p>The encryption key is generated for each message sent to or from the client. The key is simply the following: <code class="language-plaintext highlighter-rouge">RPCHeaderMethod+RPCHeaderID+"ApEMaNSNoOiE"</code> with <code class="language-plaintext highlighter-rouge">RPCHeaderMethod</code> being the 4th field of the main RPC message, <code class="language-plaintext highlighter-rouge">RPCHeaderID</code> being the 5th field, and the last value being the hardcoded string. All values are concatenated together to get the TwoFish encryption key. For following messages in a chain of messages, the ID value is simply increased by 1 each time.</p>

<p>Going deeper, the <code class="language-plaintext highlighter-rouge">RPCHeaderID</code> value is generated from rand() which is seeded with the current time and then cut down. While the ID value is included in the parent RPC message in plaintext, it could also be brute forced fairly quickly if not included.</p>

<h2 id="the-protocol---video-and-audio-data">The Protocol - Video and Audio data</h2>

<p>I was also able to reconstruct a partial video frame using the raw H.265 data found during a Wireshark capture. Below is the network setup I used to simulate a MITM attack outside of the end user’s network (for example, this could simulate an ISP snooping on traffic just outside of the gateway)</p>

<p><img src="/images/victure-iot/mitm-example.png" alt="" /></p>

<p>Video and audio data are sent using a custom TCP protocol that is not encrypted. After some careful review of the H.264 and H.265 protocol documentation and the anyka_ipc binary, I was able to manually decode some of the video data. The protocol uses a simple message format that is constant and includes length, media type, and other flags followed by raw video or audio data.</p>

<p>I wrote a very simple decoder plugin for Wireshark that displays the raw mediaData extracted from the packet. Note: the end user must choose the correct TCP port to decode. You can find it here: <a href="https://github.com/TKems/Victure-Camera-Vulnerabilities">https://github.com/TKems/Victure-Camera-Vulnerabilities</a></p>

<p><img src="/images/victure-iot/wireshark-decoder-H265.png" alt="" /></p>

<p>Using the plugin, I was able to manually gather several video type mediaData payloads and combine them into a single stream of data. This data then was transcoded into a MP4 container using FFMPEG to get a partial frame of data. Clearly, the timestamp of the video can be seen.</p>

<p><img src="/images/victure-iot/recovered-video-with-timestamp.png" alt="" /></p>

<p>While I thought of writing a full decoder plugin, I decided that I would let someone with more knowledge about video decoding attempt it.</p>

<h3 id="risks-of-unencrypted-video-and-audio-data">Risks of unencrypted video and audio data.</h3>

<p>Because the camera uses Wi-Fi to communicate with the server and user’s phones, it is possible for an attacker with access to the Wi-Fi network to snoop on the camera feed. It may also be possible to inject data into the video stream, just like in Hollywood!</p>

<p>Victure also states in their app that connections are secured with encryption (which is true when uploading files to AWS and using TLS) but as shown above, is not true for video and audio data along with RPC control data from the camera.</p>

<p><img src="/images/victure-iot/Victure-home-app-encryption.jpg" width="250" height="500" /></p>

<h1 id="mqtt">MQTT</h1>

<p>During reverse engineering, I discovered an open MQTT server that did not require authentication to view subscriptions or messages. Due to how the cameras are implemented, messages are sent to the MQTT which contain the UID and UUID values every time the camera comes online. During a 5-6 hour period, I observed over 5,000 messages and I believe that the vast majority were unique.</p>

<p><img src="/images/victure-iot/victure-mqtt-censored.png" alt="" /></p>

<p>The MQTT was promptly secured by limiting the access of unauthenticated accounts after I reported the issue to Victure/Apeman.</p>

<h1 id="android-app">Android App</h1>

<p>Victure offers an Android app to allow users to view their cameras remotely, manage their accounts, and even talk through the camera. I thought that this would have some information about the connection process that I could use in order to reverse engineer the video and audio data that was sent to and from the camera to the app. Also, with the over 500,000 downloads on Google Play, I figured that a large number of users would be still using Victure cameras with the app.</p>

<p><img src="/images/victure-iot/victure-android-app-stats.png" alt="" /></p>

<p>There are two ways I have found to easily get an APK from the Google Play store. 1) Find it on a mirror site like APKMirror (use at your own risk) 2) Download it onto a phone with developer mode enabled, connect over ADB shell, find the location, and download the APK file(s).</p>

<p>To extract the APK, I used two different tools. The most useful was <a href="https://github.com/pxb1988/dex2jar">Dex2Jar</a> that allowed me to get a .jar file from the APK that contained decompiled Java code of the app. The second tool, <a href="https://apktool.org/">ApkTool</a>, allowed me to view the file structure of the APK file and find manifest, config, and library files. After experimenting with other tools, <a href="https://github.com/skylot/jadx">JDAX</a> is much easier to use, and I have switched to using it for other projects.</p>

<p>I used <a href="https://java-decompiler.github.io/">JD-GUI</a> to view the structure and classes of the .jar file and to search for strings and other items. Over the course of a day or two, I found several concerning items. The first was the login code. Along with network captures from an active Android app, I found that the user’s password was MD5 hashed and then sent to the server. While this isn’t a vulnerability by default, it is concerning that hashing occurs on the client-side. Typically, password hashing occurs on the server-side as client-side hashing provides little benefit when the connection is secured with TLS. Additionally, as with Windows Pass-the-Hash attacks, the MD5 hash is unsalted, meaning that raw MD5 hashes can be “passed” if the password OR hash is known. This concerns me as the server-side may be storing un-salted MD5 hashes of user’s passwords, however, I have no evidence to prove this as I don’t have access to the server-side code currently running on the server.</p>

<p><img src="/images/victure-iot/android-password-md5.png" alt="" />
<img src="/images/victure-iot/android-password-md5-2.png" alt="" /></p>

<p>Another finding was the use of hardcoded values to sign requests to the server. HMACSHA256 is used to sign API requests to the server for what I can only guess is additional security. The HMAC secret was found to be hardcoded in both the Android app and anyka_ipc binary. This could allow an attacker with access to the UUID and UID of a user’s camera to forge requests to the server. However, the Android app requests also require an api_token header assigned during login. No such header is required for the camera. Note: both the UID and UUID were viewable or constructable while connected to the MQTT server. Since the MQTT server has been secured, I was unable to gain UUIDs and UIDs of other cameras.</p>

<p><img src="/images/victure-iot/sign-function-Android.png" alt="" /></p>

<h1 id="company-relationships">Company Relationships</h1>

<h3 id="victure-nooie-and-apeman">Victure, Nooie, and Apeman</h3>
<p>During my investigation into Victure and their products, I found several references to other companies. As with the hardcoded password and keys, Nooie and Apeman both showed up several times. While looking into both companies, I found several clues that lead me to believe that all 3 companies are related, working closely together, or may even be owned by the same entity.</p>

<p>Nooie seems to be a sibling of Victure as several of the underlying technologies are shared between them. I found that the camera administration login both are based on Nooie-branded pages. I also found several references to Nooie within the code during reverse engineering.</p>

<p><img src="/images/victure-iot/victure-mangement-login.png" alt="" /></p>

<p>I also found that the FCC ID reports are signed by the same individual with the same email domain listed for both Nooie and Victure products listed under the Apeman brand.</p>

<p>Victure PC420 Camera FCC ID info (from FCCID.io): <a href="https://fccid.io/2AWNK-PC420">https://fccid.io/2AWNK-PC420</a></p>

<p>Nooie Device Info (from FCCID.io): <a href="https://fccid.io/2ARER">https://fccid.io/2ARER</a></p>

<p>Additionally, the individual I was instructed to contact about the vulnerabilities had an apemans.com email address.</p>

<p>To further confirm the relationship, I purchased a <a href="https://www.amazon.com/360-degree-Wireless-Security-Tracking-Detection/dp/B07PJ67CKC">Nooie 360 Cam from Amazon</a>. The camera is highly rated and is likely used by many as a baby monitor (the main use case listed on the Amazon page and product literature).</p>

<p>While I didn’t invest the amount of time testing this camera as I did the Victure one, I found that the network traffic of the Nooie 360 Cam was extremely similar. I feel confident that the video and audio data are not encrypted.</p>

<p>A WireShark capture of the Nooie 360 Cam
<img src="/images/victure-iot/nooie-wireshark-P2P-UDP.png" alt="" /></p>

<p>A similar capture from a Victure camera
<img src="/images/victure-iot/victure-raw-UDP-P2P.png" alt="" /></p>

<h1 id="open-gitlab-repos">Open Gitlab Repos</h1>
<p>After connecting the dots with Victure, Nooie, and Apeman, I conducted some basic OSINT against the 3 companies. During a simple Google search for Apeman and the word “git”, I identified a Gitlab instance that contained several public repositories. After some investigation, I found that some of the repos contained AWS secret keys, usernames, passwords, and Go code for what potentially was the backend infrastructure. I immediately emailed my contact at Victure to confirm if Apeman and Victure were related and after confirmation, I sent a basic summary of the risks of the open repos and the URL along with a recommendation to change all AWS keys, passwords, and other sensitive information within the public repos. Several of the repos were private within hours of my report, and within a few days the site now returns a 403 response when I try to visit it.</p>

<p><img src="/images/victure-iot/gitlab-with-repos.png" alt="" /></p>

<p>I would like to note that I made no attempt to confirm the validity of the AWS secret keys, passwords, or other found sensitive information beyond what context I was able to gather from the code and config files within the Gitlab repos. While some keys seemed to be debug or development keys, others looked like potentially production keys.</p>

<h1 id="reporting-the-vulnerabilities-to-victureapeman">Reporting the Vulnerabilities to Victure/Apeman</h1>

<p>I emailed Victure first on June 5th, 2023 and noted that I had vulnerabilities to report. On June 16th, 2023, after discussions about the security of sending the report over email, I provided Victure with the vulnerability report which contained details of the above findings. Victure responded that the MQTT server was fixed on July 18th, 2023 and that it would be until at least September 20th, 2023 before the other fixes would be finished. In the end, due to the discovery of the public Gitlab repos, I opted to wait until at least early 2024 to make the information public and to allow Victure, Apeman, and Nooie time to take actions to fix the further findings. I also planned on submitting these findings for DEFCON 32’s CFP, but had other obligations that prevented me from doing so.</p>

<p>Overall, Victure has been accepting of my report and asked several clarifying questions in order to fix the vulnerabilities.</p>

<h1 id="fixes">Fixes</h1>
<p>Of the vulnerabilities identified, I found that the SD Card and hardcoded root password issues were fixed within an updated firmware file provided to me by Victure. I found that the video data was not encrypted on the new firmware along with the ProtoBuf data also using the same encryption method and key structure.</p>

<p>The new firmware version that was provided to me that fixed CVE-2023-41610 and CVE-2023-41612 was version 4.4.14.</p>

<h1 id="protection-of-sensitive-information">Protection of Sensitive Information</h1>
<p>During investigation and discovery of the identified vulnerabilities, every reasonable action was taken to avoid the disclosure of potentially sensitive customer information. While only the specific Victure and Nooie cameras owned by me were tested during MITM capture, due to the peer-to-peer nature of the camera protocol, there is no guarantee that other customer data may be captured or viewed by 3rd parties.</p>

<p>As stated above, I did not test the found AWS credentials or any other sensitive information (such as passwords to services) found within the Gitlab repos. I have not received a response from Victure/Nooie/Apeman regarding these fixes.</p>

<h1 id="conclusion">Conclusion</h1>
<p>As demonstrated in several other conference talks, blog articles, and news reports, IoT cameras can pose a security threat to those that use them. Currently there is little to no regulation surrounding the security of cameras outside of limiting their use in government buildings. Use of P2P (peer-to-peer) protocols can lower costs to sellers while simultaneously introducing an unknown risk to customers.</p>

<h1 id="future-work">Future Work</h1>
<p>While these vulnerabilities I’ve identified are significant, I believe that further research into IoT cameras will show weaknesses within popular IoT camera firmware that have similar features.</p>

<h1 id="related-talkspresentations">Related Talks/Presentations</h1>
<p><a href="https://www.youtube.com/watch?v=Z_gKEF76oMM">DEF CON Safe Mode - Paul Marrapese - Abusing P2P to Hack 3 Million Cameras</a></p>]]></content><author><name>Trevor Kems</name></author><category term="Projects" /><category term="IoT" /><category term="Cameras" /><category term="CVE" /><category term="Exploits" /><category term="Vulnerabilities" /><category term="Talks" /><summary type="html"><![CDATA[How secure are some IoT cameras? Not very! From hardware issues to missing encryption, we will go over flaws in popular IoT cameras sold by one manufacturer.]]></summary></entry><entry><title type="html">COM S 309 Multiplayer Game with Phone Integration</title><link href="http://www.trevorkems.com/coms-309/" rel="alternate" type="text/html" title="COM S 309 Multiplayer Game with Phone Integration" /><published>2020-11-09T00:00:00+00:00</published><updated>2020-11-09T00:00:00+00:00</updated><id>http://www.trevorkems.com/coms-309</id><content type="html" xml:base="http://www.trevorkems.com/coms-309/"><![CDATA[<h3 id="overview">Overview:</h3>
<p>Our focus during this project was to create a system where multiple users could create a party and play a game together using the player’s phones and one computer as the host.</p>

<h3 id="my-role">My role:</h3>
<p>My main focus during the project was to create the backend with my other teammate Eva. We worked together to create the MVC framework that responded to the Android web socket requests, controlled the game logic, and game save data in a backend MySQL database.</p>

<h3 id="skills-gained">Skills gained:</h3>
<p>During the project I was able to get a better understanding of software development and how to work with a team to complete a medium sized software project. I also learned how to work remotely with a team as half of the semester was remote due to the COVID-19 pandemic. I also learned the MVC framework and how to use it to implement an application that also had a strong database section.</p>

<h3 id="resources-used">Resources used:</h3>
<p>Our team used Android Studio, MVC, Eclipse, MySQL/SQL, and Linux.</p>]]></content><author><name>Trevor Kems</name></author><category term="Projects" /><category term="Android" /><category term="Server" /><category term="309" /><category term="ISU" /><category term="309" /><summary type="html"><![CDATA[During COM S 309, our team created an application were a group of users can play a multiplayer game with others nearby using a phone and computer.]]></summary></entry><entry><title type="html">CPR E 186 LEDs and Sound</title><link href="http://www.trevorkems.com/cpre-186/" rel="alternate" type="text/html" title="CPR E 186 LEDs and Sound" /><published>2020-11-09T00:00:00+00:00</published><updated>2020-11-09T00:00:00+00:00</updated><id>http://www.trevorkems.com/cpre-186</id><content type="html" xml:base="http://www.trevorkems.com/cpre-186/"><![CDATA[<h3 id="overview">Overview:</h3>
<p>During CPR E 186, our focus was to create a Arduino based system to control RGB LEDs to the beat and level of music. Our design focused on a header board on top of the Arduino that was able to handle the power, data, and Bluetooth communication to a host computer that would handle the audio processing. In the end, we had to remove the Bluetooth as the Arduino didn’t have enough processing power to handle Bluetooth communication along with the RGB control so we just used a USB cable.</p>

<p><img src="/images/186-prototype.jpg" alt="" /></p>

<h3 id="my-role">My role:</h3>
<p>My main focus during the project was to create the PCB design, make to work with the Arduino, order the parts, and to solder all the parts together. In the picture above, you can see the prototype created on a breadboard. The final version used a PCB with a dedicated power circuitry.</p>

<h3 id="skills-gained">Skills gained:</h3>
<p>I had little to no knowledge of how to design PCBs and how to pick parts to fit on a board. I had to learn to use a PCB design software and to make sure all the of the vias worked correctly. Surprisingly, I only had one small problem with the Bluetooth power trace which wasn’t used in the final version.</p>

<h3 id="resources-used">Resources used:</h3>
<p>Our team used ETG, EasyEDA, DigiKey, Arduino Studio, and the Processing framework.</p>]]></content><author><name>Trevor Kems</name></author><category term="Projects" /><category term="LEDs" /><category term="Arduino" /><category term="ISU" /><summary type="html"><![CDATA[During CPR E 186, our team created a custom PCB header for an Arduino to control RGB LEDs to the sound of music]]></summary></entry><entry><title type="html">DLink Movienite Part 2 and Hardware Hacking</title><link href="http://www.trevorkems.com/dlink-movienite-part-2/" rel="alternate" type="text/html" title="DLink Movienite Part 2 and Hardware Hacking" /><published>2020-05-19T00:00:00+00:00</published><updated>2020-05-19T00:00:00+00:00</updated><id>http://www.trevorkems.com/dlink-movienite-part-2</id><content type="html" xml:base="http://www.trevorkems.com/dlink-movienite-part-2/"><![CDATA[<p>In my previous post about the DLink Movienite <a href="https://www.trevorkems.com/dlink-movienite">Part 1 Here!</a>, I went over how I found a serial port enabled with root shell access. In this post, I will go over some basics of finding a open serial ports and how to use a serial device to gain network access using that port.</p>

<p>Once you have access to a serial port on a device, sometimes there can be programs that allow for network access even when there wasn’t any services at first.</p>

<p>On the Movienite, in the /etc/ directory we find the inetd.conf file that configures the inetd service. However it seems like inetd isn’t started on boot. To start it, just run the inetd command without any arguments. In the case of the Movienite, since the inetd config file starts the telnetd service, we can then connect over telnet to the device.</p>

<p><img src="/images/telnet-command.png" alt="" /></p>

<p>After telnet is established, we can use it to poke around the file system a bit more without debug message interrupting our commands.</p>

<p><img src="/images/dlink-movienite-2.jpg" alt="" /></p>

<p>Overall, this allows an attacker with physical access to the device to compromise user information. My next step is to find if this device has any remote vulnerabilities that an attacker could take advantage of.</p>

<p>In progress…</p>]]></content><author><name>Trevor Kems</name></author><category term="Projects" /><category term="Hardware Hacking" /><category term="Personal Project" /><summary type="html"><![CDATA[The DLink Movienite streaming device has a serious hardware flaw that is exploited easily for root level access.]]></summary></entry><entry><title type="html">IASG Presentation</title><link href="http://www.trevorkems.com/IASG-presentation/" rel="alternate" type="text/html" title="IASG Presentation" /><published>2020-03-04T00:00:00+00:00</published><updated>2020-03-04T00:00:00+00:00</updated><id>http://www.trevorkems.com/IASG-presentation</id><content type="html" xml:base="http://www.trevorkems.com/IASG-presentation/"><![CDATA[<p>I was given the privilege to give a talk at the Information Student Assurance Student Group meeting on March 3rd, 2020. I enjoyed talking about some of my current and past projects and below you will find a link to the Google Slides and a video of the presentation on YouTube.</p>

<p>Some of the projects listed in the presentation are not currently on my website for one or many reasons. I hope to go into more detail as soon as possible, so stay tuned!</p>

<p>IASG Post:</p>

<p><a href="https://iasg.iac.iastate.edu/meetings/2020/03/02/meeting.html">Post</a></p>

<p>Slides:</p>

<p><a href="https://docs.google.com/presentation/d/1jYWCZxqzzmHtuGNaBcyEppj0qsGm9e7zhW9ThNL43HU/edit?usp=sharing">IASG Slides</a></p>

<p>Video:</p>

<p><a href="https://www.youtube.com/watch?v=r7A0l4D0ADY">IASG Presentation Video (YouTube)</a></p>]]></content><author><name>Trevor Kems</name></author><category term="Presentations" /><category term="ISU" /><summary type="html"><![CDATA[I was given the privilege to give a presentation to the Iowa State Information Student Assurance Student Group!]]></summary></entry><entry><title type="html">DLink Movienite</title><link href="http://www.trevorkems.com/dlink-movienite/" rel="alternate" type="text/html" title="DLink Movienite" /><published>2020-02-10T00:00:00+00:00</published><updated>2020-02-10T00:00:00+00:00</updated><id>http://www.trevorkems.com/dlink-movienite</id><content type="html" xml:base="http://www.trevorkems.com/dlink-movienite/"><![CDATA[<h2 id="overview">Overview</h2>
<p>The DLink Movienite streaming device is a small, black device that was released in 2012. It supports Netflix, Vudu, Pandora, and YouTube out of the box and is very easy to setup. It has Wi-fi, Ethernet, and HDMI on the rear of the unit. This may seem like a disappointment, however there is more available inside the device.</p>

<p><img src="/images/dlink-movienite.jpg" alt="" /></p>

<p>As you can see, there is a lot inside this small box! At first I noticed the Wi-fi card in the mini PCI Express slot. However, after further examination, I noticed a 4 pin header on the left of the board. This proved to be a very interesting discovery. In order to get access I soldered on some jumper wires. At first I did some digging and found that this port most likely was a serial debugging port. However, I had no idea if this would be the case. Since I didn’t have a nice USB to serial adapter, I found an <a href="https://oscarliang.com/use-arduino-as-usb-serial-adapter-converter/">article</a> describing how to use an Arduino’s built in serial programmer as a serial adapter. I choose to just tie the Arduino’s RESET pin to GND and then connect the RX and TX to the pins on the board.</p>

<p><img src="/images/dlink-movienite-2.jpg" alt="" /></p>

<p>After I connected it to my PC, I opened up PuTTY and choose the serial option. I played around for a while with baud rate for a while, however, I only got a garbled text output. I decided to flip the TX and RX wires and see if that would change anything.</p>

<!-- Missing Image
![](/images/dlink-movienite-3.jpg)
-->

<p>Success! And a surprise! uBoot output and a root shell!</p>

<p>After some more digging around in the file system, I found a vulnerability that would allow a remote attacker control of the box remotely could be started on the device using a single, simple command. I am not listing it here as it may have security implications.</p>

<p>I am still working on this project and still trying to find some possible software based vulnerabilities within the firmware of the device.</p>

<p>Part 2 here!: <a href="https://www.trevorkems.com/dlink-movienite-part-2">Part 2</a></p>]]></content><author><name>Trevor Kems</name></author><category term="Projects" /><category term="Hardware Hacking" /><category term="Personal Project" /><summary type="html"><![CDATA[The DLink Movienite streaming device has a serious hardware flaw that is exploited easily for root level access.]]></summary></entry><entry><title type="html">New Site!</title><link href="http://www.trevorkems.com/new-site/" rel="alternate" type="text/html" title="New Site!" /><published>2020-02-10T00:00:00+00:00</published><updated>2020-02-10T00:00:00+00:00</updated><id>http://www.trevorkems.com/new-site</id><content type="html" xml:base="http://www.trevorkems.com/new-site/"><![CDATA[<p>The site was migrated today to Github Pages as the Wordpress site hosted on AWS was not being used effectively for the price per month. This will allow me to host the site for much cheaper (free) with roughly the same look, feel, and functionality.</p>]]></content><author><name>Trevor Kems</name></author><category term="Meta" /><category term="Site Related" /><summary type="html"><![CDATA[The site was moved from AWS EC2 to a Github Pages]]></summary></entry></feed>