Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2013-3900 PoC — WinVerifyTrust Signature Validation Vulnerability

Source
Associated Vulnerability
Title:WinVerifyTrust Signature Validation Vulnerability (CVE-2013-3900)
Description:Why is Microsoft republishing a CVE from 2013? We are republishing CVE-2013-3900 in the Security Update Guide to update the Security Updates table and to inform customers that the EnableCertPaddingCheck is available in all currently supported versions of Windows 10 and Windows 11. While the format is different from the original CVE published in 2013, except for clarifications about how to configure the EnableCertPaddingCheck registry value, the information herein remains unchanged from the original text published on December 10, 2013, Microsoft does not plan to enforce the stricter verification behavior as a default functionality on supported releases of Microsoft Windows. This behavior remains available as an opt-in feature via reg key setting, and is available on supported editions of Windows released since December 10, 2013. This includes all currently supported versions of Windows 10 and Windows 11. The supporting code for this reg key was incorporated at the time of release for Windows 10 and Windows 11, so no security update is required; however, the reg key must be set. See the Security Updates table for the list of affected software. Vulnerability Description A remote code execution vulnerability exists in the way that the WinVerifyTrust function handles Windows Authenticode signature verification for portable executable (PE) files. An anonymous attacker could exploit the vulnerability by modifying an existing signed executable file to leverage unverified portions of the file in such a way as to add malicious code to the file without invalidating the signature. An attacker who successfully exploited this vulnerability could take complete control of an affected system. An attacker could then install programs; view, change, or delete data; or create new accounts with full user rights. If a user is logged on with administrative user rights, an attacker who successfully exploited this vulnerability could take complete control of an affected system. An attacker could then install programs; view, change, or delete data; or create new accounts with full user rights. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights. Exploitation of this vulnerability requires that a user or application run or install a specially crafted, signed PE file. An attacker could modify an... See more at https://msrc.microsoft.com/update-guide/vulnerability/CVE-2013-3900
Description
CVE PoC 
Readme
# CVE-2013-3900-PowerShell-PoC
This PoC is provided for educational and research purposes only. 
The author takes no responsibility for misuse or damage caused by this code.



This PowerShell script is a testing tool for simulating the attack described in CVE-2013-3900.
CVE-2013-3900 concerns the Authenticode mechanism in Windows, in which the PE signature (EXE/DLL files) may contain additional data (padding) in the certificate section. In older or default Windows settings, such a modification does not invalidate the signature, allowing malicious code to be added to the file while retaining its “signed” status.
By enabling EnableCertPaddingCheck=1 in the registry, the system begins to treat additional padding as a violation of integrity, rejecting such a file.

Script:
 - Opens the selected signed EXE file.
 - Adds artificial padding to the certificate section.
 - Saves a modified copy of the file.
 - Checks the signature of the original and the copy.
 - Calls the WinVerifyTrust API to see if the system (with the current settings) will accept or reject the modified file.

If protection is enabled, the modified file will be rejected (0x800B0100); if disabled, it will be accepted (0x00000000).

I use MSBuild.exe because it is a Windows system file with an embedded Authenticode signature (not a catalog signature), which allows us to directly modify its certificate section and reliably simulate the CVE-2013-3900 vulnerability.
This makes the test repeatable and works on any Windows Server installation without the need to download additional files.

To run script:
```CMD
CMD C:\>powershell -ExecutionPolicy Bypass -File C:\CVE-2013-3900-PoC-padding-injection.ps1
```

Links:
https://msrc.microsoft.com/update-guide/vulnerability/CVE-2013-3900
File Snapshot

[4.0K] /data/pocs/4a49531f2c913ddfd0a777674daa859e13a47938 ├── [5.1K] CVE-2013-3900-PoC-padding-injection.ps1 ├── [1.2K] LICENSE ├── [1.7K] README.md └── [ 257] remediation-64bit-win.reg 0 directories, 4 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →