Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/encoders/x86/jmp_call_additive.rb
Views: 11779
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Encoder::XorAdditiveFeedback67# Uncomment when we get the poly stuff working again.8#Rank = GreatRanking910def initialize11super(12'Name' => 'Jump/Call XOR Additive Feedback Encoder',13'Description' => 'Jump/Call XOR Additive Feedback',14'Author' => 'skape',15'Arch' => ARCH_X86,16'License' => MSF_LICENSE,17'Decoder' =>18{19'Stub' =>20"\xfc" + # cld21"\xbbXORK" + # mov ebx, key22"\xeb\x0c" + # jmp short 0x1423"\x5e" + # pop esi24"\x56" + # push esi25"\x31\x1e" + # xor [esi], ebx26"\xad" + # lodsd27"\x01\xc3" + # add ebx, eax28"\x85\xc0" + # test eax, eax29"\x75\xf7" + # jnz 0xa30"\xc3" + # ret31"\xe8\xef\xff\xff\xff", # call 0x832'KeyOffset' => 2,33'KeySize' => 4,34'BlockSize' => 4,35})36end3738#39# Append the termination block.40#41def encode_end(state)42state.encoded += [ state.key ].pack(state.decoder_key_pack)43end44end454647