Cracking my friend's paid minecraft java plugin - It was fun and learned how to crack java.(java byte-code RE)
i lowkey was looking for something to crack and publish to my website, twitter cause its been like 3 day’s and still didnt do anything and struggling to write my diaries. that when my friend Yanel dmed me a challange. as he recently been working on a minecraft java plugin that clones hypixel skins and stuff like that. and he using like a premium/free switch like if you bought a license key you get to use the premium if not it auto uses the free code. also he heavly obfuscated the code to make it harder to crack. [it wasn’t :(] so let’s start how i cracked it !
Tool’s I Used
Server Launcher, Recaf, Bytecode-viewer.
0x0D - Getting to know Java RE
so i have never touched java before as i usually just crack programs, dlls, scripts. so i had to do ALOTTTTTT of research of how things works and class’s, byte-code call’s, and editors also how to debug it.
it took me an entire day testing random stuff until i got used to recaf basics like viewing the byte-code and modifying [i tried to modify raw code at the start HHHHHHHHHHHHHHHH]. i want to include this cause i see it as a funny thing after cracking it now.
0x01 - Understanding The Plugin Logic
i started by setting up the nogui server using a paper.java i found online which allows you to start a local server in order to test the plugin and see whats printed and …ect.
so with using a key i got along side with the java file it self when u use it inside of `config.yml’ and inside of the :
# Premium license. This build only runs with a valid key: paste the key you purchased below and
# restart. Leave it empty or use an invalid/expired key and the plugin disables itself on startup.
# If you don't have a key, use the free BedlamCore instead.
license-key: "License-Here"
so i noticed when you set a key it print something “Enabling Premium” and then “BedLMPremium Enabled” which allows you to use the premium features so the key checking must happen in between the Enabling and Enabled Strings.
so i opnened the BedLmPremium.jar inside of recaf and i searched for the BedLMPremium Enabled [i did it manual at the time… cause i was a noob in recaf.] and i found it inside the main Class that was inside Dev -> yanel -> bedlmcore

so JUST right after opening it we hit the jackpot…
Because first in the import i see the
private fd license;secondly i see the onEnable with license mentioned… you can’t imagine how happy i was.
so i red it and it was pretty easy and straight forward to understand.

you can already figure it out. it sets the license as a private so you can’t modify it. and it gets called in the onEnable. as it creates new instance and set it to the license after that call’s the d() function that’s inside the fd class [mostly the license check function] and if that value comes back True, it enables the premium plugin. if its false it calls the disablePlugin function that uses the free plugin version.
now we know where everything is and how the logic is working so let’s idrectly jump to the d() function and see how it looks like.
0x02 - THE OBFUSCATION HELL FIRE
upon opening this hell am praying god to take me back into cracking offline games LIKE WTH IS THIS

it literally took 2 hours just staring at the screen trying to understand wtf is this. it ruined my mental state i was almost about to quit. that’s when i figured the bytecode-viewer which makes it EASIERRRRRRRRRRRRRR to read this entire bullshit code. i did that and read the d() function and i figured that u can just remove the entire A: section because of the return last line since the start is just the logic it self bullshi :

And this is the end of it that allows us to skip reading shi.

0x03 - The Actual Patch
so we literally patch it with pushing True onto the stack. Then return its value so it always comesback as True for the onEnable. and thats what i cooked “an added some fancy things cause i enjoyed my self more than usual”.
anyways we delete the entire A: Section and we just put
ICONST_1 // Pushes `true` (1) onto the stack
IRETURN // Returns the `true` value so it always enables premium
and yea believe it or not that’s all now just export it as a java script and enjoy the Premium for free ?

and let’s run the server and test the new patched java plugin BedLamPremium-Cracked.jar
so we put it in plugins. delete all files so if you used any key its clear now.
and run it by
java -jar paper-26.2-121.jar --nogui
and just like that its enabled without any error’s nor key check bullshi. AND EVEN THE CUSTOM STRING WORKED !.

also zelda is threatening me she’s an AI trying to take me down… [it’s a joke]. best human alive “didicas”
also i hope you support Yanel my friend the owner of the script. as i got the permission to share this research from him and he fixed, patched this in the new coming release and yes i wont the challenge. this is his github !