<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Lfi on Yusuf AlMahmeed</title><link>https://www.yusufalmahmeed.com/tags/lfi/</link><description>Recent content in Lfi on Yusuf AlMahmeed</description><generator>Hugo</generator><language>en-us</language><copyright>© 2026 Yusuf AlMahmeed · &lt;a href="https://www.yusufalmahmeed.com/privacy/"&gt;privacy&lt;/a&gt;</copyright><lastBuildDate>Sat, 10 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.yusufalmahmeed.com/tags/lfi/index.xml" rel="self" type="application/rss+xml"/><item><title>Inclusiveness</title><link>https://www.yusufalmahmeed.com/posts/inclusiveness/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://www.yusufalmahmeed.com/posts/inclusiveness/</guid><description>&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;Machine&lt;/strong&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Inclusiveness&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;Platform&lt;/strong&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;OffSec Proving Grounds&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;Difficulty&lt;/strong&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Intermediate&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;OS&lt;/strong&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Linux (Debian 10)&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;Learning Path&lt;/strong&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Web fundamentals / OSWA &amp;amp; OSCP prep&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;Key Techniques&lt;/strong&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;User-Agent bypass, LFI, anonymous FTP upload, LFI-to-RCE, SUID PATH hijacking&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;Est. Time to Complete&lt;/strong&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;~45–60 min&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;!-- TODO(Yusuf): confirm the Proving Grounds difficulty rating for Inclusiveness. --&gt;&#10;&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;&#10;&lt;p&gt;Inclusiveness lives up to its name: the whole box is a chain of &lt;strong&gt;file&#10;inclusion&lt;/strong&gt;. A hidden &lt;code&gt;robots.txt&lt;/code&gt; that only answers search-engine bots points to&#10;a &lt;code&gt;/secret_information/&lt;/code&gt; page with a &lt;code&gt;lang&lt;/code&gt; parameter that includes files with no&#10;sanitization, a classic &lt;strong&gt;Local File Inclusion (LFI)&lt;/strong&gt;. By reading the FTP server&amp;rsquo;s&#10;own config through that LFI, we learn where anonymous FTP uploads land on disk,&#10;upload a PHP reverse shell, and include it to land a shell as &lt;code&gt;www-data&lt;/code&gt;. Root&#10;comes from a custom &lt;strong&gt;SUID&lt;/strong&gt; helper in &lt;code&gt;tom&lt;/code&gt;&amp;rsquo;s home directory that calls &lt;code&gt;whoami&lt;/code&gt;&#10;by its bare name, so prepending a fake &lt;code&gt;whoami&lt;/code&gt; to &lt;code&gt;PATH&lt;/code&gt; makes it hand us a root&#10;shell.&lt;/p&gt;</description></item></channel></rss>