# MySQL/MariaDB/Percona - Race Cond CVE-2016-6663 & Root PrivEsc CVE-2016-6664 PoC Exploits

{% hint style="info" %}
20**2022년 NHN Cloud&#x20;**<mark style="color:red;">**무료**</mark>**&#x20;교육일정** : <https://doc.skill.or.kr/2022-NHN-Cloud-Education>
{% endhint %}

## 제목 : MySQL/MariaDB/Percona - Race Cond CVE-2016-6663 & Root PrivEsc CVE-2016-6664 PoC Exploits

{% hint style="danger" %}
**주의 : 테스트 이외의 목적으로 발생 되는 문제점에 대해서는 프로그램을 사용하는 사용자가 책임을 지셔야 한다는 것을 알려 드립니다.**

**Disclaimer: I am not responsible for any damage done using this tool. This tool should only be used for educational purposes and for penetration testing.**
{% endhint %}

### 내용 :&#x20;

> 공격자는 CVE-2016-6663 취약점을 이용하여 웹 사용자 권한 획득 하고 CVE-2016-6664 취약점exploit 을 통해 root 권한을 획득 하는 방법 입니다.
>
> 해당 취약점은 다양한 버전에서 발생 됩니다.
>
> \--- CVE-2016-6663 ---
>
> MariaDB \[5.5.52 , 10.1.18 , 10.0.28]
>
> MySQL \[5.5.51 , 5.6.32 , 5.7.14]
>
> Percona Server \[5.5.51-38.2 , 5.6.32-78-1 , 5.7.14-8]
>
> Percona XtraDB Cluster \[5.6.32-25.17 , 5.7.14-26.17 , 5.5.41-37.0]
>
> \--- CVE-2016-6664 ---
>
> MySQL \[5.5.51 , 5.6.32 , 5.7.14]
>
> MariaDB \[ All current ]
>
> Percona Server \[5.5.51-38.2 , 5.6.32-78-1 , 5.7.14-8]
>
> Percona XtraDB Cluster \[5.6.32-25.17 , 5.7.14-26.17 , 5.5.41-37.0]
>
> 해결방안으로는 최신버전의 보안 업데이트 수행 하시기 바랍니다.

### &#x20;Description :&#x20;

> MySQL / MariaDB / Percona - PoC/Demo Exploit Video for the following vulns:
>
> * Race Condition (CVE-2016-6663 / CVE-2016-5616)
> * Root Privilege Escalation (CVE-2016-6664 / CVE-2016-5617)
>
> In the video, first, exploitation of CVE-2016-6663 Race Condition vuln is shown on 3 different hosts running MySQL, MariaDB and Percona in their default configuration leading to escalation of privileges to mysql system user (mysql shell).
>
> Finally, the exploitation of CVE-2016-6664 is shown on the last target (running Percona database) - leading to escalation to root account (rootshell)

{% embed url="<https://youtu.be/qlegexI63A4>" %}
시연 영상      &#x20;
{% endembed %}

{% hint style="info" %}
**2022년 NHN Cloud&#x20;**<mark style="color:red;">**무료**</mark>**&#x20;교육일정** : <https://doc.skill.or.kr/2022-NHN-Cloud-Education>
{% endhint %}


---

# 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://sec.skill.or.kr/hacking/exploit-cve-2016-6663-4.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.
