<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Liz Wigglesworth - write-ups</title><link href="https://www.lizwigg.com/" rel="alternate"/><link href="https://www.lizwigg.com/feeds/write-ups.atom.xml" rel="self"/><id>https://www.lizwigg.com/</id><updated>2026-04-04T00:00:00-07:00</updated><entry><title>Analyzing Amadey - Part 1</title><link href="https://www.lizwigg.com/analyzing-amadey-part-1.html" rel="alternate"/><published>2026-04-04T00:00:00-07:00</published><updated>2026-04-04T00:00:00-07:00</updated><author><name>Liz Wigglesworth</name></author><id>tag:www.lizwigg.com,2026-04-04:/analyzing-amadey-part-1.html</id><summary type="html">&lt;p&gt;Basic static and dynamic analysis of a piece of malware from Samplepedia.&lt;/p&gt;</summary><content type="html">&lt;h3&gt;Background&lt;/h3&gt;
&lt;p&gt;I recently learned about &lt;a href="https://samplepedia.cc/"&gt;Samplepedia&lt;/a&gt;, which is a curated collection of malware samples for learning malware analysis. Each sample is tagged with a difficulty level and some additional metadata like you might see on VirusTotal or on MalwareBazaar. Each one also has a specific goal for the analysis.&lt;/p&gt;
&lt;p&gt;At the moment, I'm focusing on brushing up my malware analysis skills in general. I figured I would pick an easy sample to start with and then work my way towards more difficult ones. The sample I'm analyzing in this blog post is available on Samplepedia &lt;a href="https://samplepedia.cc/sample/aad0a60cb86e3a56bcd356c6559b92c4dc4a1a960f409fb499cf76c9b5409fdb/2/"&gt;here&lt;/a&gt;. The goal is to reverse engineer it and mark it up in a decompiler. I'll start with basic static and dynamic analysis first, then we'll dive into the code. This blog post is a walkthrough of my process.&lt;/p&gt;
&lt;p&gt;The file analyzed in this post has the following SHA256 hash: &lt;code&gt;aad0a60cb86e3a56bcd356c6559b92c4dc4a1a960f409fb499cf76c9b5409fdb&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Basic Static Analysis: What Am I Looking At?&lt;/h3&gt;
&lt;p&gt;Since this is known to be malware, I started by looking at what existing intel sources say about this sample.&lt;/p&gt;
&lt;p&gt;I started with the page on &lt;a href="https://bazaar.abuse.ch/sample/aad0a60cb86e3a56bcd356c6559b92c4dc4a1a960f409fb499cf76c9b5409fdb/"&gt;Malware Bazaar&lt;/a&gt;, since that's where I downloaded the sample from.&lt;/p&gt;
&lt;figure&gt;
    &lt;img src="https://www.lizwigg.com/images/amadey-pt1-bazaar.png" /&gt;
    &lt;figcaption&gt;Sample metadata from Malware Bazaar&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;It looks like this is a Windows PE file, likely written in C++. That lines up with the metadata that Samplepedia provides. The &lt;a href="https://www.virustotal.com/gui/file/aad0a60cb86e3a56bcd356c6559b92c4dc4a1a960f409fb499cf76c9b5409fdb"&gt;VirusTotal&lt;/a&gt; page reports the same thing.&lt;/p&gt;
&lt;p&gt;What's interesting is that both sites relate this sample to Amadey, which is a modular Windows infostealer. I did some searching for background information on it and read this &lt;a href="https://any.run/malware-trends/amadey/"&gt;Any.Run write-up&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, with some initial hypotheses about what I might be looking at, I loaded up the sample in a VM and started investigating.&lt;/p&gt;
&lt;p&gt;The first thing I did was throw it into Detect It Easy to confirm some basic information about it. It does indeed appear to be written in C++. It's also a 32-bit binary.&lt;/p&gt;
&lt;figure&gt;
    &lt;img src="https://www.lizwigg.com/images/amadey-pt1-die.png" /&gt;
    &lt;figcaption&gt;Detect It Easy output&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;The next thing I wanted to do was get a quick overview of the things that this sample &lt;em&gt;might&lt;/em&gt; do in order to guide further analysis. That meant looking at strings, imports, and output from capa.&lt;/p&gt;
&lt;h4&gt;Reviewing the Imports&lt;/h4&gt;
&lt;p&gt;I loaded the sample into PEStudio and looked through the imports that it was able to parse out. PEStudio helpfully flagged some that might be of interest. Functions like &lt;code&gt;CheckTokenMembership&lt;/code&gt; and &lt;code&gt;AllocateAndInitializeSid&lt;/code&gt; are immediately interesting - maybe this sample tries to determine if it has administrator permissions or otherwise tinkers with user permissions?&lt;/p&gt;
&lt;figure&gt;
    &lt;img src="https://www.lizwigg.com/images/amadey-pt1-pestudio-imports.png" /&gt;
    &lt;figcaption&gt;A snippet of the imports table as parsed and annotated by PEStudio&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;There are also some imports from wininet that might indicate how this sample makes network connections. I noted that &lt;code&gt;InternetOpenUrlW&lt;/code&gt; and &lt;code&gt;InternetReadFile&lt;/code&gt; would be good targets to look for when doing deeper static analysis.&lt;/p&gt;
&lt;p&gt;There are some functions for registry modification (&lt;code&gt;RegCreateKeyExW&lt;/code&gt;, &lt;code&gt;RegSetValueExW&lt;/code&gt;), so I also flagged those for further analysis. Maybe this sample abuses the registry for persistence?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-us/windows/win32/api/lmshare/nf-lmshare-netshareenum"&gt;&lt;code&gt;NetShareEnum&lt;/code&gt;&lt;/a&gt; is another interesting import. Just like it says on the tin, it enumerates information about network shares. That seems like a reasonable thing for an infostealer-adjacent piece of malware to do, so I noted that down for further investigation later.&lt;/p&gt;
&lt;p&gt;Some other functionality that I flagged from the imports were potential anti-debugging functions (&lt;code&gt;GetTickCount&lt;/code&gt;, &lt;code&gt;IsDebuggerPresent&lt;/code&gt;, and &lt;code&gt;QueryPerformanceCounter&lt;/code&gt;), COM object usage (&lt;code&gt;CoInitialize&lt;/code&gt;, &lt;code&gt;CoCreateInstance&lt;/code&gt;), and runtime imports (&lt;code&gt;LoadLibrary&lt;/code&gt;, &lt;code&gt;GetProcAddress&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Closer inspection is required, of course, but the imports gave me a good idea of what this sample might do along with several interesting starting points.&lt;/p&gt;
&lt;h4&gt;Strings&lt;/h4&gt;
&lt;p&gt;I ran FLOSS to identify any interesting human-readable strings that were in the binary. It pulled out several strings that matched the imports I looked at previously, so I'll skip listing those again and focus on the more interesting strings in this section.&lt;/p&gt;
&lt;p&gt;This sample contains some strings indicating that clipboard interaction APIs are used. These didn't appear in the imports table, so they may be imported at runtime.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;SetClipboardData
User32.dll
EmptyClipboard
OpenClipboard
GetClipboardData
CloseClipboard
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;There are also some interesting regex strings:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;\b(1|3|bc1)[a-zA-HJ-NP-Z0-9]{25,42}\b
\b0x[a-fA-F0-9]{40}\b
\bT[a-zA-HJ-NP-Z0-9]{33}\b
\b(L|M)[a-zA-HJ-NP-Z0-9]{26,33}\b
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Some quick searching revealed that these are likely for matching cryptocurrency addresses. Later on, this binary contains some strings that appear to match those regexes.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;1DXc1eazyWTHTq6JMdURSqqrFGTzGL8eF1
0xb49a8bad358c0adb639f43c035b8c06777487dd7
TY4iNhGut31cMbE3M6TU5CoCXvFJ5nP59i
LedxKBWF4MiM3x9F7zmCdaxnnu8A8SUohZ
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;There's also the text for what appears to be an &lt;a href="https://learn.microsoft.com/en-us/windows/win32/shell/autorun-cmds"&gt;autorun.inf file&lt;/a&gt;. This may be a method for spreading the malware.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[autorun]&lt;/span&gt;
&lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;Update.exe&lt;/span&gt;
&lt;span class="na"&gt;icon&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;shell32.dll,4&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Finally, FLOSS pulled out some very interesting UTF-16-LE strings:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Update.exe
Document.pdf.exe
Photo.jpg.exe
Setup.exe
autorun.inf
Documents Backup.lnk
Double-click to view contents
shell32.dll
Downloader
http://%s/%d.exe
%s%d_%d.exe
txtfile\shell\open\command
&amp;quot;%s&amp;quot; &amp;quot;%%1&amp;quot;
\Windows\
\Program Files\
\Program Files (x86)\
\System32\
\SysWOW64\
\AppData\Local\
\AppData\LocalLow\
\AppData\Roaming\
\Temporary Internet Files\
\localhost\
62.60.226[.]159
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;There are some interesting file names - &lt;code&gt;Update.exe&lt;/code&gt;, &lt;code&gt;Document.pdf.exe&lt;/code&gt;, &lt;code&gt;Photo.jpg.exe&lt;/code&gt;, and &lt;code&gt;Setup.exe&lt;/code&gt; - that look like they might be attempting to blend in or trick a victim into running them. There are some format strings which seem to be related to HTTP activity and warrant further inspection.&lt;/p&gt;
&lt;p&gt;FLOSS also identified the string &lt;code&gt;txtfile\shell\open\command&lt;/code&gt;, which looks interesting. A quick search for that string reveals the MITRE ATT&amp;amp;CK technique page for &lt;a href="https://attack.mitre.org/techniques/T1546/001/"&gt;changing the default file association&lt;/a&gt;. It looks like this malware might add itself as a handler for text files to achieve persistence.&lt;/p&gt;
&lt;p&gt;And finally, there's an IP address. Several vendors mark it as malicious &lt;a href="https://www.virustotal.com/gui/ip-address/62.60.226.159"&gt;on VirusTotal&lt;/a&gt;. Analyzing the traffic that flows to this IP address will be one of the main goals of the upcoming in-depth analysis. As a side note, that IP address was not defanged in the binary; that's a change I made for this post.&lt;/p&gt;
&lt;p&gt;I was able to get quite a bit of information from just looking at the imports and strings. If this binary was packed or had more obfuscation, that would have been much harder.&lt;/p&gt;
&lt;h4&gt;&lt;code&gt;capa&lt;/code&gt; Results&lt;/h4&gt;
&lt;p&gt;Finally, &lt;a href="https://github.com/mandiant/capa"&gt;capa&lt;/a&gt; is a great tool for quickly determining the capabilities of a sample. I like to use it to find any interesting features that warrant more investigation.&lt;/p&gt;
&lt;p&gt;Here's a snippet of the output from capa:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;┌───────────────────────┬──────────────────────────────────────────────────────────────────────────┐
│ ATT&amp;amp;CK Tactic         │ ATT&amp;amp;CK Technique                                                         │
├───────────────────────┼──────────────────────────────────────────────────────────────────────────┤
│ DEFENSE EVASION       │ File and Directory Permissions Modification [T1222]                      │
│                       │ Obfuscated Files or Information [T1027]                                  │
│ DISCOVERY             │ File and Directory Discovery [T1083]                                     │
│                       │ Network Share Discovery [T1135]                                          │
│                       │ System Information Discovery [T1082]                                     │
│                       │ System Location Discovery [T1614]                                        │
│                       │ System Owner/User Discovery [T1033]                                      │
│ EXECUTION             │ Shared Modules [T1129]                                                   │
│ PERSISTENCE           │ Boot or Logon Autostart Execution::Shortcut Modification [T1547.009]     │
│                       │ Event Triggered Execution::Change Default File Association [T1546.001]   │
└───────────────────────┴──────────────────────────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────┬──────────────────────────────────┐
│ MAEC Category                                                 │ MAEC Value                       │
├───────────────────────────────────────────────────────────────┼──────────────────────────────────┤
│ malware-category                                              │ downloader                       │
│                                                               │ launcher                         │
└───────────────────────────────────────────────────────────────┴──────────────────────────────────┘

┌───────────────────────────────────────────────────────┬──────────────────────────────────────────┐
│ Capability                                            │ Namespace                                │
├───────────────────────────────────────────────────────┼──────────────────────────────────────────┤
│ get geographical location                             │ collection                               │
│ parse credit card information                         │ collection/credit-card                   │
│ receive and write data from server to client          │ communication/c2/file-transfer           │
│ check HTTP status code                                │ communication/http/client                │
│ encode data using XOR                                 │ data-manipulation/encoding/xor           │
│ hash data using fnv                                   │ data-manipulation/hashing/fnv            │
│ get common file path (3 matches)                      │ host-interaction/file-system             │
│ copy file (5 matches)                                 │ host-interaction/file-system/copy        │
│ delete file                                           │ host-interaction/file-system/delete      │
│ check if file exists (5 matches)                      │ host-interaction/file-system/exists      │
│ enumerate files recursively                           │ host-interaction/file-system/files/list  │
│ get file attributes (7 matches)                       │ host-interaction/file-system/meta        │
│ get file size                                         │ host-interaction/file-system/meta        │
│ set file attributes (6 matches)                       │ host-interaction/file-system/meta        │
│ read file on Windows                                  │ host-interaction/file-system/read        │
│ write file on Windows (2 matches)                     │ host-interaction/file-system/write       │
│ get disk information (2 matches)                      │ host-interaction/hardware/storage        │
│ print debug messages                                  │ host-interaction/log/debug/write-event   │
│ enumerate network shares                              │ host-interaction/network                 │
│ create process on Windows                             │ host-interaction/process/create          │
│ get token membership (2 matches)                      │ host-interaction/session                 │
│ create thread                                         │ host-interaction/thread/create           │
│ get kernel32 base address                             │ linking/runtime-linking                  │
│ get ntdll base address                                │ linking/runtime-linking                  │
│ link many functions at runtime (2 matches)            │ linking/runtime-linking                  │
│ linked against CPP standard library                   │ linking/static                           │
│ linked against CPP regex library                      │ linking/static/cppregex                  │
│ parse PE header                                       │ load-code/pe                             │
│ resolve function by parsing PE exports (2 matches)    │ load-code/pe                             │
│ create shortcut via IShellLink                        │ persistence                              │
│ persist via default file association registry key     │ persistence/registry                     │
└───────────────────────────────────────────────────────┴──────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I usually run just &lt;code&gt;capa&lt;/code&gt; to start with, and then I dump the output of &lt;code&gt;capa -v&lt;/code&gt; (or &lt;code&gt;-vv&lt;/code&gt;) to a file. The verbose output includes the addresses of functions or basic blocks that contain the capabilities that the tool identifies.&lt;/p&gt;
&lt;p&gt;Several of the things that capa identified aligned with my guesses from looking at the imports: HTTP calls, getting the user's access token, and runtime linking. There are also a few interesting things that capa caught, such as getting geographic and credit card information. These are all good features to dig into with further analysis.&lt;/p&gt;
&lt;h3&gt;Basic Dynamic Analysis&lt;/h3&gt;
&lt;p&gt;Now that I had an idea of what this sample might do, it was time to detonate it.&lt;/p&gt;
&lt;p&gt;My malware analysis lab consists of two virtual machines at the moment. I have a Windows 10 VM with the FLARE-VM tools installed for analyzing and running the malware. I also have a REMnux VM that I use for monitoring the network traffic leaving the Windows machine. The two VMs are connected with Virtualbox's host-only networking. This allows me to send traffic between the two machines, but neither can reach the internet. It's a good balance of functionality and safety.&lt;/p&gt;
&lt;p&gt;Before detonating the sample, there are a few things I always check:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I have a clean snapshot to revert to in the Windows VM&lt;/li&gt;
&lt;li&gt;Procmon is running on the Windows VM&lt;/li&gt;
&lt;li&gt;INetSim and Wireshark are running in the REMnux VM&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Procmon will capture interesting events happening on the host, while Wireshark will capture network traffic leaving the Windows machine. INetSim will send dummy responses to requests from several different protocols, allowing the malware to run somewhat normally.&lt;/p&gt;
&lt;p&gt;Now that everything is set up, let's detonate!&lt;/p&gt;
&lt;h4&gt;Filesystem Activity&lt;/h4&gt;
&lt;p&gt;I ran the sample as a non-Administrator user by double-clicking it from the desktop. The first thing that I noticed after executing it was a file called &lt;code&gt;Update.exe&lt;/code&gt; dropped to the desktop. Upon looking closer, the malware seems to write &lt;code&gt;Update.exe&lt;/code&gt; recursively to every folder on the desktop. Not very subtle. Procmon shows all of the operations happening:&lt;/p&gt;
&lt;figure&gt;
    &lt;img src="https://www.lizwigg.com/images/amadey-pt1-procmon-files.png" /&gt;
    &lt;figcaption&gt;Procmon output showing filesystem interactions&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;The hashes for these &lt;code&gt;Update.exe&lt;/code&gt; files are the same as the sample we're looking at, so the malware is just copying itself.&lt;/p&gt;
&lt;figure&gt;
    &lt;img src="https://www.lizwigg.com/images/amadey-pt1-updateexe-hashes.png" /&gt;
    &lt;figcaption&gt;Terminal showing the hashes for `Update.exe` and its copies&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;After investigating &lt;code&gt;Update.exe&lt;/code&gt;, I looked for other interesting events logged in Procmon. I filtered out everything except for the &lt;code&gt;CreateFile&lt;/code&gt; event to look for other files dropped to the system.&lt;/p&gt;
&lt;figure&gt;
    &lt;img src="https://www.lizwigg.com/images/amadey-pt1-procmon-removable-files.png" /&gt;
    &lt;figcaption&gt;Files copied to system&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;I noticed several of those interesting strings that I identified earlier. The malware attempts to create &lt;code&gt;Document.pdf.exe&lt;/code&gt;, &lt;code&gt;Photo.jpg.exe&lt;/code&gt;, &lt;code&gt;Setup.exe&lt;/code&gt;, &lt;code&gt;autorun.inf&lt;/code&gt;, and the ubiquitous &lt;code&gt;Update.exe&lt;/code&gt; to the &lt;code&gt;A:&lt;/code&gt; drive, and presumably other drives that may be connected to the machine. In this instance, drive A is just a virtual drive from VirtualBox.&lt;/p&gt;
&lt;figure&gt;
    &lt;img src="https://www.lizwigg.com/images/amadey-pt1-ext-drive-files.png" /&gt;
    &lt;figcaption&gt;Files created on external drive&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;All of the &lt;code&gt;.exe&lt;/code&gt; files have the same hash; it's the same hash as the sample itself. This malware copied itself to the removable drive under four different names in an attempt to get an unsuspecting victim to launch one of them.&lt;/p&gt;
&lt;figure&gt;
    &lt;img src="https://www.lizwigg.com/images/amadey-pt1-ext-drive-hashes.png" /&gt;
    &lt;figcaption&gt;Hashes of files created on an external drive&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;The contents of the &lt;code&gt;autorun.inf&lt;/code&gt; file match the interesting data I found in the strings output earlier:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[autorun]&lt;/span&gt;
&lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;Update.exe&lt;/span&gt;
&lt;span class="na"&gt;icon&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;shell32.dll,4&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Based on a &lt;a href="https://superuser.com/questions/1406594/is-there-a-reference-for-the-full-list-of-windows-10-shell-icon-numbers"&gt;quick search&lt;/a&gt;, it looks like the icon that will be displayed to the user is the empty folder icon.&lt;/p&gt;
&lt;p&gt;This is a fairly straightforward mechanism for spreading the malware. Considering the &lt;code&gt;NetShareEnum&lt;/code&gt; function imported, my hypothesis was that this malware would attempt to copy itself to every network share it could find. I had none available in my lab VM, so that's something to save for further analysis.&lt;/p&gt;
&lt;h4&gt;Registry Activity&lt;/h4&gt;
&lt;p&gt;I didn't actually find much interesting registry activity from the events logged in Procmon. I didn't see the &lt;code&gt;txtfile\shell\open\command&lt;/code&gt; key that appeared in the strings output, and I didn't see any modification to the Run keys. Deeper analysis was required to determine what registry activity, if any, this malware does.&lt;/p&gt;
&lt;h4&gt;Network Traffic&lt;/h4&gt;
&lt;p&gt;I looked at the network traffic next. This sample did not do much, frankly. It repeatedly tried to open a TCP connection to the IP address we saw earlier on port 80:&lt;/p&gt;
&lt;figure&gt;
    &lt;img src="https://www.lizwigg.com/images/amadey-pt1-wireshark-packet.png" /&gt;
    &lt;figcaption&gt;Wireshark TCP traffic to port 80&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;INetSim won't respond to traffic from that IP address, so the connection did not complete successfully. That means I had to tweak my setup a bit and do some more digging.&lt;/p&gt;
&lt;h3&gt;Basic Dynamic Analysis... 2!&lt;/h3&gt;
&lt;p&gt;The network traffic I picked up in Wireshark wasn't very exciting, and I wanted to fix that. I'm jumping ahead a little here, but a closer look into the sample with Ghidra revealed that the IP address is only used in one spot:&lt;/p&gt;
&lt;figure&gt;
    &lt;img src="https://www.lizwigg.com/images/amadey-pt1-ghidra-xref.png" /&gt;
    &lt;figcaption&gt;The single Ghidra cross-reference for the IP address string&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;I decided to just patch the binary and replace that IP address with the IP of my REMnux VM. There may have been a better solution, but this one worked fairly well.&lt;/p&gt;
&lt;p&gt;After learning how to patch &amp;amp; save binaries in Ghidra (make patches as needed, File &amp;gt; Export Program &amp;gt; save as raw bytes), I copied my new binary over to the Windows VM, set up my analysis tools, and ran it again.&lt;/p&gt;
&lt;p&gt;This time, Wireshark picked up more interesting traffic:&lt;/p&gt;
&lt;figure&gt;
    &lt;img src="https://www.lizwigg.com/images/amadey-pt1-wireshark-http-get.png" /&gt;
    &lt;figcaption&gt;HTTP GET requests logged in Wireshark&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;The malware was making HTTP GET requests to &lt;code&gt;&amp;lt;lab IP&amp;gt;/&amp;lt;number&amp;gt;.exe&lt;/code&gt;, where the number started at 1 and incremented each time. The malware made a new request every few seconds.&lt;/p&gt;
&lt;p&gt;In the Windows VM, it looked like this:&lt;/p&gt;
&lt;figure&gt;
    &lt;img src="https://www.lizwigg.com/images/amadey-pt1-desktop-exe.png" /&gt;
    &lt;figcaption&gt;Far too many instances of the INetSim default GUI binary running on the Windows 10 VM&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;I have INetSim configured to return a default dummy &lt;code&gt;.exe&lt;/code&gt; file if one is requested, and that's exactly what happened here. The malware requested the file, downloaded it, and executed it. This left me with several questions. I was fairly confident that the malware was actually expecting a PE file, since it executes the response. However, does the actual intended payload have a specific purpose, or is this a more generic downloader feature? Did the malware author intend to pull several different binaries and run them, or were they expecting only a single one to run? Is there a limit to the number of GET requests, or would my lab setup keep launching the INetSim default GUI binary until the heat death of the universe?&lt;/p&gt;
&lt;p&gt;This functionality definitely warrants some further investigation.&lt;/p&gt;
&lt;h3&gt;Where to next?&lt;/h3&gt;
&lt;p&gt;After some basic static and dynamic analysis, I now had an idea of what this sample does: it copies itself to several folders on the system and removable drives (and likely network shares), downloads PE files, and it runs them. I still have a lot of questions, however:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Does this malware attempt any other persistence mechanisms? What are they?&lt;/li&gt;
&lt;li&gt;This sample was tagged as "Amadey", which is an infostealer family. Does this PE file actually steal any info, or does it just load a later stage of Amadey?&lt;/li&gt;
&lt;li&gt;There are several interesting imports that we haven't observed activity from yet. How are COM objects used? Are the clipboard-related functions used? Does this malware do anything interesting based on the user's SID?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the next blog post, we'll dive into these questions and more.&lt;/p&gt;</content><category term="write-ups"/><category term="malware"/></entry></feed>