I have several dex files that needs to be statically analyzed by mobsf after unpacking the apk file because core code are inaccessible prior to unpacking.
What I've tried:
Adding Line 3 and changing line 4 from glob_pattern = app_dir + *.dex'
to glob_pattern = ddex_dir
def get_dex_files(app_dir):
"""Get all Dex Files for analysis."""
ddex_dir = "C:/path/Sample/dexfilepath/"
glob_pattern = app_dir + '*.dex'
return glob.glob(glob_pattern)
I know it's na?ve approach but I'm really new into pentesting.
A portion of the error code:
[INFO] 08/Jan/2021 11:49:08 - Decompiling to Java with jadx
[INFO] 08/Jan/2021 11:49:30 - DEX -> SMALI
[INFO] 08/Jan/2021 11:49:30 - Converting 10046944_dexfile_execute.dex to Smali Code
[INFO] 08/Jan/2021 11:49:30 - Converting 10152568_dexfile_execute.dex to Smali Code
[INFO] 08/Jan/2021 11:49:30 - Converting 10247328_dexfile_execute.dex to Smali Code
[INFO] 08/Jan/2021 11:49:30 - Converting 10286360_dexfile_execute.dex to Smali Code
[INFO] 08/Jan/2021 11:49:30 - Converting 10453796_dexfile_execute.dex to Smali Code
[INFO] 08/Jan/2021 11:49:30 - Converting 1272952_dexfile_execute.dex to Smali Code
[INFO] 08/Jan/2021 11:49:30 - Converting 1349780_dexfile_execute.dex to Smali Code
[INFO] 08/Jan/2021 11:49:30 - Converting 13539468_dexfile_execute.dex to Smali Code
[INFO] 08/Jan/2021 11:49:30 - Converting 3046356_dexfile_execute.dex to Smali Code
[INFO] 08/Jan/2021 11:49:31 - Converting 3261832_dexfile.dex to Smali Code
[INFO] 08/Jan/2021 11:49:31 - Converting 3261832_dexfile_execute.dex to Smali Code
[INFO] 08/Jan/2021 11:49:31 - Converting 359592_dexfile_execute.dex to Smali Code
[INFO] 08/Jan/2021 11:49:31 - Converting 5068284_dexfile_execute.dex to Smali Code
[INFO] 08/Jan/2021 11:49:31 - Converting 8294920_dexfile.dex to Smali Code
Lcom/qinggan/ftp/library/ftp/QGFTPServer$MyFtplet;->onConnect(Lorg/apache/ftpserver/ftplet/FtpSession;)Lorg/apache/ftpserver/ftplet/FtpletResult;: Invalid debug offset
Lcom/qinggan/ftp/library/socket/message/QGP2PMessageBase;->obtainHead(I)Ljava/lang/String;: Invalid debug offset
Lcom/qinggan/ftp/library/socket/message/QGP2PMessageServer$1;->run()V: Invalid debug offset
Lcom/qinggan/ftp/library/socket/message/QGP2PMessageClient$1;->run()V: Invalid debug offset
Lcom/qinggan/keepalive/GuardService;->getServiceIntent()Landroid/content/Intent;: Invalid debug offset
Lcom/qinggan/ftp/library/socket/message/QGP2PMessageClient;->closeSelf()V: Invalid debug offset
[INFO] 08/Jan/2021 11:49:32 - Converting 8294920_dexfile_execute.dex to Smali CodeLcom/qinggan/app/arielapp/ArielApplication$16;->insert(Ljava/util/List;)V: Invalid debug offset
Lcom/qinggan/ftp/library/ftp/QGFTPClient$2;->run()V: Invalid debug offset
Lcom/qinggan/app/arielapp/ArielApplication$11;->clearUserCache()V: Invalid debug offset
Lcom/qinggan/ftp/library/socket/message/QGP2PMessageServer;->dispatchMessage(Lcom/qinggan/ftp/library/socket/message/QGP2PMessage;)V: Invalid debug offset
Lcom/hp/hpl/sparta/DefaultLog;->error(Ljava/lang/String;Ljava/lang/String;I)V: Invalid debug offset
Lcom/qinggan/app/arielapp/ArielApplication$17;->onConnectStatusChange(Z)V: Invalid debug offset
question from:
https://stackoverflow.com/questions/65623227/is-it-possible-to-analyze-dex-file-directly-with-mobsf 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…