<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>pentesterlab &amp;mdash; drsh0&#39;s llog</title>
    <link>https://drsh0.writeas.com/tag:pentesterlab</link>
    <description>my learning log; notes on cybersec activities, ctfs, and ill-equipped cyber adventures. Consume responsibly.</description>
    <pubDate>Sun, 26 Apr 2026 18:10:07 +0000</pubDate>
    <image>
      <url>https://i.snap.as/v7Oo2ci6.png</url>
      <title>pentesterlab &amp;mdash; drsh0&#39;s llog</title>
      <link>https://drsh0.writeas.com/tag:pentesterlab</link>
    </image>
    <item>
      <title>PentesterLab - Serialize Badge</title>
      <link>https://drsh0.writeas.com/pentesterlab-serialize-badge?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[General writeup notes for Pentesterlab&#39;s Serialize badge. This post does not contain any spoilers. This is just information collected by me to understand the exercises better. &#xA;&#xA;TODO&#xA;XMLDecoder&#xA;CVE-2016-0792 &#xA;ObjectInputStream &#xA;CVE-2013-0156: Rails Object Injection&#xA;API to Shell &#xA;&#xA;#web #pentesterlab #Serialize&#xA;!--more--&#xA;&#xA;XMLDecoder&#xA;&#xA;Java&#39;s XMLDecoder can be used to unserliaize data. There are two common methods that can be used to perform code exec:&#xA;Runtime.exec()&#xA;ProcessBuilder&#xA;&#xA;Steps to reproduce:&#xA;submit an expected file and check output. If XML check for class=.... If it&#39;s XMLDecoder you may be able to utilise the above.&#xA;Craft an XML file with actions you want the underlying Java runtime to perform.&#xA;&#xA;References:&#xA;&#xA;https://find-sec-bugs.github.io/bugs.htm#XMLDECODER&#xA;https://www.baeldung.com/run-shell-command-in-java&#xA;&#xA;CVE-2016-0792&#xA;&#xA;This exploit relied on libraries within java applications that handled unexpected data badly and allowed code execution. &#xA;The key here would have been to test requests to servers by throwing in some unexpected data and then observing the error messages. In this case, error messages would have shown that the command being embedded in the XML was_ being executed before the application errored out. &#xA;Doing a simple ping or curl on a server you controlled would have shown that the exploit worked and could achieve remote communication. ]]&gt;</description>
      <content:encoded><![CDATA[<p>General writeup notes for Pentesterlab&#39;s Serialize badge. This post does not contain any spoilers. This is just information collected by me to understand the exercises better.</p>

<p><strong>TODO</strong>
– <del>XMLDecoder</del>
– <del>CVE-2016-0792</del>
– ObjectInputStream
– CVE-2013-0156: Rails Object Injection
– API to Shell</p>

<p><a href="https://drsh0.writeas.com/tag:web" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">web</span></a> <a href="https://drsh0.writeas.com/tag:pentesterlab" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">pentesterlab</span></a> <a href="https://drsh0.writeas.com/tag:Serialize" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Serialize</span></a>
</p>

<h2 id="xmldecoder" id="xmldecoder">XMLDecoder</h2>

<p>Java&#39;s XMLDecoder can be used to unserliaize data. There are two common methods that can be used to perform code exec:
* <code>Runtime.exec()</code>
* <code>ProcessBuilder</code></p>

<p>Steps to reproduce:
1. submit an expected file and check output. If XML check for <code>class=...</code>. If it&#39;s <code>XMLDecoder</code> you may be able to utilise the above.
2. Craft an XML file with actions you want the underlying Java runtime to perform.</p>

<p>References:</p>
<ul><li><a href="https://find-sec-bugs.github.io/bugs.htm#XML_DECODER" rel="nofollow">https://find-sec-bugs.github.io/bugs.htm#XML_DECODER</a></li>
<li><a href="https://www.baeldung.com/run-shell-command-in-java" rel="nofollow">https://www.baeldung.com/run-shell-command-in-java</a></li></ul>

<h2 id="cve-2016-0792" id="cve-2016-0792">CVE-2016-0792</h2>
<ul><li>This exploit relied on libraries within java applications that handled unexpected data badly and allowed code execution.</li>
<li>The key here would have been to test requests to servers by throwing in some unexpected data and then observing the error messages. In this case, error messages would have shown that the command being embedded in the XML <em>was</em> being executed before the application errored out.</li>
<li>Doing a simple ping or curl on a server you controlled would have shown that the exploit worked and could achieve remote communication.</li></ul>
]]></content:encoded>
      <guid>https://drsh0.writeas.com/pentesterlab-serialize-badge</guid>
      <pubDate>Tue, 02 Feb 2021 09:41:04 +0000</pubDate>
    </item>
  </channel>
</rss>