question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angr crashing with `AttributeError: 'Clemory' object has no attribute 'stream'`

See original GitHub issue
$ uname -a
Linux thinkpad 4.14.71-1-lts #1 SMP Thu Sep 20 20:14:07 CEST 2018 x86_64 GNU/Linux

Distro: Arch Linux Angr version: 7.8.2.21-1 Clemory version: 7.8.2.21-1

Code

import angr

import logging
logging.getLogger('angr.sim_mananger').setLevel(logging.DEBUG)

proj = angr.Project('./sftp')
state = proj.factory.entry_state(addr=0x4013F0)
simgr = proj.factory.simgr(state)

simgr.explore(find=0x401531)

print [simgr.found[0].posix.dumps(0)]

Output

WARNING | 2018-09-24 17:52:53,573 | angr.analyses.disassembly_utils | Your verison of capstone does not support MIPS instruction groups.
Traceback (most recent call last):
  File "verify.py", line 6, in <module>
    proj = angr.Project('./sftp')
  File "/usr/lib/python2.7/site-packages/angr/project.py", line 164, in __init__
    self.loader = cle.Loader(self.filename, **load_options)
  File "/usr/lib/python2.7/site-packages/cle/loader.py", line 126, in __init__
    self.initial_load_objects = self._internal_load(main_binary, *force_load_libs)
  File "/usr/lib/python2.7/site-packages/cle/loader.py", line 493, in _internal_load
    main_obj = self._load_object_isolated(main_spec)
  File "/usr/lib/python2.7/site-packages/cle/loader.py", line 587, in _load_object_isolated
    return backend_cls(full_spec, is_main_bin=self.main_object is None, loader=self, **options)
  File "/usr/lib/python2.7/site-packages/cle/backends/elf/elf.py", line 111, in __init__
    self.__register_segments()
  File "/usr/lib/python2.7/site-packages/cle/backends/elf/elf.py", line 428, in __register_segments
    self.__register_dyn(seg)
  File "/usr/lib/python2.7/site-packages/cle/backends/elf/elf.py", line 456, in __register_dyn
    self.strtab = elffile.StringTableSection(fakestrtabheader, 'strtab_cle', self.memory)
  File "/usr/lib/python2.7/site-packages/elftools/elf/sections.py", line 30, in __init__
    self.stream = self.elffile.stream
AttributeError: 'Clemory' object has no attribute 'stream'

Binary: sftp.zip

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rhelmotcommented, Sep 24, 2018

okay - this is very exciting! pyelftools has finally released a new version for the first time in two years!

We currently have a compatibility shim that’s meant to work with either 0.24 or 0.25, but I guess the 0.25 version broke at some point. I’ll get to this in the next week. In the meantime, just install 0.24.

0reactions
rhelmotcommented, Sep 26, 2018

Hey hey! So I misread your version number of angr and it looks like you’re using a version from february (the angr version numbers can be read as a major version number followed by the release date, with the year only being the last digit), and this was actually fixed in march. So just update and you’ll be fine!

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: object has no attribute - Stack Overflow
try this, from osv import osv from osv import fields class test_base(osv.osv): _name='test.base' _columns={ 'name':fields.char('Name'), ...
Read more >
angr - Bountysource
I'm trying to refactor it to the latest version of Angr. I met an error saying AttributeError: 'Loader' object has no attribute 'add_object'...
Read more >
The cle from angr - GithubHelp
IDABin backend: AttributeError: 'long' object has no attribute 'symbol'. it reports this error when I use idabin to load binary .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found