year Outdated libs have a 3x higher probability to include vulnerabilities OWASP Top 10 Security Risks (since 2013) “Using components with known vulnerabilities”
in the software ecosystem Identify apps that use lib versions with known vulnerabilities/privacy issues Attribute new issues to the correct component (library / app code) Requires a reliable detection of libraries in app binaries
util admob customevent de example myapp activity widget util animator … … } public class myClass { public class someClass { {..} } package com.google.ads.util; public void myTest(int, int, String) { } private int doSomething(String) { } package com.facebook.widget; public class anotherActivity { {..} } package de.example.myapp.activity; a b c d
from child hashes Efficient integrity checks for large data structures Sort hashes for deterministic build order Method Hash Class Hash Package Hash Library/App Hash Package Hash Class Hash Class Hash Method Hash Method Hash Match Build
com.Foo) com.Session fuzzy descriptor (android.content.Context, int, X) X Idea: Replace anything that is prone to identifier renaming Side-effect: Error introduced at method layer to defeat obfuscation But, error decreases when building the entire tree
after release of patched SDK) Packages with patched / removed Facebook SDK Packages with vulnerable Facebook SDK (released after patched SDK) Released apps with patched / removed Facebook SDK
70+% of code Recap – Library Outdatedness Why do app developers not update their code dependences? Steadily increasing outdated code >70% of included libs are (severely) outdated 324 days, on average, to adopt new versions (if at all)
Developing apps as primary job: yes (34%), no (66%) Coding experience: ~12yrs (general), ~4yrs (Android) # apps worked on: ~13 28 questions grouped into three categories C1. Common workflow C2. App/library update motivation + frequency C3. Reasons for library outdatedness
50 60 0 10 20 30 40 50 60 Library was still working Prevent incompatibilities Unaware of updates Too much effort Expected vs actual update effort – Expected: Which information drives app developers expectations – Actual: Based on library API changes and API usage by app Self-reported reasons for not updating
aux info – Changelogs are read sporadically or not at all (86%) – Update docs are missing or rarely read Library version string as simple compatibility indicator Semantic Versioning – a three number versioning scheme MAJOR.MINOR.PATCH breaking API changes backwards-compatible changes code-only changes
aux info – Changelogs are read sporadically or not at all (86%) – Update docs are missing or rarely read Library version string as simple compatibility indicator Semantic Versioning – a three number versioning scheme MAJOR.MINOR.PATCH breaking API changes backwards-compatible changes code-only changes
incomplete/missing API documentation Solution: Programmatically determine documented public lib interface Public lib interface ≠ set of all public API methods – Filter code in /internal/ subpackages – Eliminate obfuscated public classes (following ProGuard‘s renaming rules) – Filter synthetic classes + methods Adherence to Semantic Versioning
libraries with >10 versions each (1,971 in total) Expected vs actual changes: Lib developer‘s misclassification by type: Library Release Analysis 0 200 400 600 800 1000 1200 Major Minor Patch Expected Change Actual Change 0 200 400 600 800 1000 1200 Major Minor Patch Expected Change Actual Change
Replaces (simple) lint checks for outdated libraries Leverages library API analysis results Unique Features Reports for every outdated lib the highest compatible version For incompatible versions, it provides estimate about update effort
with nested dependencies info Warn about usage of lib versions with known vulnerabilites Feedback appreciated Up2Dep works completely offline, you may share telemetry data with us You can provide feedback via online survey (just ping us)
awareness LibScout is open-source: https://github.com/reddr/LibScout No silver bullet Requires combined effort of different actors to improve status quo more sustainably First steps: Up2Dep IDE extension https://project.cispa.io/up2dep erikdrr