리버싱/정리

PostScript analysis inside eps vulnerability at hangul malware

1q 2018. 9. 14. 13:29

below PostScript is maked encoded shellcode.


1
2
3
4
5
6
7
8
9
10
11
12
13
# 23 2D 62 78 0B 00 84 83 D7 16 16 92 96 51 41 BB
# 4E A3 B4 85 75 2D 60 E7 5F 7F 72 D3 72 FE 12 E4
key = bytearray([0x4E0xA30xB40x850x750x2D0x600xE70x5F0x7F0x720xD30x720xFE0x120xE4])
data = bytearray(open('encoded_shellcode.bin''rb').read())
 
def xor(data, key):
    l = len(key)
    return bytearray((
        [(data[i] ^ key[i % l]) for i in range(0len(data))]
    ))
 
with open('decoded_shellcode.bin''wb') as f_handle:
    f_handle.write(xor(data, key))
cs


source of analysed file obtain via link below.

https://www.virustotal.com/#/file/a299bdc3fc07def4b0d5a409484f4717884a78749796960a560a9b30fab2435b/detection