Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Challenge] iKinky Minecraft Client [Challenge]
#3
Replace -> "CFacelinesideUsers/xx/Desktop/CrackTheMinecraftClient/output.zip" with the place you want the output to be.

When the crack has been run, drag the META-INF onto the zip file, then rename to jar and run.
Link :
http://www.filedropper.com/meta-inf
Simply extract it and then drag and drop. EZPZ.

Code:
package main;

import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.*;

import java.io.FileOutputStream;
import java.io.IOException;
import java.util.*;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.JarOutputStream;
import java.util.zip.ZipEntry;


/**
* Created by Barr on 11-Oct-14.
* Thanks to Konloch for general help and his save method.
*/
public class Crack {

    //We need to get all the classes into a hashMap, lets do it.
    private static HashMap<String, ClassNode> classes = new HashMap<String, ClassNode>();
    private static final String superDooperHackCrack = " ";
    private static ArrayList<ClassNode> classNodes = null;

    public static void main(String[] args) throws IOException {
        System.out.println("MAKE SURE THE ONLY JAR FILE IN THE DIR IS THE CLIENT AND THE KINKYLAUNCHER");
        try {
            JarFile file = new JarFile("KinkyLauncher.jar");
            getShitTogether(file);
            new Crack(classes.values(), true);
            classNodes = new ArrayList<ClassNode>(classes.values());
            saveAsJar(classNodes, "C:/Users/xx/Desktop/CrackTheMinecraftClient/output.zip");

            //Crack the inner client, this one is protected.
            JarFile file1 = new JarFile("client.jar");
            getShitTogether(file1);
            new Crack(classes.values(), false);
            classNodes = new ArrayList<ClassNode>(classes.values());
            saveAsJar(classNodes, "C:/Users/Nenad/Desktop/CrackTheMinecraftClient/innerClient.zip");


        } catch (IOException e) {
            System.out.println("File not there");
            e.printStackTrace();
        }




    }


    public Crack(Collection<ClassNode> classNodes, boolean which) throws IOException {
        if (which){
            for (ClassNode classNode : classNodes) {
                if (classNode.superName.equals("java/lang/Object")) {
                    for (MethodNode methodNode : classNode.methods) {
                        if (methodNode.name.equals("login") && methodNode.desc.equals("()Z")) {
                            ListIterator<AbstractInsnNode> ainIt = methodNode.instructions.iterator();
                            while (ainIt.hasNext()) {
                                AbstractInsnNode ain = ainIt.next();
                                if (ain instanceof LdcInsnNode) {
                                    LdcInsnNode node = (LdcInsnNode) ain;
                                    if (node.cst.equals("ye")) {
                                        InsnList in = new InsnList();
                                        in.add(new LdcInsnNode(superDooperHackCrack));
                                        methodNode.instructions.set(node, new LdcInsnNode(superDooperHackCrack));

                                    }
                                }
                            }
                        }
                    }
                }

                if (classNode.superName.equals("javafx/application/Application")) {
                    if (classNode.name.equals("org/ikinky/marcus/KinkyLauncher2")) {
                        for (MethodNode methodNode : classNode.methods) {
                            if (methodNode.name.equals("login")) {
                                ListIterator<AbstractInsnNode> ainIt = methodNode.instructions.iterator();

                                while (ainIt.hasNext()) {
                                    AbstractInsnNode ain = ainIt.next();
                                    if (ain.getNext() == null) {
                                        ain = ain.getPrevious();
                                        if (ain.getOpcode() == Opcodes.ICONST_0) {
                                            methodNode.instructions.set(ain, new InsnNode(Opcodes.ICONST_1));
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        if (!which){
            for (ClassNode classNode : classNodes){
                int Z = 0;
                if (classNode.superName.equals("java/lang/Object")){
                    for (FieldNode fieldNode : classNode.fields){
                        if (fieldNode.desc.equals("Z")){
                            Z++;
                        }
                    }
                }
//cracks the inner client, now all I have to do is load it.
                if (Z == 2){
                   for (MethodNode methodNode : classNode.methods){
                       if (methodNode.access == 0x000a){
                           if (methodNode.desc.equals("(Ljava/lang/String;Ljava/lang/String;)Z")){
                                ListIterator<AbstractInsnNode> ainIt = methodNode.instructions.iterator();

                                while (ainIt.hasNext()){
                                    AbstractInsnNode ain = ainIt.next();
                                    if (ain.getNext() == null){
                                        ain = ain.getPrevious();
                                        if (ain.getOpcode() == Opcodes.ICONST_0){
                                            methodNode.instructions.set(ain, new InsnNode(Opcodes.ICONST_1));
                                        }
                                    }
                                }
                           }
                       }
                   }
                }
            }
        }

    }


    /*

    Thank you Konloch
    the.bytecode.club

    */


    public static void saveAsJar(ArrayList<ClassNode> nodeList, String path) {
        try {
            JarOutputStream out = new JarOutputStream(new FileOutputStream(path));
            for (ClassNode cn : nodeList) {
                ClassWriter cw = new ClassWriter(0);
                cn.accept(cw);
                System.out.println("Adding -> " + cn.name);
                out.putNextEntry(new ZipEntry(cn.name + ".class"));
                out.write(cw.toByteArray());
                out.closeEntry();
            }

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
        System.out.println("Done.");
    }

    public static void getShitTogether(JarFile file) {
        try {
            Enumeration<?> enumeration = file.entries();

            while (enumeration.hasMoreElements()) {
                JarEntry entry = (JarEntry) enumeration.nextElement();
                if (entry.getName().endsWith(".class")) {
                    ClassReader cr = new ClassReader(file.getInputStream(entry));
                    ClassNode cl = new ClassNode();
                    cr.accept(cl, cr.SKIP_DEBUG | cr.SKIP_FRAMES);
                    classes.put(cl.name, cl);
                }
            }
            file.close();
        } catch (Exception shit) {
            shit.printStackTrace();
        }
    }
}

This cracks the launcher to take any username/password, it also cracks the inner client used to actually cheat in Minecraft. Loader to actually load the cracked material is probably not coming.
Reply
 


Messages In This Thread
RE: [Challenge] iKinky Minecraft Client [Challenge] - by Barr - 10-11-2014, 10:08 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)

About The Bytecode Club

We're a community forum focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.

Website