diff --git a/North Korea/APT/Lazarus/23-10-19/YARA_Rule_Lazarus_October_2019.yar b/North Korea/APT/Lazarus/23-10-19/YARA_Rule_Lazarus_October_2019.yar new file mode 100644 index 0000000..65a0ea6 --- /dev/null +++ b/North Korea/APT/Lazarus/23-10-19/YARA_Rule_Lazarus_October_2019.yar @@ -0,0 +1,262 @@ +* + YARA Rule Set + Author: Arkbird_SOLG + Date: 2019-10-26 + Reference: https://github.com/StrangerealIntel/CyberThreatIntel/blob/master/North%20Korea/APT/Lazarus/23-10-19/analysis.md +*/ + +/* Rule Set ----------------------------------------------------------------- */ + +import "pe" + +rule APT_Lazarus_VBA_Malware_Oct19_1 { + meta: + description = "연인심리테스트.xls" + author = "Arkbird_SOLG" + reference = "https://github.com/StrangerealIntel/CyberThreatIntel/blob/master/North%20Korea/APT/Lazarus/23-10-19/analysis.md" + date = "2019-10-26" + hash1 = "a7ff0dfc2456baa80e6291619e0ca480cc8f071f42845eb8316483e077947339" + strings: + $x1 = "C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\OFFICE16\\MSO.DLL" fullword ascii + $x2 = "C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\VBA\\VBA7.1\\VBE7.DLL" fullword ascii + $s3 = "*\\G{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}#2.8#0#C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\OFFICE16\\MSO.DLL#Micr" wide + $s4 = "$pif.FileName=\"cmd.exe\"" fullword ascii + $s5 = "C:\\Program Files (x86)\\Microsoft Office\\Root\\Office16\\EXCEL.EXE" fullword ascii + $s6 = "*\\G{000204EF-0000-0000-C000-000000000046}#4.2#9#C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\VBA\\VBA7.1\\VBE7.DLL#" wide + $s7 = "if([System.IO.File]::Exists($spth)){try{$srsl=Get-Content -Path $spth; Remove-Item -Path $spth; if($srsl.GetType().FullName -eq " ascii + $s8 = "$bdy=\"--\" + (Get-Date -Format yyyy-MM-dd-hh-mm-ss-fffffff) + \"--\"" fullword ascii + $s9 = "*\\G{00020813-0000-0000-C000-000000000046}#1.9#0#C:\\Program Files (x86)\\Microsoft Office\\Root\\Office16\\EXCEL.EXE#Microsoft " wide + $s10 = "$spth=[System.IO.Path]::GetTempFileName()" fullword ascii + $s11 = "Start-Process $scmd" fullword ascii + $s12 = "$rq.UserAgent = \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/5" ascii + $s13 = "if($nmx -gt $rsp.ContentLength){$nmx=$rsp.ContentLength}" fullword ascii + $s14 = "if([System.IO.File]::Exists($spth)){try{$srsl=Get-Content -Path $spth; Remove-Item -Path $spth; if($srsl.GetType().FullName -eq " ascii + $s15 = "$pif = New-Object System.Diagnostics.ProcessStartInfo" fullword ascii + $s16 = "$p = New-Object System.Diagnostics.Process" fullword ascii + $s17 = "$scmd=[System.Text.ASCIIEncoding]::UTF8.GetString($buf,12,$nmlen)" fullword ascii + $s18 = "$rq=[System.Net.WebRequest]::create($pxy + \"?v=\" + $unm)" fullword ascii + $s19 = "$ip=(Test-Connection -ComputerName $hs -Count 1 | Select -ExpandProperty IPV4Address).Address" fullword ascii + condition: + uint16(0) == 0xcfd0 and filesize < 5000KB and + 1 of ($x*) and 4 of them +} + +rule APT_Lazarus_PS1_Malware_Oct19_1 { + meta: + description = "sopiiubuvsclwukz.ps1" + author = "Arkbird_SOLG" + reference = "https://github.com/StrangerealIntel/CyberThreatIntel/blob/master/North%20Korea/APT/Lazarus/23-10-19/analysis.md" + date = "2019-10-26" + hash1 = "360431100aa6da78b577cc8b4606fa66e6191056fac7c42929abec5a4402da7a" + strings: + $s1 = "$pif.FileName=\"cmd.exe\"" fullword ascii + $s2 = "if([System.IO.File]::Exists($spth)){try{$srsl=Get-Content -Path $spth; Remove-Item -Path $spth; if($srsl.GetType().FullName -eq " ascii + $s3 = "$bdy=\"--\" + (Get-Date -Format yyyy-MM-dd-hh-mm-ss-fffffff) + \"--\"" fullword ascii + $s4 = "$spth=[System.IO.Path]::GetTempFileName()" fullword ascii + $s5 = "Start-Process $scmd" fullword ascii + $s6 = "$rq.UserAgent = \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/5" ascii + $s7 = "$pbdy=stoub(\"`r`n`r`n--\" + $bdy + \"`r`nContent-Disposition: form-data; name=`\"_webident_f`\"`r`n`r`n\" + $tid + \"`r`n--\" +" ascii + $s8 = "if([System.IO.File]::Exists($spth)){try{$srsl=Get-Content -Path $spth; Remove-Item -Path $spth; if($srsl.GetType().FullName -eq " ascii + $s9 = "$fnm=-join((48..57)|Get-Random -Count 12|%{[char]$_})+\".dat\"" fullword ascii + $s10 = "$pif = New-Object System.Diagnostics.ProcessStartInfo" fullword ascii + $s11 = "$p = New-Object System.Diagnostics.Process" fullword ascii + $s12 = "$scmd=[System.Text.ASCIIEncoding]::UTF8.GetString($buf,12,$nmlen)" fullword ascii + $s13 = "$rq=[System.Net.WebRequest]::create($pxy + \"?v=\" + $unm)" fullword ascii + $s14 = "$ip=(Test-Connection -ComputerName $hs -Count 1 | Select -ExpandProperty IPV4Address).Address" fullword ascii + $s15 = "if($nmx -gt $rsp.ContentLength){$nmx=$rsp.ContentLength}" fullword ascii + $s16 = "$global:tid=Get-Random -Minimum 128 -Maximum 16383" fullword ascii + $s17 = "a; name=`\"file`\"; filename=`\"\" + $fnm + \"`\"`r`nContent-Type: octet-stream`r`n`r`n\")" fullword ascii + $s18 = "$rq.ContentLength=$pbdy.Length + $bds + $ebdy.Length;" fullword ascii + $s19 = "\"`r`nContent-Disposition: form-data; name=`\"_webident_s`\"`r`n`r`n\" + $rid + \"`r`n--\" + $bdy + \"`r`nContent-Disposition: f" ascii + condition: + uint16(0) == 0xbbef and filesize < 30KB and + 8 of them +} + +rule APT_Lazarus_VBA_Malware_Oct19_2 { + meta: + description = "샘플_기술사업계획서(벤처기업평가용).doc" + author = "Arkbird_SOLG" + reference = "https://github.com/StrangerealIntel/CyberThreatIntel/blob/master/North%20Korea/APT/Lazarus/23-10-19/analysis.md" + date = "2019-10-26" + hash1 = "761bcff9401bed2ace80b85c43b230294f41fc4d1c0dd1ff454650b624cf239d" + strings: + $s1 = "*\\G{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}#2.8#0#C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE16\\MSO.DLL#Microsoft " wide + $s2 = "000-0000-C000-000000000046}#4.2#9#C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA7.1\\VBE7.DLL#Visual Basic For Appl" wide + $s3 = "*\\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\\Windows\\system32\\stdole2.tlb#OLE Automation" fullword wide + $s4 = "https://nzssdm.com/assets/mt.dat'" fullword ascii + $s5 = "*\\G{00020905-0000-0000-C000-000000000046}#8.7#0#C:\\Program Files\\Microsoft Office\\Root\\Office16\\MSWORD.OLB#Microsoft Word " wide + $s6 = "SO.DLL#" fullword ascii + $s7 = "data) - " fullword ascii + $s8 = "command As S" fullword ascii + $s9 = "curl -o " fullword ascii + $s10 = "nd(cdata ) - L" fullword ascii + $s11 = "und(cdat@a) - L" fullword ascii + $s12 = "ypass -f" fullword ascii + $s13 = "systema" fullword ascii + $s14 = "