<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Malware on 0xMatheuZ</title><link>https://matheuzsecurity.github.io/categories/malware/</link><description>Recent content in Malware on 0xMatheuZ</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 31 Aug 2026 00:00:00 -0300</lastBuildDate><atom:link href="https://matheuzsecurity.github.io/categories/malware/index.xml" rel="self" type="application/rss+xml"/><item><title>Singularity Rootkit: Evading Elastic Defend Module Load Detection</title><link>https://matheuzsecurity.github.io/hacking/elastic-trusted-pid-bypass/</link><pubDate>Mon, 31 Aug 2026 00:00:00 -0300</pubDate><guid>https://matheuzsecurity.github.io/hacking/elastic-trusted-pid-bypass/</guid><description>&lt;p&gt;&lt;img src="https://i.imgur.com/60t8gkg.jpeg" alt="imgur"&gt;&lt;/p&gt;
&lt;p&gt;Rootkit Researchers: &lt;a href="https://discord.gg/66N5ZQppU7"&gt;https://discord.gg/66N5ZQppU7&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Singularity Rootkit: &lt;a href="https://github.com/MatheuZSecurity/Singularity"&gt;https://github.com/MatheuZSecurity/Singularity&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Elastic Defend has shipped a BPF-based module load event since around 8.14. With 9.5.0, that event gained a &lt;code&gt;taint_flags&lt;/code&gt; field, and &lt;a href="https://github.com/elastic/detection-rules/pull/6588"&gt;PR #6588&lt;/a&gt; added the EQL detection rule that queries it. The older syslog rule from 2023 is still active and fires independently. Between the two, loading an unsigned or out-of-tree module without any evasion generates alerts from both paths.&lt;/p&gt;
&lt;p&gt;So there are two problems to deal with: the YARA scan on the &lt;code&gt;.ko&lt;/code&gt; file, and the BPF hook on module load.&lt;/p&gt;</description></item><item><title>BPF Map Poisoning: Attacking Falco from the Inside</title><link>https://matheuzsecurity.github.io/hacking/bpf-map-poisoning-edr-evasion/</link><pubDate>Mon, 06 Jul 2026 00:00:00 -0300</pubDate><guid>https://matheuzsecurity.github.io/hacking/bpf-map-poisoning-edr-evasion/</guid><description>&lt;p&gt;&lt;img src="https://i.imgur.com/0Tyj00A.gif" alt="imgur"&gt;&lt;/p&gt;
&lt;p&gt;Standard EDR evasion is avoidance. Anonymous &lt;code&gt;mmap&lt;/code&gt; instead of a file, direct syscalls to skip libc hooks, &lt;code&gt;memfd_create&lt;/code&gt; so &lt;code&gt;fanotify&lt;/code&gt; never sees a path. Stay out of what the EDR is watching.&lt;/p&gt;
&lt;p&gt;BPF Map Poisoning does the opposite: walk into the EDR and rewrite its monitoring state directly.&lt;/p&gt;
&lt;p&gt;Everything here was tested against Falco. The technique is possible in any eBPF-based sensor that stores monitoring state in BPF maps without &lt;code&gt;security_bpf_map&lt;/code&gt; enforcement.&lt;/p&gt;</description></item><item><title>breaking ld_preload rootkit hooks</title><link>https://matheuzsecurity.github.io/hacking/using-io-uring-to-break-linux-rootkits-hooks/</link><pubDate>Sat, 21 Jun 2025 16:33:03 -0400</pubDate><guid>https://matheuzsecurity.github.io/hacking/using-io-uring-to-break-linux-rootkits-hooks/</guid><description>&lt;p&gt;&lt;img src="https://i.imgur.com/TGcNnzI.png" alt="imgur"&gt;&lt;/p&gt;
&lt;p&gt;This article explores a technique to bypass Userland based hooks, such as those implemented via LD_PRELOAD by leveraging io_uring, a modern Linux kernel interface for asynchronous I/O. By bypassing traditional libc wrappers, such as &lt;code&gt;open()&lt;/code&gt;, &lt;code&gt;write()&lt;/code&gt;, and &lt;code&gt;close()&lt;/code&gt;, which are commonly intercepted in LD_PRELOAD based hooks, it&amp;rsquo;s possible to evade detection or interference by such malicious userspace mechanisms.&lt;/p&gt;
&lt;p&gt;We demonstrate this by comparing a simple LD_PRELOAD rootkit that hooks the &lt;code&gt;open()&lt;/code&gt; call with a program that uses io_uring to interact with the file system while still leveraging syscalls internally, io_uring minimizes user‑kernel transitions by batching operations through shared memory queues, issuing only a few essential syscalls (e.g., &lt;code&gt;io_uring_enter&lt;/code&gt;, &lt;code&gt;io_uring_setup&lt;/code&gt;) for coordination.&lt;/p&gt;</description></item><item><title>ElfDoor-gcc</title><link>https://matheuzsecurity.github.io/hacking/gcc/</link><pubDate>Sun, 13 Apr 2025 13:14:56 -0400</pubDate><guid>https://matheuzsecurity.github.io/hacking/gcc/</guid><description>&lt;h1 id="hijacking-gcc-with-ld_preload"&gt;Hijacking GCC with LD_PRELOAD&lt;/h1&gt;
&lt;p&gt;&lt;img src="https://i.imgur.com/MmPbrjL.png" alt="imgur"&gt;&lt;/p&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;ve ever wondered how it&amp;rsquo;s possible to inject malicious code into binaries &lt;strong&gt;without touching the source code&lt;/strong&gt;, and using only standard Linux tools, this article is for you. We&amp;rsquo;ll explore a very cool technique that intercepts the compilation process with LD_PRELOAD, modifying the commands executed and forcing the inclusion of a malicious library during &lt;strong&gt;linking&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In the end, the compiled binary looks legitimate, but it is infected with embedded malicious code, ready to be executed at the right time.&lt;/p&gt;</description></item></channel></rss>