Exploit database

GH-79770e1e6d1487d91a4fd8d8426c19f8

ingenuity-fainting-goats/cve-2017-7525-jackson-deserialization-lab

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2017-7525

9 sources

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

Repository files1

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

src/main/java/com/deserialization/lab/route/RouteBuilderImpl.java

Java · 1,432 bytes
package com.deserialization.lab.route;

import com.deserialization.lab.processor.DefaultPostProcessor;
import com.deserialization.lab.processor.PayloadGetBytesProcessor;
import com.deserialization.lab.processor.PayloadGetProcessor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.model.dataformat.JsonLibrary;
import org.apache.camel.model.rest.RestBindingMode;

public class RouteBuilderImpl extends RouteBuilder
{
    @Override
    public void configure() throws Exception
    {
        restConfiguration().component("spark-rest").scheme("http").host("localhost").port(9091).bindingMode(RestBindingMode.auto);

        rest("/api/")
                .get("message").to("direct:getMessage")
                .get("messagebytes").to("direct:getMessageBytes")
                .post("message").to("direct:createMessage");

        from("direct:getMessage")
                .process(new PayloadGetProcessor())
                //.marshal().json(JsonLibrary.Gson)
                .log("getMessage body: ${body}");

        from("direct:getMessageBytes")
                .process(new PayloadGetBytesProcessor())
                //.marshal().json(JsonLibrary.Gson)
                .log("getMessage body: ${body}");


        from("direct:createMessage")
                .process(new DefaultPostProcessor())
                //.marshal().json(JsonLibrary.Gson)
                .log("crateMessage body: ${body}");
    }
}