示例#1
0
 def cit_aes_xor(self, p, addr):
     log.info('[+] Found aes_xor key @ %X' % addr)
     r = []
     for c in disasm(p.readv(addr, 40), addr):
         if len(r) == 4:
             break
         if c.mnem == 'xor':
             r.append(c.op2.value)
     return {'aes_xor': malduck.enhex(b''.join(map(p32, r)))}
示例#2
0
    def cit_getpes(self, p, addr):
        log.info('[+] pesettings found near @ %X' % addr)
        oss = []
        for c in disasm(p.readv(addr - 20, 100), addr - 20):
            if len(oss) == 2:
                break
            elif c.mnem == 'lea':
                oss.append(abs(c.op2.value))

        off = oss[0] - oss[1]
        return {'key_off': abs(off)}
示例#3
0
 def setup(self):
     self.insns = list(disasm(self.streams, 0x1000, x64=True))
示例#4
0
 def test_equal(self):
     assert next(disasm(b"hAAAA", 0)).mnem == "push"
     assert next(disasm(b"hAAAA", 0)).op1.value == 0x41414141
     assert list(disasm(b"hAAAA", 0)) == list(disasm(b"hAAAA", 0))
示例#5
0
 def setup(self):
     self.insns = list(disasm(self.streams, 0x1000))
示例#6
0
 def test_equal(self):
     assert disasm(b"hAAAA", 0)[0].mnem == "push"
     assert disasm(b"hAAAA", 0)[0].op1.value == 0x41414141
     assert disasm(b"hAAAA", 0) == disasm(b"hAAAA", 0)