-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
SharePoint Unauth RCE Exploit Chain (CVE-2023-29357 & CVE-2023-24955) #18721
SharePoint Unauth RCE Exploit Chain (CVE-2023-29357 & CVE-2023-24955) #18721
Conversation
documentation/modules/exploit/windows/http/sharepoint_dynamic_proxy_generator_unauth_rce.md
Outdated
Show resolved
Hide resolved
modules/exploits/windows/http/sharepoint_dynamic_proxy_generator_auth_bypass_rce.rb
Outdated
Show resolved
Hide resolved
modules/exploits/windows/http/sharepoint_dynamic_proxy_generator_auth_bypass_rce.rb
Outdated
Show resolved
Hide resolved
modules/exploits/windows/http/sharepoint_dynamic_proxy_generator_auth_bypass_rce.rb
Outdated
Show resolved
Hide resolved
modules/exploits/windows/http/sharepoint_dynamic_proxy_generator_auth_bypass_rce.rb
Show resolved
Hide resolved
modules/exploits/windows/http/sharepoint_dynamic_proxy_generator_auth_bypass_rce.rb
Outdated
Show resolved
Hide resolved
modules/exploits/windows/http/sharepoint_dynamic_proxy_generator_auth_bypass_rce.rb
Outdated
Show resolved
Hide resolved
modules/exploits/windows/http/sharepoint_dynamic_proxy_generator_auth_bypass_rce.rb
Show resolved
Hide resolved
modules/exploits/windows/http/sharepoint_dynamic_proxy_generator_auth_bypass_rce.rb
Outdated
Show resolved
Hide resolved
modules/exploits/windows/http/sharepoint_dynamic_proxy_generator_auth_bypass_rce.rb
Outdated
Show resolved
Hide resolved
Co-authored-by: Julien Voisin <[email protected]>
Co-authored-by: Julien Voisin <[email protected]>
Thanks @jvoisin, I really appreciate the detailed review. My apologies this one was a little more rough around the edges when originally PR'd it. I'm going to put it back in draft for now, there are a couple changes I still need to make. |
I was able to get the installer to work, but it looks likee there are still some issues. Any chance you might now where I went wrong?
|
With httptrace set:
|
OK...... I am bad and I should feel bad.
|
|
e58c6b9
Release NotesThis PR adds a module that allows unauthenticated remote code execution as |
This module exploits two vulnerabilities in Sharepoint 2019, an auth bypass CVE-2023-29357 which was patched
in June of 2023 and CVE-2023-24955, an RCE which was patched in May of 2023.
The auth bypass allows attackers to impersonate the Sharepoint Admin user. This vulnerability stems from the
signature validation check used to verify JSON Web Tokens (JWTs) used for OAuth authentication. If the signing
algorithm of the user-provided JWT is set to none, SharePoint skips the signature validation step due to a logic
flaw in the ReadTokenCore() method.
After impersonating the administrator user, the attacker has access to the Sharepoint API and is able to
exploit CVE-2023-24955. This authenticated RCE vulnerability leverages the impersonated privileged account to
replace the "/BusinessDataMetadataCatalog/BDCMetadata.bdcm" file in the webroot directory with a payload. The
payload is then compiled and executed by Sharepoint allowing attackers to remotely execute commands via the API.
Currently the check method exploits the Auth Bypass vulnerability and reports
CheckCode::Vulnerable
if successful. This means that AutoCheck cannot be set to false as the exploit method uses data gathered while running the check method.Verification
List the steps needed to make sure this thing works
use sharepoint_dynamic_proxy_generator_auth_bypass_rce
RHOST
,LHOST
, andHOSTNAME
options