diff --git a/pyproject.toml b/pyproject.toml index f6415ce..73d010f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "SFlock2" -version = "0.3.64" +version = "0.3.66" description = "Sample staging and detonation utility" readme = "README.md" license = "GPLv3" diff --git a/sflock/ident.py b/sflock/ident.py index 402fb46..fd09c52 100644 --- a/sflock/ident.py +++ b/sflock/ident.py @@ -142,6 +142,17 @@ ] ) +exec_magics = OrderedDict( + [ + ("PE32 executable (DLL)", "dll"), + ("PE32+ executable (DLL)", "dll"), + ("MS-DOS executable PE32 executable (DLL)", "dll"), + ("PE32 executable", "exe"), + ("PE32+ executable", "exe"), + ("MS-DOS executable, MZ for MS-DOS", "exe"), + ] +) + magics = OrderedDict( [ # ToDo msdos @@ -297,9 +308,6 @@ def sct(f): def xxe(f): - if is_executable(f): - return None - STRINGS = [ b"XXEncode", b"begin", @@ -315,9 +323,6 @@ def xxe(f): def hta(f): - if is_executable(f): - return None - STRINGS = [ b"", b"", @@ -433,9 +435,6 @@ def office_ole(f): def powershell(f): - if is_executable(f): - return None - POWERSHELL_STRS = [ b"$PSHOME", b"Get-WmiObject", @@ -458,9 +457,6 @@ def powershell(f): def javascript(f): - if is_executable(f): - return None - JS_STRS = [ b"var ", b"function ", @@ -486,18 +482,12 @@ def javascript(f): def wsf(f): - if is_executable(f): - return None - match = re.search(b'