geohot / qira

QEMU Interactive Runtime Analyser
MIT License
3.95k stars 469 forks source link

AttributeError: 'NullSection' object has no attribute 'get_symbol' #66

Closed gsingh93 closed 9 years ago

gsingh93 commented 9 years ago

After unpacking this binary with UPX and running qira on it, I get the following error:

$ qira flag
/opt/qira/middleware/qira_program.py:360: SyntaxWarning: import * only allowed at module level
  def disasm(self, raw, address):
which: no flag in (/home/gulshan/bin:/usr/local/bin:/home/gulshan/.cabal/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-ndk:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/android-ndk:/home/gulshan/.gem/ruby/2.2.0/bin)
*** program is /mnt/ubuntu/home/gulshan/code/ctf/pwnable.kr/flag/flag with hash 11e8f196af7d9e404b3900e7b43eb906665fe417
**** using /opt/qira/qemu/qira-x86_64 for 0x3e
Traceback (most recent call last):
  File "/usr/bin/qira", line 96, in <module>
    program = qira_program.Program(args.binary, args.args, qemu_args)
  File "/opt/qira/middleware/qira_program.py", line 174, in __init__
    self.getnames()
  File "/opt/qira/middleware/qira_program.py", line 428, in getnames
    symbol = symtable.get_symbol(rel['r_info_sym'])
AttributeError: 'NullSection' object has no attribute 'get_symbol'
nedwill commented 9 years ago

This should be fixed with the commit: https://github.com/BinaryAnalysisPlatform/qira/commit/cfec03da77077048ad7f66e138a7649e3fbb4dad You could try applying that patch yourself, or clone the repo directly. qira is under pretty heavy development now and the maintainer (geohot) is busy so it is possible that a new release will not occur too soon as we want to make sure things are really stable first with the new changes.

Thanks for the bug report!

gsingh93 commented 9 years ago

Thanks!