Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1.88 KB

006.md

File metadata and controls

43 lines (32 loc) · 1.88 KB

Day 6: Suspicious LNK files

For todays yara rule I wanted to write a detection for suspicious .LNK files that leverage the Windows CMD file format (.cmd).

I used a lnk file observed with IcedID malware earlier today.

Belkasoft's blog post Forensic Analysis of LNK Files was used to learn about .LNK file headers

Yara Rule

Here's the Yara rule I created for detecting suspicious .LNK files:

rule sus_lnk_files {
  meta:
    author = "Colin Cowie"
    description = "Yara rule to detect suspicious .LNK files used by IcedID and other malware families"
    reference = "SHA1: 92ba4c948890d67927afa26727474e563e6d1bdf"
  strings:
    $lnk_header = { 4C 00 00 00 }
    $shell = "shell32.dll" ascii wide
    $cmd = "cmd.exe" ascii wide
    $cmd_file = ".cmd" ascii wide
  condition:  
    all of them
    and $lnk_header at 0
    and filesize<5KB
}

Results

Retrohunting on VirusTotal with this rule returned some really positive results! It seemed like most of the results were either Qakbot or IcedID such as:

References