X64 DBG 转shellcode
本帖最后由 slzslz 于 2020-2-15 15:17 编辑"""
python 2.7
author:hacklvwar
date:2012/10/24
use:createshellcode
"""
incode="1.txt"
outcode="2.txt"
infile=open(incode,'r')
outfile=open(outcode,'a+')
flag=True
outlines=''
while flag:
linecode=infile.readline()
if linecode:
outline=linecode.strip()
lines=outline.split(' ')
outline=''.join(lines)
lines=outline.split(':')
outline=''.join(lines)
newline=''
for c in range(0,len(outline)-1,2):
newline+='\\x'+outline
outlines+=newline
else:
flag=False
newlines=''
for c in range(0,len(outlines)-1,64):
newlines+='\"'+outlines+'\"\n'
outfile.writelines(newlines)
infile.close()
outfile.close()
因为是改编的,所以还是保留原作者的姓名,附上效果图 77AFE9D9| 8B65 E8 | mov esp,dword ptr ss: |
77AFE9DC| C745 FC FEFFFFFF | mov dword ptr ss:,FFFFFFFE |
77AFE9E3| 8B4D F0 | mov ecx,dword ptr ss: |
77AFE9E6| 64:890D 00000000 | mov dword ptr fs:,ecx |
77AFE9ED| 59 | pop ecx |
77AFE9EE| 5F | pop edi | edi:"LdrpInitializeProcess"
77AFE9EF| 5E | pop esi |
77AFE9F0| 5B | pop ebx | ebx:PEB.InheritedAddressSpace
77AFE9F1| C9 | leave |
77AFE9F2| C3 | ret |
77AFE9F3| 64:A1 30000000 | mov eax,dword ptr fs: | :PEB.InheritedAddressSpace
77AFE9F9| 33C9 | xor ecx,ecx |
77AFE9FB| 890D 74E7B677 | mov dword ptr ds:,ecx |
77AFEA01| 890D 78E7B677 | mov dword ptr ds:,ecx |
77AFEA07| 8808 | mov byte ptr ds:,cl |
77AFEA09| 3848 02 | cmp byte ptr ds:,cl |
77AFEA0C| 74 05 | je ntdll.77AFEA13 |
77AFEA0E| E8 94FFFFFF | call ntdll.77AFE9A7 |
77AFEA13| 33C0 | xor eax,eax |
77AFEA15| C3 | ret |
77AFEA16| 8BFF | mov edi,edi |
77AFEA18| 55 | push ebp |
77AFEA19| 8BEC | mov ebp,esp |
77AFEA1B| 83E4 F8 | and esp,FFFFFFF8 |
77AFEA1E| 81EC 70010000 | sub esp,170 |
77AFEA24| A1 6033B777 | mov eax,dword ptr ds: | "\x8B\x65\xE8\xC7\x45\xFC\xFE\xFF\xFF\xFF\x8B\x4D\xF0\x64\x89\x0D"
"\x00\x00\x00\x00\x59\x5F\x5E\x5B\xC9\xC3\x64\xA1\x30\x00\x00\x00"
"\x33\xC9\x89\x0D\x74\xE7\xB6\x77\x89\x0D\x78\xE7\xB6\x77\x88\x08"
"\x38\x48\x02\x74\x05\xE8\x94\xFF\xFF\xFF\x33\xC0\xC3\x8B\xFF\x55"
"\x8B\xEC\x83\xE4\xF8\x81\xEC\x70\x01\x00\x00\xA1\x60\x33\xB7\x77"
实测效果不错,希望对大家有帮助 谢谢分享,学习学习! 感谢分享!看看学习。
页:
[1]