Angry Birds Classic Series: Game Assets (*.LUA, *.JSON, *.ZIP)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Angry Birds Classic LUA (Android)

Post by aluigi »

Use the -d or -D option
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Angry Birds Classic LUA (Android)

Post by LolHacksRule »

Ok. asset_groups_decrypt.lua decrypts as LZMA'ed 7z, but cannot be extracted, but if I decrypt with OpenSSL and remove the first 9 unique header bytes it extracts fine... Also after using -d, I'm finding folders called XXX.lua having the lua. -D worked for me when targeting the scripts directory. Also some LUAs are empty...
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Angry Birds Classic LUA (Android)

Post by aluigi »

Can you upload asset_groups.lua and those encrypted lua files that extract as empty?
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Angry Birds Classic LUA (Android)

Post by LolHacksRule »

http://www.filedropper.com/birdbaseclassdecrypt. Here's one of them... I decrypted them with OpenSSL to get their LUA's successfully extracted.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Angry Birds Classic LUA (Android)

Post by aluigi »

Can you upload asset_groups.lua and those encrypted lua files that extract as empty?
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Angry Birds Classic LUA (Android)

Post by LolHacksRule »

Here they are.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Angry Birds Classic LUA (Android)

Post by aluigi »

If you continue to upload the empty decrypted files I can help in no way.
I need the original files.
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Angry Birds Classic LUA (Android)

Post by LolHacksRule »

Sorry about that, here's the actual files. Also some files have extra bytes in them after using the script.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Angry Birds Classic LUA (Android)

Post by aluigi »

Script 0.1.2.
The decryption required the "CipherFinal" prefix.
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Angry Birds Classic LUA (Android)

Post by LolHacksRule »

Missed bytes for Powerup_ExtraBird.lua. It extracted fine with the script but with it, it gives 40B of data, without it, it gives 56kb of data, also that issue prevents unluac from decompiling it. http://www.filedropper.com/powerupextrabird. This also affects other files... Also how to compile with similar file size? Doing no modifications and compiling gives a bigger file.
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Angry Birds Classic LUA (Android)

Post by LolHacksRule »

Anything?
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Angry Birds Classic LUA (Android)

Post by LolHacksRule »

options.lua isn't a LZMA headered archive after decrypting, its a plain 7z.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Angry Birds Classic LUA (Android)

Post by aluigi »

upload it because your last link is no longer available.
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Angry Birds Classic LUA (Android)

Post by LolHacksRule »

http://www.filedropper.com/options_1 and old versions (like computer) output 7z'ed files having the LUAs after decryption.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Angry Birds Classic LUA (Android)

Post by aluigi »

Well done, script updated to version 0.1.3
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Angry Birds Classic LUA (Android)

Post by LolHacksRule »

I have the key for ABSW2's assets, I ripped it right from the game's memory on PC v1.5.1 since they kept encryption the same, should that be added in?

Str = B0pm3TAlzkN9ghzoe2NizEllPdN0hQni
Hex = 4230706D3354416C7A6B4E3967687A6F65324E697A456C6C50644E3068516E69
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Angry Birds Classic LUA (Android)

Post by aluigi »

Good. Added.
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Angry Birds Classic LUA (Android)

Post by LolHacksRule »

Angry Birds Stella asset key, I found it by doing the old way to pull encryption keys via GDB on the Android release. Should this be added?

Str = 4FzZOae60yAmxTClzdgfcr4BAbPIgj7X
Hex = 34467A5A4F6165363079416D7854436C7A6467666372344241625049676A3758


Oh and finally, Angry Birds Friends' asset key, this won't work on CDN-sided assets or the Flash version of the game's assets.

Str = EJRbcWh81YG4YzjfLAPMssAnnzxQaDn1
Hex = 454A52626357683831594734597A6A664C41504D7373416E6E7A785161446E31
Last edited by LolHacksRule on Thu Mar 28, 2019 8:10 pm, edited 1 time in total.
mlgmxyysd
Posts: 3
Joined: Wed Mar 20, 2019 12:04 am

Re: Angry Birds Classic LUA (Android)

Post by mlgmxyysd »

Since updated(8.0.1), old key not work.
I tried to use openssl to decrypt and got a message:

Code: Select all

C:\Users\Administrator>openssl enc -aes-256-cbc -d -K 55534361505170413454534E56784D49317639534B39554330795A75416E6232 -iv 0 -in F:\Repository\Downloads\lua\Level766.lua -out F:\Repository\Downloads\lua\Level766.lua.dec
hex string is too short, padding with zero bytes to length

Can anyone teach me use gdb on Android?
IDA is difficult for me. :shock:
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Angry Birds Classic LUA (Android)

Post by LolHacksRule »

ABClassic or other game? You have to make the game's APK debuggable, clone the APK decompiled on your computer, fake Android.mk, connect your device to your computer, call NDK-GDB (from Android SDK), use breakpoints on application functions that call for loading LUA files, load a level, you should hit the breakpoint, do x/4x and x/s on the given addresses and one should give you the encryption key. The current key works fine for me, I'll try that file (and script entirely) and see if there's a problem... UPDATE: That file works fine for decryption (just delete the 9 header bytes) and open as an archive, try updating OpenSSL or use the BMS script. You can decompile with "java -jar unluac.jar level766.lua > level766_decomp.lua".
Last edited by LolHacksRule on Mon Apr 01, 2019 10:41 pm, edited 1 time in total.