View previous topic :: View next topic |
Author |
Message |
desertricker Advanced Cheater Reputation: 0
Joined: 20 Jan 2013 Posts: 55 Location: 127.0.0.1
|
Posted: Thu May 19, 2016 5:50 am Post subject: Developing Cheat Engine equivalent for linux |
|
|
Hi everyone, I've been developing a reverse engineering tool called PINCE. It's a gdb front end mashed with scanmem to provide CE utilities
https://github.com/korcankaraokcu/PINCE
Just wanted to tell that you won't miss CE in linux when this project (hopefully) finishes properly. I'll post the important updates here _________________
Assembly var dediler geldik |
|
Back to top |
|
|
desertricker Advanced Cheater Reputation: 0
Joined: 20 Jan 2013 Posts: 55 Location: 127.0.0.1
|
Posted: Wed Jun 29, 2016 11:49 am Post subject: |
|
|
PROGRESS TIME!
Bugfixes and addition of a few new nice features including Variable Inspection&Modification, GDB Console and code generalization(required for the libPINCE to be reusable) _________________
Assembly var dediler geldik |
|
Back to top |
|
|
Stylo Grandmaster Cheater Supreme Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sun Jul 03, 2016 11:43 am Post subject: |
|
|
Looks pretty impressive I gotta say..
One problem though, I attached it to ubuntu's calculator and for every action I'm getting inferior is running.. what do I do with it? _________________
Stylo |
|
Back to top |
|
|
desertricker Advanced Cheater Reputation: 0
Joined: 20 Jan 2013 Posts: 55 Location: 127.0.0.1
|
Posted: Tue Jul 05, 2016 6:46 pm Post subject: |
|
|
Stylo wrote: | Looks pretty impressive I gotta say..
One problem though, I attached it to ubuntu's calculator and for every action I'm getting inferior is running.. what do I do with it? |
You have to stop the process by pressing F2 first, then the features of PINCE will be available to you. Press F3 to continue. It's also written in the "PINCE working logic" section of the Wiki of PINCE. Wiki page of PINCE is also accessible from the main window itself(press the button that has book image).
I'm glad that you managed to make my project work! Were the instructions clear? Did you had to do some workarounds? I'll try to create a setup.py for easy installation when the project finishes at basic level. Sorry for that mess for now.
Oh btw, most of the buttons doesn't work for now, the working buttons are AddAddressManually,MemoryView(only disassembly screen but it has a few CE features such as infinite scrolling, follow location changing instructions such as jmp, call, loop when pressed space, travel history etc.),page refresh button, GDB Console, Settings, table list and a few functions of it(deleting/adding rows,reading/modifying memory etc. I didn't implement freeze feature yet, read wiki for reasons. I sometimes hate gdb, but mostly love haha), about and wiki buttons _________________
Assembly var dediler geldik |
|
Back to top |
|
|
kantoboy69 Advanced Cheater Reputation: 2
Joined: 31 Mar 2010 Posts: 71 Location: Manila
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25291 Location: The netherlands
|
Posted: Fri Aug 05, 2016 4:34 am Post subject: |
|
|
Look at ceserver
It's easy to compile for linux.
You just need a gui. (E.g ce running in wine connected to localhost)
(Or compile the cecore project and use java to control it) _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
desertricker Advanced Cheater Reputation: 0
Joined: 20 Jan 2013 Posts: 55 Location: 127.0.0.1
|
Posted: Sun Aug 07, 2016 2:19 pm Post subject: |
|
|
Dark Byte wrote: | Look at ceserver
It's easy to compile for linux.
You just need a gui. (E.g ce running in wine connected to localhost)
(Or compile the cecore project and use java to control it) |
But isn't ceserver for processes running under WINE? Does it work with native linux applications? _________________
Assembly var dediler geldik |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25291 Location: The netherlands
|
Posted: Sun Aug 07, 2016 2:37 pm Post subject: |
|
|
No, ceserver is specifically to target native linux processes.(android linux, but should be easy enough to make it work for most linux builds) But you need to control it through sockets _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
desertricker Advanced Cheater Reputation: 0
Joined: 20 Jan 2013 Posts: 55 Location: 127.0.0.1
|
Posted: Sun Aug 07, 2016 4:40 pm Post subject: |
|
|
Dark Byte wrote: | No, ceserver is specifically to target native linux processes.(android linux, but should be easy enough to make it work for most linux builds) But you need to control it through sockets |
I see, but how does it work? I mean accessing memory of a remote process is different on linux, how does even debugging work? Did you modify CE in a way that it can use ptrace() calls? Did you rewrite the whole debugger for linux? Also I guess instead of regular methods, /proc/$pid/mem should be searched for efficent memory searching. And... DUDE, there's shit tons of things that should be reworked Did you rewrite CE for linux or there's another trick?
Also, how do I compile&setup ceserver on linux? There are tutorials for android but nothing for linux _________________
Assembly var dediler geldik |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25291 Location: The netherlands
|
Posted: Sun Aug 07, 2016 4:52 pm Post subject: |
|
|
i've written a wrapper/emulator for openprocess, writeprocessmemory, readprocessmemory and some basic debugging (same windows API call, but uses ptrace internally, and of course also reads /proc/$pid/mem when available )
https://github.com/cheat-engine/cheat-engine/blob/master/Cheat%20Engine/ceserver/api.c#L2481 has the rpm implementation
as for compiling, I use eclipse with the cdt package. you may have to adjust some parameters (it may default to android, but there is a linux build as well) _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
desertricker Advanced Cheater Reputation: 0
Joined: 20 Jan 2013 Posts: 55 Location: 127.0.0.1
|
Posted: Sun Aug 07, 2016 6:01 pm Post subject: |
|
|
Tbh, this made me feel useless about my project. I didn't even know all these things existed. But I should continue to this project I guess... What do you think? Is this project a waste of effort or needed? It's native, uses gdb(adds features such as python scripting and reverse-debugging which doesn't exist in CE). But on the other hand CE has a lot of tools that gdb doesn't have(such as speedhack, unrandomizer etc.). I'm asking this question because I fear that these projects may overshadow each other. See scanmem&GameConqueror for instance, even when cheat engine works with ce-server, people prefer GameConqueror over CE because it's very easy to find&install compared to ce-server. So, PINCE may also overshadow ce-server. What would ce-server lack compared to a native implementation? And are you planning to port CE to linux?
Also I'm new to ce-server. What to do after compiling? Could you please write step by step?
Thank you in advance _________________
Assembly var dediler geldik |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25291 Location: The netherlands
|
Posted: Mon Aug 08, 2016 3:52 am Post subject: |
|
|
you can of course improve ceserver for non android situations. e. g android can only read mem after a ptrace, but depending on how your kernel is compiled that doesn't have to be the case. in that case read can work a lot faster (no need to wait for attach) and threaded
but you do need to change some more code. (every thread will need it's own proc mem handle else threading problems will arise)
but it's up to you.
adding new features to ce that use gdb is possible too, just add new commands to the server layer and program in the cegui how to use it (but may be complicated if the ptrace read and gdb conflict) and you need to work with pascal
-
i may someday port ce to linux, but not sure when
it is possible using the wrapper and skip the server part, and after enough editing ce will compile for linux (i did the same for the mac port where i wrote a wrapper for rpm/rpm but then to mach_* functions)
-
after ceserver is compiled, run it as root and it will open some ports. Then you can connect and give it commands (binary commands, not text) like openProcess, readProcessMemory, debugProcess, waitForDebugEvent, getThreadContext, etc... _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
desertricker Advanced Cheater Reputation: 0
Joined: 20 Jan 2013 Posts: 55 Location: 127.0.0.1
|
Posted: Mon Aug 08, 2016 8:49 am Post subject: |
|
|
Correct, gdb and ptrace() conflicts. The only way to use ptrace() within gdb is to wrap it with python then call it by using "source" command of gdb. This means that you have to convert entire CE backend to python, which is not very easy to do.
Even ce-server and PINCE look like they are trying to accomplish the same thing, they have different approaches, which results in different features&behaviours.So, I guess I should continue developing PINCE. Diversity is a good thing to have
Oh, btw. Since you have mentioned using /proc/$pid/mem, I wondered that if it's possible to reuse CE's code for memory searching in linux. If it's possible, where is the code that's responsible of searching in github page of CE? _________________
Assembly var dediler geldik |
|
Back to top |
|
|
theidiot Newbie cheater Reputation: 0
Joined: 15 Dec 2015 Posts: 14
|
Posted: Wed Dec 28, 2016 3:01 am Post subject: |
|
|
|
|
Back to top |
|
|
helenedwards Newbie cheater Reputation: 0
Joined: 11 Oct 2016 Posts: 11
|
Posted: Wed Dec 28, 2016 10:42 pm Post subject: |
|
|
Looks pretty impressive I gotta say.. |
|
Back to top |
|
|
|