linkedin / linkedin/qark

Static Analysis of some apks takes too long

Open
#321 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.4k
Forks
663
PR merge metrics
No merged PRs in 30d

Description

When trying to run Qark on some applications with:

`qark --apk path-to-the-apk.apk` or `qark --report-type json --apk path-to-the-apk.apk`

I noticed that on some apks Static Analysis just takes too long.

For example, for an apk, I noticed that Static Analysis lasted about 8 hours, which is definitely too much. In this case, looking at the logs, I noticed that the Static Analyzer employed most of the execution time in the "Decompiling" stage, more specifically decompiling with "fernflower" was taking too long, thus I just removed fernflower from the decompilers dictionary and ran the Static Analysis again, getting a big improvement in the execution time.

Nevertheless, with some other apk, Static Analysis lasted too long again. More specifically I measured an execution time of about 5 hours, which is still too much... This time the Static Analyzer seems to employ almost all of its execution time in the "Running scans..." stage.

Could you explain the possible reasons for this behavior? Is there something I can do to improve execution time?

Thanks in advance

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported commands, `qark --apk path-to-the-apk.apk` and the JSON-report variant, while reviewing logs for the "Decompiling" and "Running scans..." stages. Inspect the decompiler configuration, including `fernflower`, and the scan execution path; done should be a documented cause and a defined way to reduce or explain the excessive runtime.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, python
Domain
mobile-dev, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.