exp 0.5: dynamic analysis
This commit is contained in:
parent
ca38a9ada6
commit
80f7fe75cf
5 changed files with 241 additions and 6 deletions
|
|
@ -423,9 +423,11 @@ def collect_runtime(
|
|||
# print(f"[*] Classloader list received" + " " * 20)
|
||||
|
||||
if apk_explorer is None:
|
||||
explore_app(app, device=device.id, android_sdk=android_sdk_path)
|
||||
exploration_data = explore_app(
|
||||
app, device=device.id, android_sdk=android_sdk_path
|
||||
)
|
||||
else:
|
||||
apk_explorer()
|
||||
exploration_data = apk_explorer()
|
||||
|
||||
# Try to find the Main class loader
|
||||
main_class_loader: str | None = None
|
||||
|
|
@ -490,6 +492,7 @@ def collect_runtime(
|
|||
else:
|
||||
main_class_loader = list(cls.keys())[0]
|
||||
data_storage["apk_cl_id"] = main_class_loader
|
||||
data_storage["exploration_data"] = exploration_data
|
||||
|
||||
json.dump(data_storage, output, indent=" ")
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ def explore_app(
|
|||
package: str,
|
||||
device: str = "emulator-5554",
|
||||
android_sdk: Path | None = None,
|
||||
):
|
||||
) -> dict:
|
||||
if USE_GRODD:
|
||||
time.sleep(1) # let the app load
|
||||
grodd_runner(
|
||||
return grodd_runner(
|
||||
"grodd",
|
||||
device,
|
||||
timeout=300,
|
||||
|
|
@ -29,9 +29,10 @@ def explore_app(
|
|||
print(
|
||||
"\033[31mGrodd is not available, you need to explore the app manually\033[0m"
|
||||
)
|
||||
manual_exploration()
|
||||
return manual_exploration()
|
||||
|
||||
|
||||
def manual_exploration():
|
||||
def manual_exploration() -> dict:
|
||||
print("==> Press ENTER to end the analysis <==")
|
||||
input()
|
||||
return {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue