News for hackers. Stuff that matters.
Re:Reverse Engineered Nintendo Switch App REST API by Polylactic_acid on Wednesday May 20, 2020 @10:34PM (#23254288)
Is this your work? I'm wondering, if the app did use cert pinning, how would you mitm it on your own device?
Re:Reverse Engineered Nintendo Switch App REST API by Scaevolus on Wednesday May 20, 2020 @10:50PM (#23254374)
> I reverse-engineered using mitmproxy. It was quite easy as the app does not use cert-pinning at all.

If the app used cert-pinning you'd probably do the RE work on android, where you can more easily install a modified APK with cert pinning disabled.

Re:Reverse Engineered Nintendo Switch App REST API by lozaning on Wednesday May 20, 2020 @11:19PM (#23254518)
I've tried various times to get around a cert pinning thing for work, curious as to what you'd recommend as the best method to go about doing this on android. RE the APK or some kind of rooted phone based debugery?
Re:Reverse Engineered Nintendo Switch App REST API by mjg59 on Thursday May 21, 2020 @01:11AM (#23255022)
As well as the other answers, an alternative is to use smali to somewhat decompile the app, figure out which HTTP library it's using, delete the call to the function that enables pinning, rebuild the apk, sign it and run that version.

The longer version is that it really varies based on the app. Some apps are using something like React Native and have all their logic in Javascript. Some apps have the API in Java code and you can figure it out by using jadx to get a reasonable approximation of the original source. Some apps do all of this in native code, and then you're into Ghidra territory. My personal experience is that MITMing the connection is the easiest way to get an understanding of the overall shape of the API, with inspection of the code itself then being used to fill in gaps.

Re:Reverse Engineered Nintendo Switch App REST API by hacksore on Wednesday May 20, 2020 @11:47PM (#23254613)
For me it’s using a rooted phone. I have some info for my RE on another app that might be helpful.

https://docs.google.com/document/d/1q0Pz2t5Gmt-vv8z-2Yswhvg2...

Re:Reverse Engineered Nintendo Switch App REST API by xkcd-sucks on Thursday May 21, 2020 @12:33AM (#23254829)
For me, the fastest way involves using apktool to decompile it, then simply reading the API code. Or insert a log statement, recompile, run on phone w adb log - requires minimal Android code fluency
Re:Reverse Engineered Nintendo Switch App REST API by Polylactic_acid on Thursday May 21, 2020 @12:43AM (#23254866)
Does this usually work? I just unzipped an apk once and saw it was all javascript but I assumed other apps would be minified.
Re:Reverse Engineered Nintendo Switch App REST API by xkcd-sucks on Wednesday May 27, 2020 @07:01PM (#23331212)
Java/Android is basically gibberish to me as is - Maybe it is obfuscated sometimes. But strings themselves (API endpoints) have to be present some way or another.

There is also something called "smali" which is an intermediate representation - You can edit it following something like https://stackoverflow.com/questions/31101740/method-to-add-a....

Finally, there are occasionally native ARM libs included in the jar - You can get these with tool "retdec" or just run strings on it to find interesting stuff

Re:Reverse Engineered Nintendo Switch App REST API by mitmfrida on Thursday May 21, 2020 @08:08AM (#23257405)
I use frida https://frida.re/ along with android-x86 VM. Worked well for every app I tried so far