Trustwave SpiderLabs Uncovers Ov3r_Stealer Malware Spread via Phishing and Facebook Advertising. Learn More

Trustwave SpiderLabs Uncovers Ov3r_Stealer Malware Spread via Phishing and Facebook Advertising. Learn More

Services
Capture
Managed Detection & Response

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

twi-managed-portal-color
Co-Managed SOC (SIEM)

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

twi-briefcase-color-svg
Advisory & Diagnostics

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

tw-laptop-data
Penetration Testing

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

twi-database-color-svg
Database Security

Prevent unauthorized access and exceed compliance requirements.

twi-email-color-svg
Email Security

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

tw-officer
Digital Forensics & Incident Response

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

tw-network
Firewall & Technology Management

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

Solutions
BY TOPIC
Microsoft Exchange Server Attacks
Stay protected against emerging threats
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
SpiderLabs Blog

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.

 

 

Latest SpiderLabs Blogs

Welcome to Adventures in Cybersecurity: The Defender Series

I’m happy to say I’m done chasing Microsoft certifications (AZ104/AZ500/SC100), and as a result, I’ve had the time to put some effort into a blog series that hopefully will entertain and inform you...

Read More

Trustwave SpiderLabs: Insights and Solutions to Defend Educational Institutions Against Cyber Threats

Security teams responsible for defending educational institutions at higher education and primary school levels often find themselves facing harsh lessons from threat actors who exploit the numerous...

Read More

Breakdown of Tycoon Phishing-as-a-Service System

Just weeks after Trustwave SpiderLabs reported on the Greatness phishing-as-a-service (PaaS) framework, SpiderLabs’ Email Security team is tracking another PaaS called Tycoon Group.

Read More