Sitemap

Malware~Analysis

6 min readOct 13, 2026

--

Scenario: You’re a SOC analyst at a mid-size company. An employee in finance reports receiving an email this morning with an attachment named invoice_photo.jpg claiming to be a scanned invoice from a vendor. They opened it because “it’s just a picture.” Their machine has been acting slow since. You’ve been handed the file for analysis.

First, we need to identify the actual file type of invoice_photo.jpg to determine whether it is a genuine image or a potentially malicious file disguised as one.

Press enter or click to view image in full size

Initial File Identification

By running the file command on invoice_photo.jpg, we discover that the file is not actually an image but an executable file disguised with a .jpg extension. This is a potential indicator of malware and requires further investigation.

Reputation check

Next, we use the file’s hash digest to check its reputation on threat intelligence platforms such as VirusTotal and determine whether it is associated with any known malware.

Press enter or click to view image in full size

Sha256: fd0d23011657d0185f6e4fb5fe57eb7894c9fc606b9ae5fc6b977efcb2ef1eeb

Press enter or click to view image in full size

VirusTotal identifies the file with the popular threat label Agent Tesla, indicating that it may be associated with this known information-stealing malware. This finding raises suspicion that the file is malicious and requires further investigation.

Press enter or click to view image in full size

https://www.checkpoint.com/cyber-hub/threat-prevention/what-is-malware/agent-tesla-malware/

We can confirm we are dealing with malware.

Magic Byte Analysis

Looking at the file’s raw bytes confirms what the extension already hid: it starts with MZ, the signature every DOS/PE executable carries at the start of its header. A real JPEG file would start with FF D8 FF instead. This rules out any chance the file is actually an image, it’s an executable wearing a .jpg mask.

Press enter or click to view image in full size

Extracting Embedded Strings

From the documentation of the malware we can see that Agent Tesla exfiltrates stolen data through FTP, HTTP, and SMTP. It also steals saved credentials from various applications on the infected machine, such as FTP clients and VPN clients.

With this we can have a good idea of where to start with our filter from the string extraction, separating what we find into exfiltration channels (FTP, HTTP, SMTP) and credential theft targets (FTP clients, VPN clients, and others).

FTP (File Transfer Protocol)

Press enter or click to view image in full size

Running strings on the file and searching for “ftp” as a keyword returns interesting results that warrants further investigation.

We can see the malware checking for specific applications by querying the registry and file paths where each client stores its saved login credentials, so it can harvest them:

  • CoreFTP — SOFTWARE\FTPWare\COREFTP\Sites
  • FTP Navigator — \FTP Navigator\Ftplist.txt
  • SmartFTP — SmartFTP\Client 2.0\Favorites\Quick Connect
  • WS_FTP — Ipswitch\WS_FTP\Sites\ws_ftp.ini
  • FTP Commander Deluxe — \Program Files (x86)\FTP Commander Deluxe\Ftplist.txt
  • cftp — \cftp\Ftplist.txt
  • FTPGetter — \FTPGetter\servers.xml

Seven separate FTP clients are targeted in total, showing the malware casts a wide net across commonly used FTP software rather than relying on a single application.

I also found a hardcoded url in the malware
ftp[:]//ftp.piovau[.]com

Reputation check and open source investigation

Press enter or click to view image in full size

OSINT

A public search for the same domain surfaces an independent reference tying ftp.piovau.com to Agent Tesla’s C2 infrastructure.

Press enter or click to view image in full size

Reputation check on VirusTotal

The URL is listed under command and control, spam, phishing, and bot network categories, all characteristics consistent with Agent Tesla’s known behavior.

HTTP(Hyper Text Transfer Protocol)

Press enter or click to view image in full size

This search returned three hardcoded strings.

Get Akinola selim’s stories in your inbox

Join Medium for free to get updates from this writer.

http://ip-api.com/line/?fields=hosting
https://account.dyn.com/
HTTP Password

On their own, these two urls are benign, but given the indicators of compromise I have gathered already, this warrants a close look.

ip-api.com is a web-based IP geolocation service and API that allows developers and websites to look up detailed information about an IPv4 or IPv6 address. Malicious actors abuse ip-api.com by embedding it into malware to secretly check a victim’s location, and also as an anti-analysis check, to see if the IP belongs to a datacenter or cloud provider, which would mean the malware is running inside a sandbox instead of a real victim’s machine.

dyn.com is a dynamic dns service that automatically updates Domain Name System (DNS) records in real time when a device’s public IP address changes. Malicious actors use dynamic dns to quickly change their ip address once it has been flagged and keep the domain name the same.

SMTP

Press enter or click to view image in full size

Running strings against the smtp there wasn’t a super telling result here

Narrowing down to specific SMTP application for credential theft

OUTLOOK

Press enter or click to view image in full size

THUNDERBIRD

Press enter or click to view image in full size

Checking for any other mail application and queries

Press enter or click to view image in full size

This is a confirmed case of credential theft attack.

VPN

Press enter or click to view image in full size

Running strings and filtering for “vpn” turns up two VPN clients being targeted:

OpenVPN — Software\OpenVPN-GUI\configs, Software\OpenVPN-GUI\configs\, \OpenVPN\config\
NordVPN — NordVpn.exe

Capability Analysis with capa: capa detects capabilities in executable files

Press enter or click to view image in full size

Capability Analysis with capa

Running capa against the file with the capa-rules ruleset, a few findings stood out and tie back to what I already found manually:

Input Capture::Keylogging [T1056.001] — confirms keystroke logging, beyond just saved app credentials.

Screen Capture [T1113] and Clipboard Data [T1115] — also grabs screenshots and clipboard contents.

Virtualization/Sandbox Evasion::System Checks [T1497.001] — confirms the ip-api.com check I found earlier is used to detect if it’s running in a sandbox.

Subvert Trust Controls::Mark-of-the-Web Bypass [T1553.005] — ties to my scenario, shows the malware tries to bypass the security warning Windows adds to downloaded files.

Application Layer Protocol::Web Protocols [T1071.001] — confirms the HTTP communication already found in strings.

Dynamic Analysis with anyrun

Press enter or click to view image in full size

Dynamic Analysis with any.run

Detonating invoice_photo.jpg in any.run confirms the file as malicious activity, automatically tagged agenttesla, stealer, ip-check, ftp, and exfiltration, matching everything found in static analysis.

The process tree shows invoice_photo.jpg.exe spawning as the main process, alongside WmiPrvSE.exe, WaaSMedicAgent.exe, conhost.exe, and slui.exe.

Looking at the HTTP Requests tab, the malware is caught making a live call to:

http://ip-api.com/line/?fields=hosting

Press enter or click to view image in full size

The IOC list also flags:

Domain: ftp.piovau.com
IP: 69.57.162.28

Both marked malicious, confirming the hardcoded FTP C2 address found during string extraction is a live, actively flagged exfiltration endpoint, not just a dormant string sitting in the code.

I’ll include the full any.run PDF report in the GitHub repo for anyone who wants to review every indicator in detail.

Mitigation and Detection using YARA

Using the indicators of compromise and strings gathered throughout this analysis, I can craft a YARA rule to detect Agent Tesla malware on a machine.

Press enter or click to view image in full size

Github: https://github.com/AKINOLASELIM/Malware_Analysis

--

--