(二十三)、re5-packed-movement

re5-packed-movement

 

攻防世界第58题

特点:movfuscator 混淆

一、 查壳

 

Upx

Linux 下脱壳

Upx -d

 

再次查壳

 

已无壳

 

二、 运行看回显

 

三、 IDA静态分析

 

大量的mov指令,无从下手

百度后发现是 movfuscator 混淆

 

 

四、解法一

Github上有一个开源项目,专门争对movfuscator反混淆:

https://github.com/kirschju/demovfuscator

五、解法二

搜索字符

1、 R2寄存器

我们在观察程序的时候可以发现,有好多类似于把字符传给R2寄存器的指令

 

2、Alt + B搜索字符

C7 05 68 20 06 08 (模仿mov R2,xx的形式)

 

组成flag

 

ALEXCTF{M0Vfusc4t0r_w0rk5_l1ke_m4g1c}

六、解法三

Python 脚本

 

 

start = 0x8048000
end =  0x8061000

flag = ""
while start<end:
    if(Byte(start) <= ord('9') && Byte(start)>=ord('0')) or (Byte(start)<=ord('z') and Byte(start)>=ord('a')) or (Byte(start)<=ord('Z') and Byte(start)>=ord('A')) or (Byte(start) == ord('}')) or (Byte(start) == ord('{')) or (Byte(start) == ord('_')) or (Byte(start) == ord('@')) or (Byte(start) == ord('!')) or (Byte(start) == ord('#')) or (Byte(start) == ord('&')) or (Byte(start) == ord('*')):
        if Byte(start) and (Byte(start + 1) == 0) and (Byte(start + 2) == 0) and (Byte(start + 3) == 0):
            print(chr(Byte(start)))
            flag += chr(Byte(start))
         start += 1
print(flag)

 

 

2ALEXCTF{M0Vfusc4t0r_w0rk5_l1ke_m4g1c}

去掉2即可

 

七、总结

这道题主要是熟悉认识movfuscator代码混淆

 

posted @ 2022-03-05 22:39  TLSN  阅读(122)  评论(0)    收藏  举报