<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Infosec on $ pirx^H^H^H^H</title>
    <link>https://pirx.io/categories/infosec/</link>
    <description>Recent content in Infosec on $ pirx^H^H^H^H</description>
    <image>
      <title>$ pirx^H^H^H^H</title>
      <url>https://pirx.io/papermod-cover.png</url>
      <link>https://pirx.io/papermod-cover.png</link>
    </image>
    <generator>Hugo -- 0.139.2</generator>
    <language>en</language>
    <lastBuildDate>Sat, 13 Aug 2022 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://pirx.io/categories/infosec/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>wtfis: Passive FQDN and Domain Lookup Tool</title>
      <link>https://pirx.io/posts/2022-08-13-wtfis-passive-fqdn-and-domain-lookup-tool/</link>
      <pubDate>Sat, 13 Aug 2022 00:00:00 +0000</pubDate>
      <guid>https://pirx.io/posts/2022-08-13-wtfis-passive-fqdn-and-domain-lookup-tool/</guid>
      <description>&lt;p&gt;I wrote a nifty Python commandline tool for looking up FQDNs and domains using various OSINT sources. It&amp;rsquo;s definitely useful to me, but I hope it is too to security researchers, incident responders and the like. Check out the project page here:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&#34;https://github.com/pirxthepilot/wtfis&#34;&gt;pirxthepilot/wtfis&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It&amp;rsquo;s available in &lt;a href=&#34;https://pypi.org/project/wtfis/&#34;&gt;Pypi&lt;/a&gt;, so installation is as easy as&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ pip install wtfis
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I wrote this because I wanted a faster way to gather information on a hostname or domain. Most of the time, it is the same set of data that I look for, but spread out across different websites.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Update to Log4shell Detection With Falco</title>
      <link>https://pirx.io/posts/2022-06-20-update-to-log4shell-detection-with-falco/</link>
      <pubDate>Mon, 20 Jun 2022 00:00:00 +0000</pubDate>
      <guid>https://pirx.io/posts/2022-06-20-update-to-log4shell-detection-with-falco/</guid>
      <description>&lt;p&gt;In a &lt;a href=&#34;https://pirx.io/posts/2022-05-20-syscall-based-detection-of-log4shell-cve-2021-44228-on-linux/&#34;&gt;prior post&lt;/a&gt; I described how to detection potential Log4shell (&lt;a href=&#34;https://www.lunasec.io/docs/blog/log4j-zero-day/&#34;&gt;CVE-2021-44228&lt;/a&gt;) exploitation by looking for patterns in a Java process&amp;rsquo; &lt;code&gt;write()&lt;/code&gt; or &lt;code&gt;sendto()&lt;/code&gt; buffer in LDAP and RMI connections. One limitation of this is that it matches on text in the buffer.&lt;/p&gt;
&lt;p&gt;The good news is that as of version &lt;a href=&#34;https://github.com/falcosecurity/falco/releases/tag/0.32.0&#34;&gt;0.32.0&lt;/a&gt;, Falco now supports matching on raw bytes expressed as hexadecimal strings! This means that we can now match on any pattern in the buffer, not just &amp;ldquo;human-readable&amp;rdquo; text.&lt;/p&gt;</description>
    </item>
    <item>
      <title>PwnKit Privilege Escalation Detection</title>
      <link>https://pirx.io/posts/2022-06-07-pwnkit-privilege-escalation-detection/</link>
      <pubDate>Tue, 07 Jun 2022 00:00:00 +0000</pubDate>
      <guid>https://pirx.io/posts/2022-06-07-pwnkit-privilege-escalation-detection/</guid>
      <description>&lt;p&gt;This article describes one way to detect the &lt;strong&gt;PwnKit&lt;/strong&gt; (&lt;a href=&#34;https://www.cve.org/CVERecord?id=CVE-2021-4034&#34;&gt;CVE-2021-4034&lt;/a&gt;), a privilege escalation vulnerability on polkit&amp;rsquo;s &lt;code&gt;pkexec&lt;/code&gt; utility.&lt;/p&gt;
&lt;p&gt;As with the &lt;a href=&#34;https://pirx.io/posts/2022-05-20-syscall-based-detection-of-log4shell-cve-2021-44228-on-linux/&#34;&gt;previous post&lt;/a&gt;, we are using &lt;a href=&#34;https://github.com/falcosecurity/falco&#34;&gt;Falco&lt;/a&gt; for detection and &lt;a href=&#34;https://github.com/draios/sysdig&#34;&gt;Sysdig&lt;/a&gt; for analysis.&lt;/p&gt;
&lt;h2 id=&#34;resources&#34;&gt;Resources&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.qualys.com/2022/01/25/cve-2021-4034/pwnkit.txt&#34;&gt;Qualys report&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/berdav/CVE-2021-4034&#34;&gt;PoC by berdav&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/ly4k/PwnKit&#34;&gt;PoC by ly4k&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;analysis&#34;&gt;Analysis&lt;/h2&gt;
&lt;h3 id=&#34;premise&#34;&gt;Premise&lt;/h3&gt;
&lt;p&gt;Based on the Qualys report, this exploit depends on GLib to load the privesc code:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;To convert messages from one charset to another, &lt;code&gt;iconv_open()&lt;/code&gt; executes small shared libraries; normally, these triplets (&amp;ldquo;from&amp;rdquo; charset, &amp;ldquo;to&amp;rdquo; charset, and library name) are read from a default configuration file, &lt;code&gt;/usr/lib/gconv/gconv-modules&lt;/code&gt;. Alternatively, the environment variable &lt;code&gt;GCONV_PATH&lt;/code&gt; can force &lt;code&gt;iconv_open()&lt;/code&gt; to read another configuration file; naturally, &lt;code&gt;GCONV_PATH&lt;/code&gt; is one of the &amp;ldquo;unsecure&amp;rdquo; environment variables (because it leads to the execution of arbitrary libraries), and is therefore removed by &lt;code&gt;ld.so&lt;/code&gt; from the environment of SUID programs.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Syscall-Based Log4Shell Detection on Linux</title>
      <link>https://pirx.io/posts/2022-05-20-syscall-based-detection-of-log4shell-cve-2021-44228-on-linux/</link>
      <pubDate>Fri, 20 May 2022 00:00:00 +0000</pubDate>
      <guid>https://pirx.io/posts/2022-05-20-syscall-based-detection-of-log4shell-cve-2021-44228-on-linux/</guid>
      <description>&lt;p&gt;This is a write-up about detecting exploitation of the &lt;strong&gt;Log4Shell&lt;/strong&gt; vulnerability (&lt;a href=&#34;https://www.lunasec.io/docs/blog/log4j-zero-day/&#34;&gt;CVE-2021-44228&lt;/a&gt;) in &lt;a href=&#34;https://logging.apache.org/log4j/2.x/&#34;&gt;Log4j&lt;/a&gt; by monitoring specific syscalls using &lt;a href=&#34;https://github.com/falcosecurity/falco&#34;&gt;Falco&lt;/a&gt;. This post also describes the analysis I employed to arrive at my conclusions.&lt;/p&gt;
&lt;p&gt;Note that this is not meant to be an end-all detection for Log4Shell but instead one of many that, as a whole, provide coverage across different points of visibility.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;UPDATE (2022-06-20): &lt;a href=&#34;https://pirx.io/posts/2022-06-20-update-to-log4shell-detection-with-falco/&#34;&gt;This post&lt;/a&gt; outlines an alternative way to detect Log4shell, this time using Falco&amp;rsquo;s brand new byte matching feature.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
