← back to portfolio
Malware
Qakbot Phishing: Macro Execution and Host Reconnaissance
Executive Summary
A Critical alert for suspected Qakbot activity fired on host Robert on 14 July 2023 at 05:32:35 UTC.
The trigger was a phishing email, delivered the day before, carrying a 7z archive presented as a
presentation. The archive held a macro-enabled Excel workbook, a malicious shortcut (readme.lnk) and a
hidden batch script (ad.bat). Shortly after the workbook ran, EXCEL.EXE requested the same .dat file from
three different external IP addresses over plain HTTP, while the shortcut launched cmd.exe to run ad.bat
— a script that enumerates the user, network, domain and shares, force-terminates two Windows
processes and attempts to repair the WebCache database. The behaviour is consistent with Qakbot and an
attempt to run malicious code and prepare further compromise. The alert was assessed as a true positive.
Scenario
A Critical alert, classified as Data Leakage, fired on workstation Robert (172.16.17.189) on 14 July 2023
at 05:32:35 UTC (08:32:35 +03:00). The first-line analyst had found an email with a suspicious attachment
and a ZIP → LNK → BAT execution chain that strongly suggested Qakbot, and escalated the case.
This investigation picks up the escalation: confirm whether the alert is a true positive, trace it back to
the delivery email, analyse the attached files, and establish what actually ran on the host.
Evidence Collected
| Artifact | Value | Why It Mattered |
| Phishing email | zirtto@digitalzedi[.]com → robert@letsdefend.io, 2023-07-13 13:39:00, sender IP 201.226.241.213 | Delivery vector; the gateway action was Allowed |
| Attachment | form.7z | Archive containing the workbook, the shortcut and a hidden script |
| Workbook | form_1484004552-07142023.xls · MD5 f9191123817870609289c3f9f8d4c3c5 | Macro-enabled workbook; hash for hunting |
| Macro indicators | auto_open · hidden sheet content · dynamic formulas · Application.Run · EXEC · regsvr32 -silent ..\Drezd.red | Automatic, concealed execution of payload-related commands |
| Shortcut | readme.lnk → cmd.exe /c "C:\Users\LetsDefend\Downloads\form\ad.bat" | Launches the batch script through cmd.exe |
| Batch script | ad.bat (hidden) | Host, network and domain reconnaissance plus system tampering |
| Network requests | EXCEL.EXE (PID 4364) → GET /45121.3553172454.dat on 3 hosts, port 80 | Same payload name requested from three IPs; all permitted by the firewall |
| WebCache check | AppData\Local\Microsoft\Windows | No WebCache folder or WebCacheV01.dat found on the evidence left on the endpoint |
Timeline
Log-management times are UTC. Sysmon timestamps appear three hours later, which matches the +03:00 offset
on the alert.
| Time (UTC) | Event | Source |
| 2023-07-13 13:39:00 | Phishing email with form.7z delivered; gateway action Allowed (time as recorded in the email) | Email security |
| 2023-07-14 05:31:13 – 05:31:19 | EXCEL.EXE makes normal Microsoft Office connections over HTTPS (officeapps.live.com), with matching DNS lookups | Firewall, Sysmon EID 22 |
| 2023-07-14 05:32:00 | EXCEL.EXE requests /45121.3553172454.dat from 111.90.151.238:80 and 190.14.37.241:80 | Firewall |
| 2023-07-14 05:32:01 | EXCEL.EXE requests /45121.3553172454.dat from 84.32.188.11:80 | Firewall |
| 2023-07-14 05:32:35 | Alert fires (08:32:35 +03:00) | SIEM alert |
Key Findings
- A phishing email carrying a 7z archive presented as a presentation passed the email gateway (action: Allowed).
- The archive held a macro-enabled workbook, a malicious shortcut (readme.lnk) and a hidden batch script (ad.bat).
- The workbook macro runs automatically on open, hides worksheet content, builds its formulas dynamically, executes indirectly through Application.Run and references several external payload-like files, including a regsvr32 -silent ..\Drezd.red command.
- After normal Office traffic, EXCEL.EXE (PID 4364) requested the same .dat file from three unrelated external IPs over unencrypted HTTP, a pattern consistent with a macro using fallback servers.
- readme.lnk launches cmd.exe, which runs ad.bat to enumerate the user, network, domain, shares and local groups, force-terminate taskhostw.exe and dllhost.exe, and attempt recovery of the WebCache database.
- The alert was assessed as a true positive consistent with Qakbot activity; escalation to incident response is warranted.
- Not confirmed: the logs show the three payload requests being permitted, but not whether any payload was actually delivered.
- Not confirmed: the WebCache folder and WebCacheV01.dat targeted by ad.bat were not present in AppData\Local\Microsoft\Windows on the evidence left on the endpoint, so recovery of browser data by the script is not confirmed.
Attack Chain
Delivery
Phishing email from zirtto@digitalzedi[.]com with form.7z attached, allowed through the gateway.
Execution (workbook)
The workbook macro runs on open, conceals its content and calls payload-related commands, including regsvr32.
Payload Retrieval
EXCEL.EXE requests 45121.3553172454.dat from three external IPs over HTTP port 80.
Execution (shortcut)
readme.lnk starts cmd.exe /c, which runs the hidden ad.bat from the extracted folder.
Discovery
ad.bat enumerates user, environment, ARP, network configuration, domain controller, shares, routes, connections and local groups.
System Tampering
taskhostw.exe and dllhost.exe are force-terminated, then esentutl is run against the WebCache database.
ad.bat Analysis
The batch script is the reconnaissance and preparation stage. Every command below ran from the extracted
form folder through the shortcut’s cmd.exe.
| Command | Purpose |
| whoami /all | Current user, group memberships and privileges |
| cmd /c set | Environment variables |
| arp -a | Hosts the machine has recently talked to on the local network |
| ipconfig /all | Network adapter and DNS configuration |
| net view /all | Other systems and shares visible on the network |
| nslookup -querytype=ALL -timeout=10 _ldap.tcp.dc._msdc.letsdefend | Locates the domain controllers through DNS |
| net share | Shares exposed by this machine |
| route print | Routing table |
| netstat -nao | Active connections and owning process IDs |
| net localgroup | Local groups |
| taskkill /IM taskhostw.exe /IM dllhost.exe /F | Force-terminates two Windows processes |
| esentutl.exe /r V01 /l"C:\Users\LetsDefend\AppData\Local\Microsoft\Windows\WebCache" /s"…WebCache" /d"…WebCache" | Attempts recovery of the ESE database V01 using the WebCache directories |
Inference, not log-confirmed
Terminating taskhostw.exe before running esentutl on the WebCache directories suggests an attempt to make
the browser database readable. This is read from the commands themselves; no log confirms the intent or
the result.
Indicators of Compromise
| Type | Value | Context |
| IP (HTTP) | 111.90.151.238 | Requested for 45121.3553172454.dat |
| IP (HTTP) | 190.14.37.241 | Requested for 45121.3553172454.dat |
| IP (HTTP) | 84.32.188.11 | Requested for 45121.3553172454.dat |
| IP (email) | 201.226.241.213 | Phishing email sender IP |
| Email | zirtto@digitalzedi[.]com | Phishing sender |
| Subject | Questions Creating Delivery Using Open APIs | Phishing email |
| File | form.7z | Email attachment |
| File | form_1484004552-07142023.xls | Macro-enabled workbook |
| MD5 | f9191123817870609289c3f9f8d4c3c5 | form_1484004552-07142023.xls |
| File | readme.lnk | Launches cmd.exe /c ad.bat |
| MD5 | c868ee195d4ae11ee09c9ea0ec5f4a6d | readme.lnk |
| File (hidden) | ad.bat | Reconnaissance / WebCache script |
| MD5 | d868a643d42e435700806d981f597b97 | ad.bat |
| Payload name | 45121.3553172454.dat | Requested by EXCEL.EXE |
Recommended Actions
These are recommendations from the investigation, not findings.
- Isolate Robert (172.16.17.189) and escalate to incident response.
- Block 111.90.151.238, 190.14.37.241, 84.32.188.11 and 201.226.241.213, and the sender domain digitalzedi[.]com.
- Hunt across endpoints for readme.lnk, ad.bat, the file hashes and requests for 45121.3553172454.dat.
- Search the mail system for other messages from the same sender or carrying form.7z, and remove them.
- Reset credentials for the affected user and review other activity from the host.
- Block or tightly restrict macro execution in files received from the internet.
Analyst Notes
Started from the alert and the L1 note, then pivoted to the delivery email to establish how the files reached the host.
Filtered log management on the host IP: normal Office traffic first, then plain-HTTP requests from EXCEL.EXE to three unrelated hosts, all permitted.
Requesting one payload name from three IPs right after the Microsoft connections is typical of a macro working through fallback servers.
Reconciled time zones before building the timeline: log-management times are UTC, Sysmon is three hours later, which matches the alert’s +03:00 offset.
Parsed readme.lnk to confirm it runs cmd.exe /c against ad.bat, and read the strings extracted from the workbook to confirm the macro indicators.
Checked AppData\Local\Microsoft\Windows, the path the script targets, for WebCache data and found none on the evidence left on the endpoint.
The evidence timestamps the workbook’s network activity and the alert, but does not separately timestamp the cmd.exe and ad.bat run, so the order of the two execution paths is not established.