Leveraging LLMs for Malware Analysis: Insights and Future Directions
Our approach
Malware analysis
Consistent Output
Prompt evolution
Conclusion
Continue reading Leveraging LLMs for Malware Analysis: Insights and Future Directions
Collaborate Disseminate
Continue reading Leveraging LLMs for Malware Analysis: Insights and Future Directions
Images:Many threat actors use images related to the organizations or entities they intend to impersonate. They do this to make documents appear legitimate and gain the trust of their victims.
[Content_Types].xml:This file specifies the content types and relationships within the Office Open XML (OOXML) document. It essentially defines the types of content and how they are organized within the file structure.
Styles.xml:Stores stylistic definitions for your document. These styles provide consistent formatting instructions for fonts, paragraph spacing, colors, numbering, lists, and much more.
The first image is just a simple line with no particular meaning. It’s embedded in over 100 files known by VirusTotal.
The second image is a hand and has 14 compressed parents.
The third image consists of black circles and also has over 100 compressed parents.
The last image is like a Word page with a table, presenting a fake EDA Roadmap of the European Commission. The image format is EMF (an old format) and it has 4 compressed parents
|
[Content_Type].xml |
Shared |
|
3d8578fd41d766740a1f1ddef972a081436a2d70ab1e9552a861e58d8bbf5321 |
APT33, |
|
4ea40d34cfcaf69aa35b405c575c7b87e35c72246f04d2d0c5f381bc50fc8b3d |
APT29, |
|
4f7fa7433484b4e655d185719613e2f98d017590146d15eedc1aa1d967636b3a |
FIN7, |
|
529739886f6402a9cd5a8064ece73eef19c597ef35c0bc8d09390e8b4de9041b |
FIN7, |
|
688dca40507fb96630f3df80442266a0354e7c24b7df86be3ea57069b25d12c6 |
Gamaredon, |
|
6f1ac5f0ebfb7e97d3dc4100e88eaab10016a5cac75e1251781f2ea12477af51 |
Gamaredon, |
|
7796c382cd4c7c4ae3bcf2eed4091fbb20a2563ca88f2aecadb950ad9cf661f8 |
Razor |
|
b4fa7f3faa0510e4d969219bceec2a90e8a48ff28e060db3cdd37ce935c3779c |
Razor |
|
dfa90f373b8fd8147ee3e4bfe1ee059e536cc1b068f7ec140c3fc0e6554f331a |
Gamaredon, |
|
fe98b3bcf96f9c396eb9193f0f9484ef01d3017257300cc76098854b1f103b69 |
FIN7, |
|
ff5a5ba3730a8d2ec0cbad39e5edf4ad502107bd0ef8a5347f29262b3dfe8a43 |
Mustang |
|
Styles.xml |
Shared |
|
13ed55637980452662cb6838a2931a5e54fbed5881bcbae368b3d189d3a01930 |
APT28, |
|
2de1fc9c48c4b0190361c49cdb053fd39cf81e32f12c82d08f88aec34358257f |
Hazy |
|
59df7787c7cf5408481ae149660858d3af765a0c2cd63d6309b151380f92adb2 |
TA505, |
|
8f590f608f0719404a1731bb70a6ce2db420fd61e5a387d5b3091d47c7e21ac9 |
APT28, |
|
de392cd4bf1d650a9cf8c6d24e05e0605bf4eaf1518710f0307d8aceb9e5496c |
Hazy |
|
e16f84c5fd1df6af1a1f2049f7862f4ea460765863476afb17e78edee772d35b |
APT32, |
Continue reading Tracking Threat Actors Using Images and Artifacts
{79ECA078-17FF-726B-E811-213280E5C831}
{79FEACFF-FFCE-815E-A900-316290B5B738}
{79FAA099-1BAE-816E-D711-115290CEE717}
EventID:13
EventType:SetValue
Details:%windir%\SysWOW64\rundll32.exe /sta {D4D4D7B7-1774-4FE5-ABA8-4CC0B99452B4} "USB_Module"
TargetObject:HKU\S-1-5-21-575823232-3065301323-1442773979-1000\Software\Microsoft\Windows\CurrentVersion\Run\RunDllModule
{EBEB87A6-E151-4054-AB45-A6E094C5334B}
{57477331-126E-4FC8-B430-1C6143484AA9}
{241D7F03-9232-4024-8373-149860BE27C0}
{C07DB6A3-34FC-4084-BE2E-76BB9203B049}
\qmacro
\mymacro
\MacroCommerce
\Plugin
\Microsoft
The C:\Windows\SysWow64 is a folder found in 64-bit versions of Windows, containing legitimate 32-bit system files and
libraries, and is oftenly used to conceal malicious DLLs. Its prevalence makes it an attractive
hiding place, complicating detection efforts. However, permissions are required to create files in
it.
The
C:\Program Files (x86)
folder is another legitimate directory used to store malicious COM hijacking payloads. Similar to
\AppData\Roaming, in this case we have observed that the malicious DLLs are stored under specific
subfolders, such as “\Google”, “\Mozilla Firefox”, “\Microsoft”, “\Common Files” or “\Internet
Download Manager”.
C:\Users\<user>\AppData\Local
is another folder used for storing these payloads, including the “\Temp”, “\Microsoft” and “\Google”
subfolders.
Potential
Persistence Via COM Hijacking From Suspicious Locations
(high risk level). Detects suspicious when creating a registry key using COM objects.
Potential
Persistence Via COM Search Order Hijacking
(medium risk level). Similar to the previous rule, it also filters out paths associated with
legitimate behaviors.
import "vt"
rule CLSID_COM_Hijacking: {
meta:
target_entity = "file"
hash = "a19472bd5dd89a6bd725c94c89469f12cdbfee3b0f19035a07374a005b57b5e0"
author = "@Joseliyo_Jstnk"
mitre_technique = "T1546.015"
mitre_tactic = "TA0003"
condition:
vt.metadata.new_file and vt.metadata.analysis_stats.malicious >= 5 and
for any vt_behaviour_registry_keys_set in vt.behaviour.registry_keys_set: (
vt_behaviour_registry_keys_set.key matches /\\CLSID\\{[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\}\\InProcServer32\\\(Default\)/
)
}
and not
(
for any engine, signature in vt.metadata.signatures : (
signature icontains "berbew"
)
)
import "vt"
rule CLSID_COM_Hijacking: {
meta:
target_entity = "file"
hash = "a19472bd5dd89a6bd725c94c89469f12cdbfee3b0f19035a07374a005b57b5e0"
author = "@Joseliyo_Jstnk"
sigma_authors = "Maxime Thiebaut (@0xThiebaut), oscd.community, Cédric Hien"
mitre_technique = "T1546.015"
mitre_tactic = "TA0003"
condition:
vt.metadata.new_file and vt.metadata.analysis_stats.malicious >= 5 and
for any vt_behaviour_sigma_analysis_results in vt.behaviour.sigma_analysis_results: (
vt_behaviour_sigma_analysis_results.rule_id == "7f5d257abc981b5eddb52d4a9a02fb66201226935cf3d39177c8a81c3a3e8dd4"
)
}
|
CLSID |
|
79FAA099-1BAE-816E-D711-115290CEE717 |
|
EBEB87A6-E151-4054-AB45-A6E094C5334B |
|
241D7F03-9232-4024-8373-149860BE27C0 |
|
C07DB6A3-34FC-4084-BE2E-76BB9203B049 |
|
79ECA078-17FF-726B-E811-213280E5C831 |
|
22C6C651-F6EA-46BE-BC83-54E83314C67F |
|
F4CBF20B-F634-4095-B64A-2EBCDD9E560E |
|
57477331-126E-4FC8-B430-1C6143484AA9 |
|
C73F6F30-97A0-4AD1-A08F-540D4E9BC7B9 |
|
89565275-A714-4a43-912E-978B935EDCCC |
|
26037A0E-7CBD-4FFF-9C63-56F2D0770214 |
|
16426152-126E-4FC8-B430-1C6143484AA9 |
|
33414471-126E-4FC8-B430-1C6143484AA9 |
|
23716116-126E-4FC8-B430-1C6143484AA9 |
|
D4D4D7B7-1774-4FE5-ABA8-4CC0B99452B4 |
|
79FEACFF-FFCE-815E-A900-316290B5B738 |
|
74A94F46-4FC5-4426-857B-FCE9D9286279 |
|
Common |
|
C:\Users\<user>\AppData\Roaming |
|
C:\Users\<user>\AppData\Roaming\qmacro |
|
C:\Users\<user>\AppData\Roaming\mymacro |
|
C:\Users\<user>\AppData\Roaming\MacroCommerce |
|
C:\Users\<user>\AppData\Roaming\Plugin |
|
C:\Users\<user>\AppData\Roaming\Microsoft |
|
C:\Windows\SysWow64 |
|
C:\Program |
|
C:\Program |
|
C:\Program |
|
C:\Program |
|
C:\Program |
|
C:\Program |
|
C:\Users\<user>\AppData\Local |
|
C:\Users\<user>\AppData\Local\Temp |
|
C:\Users\<user>\AppData\Local\Microsoft |
|
C:\Users\<user>\AppData\Local\Google |
|
C:\Windows\Temp |
logsource:
product: linux
category: process_creation
detection:
selection:
Image|endswith: ‘/crontab’
CommandLine|contains: ‘ -l’
condition: selection

import
“vt”
rule
sigma_example_registry_keys {
meta:
target_entity
= “file”
condition:
for
any
vt_behaviour_sigma_analysis_results in
vt.behaviour.sigma_analysis_results: (
for
any
vt_behaviour_sigma_analysis_results_match_context in
vt_behaviour_sigma_analysis_results.match_context: (
vt_behaviour_sigma_analysis_results_match_context.values[“TargetObject”]
icontains
“\\CurrentVersion\\RunOnce\\”
and
(vt_behaviour_sigma_analysis_results_match_context.values[“Details”]
endswith
“.vbs”
or
vt_behaviour_sigma_analysis_results_match_context.values[“Details”]
endswith
“.bat”)
)
)
}
import
“vt”
rule
sigma_rule_evtx_cve {
meta:
target_entity
= “file”
condition:
for
any
vt_behaviour_sigma_analysis_results in
vt.behaviour.sigma_analysis_results: (
for
any
vt_behaviour_sigma_analysis_results_match_context in
vt_behaviour_sigma_analysis_results.match_context: (
vt_behaviour_sigma_analysis_results_match_context.values[“TargetFilename”]
startswith
“C:\\Windows\\System32\\”
and
vt_behaviour_sigma_analysis_results_match_context.values[“TargetFilename”]
endswith
“.dll”
and
for
any
vt_metadata_tags in
vt.metadata.tags: (
vt_metadata_tags
icontains
“cve-“
)
)
)
}
|
VT |
YARA |
Sigma |
Sigma |
|
behavior_created_processes |
vt.behaviour.processes_created |
process_creation |
Image CommandLine ParentCommandLine ParentImage OriginalFileName |
|
behavior_files |
vt.behaviour.files_attribute_changed vt.behaviour.files_deleted vt.behaviour.files_opened vt.behaviour.files_copied vt.behaviour.files_copied[x].destination vt.behaviour.files_copied[x].source vt.behaviour.files_written vt.behaviour.files_dropped vt.behaviour.files_dropped[x].path vt.behaviour.files_dropped[x].sha256 vt.behaviour.files_dropped[x].type |
file_access file_change file_delete file_rename file_event |
TargetFilename |
|
behavior_injected_processes |
vt.behaviour.processes_injected |
process_access create_remote_thread process_creation |
CallTrace GrantedAccess SourceImage TargetImage StartModule StartFunction TargetImage SourceImage |
|
behavior_processes |
vt.behaviour.processes_terminated vt.behaviour.processes_killed vt.behaviour.processes_created vt.behaviour.command_executions vt.behaviour.processes_injected |
process_access create_remote_thread process_creation |
CallTrace GrantedAccess SourceImage TargetImage StartModule StartFunction TargetImage SourceImage Image CommandLine ParentCommandLine ParentImage OriginalFileName |
|
behavior_registry |
vt.behaviour.registry_keys_deleted vt.behaviour.registry_keys_opened vt.behaviour.registry_keys_set vt.behaviour.registry_keys_set[x].key vt.behaviour.registry_keys_set[x].value |
registry_add registry_delete registry_event registry_rename registry_set |
EventType TargetObject Details |
|
behavior_services |
vt.behaviour.services_bound vt.behaviour.services_created vt.behaviour.services_opened vt.behaviour.services_started vt.behaviour.services_stopped vt.behaviour.services_deleted |
registry_set process_creation |
Image CommandLine ParentCommandLine ParentImage EventType TargetObject Details |
|
behavior_network |
vt.behaviour.dns_lookups vt.behaviour.dns_lookups[x].hostname vt.behaviour.dns_lookups[x].resolved_ips vt.behaviour.hosts_file vt.behaviour.ip_traffic vt.behaviour.ip_traffic[x].destination_ip vt.behaviour.ip_traffic[x].destination_port vt.behaviour.ip_traffic[x].transport_layer_protocol vt.behaviour.http_conversations vt.behaviour.http_conversations[x].url vt.behaviour.http_conversations[x].request_method vt.behaviour.http_conversations[x].request_headers vt.behaviour.http_conversations[x].response_headers vt.behaviour.http_conversations[x].response_status_code vt.behaviour.http_conversations[x].response_body_filetype vt.behaviour.smtp_conversations[x].hostname vt.behaviour.smtp_conversations[x].destination_ip vt.behaviour.smtp_conversations[x].destination_port vt.behaviour.smtp_conversations[x].smtp_from vt.behaviour.smtp_conversations[x].smtp_to vt.behaviour.smtp_conversations[x].message_from vt.behaviour.smtp_conversations[x].message_to vt.behaviour.smtp_conversations[x].message_cc vt.behaviour.smtp_conversations[x].message_bcc vt.behaviour.smtp_conversations[x].timestamp vt.behaviour.smtp_conversations[x].subject vt.behaviour.smtp_conversations[x].html_body vt.behaviour.smtp_conversations[x].txt_body vt.behaviour.smtp_conversations[x].x_mailer vt.behaviour.tls |
network_connection |
DestinationHostname DestinationIp DestinationIsIpv6 DestinationPort DestinationPortName SourceIp SourceIsIpv6 SourcePort SourcePortName |
|
behavior (too generic) |
vt.behaviour.modules_loaded |
image_load |
ImageLoaded Image OriginalFileName |
Continue reading The path from VT Intelligence queries to VT Livehunt rules: A CTI analyst approach
Continue reading It’s all about the structure! Creating YARA rules by clicking