Do any of you guys have experience editing another program/processes memory? This is a murky area for me right now but definitely one I find fascinating (anything with direct memory manip I love) and I am looking to get some answers on this particular question:
How do you make a program which controls the UI or other programs? For example, I want to make a chatbot for fun, but the thing is, there is no API available (from the chat program) and/or I don't want to use an API. I want to be able to open up, for example, a chat program and my program will be able to read the chatbox and type into the input and send messages for me. The key here is that this would be good for an application that has no API for this. I know this is possible, I just have no clue how to go about it. Another example would be to have a program surf the web live for me on the screen.
One way I've been researching is via reading/writing to another program's memory space in C# and C using the Windows API. I figure I could write a program that scans my chat application's memory space (or I can provide it the proper address if I can grab it from a debugger and it does not change) and locates the messages as well as the input field and then I can manipulate it like that. Does anyone have experience with this?
To be honest, I have limited experience with "debugging" in the raw sense of looking at the memory/registers outside of debugging my own programs with gdb and Visual Studio, however, I did watch Casey's primer and I do remember fiddling with GameShark as a kid. However, there doesn't seem to be a whole ton of info/resources, especially with x64. I've heard of this thing called OllyDbg but apparently it has little x64 support, I also downloaded and tried out something called x64dbg (open source) which seems to work pretty well but it apparently is new and in Alpha right now. Another issue I've had is x64 x86 confusion. For example, I tried doing a ReadProcessMemory using the kernel32.dll API and it crashed when I had the Visual Studio set in x86 mode but then when I switched to x64 and switched the int memory value to the uint, it worked fine.
This is the little intro tutorial I found on this. But when I did a WriteProcessMemory, the program didn't crash but it also didn't change the text either for some unknown reason (I gotta debug this some more and try to figure it out).
Last but not least, nearly every (limited) resource out there that has to do with memory editing/reading seems to involve "game hacking"/cheating, however, there must be a lot more usages of this than that right? For example, I keep hearing about a program called CheatEngine which helps you to detect data in memory in a process and then change/track it. I'd like to use this for just regular programs/not games but not sure on how all of this works, because all of these programs seem to be specifically for games but they are general-purpose memory tools, no? Thanks.
Preferred languages for this: C# or C and please note that I am using x64 Windows 10.
TL;DR - Any resources/advice on editing another Windows process' memory space to make a chatbot or just for fun would be useful.