GithubHelp home page GithubHelp logo

mspreitz / mobilesandbox Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 3.0 91.93 MB

Source code and tools of the former Mobile-Sandbox

Home Page: https://www.mobilesandbox.org

Python 97.69% Assembly 0.02% Shell 0.02% Batchfile 0.01% HTML 1.27% JavaScript 0.07% Makefile 0.02% C 0.63% Visual Basic 0.01% Mako 0.01% CSS 0.11% C++ 0.10% Java 0.07% YARA 0.01%

mobilesandbox's People

Contributors

mkauschi avatar mspreitz avatar testtest2227 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mobilesandbox's Issues

Bug: UnicodeEncodeError

UnicodeEncodeError at /analyzer/show/

'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)

Exception Location: classifier_report_loader.py in __process_single_item, line 135

Folgende APK hat dies verursacht:

https://transfer.sh/tGcBu/encoding.apk (Löscht sich innerhalb von 14 Tagen)

Missing check on classes.dex causes androguard to break on analysis

If the classes.dex file is missing in the sample, the following exception is thrown in the course of the analysis:

[1446E09EBD8002F29E795456FA6DB323F16972229A7050D68A04517F8F2EDCE6] Starting Static Analyzer
Traceback (most recent call last):
  File "./daemon.py", line 115, in <module>
    run(apkFile, workingDir)
  File "/home/o/git/MobileSandbox/StaticAnalysis/StaticAnalyzer.py", line 632, in run
    d = dvm.DalvikVMFormat(a.get_dex())
  File "build/bdist.linux-x86_64/egg/androguard/core/bytecodes/dvm.py", line 7567, in __init__
  File "build/bdist.linux-x86_64/egg/androguard/core/bytecodes/dvm.py", line 7573, in _load
  File "build/bdist.linux-x86_64/egg/androguard/core/bytecodes/dvm.py", line 391, in __init__
struct.error: unpack requires a string argument of length 8

I looked up all samples that have thrown this exception in my timing sample set, all appear to have a missing classes.dex file. I will now add a check for the file before the analysis can start.

Bug: Androguard crashes when decompiling

search for dangerous calls...
Traceback (most recent call last):
  File "daemon.py", line 76, in <module>
    run(sample, tmpPath)
  File "StaticAnalysis/StaticAnalyzer.py", line 840, in run
    dangerousCalls = parseDumpFile(workingDir,logFile,d)
  File "StaticAnalysis/StaticAnalyzer.py", line 264, in parseDumpFile
    dumpMethods(d, workingDir)
  File "StaticAnalysis/StaticAnalyzer.py", line 254, in dumpMethods
    for i in byteCode.get_instructions():
  File "build/bdist.linux-x86_64/egg/androguard/core/bytecodes/dvm.py", line 6500, in get_instructions
  File "build/bdist.linux-x86_64/egg/androguard/core/bytecodes/dvm.py", line 6399, in get_instructions
  File "build/bdist.linux-x86_64/egg/androguard/core/bytecodes/dvm.py", line 6336, in get_extented_instruction
androguard.core.bytecodes.dvm.InvalidInstruction: Invalid Instruction for 0xfff:'\xff\x0f\xc3\x91'

APK: https://transfer.sh/zRMkW/crash.apk

Complete check on zipfile

[FBA16537D59EDF6C392F7EA439FB6E4FD5C6DE8B6A72F8806690714647068462] Starting Static Analyzer
Traceback (most recent call last):
  File "./daemon.py", line 115, in <module>
    run(apkFile, workingDir)
  File "/home/o/git/MobileSandbox/StaticAnalysis/StaticAnalyzer.py", line 630, in run
    a = apk.APK(sampleFile)
  File "build/bdist.linux-x86_64/egg/androguard/core/bytecodes/apk.py", line 193, in __init__
  File "/usr/lib/python2.7/zipfile.py", line 770, in __init__
    self._RealGetContents()
  File "/usr/lib/python2.7/zipfile.py", line 811, in _RealGetContents
    raise BadZipfile, "File is not a zip file"
zipfile.BadZipfile: File is not a zip file

Q: Custom Templatetags in analyzer

In Backend/analyzer/templatetags sind custom Filter/Tags spezifiziert (array_filter.py). Jedoch sind die Voraussetzung, dass array_filter als gültige Tag Library gefunden wird, unter anderem die folgende: In INSTALLED_APPS muss die app analyzer gesetzt und ein Ordner templatetags mit __init__.py existieren.

@mkauschi Gibt es noch eine andere Konfiguration, dass das ohne setzen von analyzer in INSTALLED_APPS bei dir funktioniert oder benutzt du eine andere Django Version? Ich habe wegen der mongoDB und der nonrel Django versions Restriktion die folgende Version:

$ django-admin.py --version
1.5.11

Die neueste Version ist 1.9.

Falls man analyzer als app in INSTALLED_APPS hinzufügt gibt es noch einige andere Fehler.
Deshalb ist der folgende Commit (Im Grunde genommen ein move templatetags von mobilesandbox Ordner zu analyzer Ordner) ist dafür da, dass der custom filter/tag bei mir ebenfalls funktioniert.

Bug: Report prints error while daemons aren't finished

TypeError at /analyzer/show/

coercing to Unicode: need string or buffer, NoneType found

Request Method:         GET
Request URL:    http://localhost:8000/analyzer/show/?report=0e83ce90626977ccbc02d323da4b13635be42c7f0449c9373f81fd1e9cd68033
Django Version:         1.8
Exception Type:         TypeError
Exception Value: 

coercing to Unicode: need string or buffer, NoneType found

Exception Location:     Backend/analyzer/views.py in loadResults, line 313

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.