Exemplo n.º 1
0
 def wroteToAddress(self, target_addr):
     disabledSet = bpUtils.disableAllBpts(None)
     command = '@cgc.stopAtKernelWrite(0x%x)' % target_addr
     simicsString = gdbProt.Evalx('SendGDBMonitor("%s");' % command)
     eip = gdbProt.getEIPWhenStopped()
     #gdbProt.stepWait()
     self.signalClient()
     bpUtils.enableBpts(disabledSet)
     if eip >= self.kernel_base:
         print('previous syscall wrote to address 0x%x' % target_addr)
     else:
         curAddr = idc.GetRegValue(self.PC)
         #print('Current instruction (0x%x) wrote to 0x%x' % (curAddr, target_addr))
         print('Previous instruction  wrote to 0x%x' % (target_addr))
Exemplo n.º 2
0
 def trackAddress(self, target_addr):
     disabledSet = bpUtils.disableAllBpts(None)
     command = '@cgc.revTaintAddr(0x%x)' % target_addr
     print('do command '+command)
     simicsString = gdbProt.Evalx('SendGDBMonitor("%s");' % command)
     print('not get when stopped')
     eip = gdbProt.getEIPWhenStopped()
     #gdbProt.stepWait()
     self.signalClient()
     bpUtils.enableBpts(disabledSet)
     if eip >=  self.kernel_base:
         print('previous is as far back as we can trace content of address 0x%x' % target_addr)
     else:
         curAddr = idc.GetRegValue(self.PC)
         print('Current instruction (0x%x) is as far back as we can trace 0x%x' % (curAddr, target_addr))
Exemplo n.º 3
0
 def trackAddress(self, target_addr):
     disabledSet = bpUtils.disableAllBpts(None)
     command = '@cgc.revTaintAddr(0x%x)' % target_addr
     simicsString = gdbProt.Evalx('SendGDBMonitor("%s");' % command)
     if self.checkNoRev(simicsString):
         eip = gdbProt.getEIPWhenStopped()
         self.signalClient()
     else:
         return
     bpUtils.enableBpts(disabledSet)
     if eip >=  self.kernel_base:
         print('previous is as far back as we can trace content of address 0x%x' % target_addr)
     else:
         curAddr = idaversion.get_reg_value(self.PC)
         print('Current instruction (0x%x) is as far back as we can trace 0x%x' % (curAddr, target_addr))
Exemplo n.º 4
0
 def wroteToAddress(self, target_addr):
     disabledSet = bpUtils.disableAllBpts(None)
     command = '@cgc.stopAtKernelWrite(0x%x)' % target_addr
     simicsString = gdbProt.Evalx('SendGDBMonitor("%s");' % command)
     if self.checkNoRev(simicsString):
         eip = gdbProt.getEIPWhenStopped()
         self.signalClient()
     else:
         return
     bpUtils.enableBpts(disabledSet)
     if eip >= self.kernel_base:
         print('previous syscall wrote to address 0x%x' % target_addr)
     else:
         curAddr = idaversion.get_reg_value(self.PC)
         #print('Current instruction (0x%x) wrote to 0x%x' % (curAddr, target_addr))
         print('Previous instruction  wrote to 0x%x' % (target_addr))
     self.bookmark_list = self.bookmark_view.updateBookmarkView()