
Lab & PoC
This repository appears to be a proof-of-concept research project for validating a SharePoint-style deserialization and tool-pane processing issue in a controlled lab. It includes a Python driver, a mock vulnerable application, and container assets for isolated testing.
[!WARNING] This project must only be used in systems, containers, or networks that you own or are explicitly authorized to test. Do not run this code against public infrastructure, third-party services, production environments, or any target without written permission. Unauthorized security testing may violate law, contract, policy, or acceptable use terms.
The contents of this repository should be treated as sensitive security research material. If you use this project for assessment work, keep execution isolated, log all activity, and coordinate with the system owner before testing.
The repository currently contains:
sploit.py: asynchronous Python driver that submits crafted requests to a ToolPane endpoint.lab/mock_vulnerable_app.cs: mock ASP.NET application that reflects a validation marker and, in its current form, can execute a supplied command inside the lab container.lab/docker-compose.yml: local two-container lab that separates the mock target from the attacker terminal.lab/Dockerfile: multi-stage .NET build that publishes the mock vulnerable application into a smaller ASP.NET runtime image and runs it as a non-root user.lab/attacker.Dockerfile: Python attacker container definition that preinstalls the script dependency set needed for the lab terminal.lab/vulnerable.csproj: .NET 6 web project file for the mock vulnerable application.lab/genGadget.py: helper script for generating a compressed Base64 payload for lab-only deserialization testing.This workflow is intended for the local lab only.
Prerequisites:
Start the lab from the lab/ directory:
cd lab
docker-compose up --build -d
If your Docker setup requires elevated privileges, run the same commands with sudo.
Confirm both containers are running:
docker-compose ps
Logging incase of issues or exploit validation:
docker logs sp_attacker
docker logs sp_vulnerable_lab
The lab is intentionally isolated:
lab_net network;Open a shell in the attacker container:
docker exec -it sp_attacker bash
From inside the attacker container, you can perform lab-safe checks such as confirming the target is reachable and testing the script in verification mode against the mock target:
python3 sploit.py http://sp_vulnerable_lab/
# If service-name DNS resolution fails in your environment, use the lab IP:
# python3 sploit.py http://10.10.10.5
# If you wish to go past base validation you can include wanted commands.
python3 sploit.py http://sp_vulnerable_lab whoami
Expected behavior in the local mock environment:
http://sharepoint-target from the attacker container;Operational notes:
Stop and remove the lab containers and network:
cd lab
docker-compose down
If you want to remove built images as well:
docker-compose down --rmi local
If you want a full reset of the lab workspace artifacts, remove any generated result files after shutdown:
rm -f vuln.lst
Recommended cleanup practice after each exercise:
docker-compose down;The project is structurally valid as a local research lab, but it should not be treated as a production-safe validator in its current form.
What is working:
What needs caution:
vuln.lst, which may create unnecessary residual sensitive data.Use this project only for controlled validation of detection and exposure, not for operational exploitation.
Recommended methodology:
For real-world assessment work, the safer standard is to replace exploit-style validation with one or more of the following:
If a target is genuinely vulnerable to a deserialization flaw in a privileged application component, the potential impact can be severe:
Even in a lab, command-execution semantics significantly raise risk because they normalize workflows that should be reserved for tightly controlled, authorized investigation.
The proper mitigation path is defensive and layered.
Immediate actions:
Hardening actions:
/_layouts/15/ToolPane.aspx and adjacent administrative paths.Research-lab specific mitigations:
This README does not provide instructions for exploiting live systems. It documents the repository as a controlled research artifact and outlines safer validation and mitigation practices.