Python One-Liners with Base64 Decoding
Last updated on:
In this page
About the rule
Rule Type
Standard
Rule Description
Detects Python one-liners that use base64 decoding functions in command line executions.
Severity
Trouble
Rule Requirement
Criteria
Action1:
actionname = "Process started" AND (( PROCESSNAME contains "python,py.exe,pyw.exe,pip.exe,pwa.exe,pyshellext.dll" OR ORIGINALFILENAME contains "python,py.exe,pyw.exe,pip.exe,pwa.exe,pyshellext.dll" ) AND COMMANDLINE contains "import" AND COMMANDLINE contains "base64" AND COMMANDLINE contains " -c" AND COMMANDLINE contains ".decode,b16decode,b32decode,b32hexdecode,b64decode,b85decode,z85decode" )
select Action1.HOSTNAME,Action1.MESSAGE,Action1.COMMANDLINE,Action1.FILE_NAME,Action1.PROCESSNAME,Action1.USERNAME,Action1.PARENTPROCESSNAME,Action1.DOMAIN,Action1.ORIGINALFILENAME,Action1.PARENTPROCESSID,Action1.PROCESSID,Action1.PRODUCT_NAME,Action1.SECURITYID
Detection
Execution Mode
realtime
Log Sources
Windows
Author
@Hugh Ryan (HueCodes), Swachchhanda Shrawan Poudel (Nextron Systems)


