Skip to content

Commit

Permalink
Merge pull request #285 from CybercentreCanada/identify_ps1
Browse files Browse the repository at this point in the history
Adding better PowerShell identification
  • Loading branch information
cccs-kevin authored Jul 12, 2021
2 parents 9922af6 + 4290f6b commit 22f8a75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion assemblyline/common/identify.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
# Match one of the common Classes
re.compile(rb'(-memberDefinition|-Name|-namespace|-passthru)'),
# Match one of the common Methods
re.compile(rb'\.Get(String|Field|Type|Method)\(')
re.compile(rb'(\.Get(String|Field|Type|Method)|FromBase64String)\(')
]
}
STRONG_SCORE = 15
Expand Down
1 change: 1 addition & 0 deletions test/test_identify.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ def test_constants():
(b".GetField(", ["code/ps1"]),
(b".GetType(", ["code/ps1"]),
(b".GetMethod(", ["code/ps1"]),
(b"FromBase64String(", ["code/ps1"]),
]
)
def test_strong_indicators(code_snippet, code_types):
Expand Down

0 comments on commit 22f8a75

Please sign in to comment.