Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quark cannot analyze pivaa.apk when using radare2 as the core library. #599

Closed
sidra-asa opened this issue Jan 6, 2024 · 0 comments · Fixed by #602
Closed

Quark cannot analyze pivaa.apk when using radare2 as the core library. #599

sidra-asa opened this issue Jan 6, 2024 · 0 comments · Fixed by #602
Assignees
Labels
bug Something isn't working issue-processing-state-04

Comments

@sidra-asa
Copy link
Collaborator

Describe the bug
I analyzed the pivaa.apk with radare2 as the core library. The analysis was failed and the message showed that Quark failed to parse the permissions.

To Reproduce
Steps to reproduce the behavior:

$ quark -a pivaa.apk -s --core-library radare2        

    ________                      __
    \_____  \  __ _______ _______|  | __
     /  / \  \|  |  \__  \_  __ \  |/ /
    /   \_/.  \  |  // __ \|  | \/    <
    \_____\ \_/____/(____  /__|  |__|_ \
           \__>          \/           \/ v23.12.1
    
                An Obfuscation-Neglect Android Malware Scoring System
                
  0%|                                                   | 0/211 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/Users/sasaki/.local/share/virtualenvs/quark-engine-KzHyODU-/bin/quark", line 33, in <module>
    sys.exit(load_entry_point('quark-engine', 'console_scripts', 'quark')())
  File "/Users/sasaki/.local/share/virtualenvs/quark-engine-KzHyODU-/lib/python3.8/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/Users/sasaki/.local/share/virtualenvs/quark-engine-KzHyODU-/lib/python3.8/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/Users/sasaki/.local/share/virtualenvs/quark-engine-KzHyODU-/lib/python3.8/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/sasaki/.local/share/virtualenvs/quark-engine-KzHyODU-/lib/python3.8/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/Users/sasaki/program/python/quark-engine/quark/cli.py", line 334, in entry_point
    data.run(rule_checker)
  File "/Users/sasaki/program/python/quark-engine/quark/core/quark.py", line 458, in run
    elif set(rule_obj.permission).issubset(set(self.apkinfo.permissions)):
  File "/Users/sasaki/.pyenv/versions/3.8.16/lib/python3.8/functools.py", line 967, in __get__
    val = self.func(instance)
  File "/Users/sasaki/program/python/quark-engine/quark/core/r2apkinfo.py", line 220, in permissions
    for elm in axml.get_xml_tree().iter("uses-permission"):
  File "/Users/sasaki/.pyenv/versions/3.8.16/lib/python3.8/xml/etree/ElementTree.py", line 618, in iter
    return self._root.iter(tag)
AttributeError: 'NoneType' object has no attribute 'iter'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working issue-processing-state-04
Projects
None yet
2 participants