Don't Click Evil.txt: CVE-2024-30050 and Other Windows Silliness
The report describes four flaws in Windows shortcut and file-share handling that allow an attacker to execute arbitrary code without triggering security prompts. An attacker could trick a user into running a malicious file that bypasses Mark of the Web and SmartScreen warnings.
research.aurainfosec.io
Published on research.aurainfosec.io
These let you bypass user security prompts and execute commands without any warnings.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the root cause is inconsistent handling of file paths and shortcut parameters in Windows, where certain file types or flags cause security checks to be skipped.
Impact
An attacker could execute arbitrary code on a victim's machine without triggering security warnings, increasing the success rate of phishing attacks.
What the attacker needed
Victim clicks a malicious file; outbound SMB/WebDAV allowed; attacker controls a remote share
The fix
Microsoft fixed some of these issues in patches, and as of 9 July 2024, .url files are no longer considered safe within shares or as .lnk targets, but the malformed filename bypass is still exploitable.
How it was found
- Create a .url file that references a local executable and sets a remote WorkingDirectory.
- Place a malicious executable named powershell.exe in the remote share.
- Use a .lnk file to reference the .url file to bypass prompts.
- For the malformed filename bypass, name a file like C:cmd.exe on a share and run it.
- Use .library-ms or .searchconnector-ms to open the share and execute the file.
- For the .cab traversal bypass, create a .url referencing a .cab file with a crafted path that causes explorer.exe to error but wscript.exe to execute a script.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Windows tries to protect users by showing warnings when they open files downloaded from the internet. This research found ways to make malicious shortcut files run code without those warnings, so a victim might not realise anything is wrong.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.