MobSF / Mobile-Security-Framework-MobSF

Mobile Security Framework (MobSF) is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis.
https://opensecurity.in
GNU General Public License v3.0
17.46k stars 3.23k forks source link

Dynamic analysis report error. #143

Closed ideasfoundry closed 8 years ago

ideasfoundry commented 8 years ago

I am getting following error while generating Dynamic analysis report: Don't Play Around. An Error just popped in! Cosole says: [INFO] Waiting for TAR dump to complete...

[ERROR] TAR Generation Failed. Process timed out.

[INFO] Dumping Application Files from Device/VM remote object '/data/local/com.myapp.custom.tar' does not exist

[INFO] Stopping ADB [06/May/2016 15:11:17]"POST /DumpData/ HTTP/1.1" 200 15

[INFO] Dynamic Analysis Report Generation

[INFO] Dynamic API Analysis

[2016-05-06 15:11:17] [ERROR] Dynamic API Analysis (C:\Users\origami\Downloads\MobSF\DynamicAnalyzer\views.py, LINE 681 "with open(LOCATION,"r") as f:"): [Errno 2] No such file or directory: u'C:\Users\origami\Downloads\MobSF\uploads/c3df704d723c5ae7a1a64bf58b843a5a/x_logcat.txt'

[INFO] Dynamic File Analysis

[2016-05-06 15:11:17] [ERROR] Dynamic Analysis Report Generation (C:\Users\origami\Downloads\MobSF\DynamicAnalyzer\views.py, LINE 483 "URL,DOMAINS,EMAIL,HTTP,XML,SQLiteDB,OtherFiles=RunAnalysis(APP_DIR,MD5,PKG)"): [Errno 2] No such file or directory: u'C:\Users\origami\Downloads\MobSF\uploads/c3df704d723c5ae7a1a64bf58b843a5a/x_logcat.txt' [06/May/2016 15:11:17]"GET /Report/?md5=c3df704d723c5ae7a1a64bf58b843a5a&pkg=com.myapp.custom HTTP/1.1" 302 0 [06/May/2016 15:11:17]"GET /error/ HTTP/1.1" 200 4602 [06/May/2016 15:11:17]"GET /static/bootstrap/css/bootstrap.min.css HTTP/1.1" 304 0 [06/May/2016 15:11:17]"GET /static/css/ionicons.min.css HTTP/1.1" 304 0 [06/May/2016 15:11:17]"GET /static/css/font-awesome.min.css HTTP/1.1" 304 0 [06/May/2016 15:11:17]"GET /static/dash/css/AdminLTE.min.css HTTP/1.1" 304 0 [06/May/2016 15:11:17]"GET /static/dash/css/skins/_all-skins.min.css HTTP/1.1" 304 0 [06/May/2016 15:11:17]"GET /static/css/style.css HTTP/1.1" 304 0 [06/May/2016 15:11:17]"GET /static/plugins/jQuery/jQuery-2.1.4.min.js HTTP/1.1" 304 0 [06/May/2016 15:11:17]"GET /static/bootstrap/js/bootstrap.min.js HTTP/1.1" 304 0 [06/May/2016 15:11:17]"GET /static/plugins/fastclick/fastclick.min.js HTTP/1.1" 304 0 [06/May/2016 15:11:17]"GET /static/dash/js/app.min.js HTTP/1.1" 304 0 [06/May/2016 15:11:17]"GET /static/plugins/slimScroll/jquery.slimscroll.min.js HTTP/1.1" 304 0 [06/May/2016 15:11:17]"GET /static/js/docs.js HTTP/1.1" 304 0

While starting manager.py C:\Users\origami\Downloads\MobSF>python manage.py runserver

Mobile Security Framework v0.9.2 Beta


| \/ | | |**/ || | / \ / \ | \ | |\/| |/ | ' _ | | \ \ / / | | | () | ) | | | | | () | |) |) | | \ V /| || |**, | / / || ||_/|_./__/|| _/ **() /()**|

[INFO] Finding JDK Location in Windows....

[INFO] Oracle JDK Identified. Looking for JDK 1.7 or above

[INFO] Oracle Java (JDK >= 1.7) is installed!

Mobile Security Framework v0.9.2 Beta


| \/ | | |**/ || | / \ / \ | \ | |\/| |/ | ' _ | | \ \ / / | | | () | ) | | | | | () | |) |) | | \ V /| || |**, | / / || ||_/|_./__/|| _/ **() /()**|

[INFO] Finding JDK Location in Windows....

[INFO] Oracle JDK Identified. Looking for JDK 1.7 or above

[INFO] Oracle Java (JDK >= 1.7) is installed! Performing system checks...

System check identified no issues (0 silenced). May 06, 2016 - 12:04:26 Django version 1.8, using settings 'MobSF.settings' Starting development server at http://127.0.0.1:8000/

ajinabraham commented 8 years ago

Are you using default MobSF VM? This looks like some files are not created for you. Is it happening for all the APKs or just one?

ideasfoundry commented 8 years ago

I am running it on Laptop, no VM. I just tried this apk.

ajinabraham commented 8 years ago

@ideasfoundry That is fine, but did you configured the MobSF android VM for performing dynamic analysis?

ideasfoundry commented 8 years ago

ah. yes its android VM

ajinabraham commented 8 years ago
  1. Try a different apk and see this is happening.
  2. Upload the complete log. You can find that under logs /MoSF.log
ideasfoundry commented 8 years ago
  1. I will try different APK.
  2. Here's the logs/MobSF.log contents:

[2016-05-05 22:04:07] [ERROR] Oracle Java (JDK >=1.7) is not found! (C:\Users\origami\Downloads\MobSF\MobSF\utils.py, LINE 110 "for dirname in os.listdir(WIN_JAVABASE):"): [Error 3] The system cannot find the path specified: 'C:/Program Files (x86)/Java/._' [2016-05-05 22:04:09] [ERROR] Oracle Java (JDK >=1.7) is not found! (C:\Users\origami\Downloads\MobSF\MobSF\utils.py, LINE 110 "for dirname in os.listdir(WIN_JAVABASE):"): [Error 3] The system cannot find the path specified: 'C:/Program Files (x86)/Java/._' [2016-05-05 22:04:10] [ERROR] Oracle Java (JDK >=1.7) is not found! (C:\Users\origami\Downloads\MobSF\MobSF\utils.py, LINE 110 "for dirname in os.listdir(WIN_JAVABASE):"): [Error 3] The system cannot find the path specified: 'C:/Program Files (x86)/Java/._' [2016-05-06 00:05:13] [ERROR] Dynamic API Analysis (C:\Users\origami\Downloads\MobSF\DynamicAnalyzer\views.py, LINE 681 "with open(LOCATION,"r") as f:"): [Errno 2] No such file or directory: u'C:\Users\origami\Downloads\MobSF\uploads/c3df704d723c5ae7a1a64bf58b843a5a/x_logcat.txt' [2016-05-06 00:05:13] [ERROR] Dynamic Analysis Report Generation (C:\Users\origami\Downloads\MobSF\DynamicAnalyzer\views.py, LINE 483 "URL,DOMAINS,EMAIL,HTTP,XML,SQLiteDB,OtherFiles=RunAnalysis(APP_DIR,MD5,PKG)"): [Errno 2] No such file or directory: u'C:\Users\origami\Downloads\MobSF\uploads/c3df704d723c5ae7a1a64bf58b843a5a/x_logcat.txt' [2016-05-06 11:37:52] [ERROR] Dynamic API Analysis (C:\Users\origami\Downloads\MobSF\DynamicAnalyzer\views.py, LINE 681 "with open(LOCATION,"r") as f:"): [Errno 2] No such file or directory: u'C:\Users\origami\Downloads\MobSF\uploads/c3df704d723c5ae7a1a64bf58b843a5a/x_logcat.txt' [2016-05-06 11:37:52] [ERROR] Dynamic Analysis Report Generation (C:\Users\origami\Downloads\MobSF\DynamicAnalyzer\views.py, LINE 483 "URL,DOMAINS,EMAIL,HTTP,XML,SQLiteDB,OtherFiles=RunAnalysis(APP_DIR,MD5,PKG)"): [Errno 2] No such file or directory: u'C:\Users\origami\Downloads\MobSF\uploads/c3df704d723c5ae7a1a64bf58b843a5a/x_logcat.txt' [2016-05-06 15:11:17] [ERROR] Dynamic API Analysis (C:\Users\origami\Downloads\MobSF\DynamicAnalyzer\views.py, LINE 681 "with open(LOCATION,"r") as f:"): [Errno 2] No such file or directory: u'C:\Users\origami\Downloads\MobSF\uploads/c3df704d723c5ae7a1a64bf58b843a5a/x_logcat.txt' [2016-05-06 15:11:17] [ERROR] Dynamic Analysis Report Generation (C:\Users\origami\Downloads\MobSF\DynamicAnalyzer\views.py, LINE 483 "URL,DOMAINS,EMAIL,HTTP,XML,SQLiteDB,OtherFiles=RunAnalysis(APP_DIR,MD5,PKG)"): [Errno 2] No such file or directory: u'C:\Users\origami\Downloads\MobSF\uploads/c3df704d723c5ae7a1a64bf58b843a5a/x_logcat.txt'

ajinabraham commented 8 years ago

MobSF cannot even find the Java Path.

[Error 3] The system cannot find the path specified: 'C:/Program Files (x86)/Java/.'

Where is oracle jdk installed in your system ?

Can you try opening a new CMD prompt with "Run As Administrator" and run MobSF from there. It can happen that windows permissions are screwing it up.

ideasfoundry commented 8 years ago

That JDK error came earlier. Now if I run MobSF it says: [INFO] Finding JDK Location in Windows....

[INFO] Oracle JDK Identified. Looking for JDK 1.7 or above

[INFO] Oracle Java (JDK >= 1.7) is installed! Performing system checks...

System check identified no issues (0 silenced). May 06, 2016 - 20:14:47 Django version 1.8, using settings 'MobSF.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK.

ajinabraham commented 8 years ago

Ok try deleting that log file and run MobSF again. Upload the new log here. I wanted to know where exactly it's breaking

ideasfoundry commented 8 years ago

Fresh log file:

[2016-05-06 20:31:31] [ERROR] Dynamic API Analysis (C:\Users\origami\Downloads\MobSF\DynamicAnalyzer\views.py, LINE 681 "with open(LOCATION,"r") as f:"): [Errno 2] No such file or directory: u'C:\Users\origami\Downloads\MobSF\uploads/c3df704d723c5ae7a1a64bf58b843a5a/x_logcat.txt' [2016-05-06 20:31:31] [ERROR] Dynamic Analysis Report Generation (C:\Users\origami\Downloads\MobSF\DynamicAnalyzer\views.py, LINE 483 "URL,DOMAINS,EMAIL,HTTP,XML,SQLiteDB,OtherFiles=RunAnalysis(APP_DIR,MD5,PKG)"): [Errno 2] No such file or directory: u'C:\Users\origami\Downloads\MobSF\uploads/c3df704d723c5ae7a1a64bf58b843a5a/x_logcat.txt'

ajinabraham commented 8 years ago

Let me try to reproduce this on my Windows 10 test machine.

carlak1701 commented 8 years ago

Hi Ajin,

Thanks for a great tool.

I have also received the same issue ("GET /error/ HTTP/1.1" 200 4602" displayed in the console) when attempting to run the Dynamic Analysis component. It automatically launches the VM (from the snapshot state). I then click "Create Environment" which gives the following message in the VM status window:

"VM Snapshot loaded Trying to setup the environment Running HTTPS Proxy Connecting to VM Mounting Installing APK Running APK Environment is Ready! Agents are running in the Background Go Ahead and navigate through all the flows of the Application."

...but the app is not installed to the VM, nor does anything happen on the screencast within the browser.

I am running the tool in Kali Linux 2.0 rolling.

I would appreciate any input you could provide in resolving this issue, as it would make dynamic analysis so much easier... Setting up environments and tools, proxies, sniffers etc is quite a pain.

Thanks again.

carlak1701 commented 8 years ago

Apologies... log file below:

[2016-05-17 15:28:19] [ERROR] Starting App for Dynamic Analysis (/root/Builds/MobSF/Mobile-Security-Framework-MobSF-0.9.2/DynamicAnalyzer/views.py, LINE 608 "subprocess.call([adb, "kill-server"])"): [Errno 2] No such file or directory [2016-05-17 15:28:19] [ERROR] Getting Screen Resolution (/root/Builds/MobSF/Mobile-Security-Framework-MobSF-0.9.2/DynamicAnalyzer/views.py, LINE 972 "resp=subprocess.check_output([adb, "-s", getIdentifier(), "shell", "dumpsys" ,"window"])"): [Errno 2] No such file or directory [2016-05-17 15:28:19] [ERROR] MobSF RootCA Handler (/root/Builds/MobSF/Mobile-Security-Framework-MobSF-0.9.2/DynamicAnalyzer/views.py, LINE 238 "subprocess.call([adb, "-s",getIdentifier() ,"push", ROOTCA, "/data/local/tmp/"+settings.ROOT_CA])"): [Errno 2] No such file or directory

ajinabraham commented 8 years ago

@carlak1701 This should be an easy fix. The adb binary used by MobSF is not compatible on Kali. Install adb on Kali. Find the location of newly installed ADB. copy the new files and directories and overwrite the files located in DynamicAnalyzer/tools/adb/linux

ajinabraham commented 8 years ago

@carlak1701 please let me know if that fixes it.

carlak1701 commented 8 years ago

Thanks ajin. Seems easy enough. Will try your suggested fix and provide feedback in morning.

I was pulling out my hair trying to troubleshoot. I was just about to root an old Android and follow the "real_device" process.

carlak1701 commented 8 years ago

@ajinabraham Thanks. That worked like a charm.

PolarBearGod commented 8 years ago

For those that run unto this issue in the future (or until it is fixed by the awesome Ajin), you can follow the below: Download the new ADB from Google's Android SDK site.

Downloads > Download Options > Linux Before running make sure you have all dependencies: sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6 (If you get an error about a package, check out this thread.)

Extract package and run android.sh (located in $ /android-studio/bin)

Grab coffee because it might be a few.

Default installation path of Android SDK is /root/Android/Sdk/platform-tools Default path of MobSF is root/Mobile-Security-Framework-MobSF/DynamicAnalyzer/tools/adb/linux

Copy all files from Android Studio SDK location to MobSF location cp -avr /root/Android/Sdk/platform-tools/. root/Mobile-Security-Framework-MobSF/DynamicAnalyzer/tools/adb/linux

Fire up MobSF and the issue should be fixed.

(Huge thanks to Ajin for making this possible.)

ashokMobSF commented 7 years ago

Im getting the following error after launching the application and im not getting any response from the tool for each and every hit on the application.

[2017-07-11 12:48:00] [ERROR] Duplicating MobSF Emulator (/home/ashokvenkateshk/Softwares/Mobile-Security-Framework-MobSF-master/DynamicAnalyzer/views/android/android_avd.py, LINE 64 "with io.open(path_to_update, mode='r', encoding="utf8", errors="ignore") as fled:"): [Errno 2] No such file or directory: '/home/ashokvenkateshk/.android/avd/Nexus5API16_1.avd/hardware-qemu.ini'

File is existing in the path, but still im facing the issue ashokvenkateshk@ashokvenkatesh-lptss-ubu:~/.android/avd/Nexus5API16_1.avd$ ls -ltr total 575540 -rw-r--r-- 1 ashokvenkateshk ashokvenkateshk 861 Jul 10 16:39 config.ini -rw------- 1 ashokvenkateshk ashokvenkateshk 4135296 Jul 11 13:17 userdata.img -rw------- 1 ashokvenkateshk ashokvenkateshk 5 Jul 11 18:18 hardware-qemu.ini.lock -rw-rw-r-- 1 ashokvenkateshk ashokvenkateshk 1761 Jul 11 18:18 hardware-qemu.ini -rw------- 1 ashokvenkateshk ashokvenkateshk 5 Jul 11 18:18 userdata-qemu.img.lock -rw------- 1 ashokvenkateshk ashokvenkateshk 5 Jul 11 18:18 sdcard.img.lock -rw------- 1 ashokvenkateshk ashokvenkateshk 5 Jul 11 18:18 cache.img.lock -rw------- 1 ashokvenkateshk ashokvenkateshk 8412 Jul 11 18:18 cache.img -rw-r--r-- 1 ashokvenkateshk ashokvenkateshk 536870912 Jul 11 18:21 sdcard.img -rw------- 1 ashokvenkateshk ashokvenkateshk 48303516 Jul 11 18:30 userdata-qemu.img ashokvenkateshk@ashokvenkatesh-lptss-ubu:~/.android/avd/Nexus5API16_1.avd$ vi hardware-qemu.ini ashokvenkateshk@ashokvenkatesh-lptss-ubu:~/.android/avd/Nexus5API16_1.avd$

ajinabraham commented 7 years ago

I suppose, you are trying to use MobSF ARM emulator. The error is pretty self explanatory No such file or directory:'/home/ashokvenkateshk/.android/avd/Nexus5API16_1.avd/hardware-qemu.ini'

ashokMobSF commented 7 years ago

File is existing in the path, but still im facing the issue ashokvenkateshk@ashokvenkatesh-lptss-ubu:/.android/avd/Nexus5API16_1.avd$ ls -ltr total 575540 -rw-r--r-- 1 ashokvenkateshk ashokvenkateshk 861 Jul 10 16:39 config.ini -rw------- 1 ashokvenkateshk ashokvenkateshk 4135296 Jul 11 13:17 userdata.img -rw------- 1 ashokvenkateshk ashokvenkateshk 5 Jul 11 18:18 hardware-qemu.ini.lock -rw-rw-r-- 1 ashokvenkateshk ashokvenkateshk 1761 Jul 11 18:18 hardware-qemu.ini -rw------- 1 ashokvenkateshk ashokvenkateshk 5 Jul 11 18:18 userdata-qemu.img.lock -rw------- 1 ashokvenkateshk ashokvenkateshk 5 Jul 11 18:18 sdcard.img.lock -rw------- 1 ashokvenkateshk ashokvenkateshk 5 Jul 11 18:18 cache.img.lock -rw------- 1 ashokvenkateshk ashokvenkateshk 8412 Jul 11 18:18 cache.img -rw-r--r-- 1 ashokvenkateshk ashokvenkateshk 536870912 Jul 11 18:21 sdcard.img -rw------- 1 ashokvenkateshk ashokvenkateshk 48303516 Jul 11 18:30 userdata-qemu.img ashokvenkateshk@ashokvenkatesh-lptss-ubu:/.android/avd/Nexus5API16_1.avd$ vi hardware-qemu.ini ashokvenkateshk@ashokvenkatesh-lptss-ubu:~/.android/avd/Nexus5API16_1.avd$

ajinabraham commented 7 years ago

You might need to debug why it is not accessible. Make sure MobSF have necessary privileges and permissions to access these directories and files.

ashokMobSF commented 7 years ago

"I suppose, you are trying to use MobSF ARM emulator. The error is pretty self explanatory No such file or directory:'/home/ashokvenkateshk/.android/avd/Nexus5API16_1.avd/hardware-qemu.ini'"

yes, im trying with MobSF ARM Emulator, so do i need to change any path related or access related?

ashokMobSF commented 7 years ago

"You might need to debug why it is not accessible. Make sure MobSF have necessary privileges and permissions to access these directories and files."

Given full permissions and privileges to access the directories and files. But still im getting the same error.

"[ERROR] Duplicating MobSF Emulator (/home/ashokvenkateshk/Softwares/Mobile-Security-Framework-MobSF-master/DynamicAnalyzer/views/android/android_avd.py, LINE 64 "with io.open(path_to_update, mode='r', encoding="utf8", errors="ignore") as fled:"): [Errno 2] No such file or directory: '/home/ashokvenkateshk/.android/avd/Nexus5API16_1.avd/hardware-qemu.ini'"

Please kindly help me....

ajinabraham commented 7 years ago

Follow the instruction in Wiki https://github.com/MobSF/Mobile-Security-Framework-MobSF/wiki/1.-Documentation#configuring-dynamic-analyzer-with-with-mobsf-android-412-arm-emulator

ashokMobSF commented 7 years ago

Hi thanks, above mentioned issue got fixed.

But tracking is not happening on the terminal, when i hit any event on the application.

[INFO] Starting App for Dynamic Analysis

[INFO] Installing APK /home/ashokvenkateshk/Softwares/Mobile-Security-Framework-MobSF-ma...0c103e7072d.apk: 1 file pushed. 4.2 MB/s (6217657 bytes in 1.420s) pkg: /data/local/tmp/3a1a41a03fe74ce3f00dc0c103e7072d.apk Success rm failed for -f, Read-only file system

[INFO] Launching APK Main Activity Starting: Intent { cmp=devian.tubemate.home/.Main } [INFO] Testing Environment is Ready!

[INFO] Getting Screen Resolution [12/Jul/2017 05:58:21] "POST /GetEnv/ HTTP/1.1" 200 66

[INFO] Starting Clipboard Dump Service in VM/Device Starting service: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=opensecurity.clipdump/.ClipDumper } [12/Jul/2017 05:58:23] "POST /ClipDump/ HTTP/1.1" 200 21

Its stop here, and there is no any result or error on the terminal. Kindly assist me.....

ashokMobSF commented 7 years ago

Hi, MobSF supports for Hybrid application too..?

ajinabraham commented 7 years ago

@ashokMobSF This is an issue tracker. Please don't use this for discussions, use our slack channel instead.

ashokMobSF commented 7 years ago

Ok , Thanks

kamalawy commented 7 years ago

Hi, I got this in log file, i checked files and it s in the right place and start up checks also are good. I tried different apps. Can you suggest any solution.

Log [2017-08-03 02:40:25] [ERROR] Performing Code Analysis (C:\Users\extra\Desktop\FIS\Tools\Mobile\Android\MOBSF\Mobile-Security-Framework-MobSF-master\Mobile-Security-Framework-MobSF-master\StaticAnalyzer\views\android\code_analysis.py, LINE 70 "errors="ignore""): [Errno 2] No such file or directory: u'C:\Users\extra\Desktop\FIS\Tools\Mobile\Android\MOBSF\Mobile-Security-Framework-MobSF-master\Mobile-Security-Framework-MobSF-master\uploads/e79a2d2675fb89de6b5cc1469c49e330/java_source/com\afollestad\materialdialogs\prefs\MaterialMultiSelectListPreference.java' [2017-08-03 02:40:25] [ERROR] Zipping (C:\Users\extra\Desktop\FIS\Tools\Mobile\Android\MOBSF\Mobile-Security-Framework-MobSF-master\Mobile-Security-Framework-MobSF-master\MobSF\utils.py, LINE 465 "zip_file.write(os.path.join(root, file_name))"): [Error 3] The system cannot find the path specified: u'C:\Users\extra\Desktop\FIS\Tools\Mobile\Android\MOBSF\Mobile-Security-Framework-MobSF-master\Mobile-Security-Framework-MobSF-master\uploads/e79a2d2675fb89de6b5cc1469c49e330/java_source/com\afollestad\materialdialogs\prefs\MaterialMultiSelectListPreference.java' [2017-08-03 02:40:25] [ERROR] Zipping (C:\Users\extra\Desktop\FIS\Tools\Mobile\Android\MOBSF\Mobile-Security-Framework-MobSF-master\Mobile-Security-Framework-MobSF-master\MobSF\utils.py, LINE 465 "zip_file.write(os.path.join(root, file_name))"): [Error 3] The system cannot find the path specified: u'C:\Users\extra\Desktop\FIS\Tools\Mobile\Android\MOBSF\Mobile-Security-Framework-MobSF-master\Mobile-Security-Framework-MobSF-master\uploads/e79a2d2675fb89de6b5cc1469c49e330/smali_source/android\support\v4\media\session\MediaControllerCompat$MediaControllerImplApi21$1.smali' [2017-08-03 02:40:25] [ERROR] Saving to DB (C:\Users\extra\Desktop\FIS\Tools\Mobile\Android\MOBSF\Mobile-Security-Framework-MobSF-master\Mobile-Security-Framework-MobSF-master\StaticAnalyzer\views\android\db_interaction.py, LINE 209 "API=code_an_dic['api'],"): 'NoneType' object has no attribute 'getitem' [2017-08-03 02:40:25] [ERROR] Rendering to Template (C:\Users\extra\Desktop\FIS\Tools\Mobile\Android\MOBSF\Mobile-Security-Framework-MobSF-master\Mobile-Security-Framework-MobSF-master\StaticAnalyzer\views\android\db_interaction.py, LINE 102 "'api': code_an_dic['api'],"): 'NoneType' object has no attribute 'getitem' [2017-08-03 02:40:25] [ERROR] 'NoneType' object does not support item assignment

Thanks,,

erraja1991 commented 7 years ago

I am getting following error while generating Dynamic analysis report: Don't Play Around. An Error just popped in! [INFO] Waiting for TAR dump to complete...

[INFO] Saving Captured Web Proxy Data

[INFO] Saving URLS

[INFO] Saving WebTraffic

[INFO] Saving Request Objects

[INFO] Stopped WebProxy and Data Saved

[ERROR] TAR Generation Failed. Process timed out.

[INFO] Dumping Application Files from Device/VM adb: error: remote object '/data/local/com.fin.elss.tar' does not exist

[INFO] Stopping MobSF Emulator

[INFO] Stopping ADB [14/Nov/2017 10:00:40] "POST /DumpData/ HTTP/1.1" 200 15

[INFO] Dynamic Analysis Report Generation

[INFO] Dynamic API Analysis

[2017-11-14 10:00:40] [ERROR] Dynamic API Analysis (/home/ashishkumar1/Documents/ASHISH_DATA/Ashish_AutoMation/sequrityTesting/tool/MOBILEApp_sec_test_tools/MobSF/Mobile-Security-Framework-MobSF-master_Final/DynamicAnalyzer/views/android/android_dynamic.py, LINE 964 "with open(location, "r") as flip:"): [Errno 2] No such file or directory: u'/home/ashishkumar1/Documents/ASHISH_DATA/Ashish_AutoMation/sequrityTesting/tool/MOBILEApp_sec_test_tools/MobSF/Mobile-Security-Framework-MobSF-master_Final/uploads/b3362fa180bea156ce8862a249f31479/x_logcat.txt'

[INFO] Dynamic File Analysis

[2017-11-14 10:00:40] [ERROR] Dynamic Analysis Report Generation (/home/ashishkumar1/Documents/ASHISH_DATA/Ashish_AutoMation/sequrityTesting/tool/MOBILEApp_sec_test_tools/MobSF/Mobile-Security-Framework-MobSF-master_Final/DynamicAnalyzer/views/android/android_dynamic.py, LINE 830 "analysis_result = run_analysis(app_dir, md5_hash, package)"): [Errno 2] No such file or directory: '/home/ashishkumar1/Documents/ASHISH_DATA/Ashish_AutoMation/sequrityTesting/tool/MOBILEApp_sec_test_tools/MobSF/Mobile-Security-Framework-MobSF-master_Final/uploads/b3362fa180bea156ce8862a249f31479/x_logcat.txt'

I Am Using MobSF Emulator.

rohitanga commented 6 years ago

Hi , I am getting below error while generating Dynamic analysis report: Don't Play Around. An Error just popped in!

[INFO] Downloading Logcat logs adb: error: remote object '/data/data/de.robv.android.xposed.installer/log/error.log' does not exist

[INFO] Downloading Droidmon API Monitor Logcat logs

[INFO] Downloading Dumpsys logs

[INFO] Stopping Application

[INFO] Stopping ScreenCast Service [09/Jan/2018 14:18:06] "POST /FinalTest/ HTTP/1.1" 200 16

[INFO] Downloading Application Data from Device

[INFO] Stopping any running instance of WebProxy

[INFO] Deleting Dump Status File

[INFO] Saving Captured Web Proxy Data

[INFO] Saving URLS rm failed for /sdcard/mobsec_status, No such file or directory

[INFO] Creating TAR of Application Files. /system/bin/sh: /data/local/tmp/tar.sh: not found

[INFO] Waiting for TAR dump to complete...

[INFO] Saving WebTraffic

[INFO] Saving Request Objects

[INFO] Stopped WebProxy and Data Saved

[ERROR] TAR Generation Failed. Process timed out.

[INFO] Dumping Application Files from Device/VM adb: error: remote object '/data/local/com.androwarn.sampleapplication.tar' does not exist

[INFO] Stopping MobSF Emulator

[INFO] Stopping ADB [09/Jan/2018 14:19:47] "POST /DumpData/ HTTP/1.1" 200 15

[INFO] Dynamic Analysis Report Generation

[INFO] Dynamic API Analysis

[2018-01-09 14:19:47] [ERROR] Dynamic API Analysis (D:\Tools\Mobile-Security-Framework-MobSF-master\Dy namicAnalyzer\views\android\android_dynamic.py, LINE 964 "with open(location, "r") as flip:"): [Errno 2] No such file or directory: u'D:\Tools\Mobile-Security-Framework-MobSF-master\uploads/bebecf3d5f13f41affb5ab9da8f7e391/x_logcat.txt'

[INFO] Dynamic File Analysis

[2018-01-09 14:19:47] [ERROR] Dynamic Analysis Report Generation (D:\Tools\Mobile-Security-Framework-MobSF-master\DynamicAnalyzer\views\android\android_dynamic.py, LINE 830 "analysis_result = run_analysis(app_dir, md5_hash, package)"): [Errno 2] No such file ordirectory: u'D:\Tools\Mobile-Security-Framework-MobSF-master\uploads/bebecf3d5f13f41affb5ab9da8f7e391/x_logcat.txt' [09/Jan/2018 14:19:47] "GET /Report/?md5=bebecf3d5f13f41affb5ab9da8f7e391&pkg=co m.androwarn.sampleapplication HTTP/1.1" 302 0 [09/Jan/2018 14:19:47] "GET /error/ HTTP/1.1" 200 4661

I see that x_logcat file isn't getting created in uploads folder , I tried with other apks too but no luck . I am using Mobsf Emulator.

ajinabraham commented 6 years ago

@matandobr Please take a look into this.

HILALUDEEN commented 6 years ago

Hi, I am getting this error when running Dynamic Analyzer

[INFO] Dynamic Analysis Started

[INFO] Refreshing MobSF Emulator

[INFO] Stopping MobSF Emulator

[INFO] Deleting emulator files

[INFO] Duplicating MobSF Emulator

[2018-04-11 11:27:17] [ERROR] Duplicating MobSF Emulator (/root/Mobile-Security-Framework-MobSF/DynamicAnalyzer/views/android/avd.py, LINE 56 "shutil.copyfile(reference_ini, dup_ini)"): [Errno 2] No such file or directory: '/home/hilaal/.android/avd/Nexus5API16.ini'

[INFO] Starting MobSF Emulator

[2018-04-11 11:27:17] [ERROR] Starting MobSF Emulator (/root/Mobile-Security-Framework-MobSF/DynamicAnalyzer/views/android/avd.py, LINE 96 "subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)"): [Errno 2] No such file or directory: '/home/hilaal/Android/Sdk/emulator/emulator': '/home/hilaal/Android/Sdk/emulator/emulator'