3 ms·
The author is yet to complete the tutorial but its an interesting resource, nonetheless. The tutorial does leave out https://frida.re https://frida.re which o
by ignoramous 8y ago
The author is yet to complete the tutorial but its an interesting resource, nonetheless.
The tutorial does leave out https://frida.re https://frida.re which offers a runtime no-root reverse engineering mechanism, which I'm currently using it to MiTM apps with cert-pinned TLS.
There's also the excellent FlowDroid and Androguard, the latter of which I've used for static analysis [0].
I recall NateLawson founded a YC startup, SourceDNA [1], that offered intelligence on reverse engineered iOS and Android apps (based on static analysis). I wonder what tools they used.
[0] https://github.com/ashishb/android-security-awesome https://github.com/ashishb/android-security-awesome
[1] https://news.ycombinator.com/item?id=10049925 https://news.ycombinator.com/item?id=10049925
- ollyfg 8y agoWow! How have I not heard of frida? This should make my normal process much simpler! 1) Decompile App -> smali 2) Decompile App -> Java (non-reversible, but easier to read) 3) Search the app for certificate pinning code (check for network_security.xml or grep for OKHttp pinning functions) 4) Find the code I just found in java, in the smali version 5) Remove the pinning code 6) Recompile smali -> apk 7) Fix whatever was causing the smail not to recompile 8) Recompile again 9) Pray 10) Install on device 11) Run app (that hopefully doesn't crash) 12) Pipe connection through Charles proxy 13) Read api calls! I'll definitely give it a go. In general I think there are nowhere near enough resources on decompilation, particularly on a purportedly "open" platform like Android. Really looking forward on the rest of the tutorial coming online.
- sonnyblarney 8y ago"there are nowhere near enough resources on decompilation, particularly on a purportedly "open" platform like Android." Most apps are definitely not 'open' and unfortunately most of 'reverse engineering' has nefarious intentions. Once one has had key code stolen from them, it changes one's perspective a little.
- saagarjha 8y agoAre you suggesting that reverse engineering resources not be made available because you feel it will lead to people stealing code?
- voltagex_ 8y agoUnless your APK is internal and not distributed outside a small circle, assume your code has been reverse engineered. Surely if you're running something that has to be that "closed", most of the key code is server side and the client is just calling APIs. Reverse engineers are not your enemy.
- sonnyblarney 8y ago"Unless your APK is internal and not distributed outside a small circle, assume your code has been reverse engineered." Of course, but doesn't obviate the illegality of stealing protected code. "Reverse engineers are not your enemy." Yes, many of them are. Many of these resources and individuals are involved in illegal and immoral acts around stealing code and IP, and justify it to themselves on some kind of skewed logic. Nobody really cares that folks are hacking code for fun, and nobody cares that people would use resources for this purpose. This is fine and possibly helpful. But IP theft is a big deal, and it's very damaging. "Surely if you're running something that has to be that "closed", most of the key code is server side and the client is just calling APIs" Unfortunately, this isn't possible in a variety of cases, especially new and upcoming scenarios that require AI to be 'on device'. There are many other such scenarios. It's very oppressive to a major class of innovation - particularly to those who've worked very hard to assemble something exceptional and useful.
- Lukas_Skywalker 8y agoAs an alternative, you could use the XPosed framework. It basically lets you overwrite App and System methods and classes by installing a small module. No need to modify your target apk. So you can just return true from the method that checks if the correct certificate is in use.
- ignoramous 8y agoXposedMod is amazing but you could override methods with Frida, as well. Just that Frida works both with or without having to root the device.
- jscholes 8y agoThese are great resources, thanks so much.