Jump to content

LF a confident guy with some revesrse knowledge for some help.


Go to solution Solved by n1ce0n3,

2 posts in this topic

Recommended Posts

Posted (edited)

Hi there, I'm currently trying to hack a pretty popular game (not going to tell the name of the game, though, it's pretty new and it has around a milion downloads on the play store :))

1. The game uses LUA, which is packed with some kind of a packer that renamed all the source files into its' hashed names. There's a ton of files like that.  

(pic1, pic2)

The progress I have so far. The game uses LuaJIT-2.1.0-beta3 on top of lua5.1. If I got it right the game uses a 64-bit compiler, since LUA's header is  1B 4C 4A 02 0A, when I compile lua script with a 32bit version of luajit - the header is  1B 4C 4A 02 02, the 64 bit version gives me  1B 4C 4A 02 0A.

Okay, so.

Each of these files you can see in a screenshot is not just a LUA script.

It is a lua script, which is compiled into LuaJIT with it's own name, after that that script gets zipped into a hashed name, but it keeps the lua extension. (e.g. config/Team.lua, becomes a ZIPPed archive "aa/aa70e1b8e38c140d2242f45bb58e2edf.lua".

On top of that the zip archive gets XXTEA encrypted.

Oh, forgot to mention that the game is built on cocos2d engine.

I've managed to recover all the source files (using luajit decompiler doesn't give you the exact sources, but at least it gives you a readable file, which you can look through and actually figure what's going on there.)

The problem is that if I modify a decompiled script - pack it the way it was originally packed, most of the times - it fails to work (I think it's because the decompiler doesn't give you the exact source code as it is originally written, since I've tried compilig for all of the architectures available, and most of the time - the game eitehr hangs when it gets to read that file - or doesn't load the section that I've modified like the file is corrupt or something)

The game loads cocos2dlua.so library during the startup - and then it unloads the library, so that it doesn't remain in the proccesses' memory.

As much as I've tried - I couldn't figure the addresses of the functions I wan.

Also, the library has no exports, exports tab in IDA have a single entry, which is ".init_proc".

I've located the LUA functions' names in IDA, but since I'm not super confident with IDA, I cannot figure how do I either hook any of these, or how to get their address.

They are in the symbols table, but yet again, I have no idea how I can reach them. (pic)

I've hooked fopen, fred, fwrite, fgets, fread and most of the other relevant native functions, but the most I could've gotten was the file name that gets loaded.

TL:DR

I've decompiled all of the games' sources (over 10k LUA files), and the only thing that is left to do is to somehow execute luaL_loadstring or luaL_loadfile on my own.

I've spent quite some time on that and honestly I am out of ideas can I get what I'm trying to.

I even tried pattern scanning the binary and all its' libraries to get either of the functions, basically, any lua function - had no success so far.

 

I'll really appreciate any help I can get at this point.

Feel free to reach me out messages so then we can get in touch via discord or any way you'll prefer. Thanks in advance.

The game's binary is actually a "split installer" as they call it, it has both ARM and x86 libraries within it's content (even every lua script has another version of itself for another architecture). That prevents me from loading the binary manually into the process , since it gives me an error:

Error: dlopen failed: "/data/local/tmp/libcocos2dlua.so" has unexpected e_machine: 183 (EM_AARCH64)

Updated by n1ce0n3
  • Informative 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • Royal Kingdom v19315 [ +10 Jailed ] Auto Win
      Modded/Hacked App: Royal Kingdom By Dream Games Teknoloji Anonim Sirketi
      Bundle ID: com.dreamgames.royalkingdom
      iTunes Store Link: https://apps.apple.com/us/app/royal-kingdom/id1606549505?uo=4


      Hack Features:

      - Coins [ Win Match ]

      - Potions

      - Lives Free

      - Booster Max

      - ViP Frame Unlock

      - Kingdom Pass Free

      - District unlock [ One Task Only ]

      - Auto Win [ Just One Move ]

      - Colour Spawn [ Blue Green Red Yellow Pink Orange ] Choose One Only


      Jailbreak required hack(s): https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 65 replies
    • Royal Kingdom v19315 [ +10 Cheats ] Auto Win
      Modded/Hacked App: Royal Kingdom By Dream Games Teknoloji Anonim Sirketi
      Bundle ID: com.dreamgames.royalkingdom
      iTunes Store Link: https://apps.apple.com/us/app/royal-kingdom/id1606549505?uo=4



      Hack Features:
      - Coins [ Win Match ]

      - Potions

      - Lives Free

      - Booster Max

      - ViP Frame Unlock

      - Kingdom Pass Free

      - District unlock [ One Task Only ]

      - Auto Win [ Just One Move ]

      - Colour Spawn [ Blue Green Red Yellow Pink Orange ] Choose One Only


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 47 replies
    • Piggy Kingdom - Match 3 Games v2.1.4 [ +6 Cheats ] Currency Max
      Modded/Hacked App: Piggy Kingdom - Match 3 Games By OLLEYO PTE. LTD.
      Bundle ID: com.olleyo.piggy.match
      iTunes Store Link: https://apps.apple.com/us/app/piggy-kingdom-match-3-games/id1635337354?uo=4


      🚀 Hack Features

      - Coins

      - Lives

      - Build Coins

      - Moves

      - Booster

      - Color Move Only [ Without Matching Move Anywhere ]


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APK(s): https://iosgods.com/forum/68-android-section/
        • Like
      • 12 replies
    • Piggy Kingdom - Match 3 Games v2.1.4 [ +6 Jailed ] Currency Max
      Modded/Hacked App: Piggy Kingdom - Match 3 Games By OLLEYO PTE. LTD.
      Bundle ID: com.olleyo.piggy.match
      iTunes Store Link: https://apps.apple.com/us/app/piggy-kingdom-match-3-games/id1635337354?uo=4


      🚀 Hack Features

      - Coins

      - Lives

      - Build Coins

      - Moves

      - Booster

      - Color Move Only [ Without Matching Move Anywhere ]


      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Informative
        • Like
      • 15 replies
    • Puzzle Town Mysteries v3.01 [ +7 Cheats ] Currency Max
      Modded/Hacked App: Puzzle Town Mysteries By Haiku Games Co
      Bundle ID: com.haiku.puzzle.minigame.set.block.slide.games.mysteries
      App Store Link: https://apps.apple.com/us/app/puzzle-town-mysteries/id6738405781?uo=4


      🤩 Hack Features

      - Coins

      - Stars

      - Booster

      - Diamond Keys Freeze

      - Energy

      - All Puzzle Unlocked

      - Golden Pass
        • Like
      • 0 replies
    • Puzzle Town Mysteries v3.01 [ +7 Jailed ] Currency Max
      Modded/Hacked App: Puzzle Town Mysteries By Haiku Games Co
      Bundle ID: com.haiku.puzzle.minigame.set.block.slide.games.mysteries
      App Store Link: https://apps.apple.com/ph/app/puzzle-town-mysteries/id6738405781?uo=4

       
      🤩 Hack Features

      - Coins

      - Stars

      - Booster

      - Diamond Keys Freeze

      - Energy

      - All Puzzle Unlocked

      - Golden Pass
      • 0 replies
    • Candy Crush Friends Saga Cheats v4.12.0 +3
      Modded/Hacked App: Candy Crush Friends Saga By King
      Bundle ID: com.midasplayer.apps.candycrush4
      iTunes Store Link: https://itunes.apple.com/us/app/candy-crush-friends-saga/id1225867923?mt=8&uo=4&at=1010lce4



      Hack Features:
      - Infinite Moves (Won't subtract when use)
      - Infinite Lives (Won't subtract when quit lose)
      - Infinite Boosters (Won't subtract when use)


      Hack Download Link: https://iosgods.com/topic/80252-arm64-candy-crush-friends-saga-cheats-v109-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 629 replies
    • Mimo: Learn Coding/Programming v9.13.0 Jailed Mod +1
      Modded/Hacked App: Mimo: Learn to Code By Mimohello GmbH
      Bundle ID: com.getmimo.mimo
      iTunes Store Link: https://itunes.apple.com/us/app/mimo-learn-to-code/id1133960732?mt=8&uo=4&at=1010lce4


      Hack Features:
      - Premium
      - All Chapters Unlocked
       

      Hack Download Link: https://iosgods.com/topic/68649-arm64-mimo-learn-to-code-v312-jailed-mod-2/


      Credits:
      - @Laxus
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,209 replies
    • Demon Hunter Idle Cheats v1.11.0 +3
      Modded/Hacked App: Demon Hunter Idle By MOBIRIX
      Bundle ID: com.mobirix.mbpdh
      iTunes Store Link: https://apps.apple.com/us/app/demon-hunter-idle/id6472879858?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Freeze Currencies*

      *NOTE: Do not abuse or buy ViP for just this cheat


      iOS Hack Download Link: https://iosgods.com/topic/183710-demon-hunter-idle-cheats-v102-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 164 replies
    • Seven Hearts Cheats v1.3.352 +6 [ Always Win & More ]
      Modded/Hacked App: Seven Hearts By BROKKSINDRI Co.,LTD.
      Bundle ID: com.brokksindri.sevenhearts.ios.kr
      iTunes Store Link: https://apps.apple.com/us/app/seven-hearts/id1525657053?uo=4


      Hack Features:
      - Infinite Coins
      - Infinite Mana
      - Instant Deploy (Enable before Battle)
      - God Mode (Tower)
      - Always Win (Quit / Surrender the Game)
      - Always 3 Stars


      iOS Hack Download Link: https://iosgods.com/topic/145909-seven-hearts-cheats-v1280-6-always-win-more/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 341 replies
    • Potion Punch 2 Cheats v2.9.71 +1
      Modded/Hacked App: Potion Punch 2 by Monstronauts Inc.
      Bundle ID: com.monstronauts.potionpunch2
      iTunes Store Link: https://apps.apple.com/us/app/potion-punch-2/id1463550435?uo=4&at=1010lce4


      Hack Features:
      - Infinite Currencies
      - Free iAP (Turn this on and use with Free iAP Tweak)


      iOS Hack Download Link: https://iosgods.com/topic/112395-arm64-potion-punch-2-cheats-v102-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 95 replies
    • Fun Run 3 - Multiplayer Games Cheats v4.48.0 +1
      Modded/Hacked App: Fun Run 3: Arena Running Game By Dirtybit
      Bundle ID: com.dirtybit.fra
      iTunes Store Link: https://itunes.apple.com/us/app/fun-run-3-arena-running-game/id1118878857?mt=8&uo=4&at=1010lce4


      Hack Features:
      - God Mode
       

      Hack Download Link: https://iosgods.com/topic/75790-arm64-fun-run-3-arena-running-game-cheats-v210-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,284 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines