<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Rust on Matt Suiche</title><link>https://www.msuiche.com/categories/rust/</link><description>Recent content in Rust on Matt Suiche</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 27 Sep 2023 12:00:00 +0200</lastBuildDate><atom:link href="https://www.msuiche.com/categories/rust/index.xml" rel="self" type="application/rss+xml"/><item><title>Researching BLASTPASS: Detecting the exploit inside a WebP file - Part 1</title><link>https://www.msuiche.com/posts/researching-blastpass-detecting-the-exploit-inside-a-webp-file-part-1/</link><pubDate>Wed, 27 Sep 2023 12:00:00 +0200</pubDate><guid>https://www.msuiche.com/posts/researching-blastpass-detecting-the-exploit-inside-a-webp-file-part-1/</guid><description>&lt;p&gt;&lt;p class="markdown-image"&gt;
 &lt;img src="./images/riff-webp-vp8l-whitebg.png" alt="Anatomy of a WebP file" /&gt;
&lt;/p&gt;&lt;/p&gt;
&lt;h2 id="introduction"&gt;Introduction &lt;a href="#introduction" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Once again compression algorithms are showing us that they are ruling the internet. My initial encounter with compression algorithms was in the year 2007, while reversing the Windows hibernation file to reimplement the now well-known &lt;a href="https://github.com/MagnetForensics/rust-lzxpress" target="_blank" rel="noopener"&gt;Microsoft LZXpress&lt;/a&gt; which I discovered later was used in most Microsoft products until today. This journey continues today, with the scrutiny of the vulnerability CVE-2023-4863 located within the open-source &lt;a href="https://developers.google.com/speed/webp" target="_blank" rel="noopener"&gt;Libwebp&lt;/a&gt; library, affecting Chromium-based browsers such as such Mozilla, Chrome, and Edge but also messaging applications such as iMessage.&lt;/p&gt;</description></item><item><title>Researching FORCEDENTRY: Detecting the Exploit With No Samples</title><link>https://www.msuiche.com/posts/researching-forcedentry-detecting-the-exploit-with-no-samples/</link><pubDate>Mon, 19 Dec 2022 12:00:00 +0200</pubDate><guid>https://www.msuiche.com/posts/researching-forcedentry-detecting-the-exploit-with-no-samples/</guid><description>&lt;p&gt;Earlier this month, I reached out to my friend &lt;a href="https://twitter.com/chompie1337" target="_blank" rel="noopener"&gt;Valentina&lt;/a&gt; and told her I wanted to learn about macOS/iOS exploitation, so she recommended taking a look at the CVE-2021-30860 vulnerability, also known as FORCEDENTRY, and the prior work &lt;a href="https://github.com/jeffssh/exploits/tree/main/CVE-2021-30860" target="_blank" rel="noopener"&gt;her friend Jeffrey Hofmann posted on Twitter&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One year ago, &lt;a href="https://googleprojectzero.blogspot.com/2021/12/a-deep-dive-into-nso-zero-click.html" target="_blank" rel="noopener"&gt;Google Project Zero published an analysis&lt;/a&gt; of the NSO iMessage-based zero-click exploit &lt;a href="https://citizenlab.ca/2021/09/forcedentry-nso-group-imessage-zero-click-exploit-captured-in-the-wild/" target="_blank" rel="noopener"&gt;caught in-the-wild by Citizen Lab&lt;/a&gt; and was dubbed as “one of the most technically sophisticated exploits we’ve ever seen” by the Google Project Zero team.&lt;/p&gt;</description></item><item><title>POC 2022 - Korea - Keynote 🦀</title><link>https://www.msuiche.com/posts/poc-2022-korea-keynote/</link><pubDate>Thu, 10 Nov 2022 12:00:00 +0200</pubDate><guid>https://www.msuiche.com/posts/poc-2022-korea-keynote/</guid><description>&lt;p&gt;POC is one of the top conference in Asia and has been running since 2006, and today I&amp;rsquo;ve had the opportunity to give the opening keynote &lt;a href="https://github.com/msuiche/slides/blob/main/2022-POC-Keynote.pdf" target="_blank" rel="noopener"&gt;(Slides)&lt;/a&gt; for &lt;a href="https://powerofcommunity.net" target="_blank" rel="noopener"&gt;POC 2022&lt;/a&gt; conference in Seoul, Korea where I discussed our favorite memory safe language: Rust - thanks again to the organizers for the invitation.&lt;/p&gt;
&lt;p&gt;I chose to discuss Rust from a software engineering and application security point of view. The main points were:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The current availability of high-performance memory safe languages like Rust, make it the best time in history of computer science to be (or become) a software engineer.&lt;/li&gt;
&lt;li&gt;Rust is a great language to learn if you are new to programming and are looking for pointers for your software engineering career. I always recommend to students who want to get into software engineering to start with Python to learn the basics of programming, and then to learn a more mature language such as Rust which can be used for production level coding.&lt;/li&gt;
&lt;li&gt;Rust is a great language if you are starting a new project from scratch, but if you are trying to migrate an existing code base written in C/C++ this may be more challenging to fully rewrite everything the larger your existing code base is.&lt;/li&gt;
&lt;li&gt;Rust allows you to focus on the logic of your code instead of wasting unnecessary time debugging (especially compared to C/C++), without sacrificing on performance.&lt;/li&gt;
&lt;li&gt;Memory safety bugs represent around &lt;a href="https://github.com/Microsoft/MSRC-Security-Research/blob/master/presentations/2019_02_BlueHatIL/2019_01%20-%20BlueHatIL%20-%20Trends%2C%20challenge%2C%20and%20shifts%20in%20software%20vulnerability%20mitigation.pdf" target="_blank" rel="noopener"&gt;around 70% of security bugs (as reported by MSRC)&lt;/a&gt;, so having the opportunity to have safe code that compiles and works is amazing.&lt;/li&gt;
&lt;li&gt;There are two main avenues to make applications more secure:
&lt;ul&gt;
&lt;li&gt;either you improve the compiler (which is the best solution for legacy code base that can&amp;rsquo;t be rewritten for various reasons)&lt;/li&gt;
&lt;li&gt;or you actually use a safer language (a memory safe language - which is the best solution for new code base)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Although Microsoft has been doing a great job at promoting Rust, the lack of official WDK for kernel programming is problematic and we will probably see a lot of people writing Windows Rust user-mode applications just like they would write C/C++ user-mode applications due to lack of resources (There is definitely room for improvement that could be done on that side).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://github.com/msuiche/slides/blob/main/2022-POC-Keynote.pdf" target="_blank" rel="noopener"&gt;You can find the slides here. (Slides)&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>