News for hackers. Stuff that matters.
Re: by kelnos on Friday September 15, 2023 @04:13PM (#37528568)
"Just" is doing a lot of work there. Getting root isn't always possible or easy, depending on your device manufacturer. And if you do manage to get root, your phone will likely stop passing SafetyNet, and you'll lose access to a bunch of apps that you may care about. SafetyNet can be spoofed in some situations, but not all, and even when spoofing does work, it all seems very brittle to me.

Yes, of course, you can do this, but let's not pretend there aren't trade offs.

Re: by jeroenhd on Friday September 15, 2023 @04:26PM (#37528699)
In the context of "changes to Android 14", "just" is right. Android has required root access for modifying random apps since before Android 6, and that's only because many apps didn't bother implementing certificate pinning (which was already known advice at that point).

Alternatively, you can use ADB + Frida to pull an APK from the device, inject a binary, and inject code at runtime using Javascript or Python. That's much easier for intercepting traffic than messing with certificate stores or eBPF ever was in my opinion.

Re: by ungamedplayer on Friday September 15, 2023 @11:15PM (#37531706)
Do you have any kind of docs on doing this. I want to get some stats from a game I'm playing and think that the server fudges the number to keep whales happy.

Any quality documentation on how to do this would be great.

Re: by jeroenhd on Saturday September 16, 2023 @11:14AM (#37535516)
https://httptoolkit.com/blog/frida-certificate-pinning/ has a detailed blog on it. Frida receives updates all the time, so the exact commands and scripts don't always work with the latest version, but you can start there.

As a concept, Frida works by running a gadget on the phone (as root, or as part of an app) and a client on another device (or the same device, I suppose, if you're using a terminal emulator on Android).

To install the gadget, you either download the right binary and execute it on the phone as root, or use a tool like https://github.com/ksg97031/frida-gadget to inject the gadget into an APK.

Then, use Frida (https://frida.re/docs/Android) to connect to the gadget and load any script you want. There are a bunch of scripts that can be used to patch out certificate validation, or to exclusively use a certificate authority of your choice, or you can write your own.

You can download scripts and run them directly, or you can run Frida with a command line flag to open up a remote debugging port; you can connect to that port from the Chrome dev tools and get an interactive code execution prompt. From there, you can patch out Java methods, load native binaries, patch memory, whatever you want. It's a really powerful tool for debugging and reversing applications you don't have the source for.

Re: by ungamedplayer on Sunday September 17, 2023 @09:35PM (#37551207)
Thank you for taking the time to reply. This has put me on the right path.
Re: by worthless-trash on Thursday September 21, 2023 @10:28AM (#37598140)
I've now confirmed that if you pay money for the game, you -automatically- get exactly 12% more damage than someone who hasn't, and it appears to drop 1% a day over time.

Not much I can do with that data, other than sleep in comfort knowing that its the case.

Re: by jeroenhd on Thursday September 21, 2023 @11:43AM (#37599356)
Perhaps it's worth writing a quick blog about it? If this system wasn't documented before you purchase anything, you may even be able to get the attention of certain game review websites.

There are plenty of pay2win games out there, but if the game doesn't tell you that paying will give you an unfair advantage /or what advantage you're getting, exactly) I'd consider that worth reporting on, especially if the game has a decently large following!

Re: by 1vuio0pswjnm7 on Friday September 15, 2023 @06:36PM (#37529928)
"Yes, of course, you can do this, but let's not pretend there aren't trade offs."

Are there some words in the parent comment that "pretend there aren't tradeoffs". Is it that he did not include a warning about "SafetyNet". What would this "pretending" look like.

Losing access to "a bunch of apps you may care about" seems to be dependent on an assumption: that the reader cares about certain unnamed apps. Yet we cannot even name these apps. We cannot know what apps a user cares about unless the user tells us. I know Android users that do not use any apps that rely on SafetyNet.

Nor do we know what device manufacturer the reader may be dealing with. It might be one that makes rooting easy.

Perhaps we can refrain from making assumptions about readers.

Re: by Dylan16807 on Friday September 15, 2023 @11:06PM (#37531663)
> Are there some words in the parent comment that "pretend there aren't tradeoffs"

Yes. They quoted it! "you just need root". Especially the word just. That kind of phrasing implies that it's not flat-out impossible on many devices and that it doesn't break major functionality.

"I know users that don't use that feature" is praising with faint damnation.

Re: by 1vuio0pswjnm7 on Saturday September 16, 2023 @12:00AM (#37531939)
Some people have more than one phone. One phone is for recreational use; it's rooted. Another phone is for work; it's not rooted. Another phone is for stuff like banking, etc.; it's not rooted.

ecapture is top comment. The voters have indicated their preference.

Re: by matheusmoreira on Friday September 15, 2023 @08:13PM (#37530635)
Yeah. Android has become as hostile as Apple devices due to hardware remote attestation. Might as well buy an iPhone at this point. Only reason I didn't is I discovered the existence of Termux which turned into something of an Android killer app for me.
Re: by WeylandYutani on Saturday September 16, 2023 @04:34AM (#37533037)
It's true that Google is unpredictable but as it stands Android still allows me to install apps outside of the approved store.
Re: by selfhoster11 on Saturday September 16, 2023 @05:55AM (#37533430)
I bought an iPhone a year ago for this exact reason. Both are user-hostile platforms now, so I might as well pick one that respects my attention more and treats me more acceptably. In addition, it looks like a near-future version of iOS will allow sideloading, which would make iOS an overall better mobile OS than Android.

Sent from my iPhone (after 13 years of using Android)

Re: by matheusmoreira on Saturday September 16, 2023 @11:08AM (#37535448)
Yeah. If iOS gets sideloading support, it could get a Termux equivalent. If that happens, I'm sold.