File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
volatility3/framework/plugins/windows Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ def check_inline_hook(
8585 # This is important to avoid false positives on stub functions
8686 MIN_FUNC_SIZE_FOR_JMP = 2
8787 MIN_FUNC_SIZE_FOR_RET = 2
88+ MIN_FUNC_SIZE_FOR_XOR_RET = 3
8889 MIN_FUNC_SIZE_FOR_CALL = 2
8990
9091 if len (data ) < 1 :
@@ -139,6 +140,13 @@ def check_inline_hook(
139140 and disasm [0 ].mnemonic == "jmp"
140141 and disasm [1 ].id == capstone .x86 .X86_INS_RET
141142 )
143+ or (
144+ func_insn_count >= MIN_FUNC_SIZE_FOR_XOR_RET
145+ and disasm [0 ].mnemonic == "xor"
146+ and disasm [0 ].operands [0 ].type == capstone .x86 .X86_OP_REG
147+ and disasm [0 ].operands [1 ].type == capstone .x86 .X86_OP_REG
148+ and disasm [1 ].id == capstone .x86 .X86_INS_RET
149+ )
142150 ):
143151 return (data , "Early RET" )
144152
You can’t perform that action at this time.
0 commit comments