Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. Learn More

Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. Learn More

Services
Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

Database Security

Prevent unauthorized access and exceed compliance requirements.

Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Solutions
BY TOPIC
Microsoft Security
Unlock the full power of Microsoft Security
Offensive Security
Solutions to maximize your security ROI
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats

Lnk files in Email Malware Distribution

Recently I have noticed more use of .lnk files used in malware distribution via email. These files are Windows Shortcut files, typically used for shortcuts on your system, such as on your desktop. The use of .lnk files in emails is not new, but a recent sample caught my eye and I took a closer look. The original email, as it would appear to the recipient, looked like this, purporting to be from an individual at Automatic Data Processing, and containing what looks to be a PDF document and a ZIP archive.

12056_d702cd47-f710-43e7-9b7c-5d4c941eaf4a

However, our Trustwave Secure Email Gateway had a slightly different view of the message, identifying the "statement.pdf" file as an executable, and showing a number of .lnk files in the ZIP archive, as well as another copy of the executable.

11854_ccbd67ea-784e-4943-ba67-a538349ed873

So what's going on here? My initial questions were why rename the executable file with a .pdf extension as it won't execute for the user? Also, why all the .lnk files? A closer look at the .lnk files show that they are identical. Their properties reveal a clue to what is going on. The target runs cmd.exe in the current directory and executes "statement.pdf" with a /c option, which simply means "Carry out the command specified by string and then terminate".

11039_a565e3b1-e175-40dd-99f4-dfcdac262d15

When one of the .lnk files is clicked, it effectively runs the "Statement.pdf" executable, regardless of the fact that it has a .pdf extension. Why should this be so? It turns out that this is a feature of cmd.exe, documented by Microsoft here. Cmd.exe uses the Kernel32 API function CreateProcess that examines the file's contents for executable headers, and if found, executes the file regardless of its extension.

So, assuming the user clicks on "Statement.pdf" first, and finds out that nothing happens, that user may then feel compelled to extract the contents of the zip file and see a series of "parts". These parts do not show a .lnk extension because these are hidden on Windows (think of your desktop shortcuts). But when clicked, the malware is executed, and the user's machine is now infected. In this case, the malware was an Upatre downloader, VirusTotal report here for those interested.

You have to wonder how many users would actually go through that many steps to check out an un-solicited email! But the ruse does have a few things going for it. The email would bypass any email gateways that seek to block executables based just on file extension, as opposed to examining the file contents. And if the email gets to the user, the file attachments appear to be a "harmless" PDF file. The .lnk files provide a way to invoke cmd.exe to run the renamed executable.

Shortcut files have also been observed by others in recent email targeted attacks, for example see here and here. Clearly, they are something to lock down in your email gateway policy. People shouldn't have too much need to email shortcut files into your organization, and if they do, then find another way to accommodate the file transfer. The Trustwave Secure Email Gateway blocks all .lnk files by default.

 

 

ABOUT TRUSTWAVE

Trustwave is a globally recognized cybersecurity leader that reduces cyber risk and fortifies organizations against disruptive and damaging cyber threats. Our comprehensive offensive and defensive cybersecurity portfolio detects what others cannot, responds with greater speed and effectiveness, optimizes client investment, and improves security resilience. Learn more about us.

Latest Intelligence

Discover how our specialists can tailor a security program to fit the needs of
your organization.

Request a Demo