Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Developing Cheat Engine equivalent for linux

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
desertricker
Advanced Cheater
Reputation: 0

Joined: 20 Jan 2013
Posts: 55
Location: 127.0.0.1

PostPosted: Thu May 19, 2016 5:50 am    Post subject: Developing Cheat Engine equivalent for linux Reply with quote

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 Very Happy
Back to top
View user's profile Send private message Visit poster's website
desertricker
Advanced Cheater
Reputation: 0

Joined: 20 Jan 2013
Posts: 55
Location: 127.0.0.1

PostPosted: Wed Jun 29, 2016 11:49 am    Post subject: Reply with quote

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 Very Happy
Back to top
View user's profile Send private message Visit poster's website
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Sun Jul 03, 2016 11:43 am    Post subject: Reply with quote

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
View user's profile Send private message
desertricker
Advanced Cheater
Reputation: 0

Joined: 20 Jan 2013
Posts: 55
Location: 127.0.0.1

PostPosted: Tue Jul 05, 2016 6:46 pm    Post subject: Reply with quote

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! Very Happy 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 Very Happy
Back to top
View user's profile Send private message Visit poster's website
kantoboy69
Advanced Cheater
Reputation: 2

Joined: 31 Mar 2010
Posts: 71
Location: Manila

PostPosted: Fri Aug 05, 2016 2:37 am    Post subject: Reply with quote

Tried that before but never actually started a prototype project

On my research I found this backdoor SSHEATER can be use to modify memory just like cheat engine so it can be helpful on building a prototype similar to cheatengine without actually using GDB Very Happy

I forgot the name of the project for the android counterpart which I think could also work on linux.

_________________
Cheater always prosper Hitler
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25283
Location: The netherlands

PostPosted: Fri Aug 05, 2016 4:34 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
desertricker
Advanced Cheater
Reputation: 0

Joined: 20 Jan 2013
Posts: 55
Location: 127.0.0.1

PostPosted: Sun Aug 07, 2016 2:19 pm    Post subject: Reply with quote

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 Very Happy
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25283
Location: The netherlands

PostPosted: Sun Aug 07, 2016 2:37 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
desertricker
Advanced Cheater
Reputation: 0

Joined: 20 Jan 2013
Posts: 55
Location: 127.0.0.1

PostPosted: Sun Aug 07, 2016 4:40 pm    Post subject: Reply with quote

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 Very Happy 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 Very Happy
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25283
Location: The netherlands

PostPosted: Sun Aug 07, 2016 4:52 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
desertricker
Advanced Cheater
Reputation: 0

Joined: 20 Jan 2013
Posts: 55
Location: 127.0.0.1

PostPosted: Sun Aug 07, 2016 6:01 pm    Post subject: Reply with quote

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 Very Happy
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25283
Location: The netherlands

PostPosted: Mon Aug 08, 2016 3:52 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
desertricker
Advanced Cheater
Reputation: 0

Joined: 20 Jan 2013
Posts: 55
Location: 127.0.0.1

PostPosted: Mon Aug 08, 2016 8:49 am    Post subject: Reply with quote

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 Very Happy

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 Very Happy
Back to top
View user's profile Send private message Visit poster's website
theidiot
Newbie cheater
Reputation: 0

Joined: 15 Dec 2015
Posts: 14

PostPosted: Wed Dec 28, 2016 3:01 am    Post subject: Reply with quote

Shocked Shocked Shocked
Back to top
View user's profile Send private message
helenedwards
Newbie cheater
Reputation: 0

Joined: 11 Oct 2016
Posts: 11

PostPosted: Wed Dec 28, 2016 10:42 pm    Post subject: Reply with quote

Looks pretty impressive I gotta say..
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites