4 ms·
Hacks like these are fun; but there's a number of interesting takeaways from something like this. One is that applications supporting accessibility or scripting
by saagarjha 7y ago
Hacks like these are fun; but there's a number of interesting takeaways from something like this. One is that applications supporting accessibility or scripting interfaces are really, really important: they let other apps interact with your program in ways you may have never imagined, "for free".
Another is that platforms have been locking down on cross-application access for quite a while, for security reasons. Reading or writing a process's memory is a big no-no these days, since it effectively lets you inherit the privileges of that application, and some operating systems will prevent you from doing it altogether no matter how much privileges you have. The latter operating systems have also begin to lock down the APIs that give programmatic control as well, which is somewhat sad…
Finally, when doing things like this try to see if you can find the "highest level" to do such hackery at. Ideally, the app has functionality built-in to do what you want, and if that doesn't work see if the accessibility APIs can help. Then see if you can find functions in the binary to call, and then as a last resort you can touch data structures in memory. This is because using higher-level APIs is more likely to keep things working: you might be changing the string in memory, but some code at a "higher level" might not expect that and misbehave. Perhaps it cached the string's length or thinks it has exclusive access to that memory so it overwrites your modifications. Have fun with your hacks, but be careful!
- nolok 7y agoThe Valorant hack through Raspberry Pi emulated mouse* that has been going around really shows that while you're right, ultimately those kind of things are like DRM in that they fight a fight that they cannot win by design. You can't stop the user (or other application pretending to be him) from accessing the content of something while allowing him to access the content of something, and you can't stop the user (or other application pretending to be him) from interacting with your software while being interactive for him. * actual mouse is plugged into the pi, pi is plugged in the computer in usb and pretend to be a mouse, video output is piped into the pi, software magic running on the pi "fix" the mouse movement to make perfect aim when need be through image analysis https://www.youtube.com/watch?v=d1jz8qbzfIk https://www.youtube.com/watch?v=d1jz8qbzfIk
- Polylactic_acid 7y agoThere were also mice you could buy which were programmed to undo the recoil pattern of guns in a game. The game responded by blocking the usb ID of those mice. But there is nothing stopping them as showing up as another brand of mice.
- tsukurimashou 7y agodo you have more details on that? I haven't been gaming for a while but you got me interested about the setup and how it works