Skip to content

DLL Hijacking Vulnerability

Description

The function is vulnerable to DLL hijacking attacks. Use `windows.NewLazySystemDLL()` function to limit DLL search to the Windows directory

Examples

Insecure Code

go
syscall.LoadDLL("example.dll")

Secure Code

go
windows.NewLazySystemDLL("example.dll")

Remediation

Replace vulnerable functions with `windows.NewLazySystemDLL()` to limit DLL search to the Windows directory

Rule Details

FieldValue
IDCODE-0213
CategoryInsecureConfig
SeverityHIGH
CWECWE-427
ConfidenceHIGH
ImpactHIGH
LikelihoodMEDIUM
ExploitabilityEASY
Tagsdll-hijacking, windows
OWASPN/A

References