Unity Game Hacking with dnSpy

Поділитися
Вставка
  • Опубліковано 7 лис 2024

КОМЕНТАРІ • 102

  • @Plagueheart
    @Plagueheart 2 місяці тому +109

    As someone who has been reverse engineering since the 90s, I think this tutorial is okay for beginners, but I strongly advise against modifying assemblies physically using methods like hex editing or DnSpy. Not only does it increase risks to anti-cheat detection, but you'll also lose lots of progress when the game updates.
    A much safer and more effective approach is to create a .NET project that serves as a loader, utilizing HarmonyPatch and reflection to inject patches. This way, you can avoid detection by checksums on physical hard drives at least. Plus, having a repo for modifications allows for easy updating the source code if the game changes in the future.

    • @nordgaren2358
      @nordgaren2358 2 місяці тому +13

      @@Plagueheart this is way too much to start with. The point of this game is to teach beginners.

    • @nordgaren2358
      @nordgaren2358 2 місяці тому

      @@Plagueheart there is a challenge associated with this binary that isnbest done with harmony, though, so that's probably when that will be introduced.

    • @DarkForce2024
      @DarkForce2024 2 місяці тому +1

      Would this still apply to offline, single player only games? That's what I'd be interested in.

    • @Plagueheart
      @Plagueheart 2 місяці тому

      @@nordgaren2358 Yes, you are right about it being too much but still i did say it was okay for beginner level, but it could of atleast acknowledged for the end-user on bad practices and how this method is the wrong way of doing because of explained pitfalls

    • @Alfred-Neuman
      @Alfred-Neuman 2 місяці тому

      I tried to do something similar with a single-player racing game by using ILSpy. I didn't even want to cheat, the game is pretty good but is a beta version and has many annoying things like hard coded keys so I wanted to fix a few things (ex. shifting gears with , and .) I don't have enough knowledge for injecting code so I used ILSpy and when I try to compile the reversed code I get one very annoying compiling error and I don't know how to fix it. I'll take a look at HarmonyPatch, seems very interresting.

  • @Californ1a
    @Californ1a 2 місяці тому +10

    Hopefully this series expands to a game compiled with il2cpp instead of mono. Mono modding is super easy, but il2cpp is a huge pain.

    • @penewoldahh
      @penewoldahh 2 місяці тому

      i really wanna see this too

  • @threeMetreJim
    @threeMetreJim 2 місяці тому +10

    For the apple/fish, I would have tried changing an apple object into a fish object, by looking for the definitions of objects and how they are placed. Your method is much simpler. The ability to place any object anywhere, could have more 'fun' potential instead of just being a simple cheat.
    The 'you should play basketball' on the first flag seems to indicate the original authors envisioned people modifying the 'jump' to go much higher than usual.

    • @arjunprajapati7378
      @arjunprajapati7378 Місяць тому

      🤓🤔🤔🤔🤔😐😑😐😑🤔🙂🙂6 0:48 0:48 0:48 0:48 0:48 😅😅😊😅😮 0:48 0:48

  • @hahhaahh7767
    @hahhaahh7767 2 місяці тому +3

    Finally waiting for this topic i used this in mobile. Games its so fun changing models inside the. Game

  • @washi_dev
    @washi_dev 2 місяці тому +10

    I would highly suggest not to rely on the C# editor when editing .NET binaries. ILSpy's engine is great, but decompilation remains an imperfect process. In this case you were lucky the decompiler produced 100% correct syntax and semantically equivalent code. This is not generalizable however for larger, more complex methods, especially for binaries with obfuscation applied.
    Better is to get familiar with CIL, the underlying bytecode of .NET, and edit methods that way. Not only does this prevent incorrect decompiler artifacts, you will also lay a good foundation on making tools that solely operate on this bytecode, which **will** be required for more complicated cases (e.g., for deobfuscation).

    • @nordgaren2358
      @nordgaren2358 2 місяці тому +2

      Hey Washi!
      We aren't really staying on .net for long, anyways. This is just the first game in the defcon challenge. I still think these tools can be good for a first pass, but it's not like Ghidra where I can also see the assembly that the de-compiler is basing it's pseudo code on, which is a bummer. I had a few times during this challenge where I would have much rather been able to look at actual instructions, rather than trusting dnspy, but, he hasn't gotten to those levels, yet.

    • @person-yq8di
      @person-yq8di Місяць тому

      @@nordgaren2358 dnSpy has an IL Editor, and IL view option that can view/edit the raw CIL bytecode. Washi is referring to the C# Editor used here (9:28 for example). ILSpy also has an IL view option, but no editing capability.

  • @johndeaux8815
    @johndeaux8815 2 місяці тому +13

    This is what got me reinterested in programming and cybersecurity. I downloaded a game mod, realised it was just replacing one file with another similarly sized one, and thought it must just be a slightly modified version of the original, which must be decompileable. So I went looking for a DLL decompiler, found DnSpy, and was surprised to find an extra module called "Discord" floating around 😅 Glad I didn't run the original mod and just found the parts I wanted to change in the original DLL, my Discord token is safe for another day.

    • @Alveneb
      @Alveneb 2 місяці тому +3

      with what game did u experience this, please? I'm trying to think of examples to study later

  • @Mrcool12able
    @Mrcool12able 2 місяці тому +1

    I would love seeing this, and then do a comparison between this and say unreal engine. What differs. Can you use the same methods as shown here?
    Great video!

  • @fadiallo1
    @fadiallo1 2 місяці тому +1

    You Getting Better
    Keep Going.

  • @trevorayala7368
    @trevorayala7368 2 місяці тому

    I'm enjoying this series, keep em coming!

  • @oliver-nation4377
    @oliver-nation4377 2 місяці тому +2

    Love this, pls keep it coming.

  • @masterneme
    @masterneme Місяць тому +1

    I've tried this method with actual released games but never got the { } so I guess it doesn't work with IL2CPP games, right?

  • @ThisIsJustADrillBit
    @ThisIsJustADrillBit 2 місяці тому +1

    Perpetual POGGERS 😮❤

  • @wermair
    @wermair 2 місяці тому +2

    Childish stuff for beginners. Unity games with Mono backend kinda rare this days. Usually I am facing il2cpp and hooking it using Frida. So maybe John will teach us this method in next video 🤔

  • @Heckatomba
    @Heckatomba 2 місяці тому +2

    1:33 A platypus?

  • @Net-Guru
    @Net-Guru 2 місяці тому +1

    You sir is amazing

  • @MyRandomness987
    @MyRandomness987 2 місяці тому +1

    This looks like so much fun!!! Can anyone do this? I did not know this was a thing!

  • @RuthJones-k8v
    @RuthJones-k8v Місяць тому

    Irving Knoll

  • @givowo
    @givowo 2 місяці тому

    Dnspy my beloved

  • @fr34k09
    @fr34k09 2 місяці тому

    I love how I used cheat engine looking like Harry Potter giving himself a wedgie to fly across the hole and not know which file to modify with dnspy, thx for the vid XD

  • @Kamerzystanasyt
    @Kamerzystanasyt 2 місяці тому

    what about unreal engine games

  • @GodzillaJawz
    @GodzillaJawz 2 місяці тому

    Wassup dr John Hammond

  • @NicolLauren-q4w
    @NicolLauren-q4w Місяць тому

    Christine Unions

  • @juiciestlemonadeofyoutube
    @juiciestlemonadeofyoutube 2 місяці тому

    hows the park bro

  • @maxime_vhw
    @maxime_vhw 2 місяці тому +2

    My first thought would have been to increase jumpheight. Also the "you should play basketball" makes me think that was their solution. But yea doesnt matter how you hack the system if you get the same result :p

  • @彼らは無生物です
    @彼らは無生物です 2 місяці тому +44

    hahahaahhaaha now i repeat this in cs2.

    • @DopeyDopesta
      @DopeyDopesta 2 місяці тому +19

      I know this is a troll. But DNSpy typically only works with C#. This isn't the case for CS2.

    • @KillianTwew
      @KillianTwew 2 місяці тому +4

      Plus they won't have a file that is basically called "modify for hacks"

    • @Josh-dm5sx
      @Josh-dm5sx 2 місяці тому +3

      🤦‍♂️

    • @depsep
      @depsep Місяць тому +1

      CS2 is made in the Source 2 engine, not the Unity engine. And it’s made with C++.

  • @Tobi14762
    @Tobi14762 2 місяці тому

    I've never been this early

  • @BedirSama
    @BedirSama 11 днів тому

    I ended up learning all of Unity just to change values in hentai games, ong 😭😭

  • @0xgodson119
    @0xgodson119 2 місяці тому

    Nice

  • @FlazhyVR
    @FlazhyVR 2 місяці тому +1

    1st before it goes viral

  • @thecooldudes69420
    @thecooldudes69420 2 місяці тому +1

    Interesting.

  • @riashadibnekaiser8629
    @riashadibnekaiser8629 2 місяці тому

    Let's hack (or crack) denuvo DRM🤩

  • @RhizGh037
    @RhizGh037 2 місяці тому

    Not first

  • @MemoriesInsideMe
    @MemoriesInsideMe 2 місяці тому

    john u dont need to act as the authority in categories you barely know of

  • @CookieGamesHD
    @CookieGamesHD 2 місяці тому

    :-)

  • @𰻝0
    @𰻝0 2 місяці тому

    meow

  • @trxsyn
    @trxsyn 2 місяці тому +1

    im so early bro

  • @MagnaP
    @MagnaP 2 місяці тому

    I thought cheat engine was deemed unsafe beyond 7.2? Between adwares in the installer and the weird antics of the dev in the code itself.

  • @anispinner
    @anispinner 2 місяці тому

    What is the point of the "-modified" file?.. Just keep patching the original file avoiding this redundancy.

    • @TrebleWing
      @TrebleWing 2 місяці тому

      If the game updates it can erase all your work.

    • @anispinner
      @anispinner 2 місяці тому

      Then save it *after* you done with it, not each of your 99 iterations.

  • @LukeAvedon
    @LukeAvedon 2 місяці тому

    I love dnSpyEx so very much.

  • @pankoza3
    @pankoza3 2 місяці тому +1

    Copyright

  • @WhiteGroyper
    @WhiteGroyper 2 місяці тому

    desktop icons not large enough, pass

  • @WolverineMKD
    @WolverineMKD 2 місяці тому

    Cheaters/Hackers ruin gaming, as educational this is its more damaging than anything else.
    Edit: i take it back it might make more good than bad after some good explanation below in this comments comments.

    • @dedkeny
      @dedkeny 2 місяці тому +1

      Salty people like you ruined the internet

    • @ThisIsJustADrillBit
      @ThisIsJustADrillBit 2 місяці тому +9

      People understanding reverse engineering is more important for society than games having cheaters. I think the intention is that reversing games is a great way to attract smart people towards these kinds of skills more broadly.

    • @npc_tom
      @npc_tom 2 місяці тому +8

      It also lets (beginner) game devs understand how a cheater/hacker might go about breaking their game, so I'd argue the educational benefits outweigh the potential damage.

    • @delofj
      @delofj 2 місяці тому +7

      I cannot disagree more on that topic
      I think, things like this, is the reason why modding in games exists, and the modding community can be really huge for a game
      And it can even keep some games alive because its servers are done and the publisher no longer cares about it

    • @stage6fan475
      @stage6fan475 2 місяці тому +5

      The cheaters/hackers are light years beyond this already, so don't worry.

  • @DrivingStubby
    @DrivingStubby Місяць тому +1

    44119 Emmanuel Key