Skip to content

Commit

Permalink
fix dll hijacking
Browse files Browse the repository at this point in the history
  • Loading branch information
sobregosodd committed Jan 13, 2025
1 parent 5b70b79 commit 0e3142f
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions guarddog/analyzer/sourcecode/dll-hijacking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,17 @@ rules:
- patterns:
# write a library to disk
- patterns:
- pattern: |
...
open($DLL,'wb')
...
$FN(...,$EXE,...)
- pattern-either:
- pattern: |
...
with open($DLL,'wb') as $FILE:
...
$FN(...,$EXE,...)
- pattern: |
...
$FILE = open($DLL,'wb')
...
$FN(...,$EXE,...)
- metavariable-pattern:
metavariable: $EXE
patterns:
Expand All @@ -82,5 +88,3 @@ rules:
- focus-metavariable: $DLL

severity: WARNING
options:
symbolic_propagation: true

0 comments on commit 0e3142f

Please sign in to comment.