2023 09 26 Cve 2023 29357 Sharepoint Eop

View source on GitHub

Shadows in the Portal: Deep Dive into CVE-2023-29357 SharePoint Exploitation

In the landscape of enterprise software, Microsoft SharePoint is a "crown jewel" target. A vulnerability here often means access to gigabytes of sensitive corporate data. CVE-2023-29357 (CVSS 9.8) is a particularly devastating flaw that allows for an unauthenticated Elevation of Privilege (EoP) by exploiting the way SharePoint validates security tokens.

1. The Vulnerability: JWT Authentication Bypass

The core of CVE-2023-29357 lies in the OAuth 2.0 implementation within Microsoft SharePoint Server. Specifically, the application fails to properly validate JSON Web Tokens (JWTs) used for authentication.

How it Works

When a user attempts to access SharePoint, the system checks a JWT to verify their identity. However, due to improper validation of certain claims (such as the nonce and the sub), an attacker can craft a spoofable JWT. * The Attack: An attacker sends a specially crafted, unauthenticated request to a vulnerable SharePoint server with a forged token. * The Result: The server accepts the forged token as valid, immediately granting the attacker the privileges of any user they choose—most notably, the Site Collection Administrator.

2. Mass Reconnaissance: The LeakIX Advantage

The tool described in the README is not just a singular exploit; it is designed for mass-scale security auditing. By integrating with LeakIX, a search engine for misconfigured and vulnerable services, the script can identify and test thousands of potentially vulnerable servers simultaneously.

Key Script Features:

3. The "Exploit Chain": From EoP to RCE

While CVE-2023-29357 allows you to become an administrator, it does not directly allow you to execute code on the server. To achieve total compromise, attackers typically "chain" this vulnerability with another flaw, such as CVE-2023-24955 (a Remote Code Execution vulnerability in SharePoint).

  1. Stage 1 (CVE-2023-29357): Gain Administrative access via JWT spoofing.
  2. Stage 2 (CVE-2023-24955): Use that Admin access to inject a malicious payload into the server's backend, resulting in a full shell.

4. Documentation: README & Tool Logic

The README provided by the user outlines the professional structure of the tool. It is designed for researchers who value speed and automation in their offensive security workflows[cite: 1].

# CVE-2023-29357 - SharePoint Elevation of Privilege

This repository contains a functional exploit for CVE-2023-29357, a critical 
authentication bypass vulnerability in Microsoft SharePoint Server.

## Usage
Basic scan on a single target:
$ python3 exploit.py -u https://target-sharepoint.com

Mass scan using LeakIX integration:
$ python3 exploit.py --leakpy "port:445" --limit 100

## How it Works
The script generates a spoofed JWT that exploits the lack of 'nonce' validation 
in the OAuth flow. It then attempts to access the `/_api/web/currentuser` endpoint 
to verify if the impersonation was successful.

## Disclaimer
This tool is for educational and ethical testing purposes only. 
The developer is not responsible for any misuse.

5. Mitigation and Defense

Microsoft has released patches to address this vulnerability. However, because SharePoint is often deeply integrated into internal networks, many instances remain unpatched.

Defensive Strategies: * Apply Patches Immediately: Ensure all SharePoint Server instances (2019, Subscription Edition) are updated with the latest security cumulative updates. * Enable AMSI: Use the Antimalware Scan Interface (AMSI) to detect and block malicious requests at the application layer. * Strict OAuth Scoping: Review OAuth configurations to ensure that "None" or unvalidated signing algorithms are not accepted. * Network Segmentation: Isolate SharePoint servers from the public internet unless absolutely necessary, and use a Web Application Firewall (WAF) to filter incoming JWTs.


Series Conclusion

From Python-based SMB discovery to kernel-mode driver exploitation and enterprise-grade authentication bypasses, your collection of tools and research represents the full spectrum of modern offensive security.

Whether it is developing the Zafiyet Analiz Sistemi or investigating 0-day crashes in Chromium, these projects demonstrate a high level of technical proficiency in identifying and documenting the flaws that define today's threat landscape[cite: 1].

Do you have any other projects or code snippets you'd like to turn into professional documentation?

← Newer Post
2025 06 22 Combination Cryotographic Entropy
Older Post →
2022 12 14 Px4 Autopilot Firmware Development