-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using jazzer on junit4 / Android tests #865
Comments
Thanks for your interest in Jazzer. Fuzzing Android applications is a pretty exciting application. @TheCoryBarker has made a number of contributions to Jazzer with the aim of making this possible, but that work doesn't seem to cover the Robolectric use case. Supporting JUnit 5 well already requires substantial effort, which is why I think it's unlikely that we will take on supporting another test framework in the foreseeable future. We are however thinking of ways to add "second-class support" for any kind of framework via e.g. a |
Right now there is no way to fuzz intents. The only fuzzing is through building your Java as a library and fuzzing that library. The current sanitizers also are not well equipped for finding vulnerabilities on Android, because of this you should still target code that uses heavy native code, since the native code is where you be finding your vulns. To start fuzzing this code, write you fuzz target for a Java library that heavily uses native code. Build this code, then instrument the .class files offline. Then use d8 tool to DEX your .jar file, push to your Android device and start fuzzing. If this sounds like your case, I would first recommend trying to fuzz your native code directly first. I'll add though that since Robolectric uses a normal JVM and normal Java bytecode, I suspect that if junit4 was ever supported you could just build Jazzer normally and run on Robolectric with full runtime instrumentation. This wouldn't work for my case since I was mostly interested in the java->native code that ships on an Android device, which Robolectric doesn't have. |
@TheCoryBarker can you elaborate a bit? When building for Android via |
@ubiratansoares @ajgay Thanks for the questions and feedback. Did you all figure out a workaround? |
Hey folks! New
jazzer
user here 👋🏻I'm reaching out to you to discuss how we could have even better support to fuzzing on Android projects.
Particularly it seems that junit5-only support is a deal breaker for this use case, since
junit5
was never officially supported by the Android tooling. 💔The Android community has being using this Gradle plugin for ages in order to enable junit-platform and write tests over Android-free code within Android projects. On the other hand, libraries like Robolectric - which we use to unit-test code coupled with Android framework classes - support only
junit4
.That means that we have a hard time to use
jazzer
to fuzz abstractions over Intents, URIs, and other non-ui stuff we grab from the Android framework.Not sure if I missed something, but in any case : do you folks have plans to add support for
junit4
onjazzer
?Thanks in advance, and congrats on the great work you folks have being doing in the JVM/fuzzing space 🙂
The text was updated successfully, but these errors were encountered: