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 


How easy is it to reverse engineer a C# game?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
S0ulution
How do I cheat?
Reputation: 0

Joined: 03 Feb 2015
Posts: 2

PostPosted: Tue Feb 03, 2015 5:53 am    Post subject: How easy is it to reverse engineer a C# game? Reply with quote

Hi,

slideshare.net/khanamaan/reverse-engineering-and-modifying-windows-8-apps

Having read a little how to, by Justin Angel, regarding Windows 8 app exploits I wanted to know how easy it would be to reverse engineer a Windows 8 game programmed in C#. Is it easy or am I having myself on?

Say I wanted to make gold/diamond purchases free buy editing the XAML files for example. How easy would that be to do? Is there a definitive tutorial on exactly how to do this that anyone knows of?

Thanks Smile
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Tue Feb 03, 2015 6:11 am    Post subject: Reply with quote

it's easy, but to do what you want you have to find out all networking code, then write a server that emulates the whole game but lets you buy what you want, and finally redirect the urls it connects to to localhost
_________________
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
S0ulution
How do I cheat?
Reputation: 0

Joined: 03 Feb 2015
Posts: 2

PostPosted: Tue Feb 03, 2015 6:26 am    Post subject: Reply with quote

Sounds a little too complicated for me! I was hoping to just be able to edit the file and put it back. I tried using Cheat Engine to edit my amounts but could never find the real value to edit.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Tue Feb 03, 2015 6:35 am    Post subject: Reply with quote

yeah, the problem is that the real value isn't stored on your system, but on the server it connects to.
To get around that issue you need to put the server on your own system instead, and without having access to the original server code you'll have to write one from scratch (and not to mention you'll be playing singleplayer then)

_________________
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
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Tue Feb 03, 2015 3:07 pm    Post subject: Reply with quote

Editing C# applications is VERY easy. However, it does depend on if the file is packed / obfuscated to protect itself. If so, then the task may be a bit rough depending on the protection used. However, there are tools like:
- de4dot
- ILSpy
- Reflector
- DotPeek
- JustDecompile

and so on to help with the task of viewing, editing, and saving a modified file as well as unpacking it if it is protected. In some cases you may need to resort to manual unpacking or finding tools specific to the protection used.

Once the file is unprotected, if it was protected to begin with, opening the file in a decompiler such as ILSpy, Reflector, DotPeek, JustDecompile, etc. will show you the resulting source code.

As Dark Byte said, for what you want to do a proxy server may be needed to intercept the communication and fake the results. This is not at all hard to do with C# applications though since you can easily hook onto them (using stuff such as Mono.Cecil) and rewrite parts of the application without actually modifying the .exe/.dll's of the game.

I wrote two tutorials on hooking C# applications with Mono.Cecil which you can find here:
http://atom0s.com/forums/viewtopic.php?f=11&t=40
http://atom0s.com/forums/viewtopic.php?f=11&t=39

In the tutorials I used the Windows game, Terraria as an example. (It is written in C#)

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
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