Skip to content

match genops operands case-sensitively against unsafe strings - #45

Open
abdul-khaliq-khalid wants to merge 1 commit into
google:mainfrom
abdul-khaliq-khalid:genops-case-sensitive-match
Open

match genops operands case-sensitively against unsafe strings#45
abdul-khaliq-khalid wants to merge 1 commit into
google:mainfrom
abdul-khaliq-khalid:genops-case-sensitive-match

Conversation

@abdul-khaliq-khalid

Copy link
Copy Markdown

_categorize_genops lowercases each operand before matching it, but UNSAFE_STRINGS and the compiled patterns are case-sensitive, so the mixed-case entries (VirtualAlloc, CreateThread, RtlMoveMemory, WaitForSingleObject, Crypto, cProfile, code.InteractiveConsole) never match. A pickle that resolves a global whose name is one of those scores unsafe=0 in the genops scan, and because picklemagic cannot tie the bare name to a known module the whole scan comes back clean on those classic ctypes shellcode primitives. Match the operand as-is, the way strict_security_scan and classify_class_name already do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant