<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Persistence on Cybersecurity Research</title><link>https://lukeleal.com/research/tags/persistence/</link><description>Recent content in Persistence on Cybersecurity Research</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Wed, 18 Oct 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://lukeleal.com/research/tags/persistence/index.xml" rel="self" type="application/rss+xml"/><item><title>One Line in query.php That Brings index.php and .htaccess Back From the Dead</title><link>https://lukeleal.com/research/posts/query-php-reinfection-watchdog/</link><pubDate>Wed, 18 Oct 2023 00:00:00 +0000</pubDate><guid>https://lukeleal.com/research/posts/query-php-reinfection-watchdog/</guid><description>&lt;p&gt;A frustrating thing to see in a cleanup is a file you just fixed going back to its infected version. You clean &lt;code&gt;index.php&lt;/code&gt;, reload the site, and the malware is back.&lt;/p&gt;&#10;&lt;p&gt;This sample shows one way that happens. It&amp;rsquo;s &lt;strong&gt;one line of PHP&lt;/strong&gt; added to &lt;code&gt;wp-includes/query.php&lt;/code&gt;, and it is the entire persistence mechanism.&lt;/p&gt;&#10;&lt;h2 id="finding-the-change"&gt;Finding the Change&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;query.php&lt;/code&gt; is a WordPress core file, so I could diff the sample against a clean copy. I compared it with &lt;code&gt;query.php&lt;/code&gt; from WordPress 6.6 and found only two differences:&lt;/p&gt;</description></item></channel></rss>