购买一个代码签名证书非常昂贵,而在Windows平台上,驱动签名需要EV代码签名证书才能进行WHQL认证,EV代码签名证书一年就需要几千块。作为个人开发者或者测试驱动需求,购买权威机构的EV代码签名证书是非常不划算的,同时需要公司认证,时间流程都非常麻烦。微软于2019年7月暂停了EV交叉驱动签名证书CA的签发,意味着这之后不能直接使用EV代码签名,需要WHQL认证。但在这之前签发的证书可以直接签署驱动完成认证。网上有一些泄露的EV代码签名证书,可以利用《自建时间戳服务实现伪签驱动证书》的时间戳功能完成伪造签名,让签名时间戳在泄露证书有效期内,实现驱动签名和认证。
Purchasing a code signing certificate is very expensive, and on the Windows platform, driver signing requires an EV code signing certificate for WHQL authentication, which costs several thousand yuan per year. As an individual developer or test driver, purchasing an EV code signing certificate from an authoritative organization is very uneconomical, and requires company certification, which is a very complicated time process. Microsoft suspended the issuance of EV cross drive signing certificate CA in July 2019, which means that EV code signing cannot be directly used after that and WHQL authentication is required. But certificates issued before this can be directly signed to complete authentication. There are some leaked EV code signature certificates online, which can be used to Implement Pseudo Signature Driver Certificates through Self-built Timestamp Services The timestamp function completes the forgery of signatures, allowing the signature timestamp to be within the validity period of the leaked certificate, achieving driver signature and authentication.
本文涉及网络安全实验,阅读本文表示您已经阅读、完全理解并承诺遵守下列条款的全部内容:
This article involves network security experiments. Reading this article means that you have read, fully understood, and committed to complying with all the following terms and conditions:
"Drivers Signning with Self-Sign Fake Timestamp Servers" Disclaimers - English
Welcome to research and conduct the experiment on "Drivers Signning with Self-Sign Fake Timestamp Servers"
Before using this experiment,Please carefully read and agree to the following disclaimer license terms.
Continuing means that you agree to all the terms.If you do not agree with any content of this license term,
Please immediately stop conducting this experiment and delete all content and its derivative data.
- "Experimental Content": This includes the technology (including but not limited to code, files, steps) and its derivative content provided by this website experiment.
- "Violation of laws and regulations": refers to a violation of the relevant laws and regulations mentioned in this agreement and in your country or region, as well as their relevant provisions.
- "Author": The provider of this experimental technology, including the creator of this document, website provider, and other assistance providers.
- "User": The subject who uses the technology provided in this experiment (including but not limited to: code, files, steps) and its derivative content.
- This experiment aims to provide practical learning and technical research on network security technology.
- This experiment is only for individuals or groups to conduct non commercial technological exploration.
- You promise that the principles of this experiment will only be used for experiments and safety technology testing and technical experiments, and will not be used in confidential or important production environments.
- You are not allowed to use it for any activities that violate laws and regulations, including but not limited to criminal behavior, fraud, damage to computer information systems, etc.
- You comply with the Cybersecurity Law of the People's Republic of China and are not allowed to use any technology on this website for illegal or criminal activities.
- You shall comply with Article 286 (1) of the Criminal Law of the People's Republic of China and shall not use any technology on this website to damage the computer information system.
- You shall comply with Article 32 of the Electronic Signature Law of the People's Republic of China and shall not use any technology of this website to forge, impersonate, or embezzle the electronic signature of others
- You shall comply with the laws and regulations of China and other countries and regions where you are located, and shall not use any technology on this website to violate laws and regulations, or cause problems or losses to any other individual or group.
- This experiment is only for technical and safety technical testing purposes and is not responsible for the user's behavior
- The principles of this experiment are published on Github and can be freely accessed and used by anyone. The author is not responsible for the user behavior of the experiment.
- The principle of this experiment may have technical, safety, or other issues, and users are required to bear the risk of use and take necessary safety measures to protect their own and others' interests.
- The author shall not be liable for any direct or indirect losses arising from the use of the principles of this experiment, including but not limited to profit losses, data losses, business interruptions, etc.
- This website reserves the right to interrupt or terminate this service at any time without prior notice to users.
- If you violate any of the above terms, you will fully and independently bear any legal and other responsibilities and consequences that may arise
Please carefully read and understand the above disclaimer terms before using this service.
If you agree and accept the above terms, please continue to use this experiment.
If you have any questions or need further explanation, please contact us.
《自建时间戳服务器实现伪签名驱动证书》免责声明 - 简体中文
欢迎您研究并进行《自建时间戳服务器实现伪签名驱动证书》实验(以下简称“本实验”)。
在使用本实验前请您仔细阅读并同意以下免责许可条款,继续则代表您同意条款全部内容。
若您不同意本许可条款的任何内容,请立即停止进行本实验,并删除所有内容及其衍数据。
“实验内容”:包括本网站实验所提供的技术(包括但不限于代码、文件、步骤)及其衍生内容。
“违反法律法规”:指违反本协议所提及的和您所在国家或地区的相关法律法规,及其相关规定。
“作者”:本实验技术的提供者,包括本文档创建人,网站提供者,以及其他提供帮助的主体等。
“使用者”:使用本实验提供的技术(包括但不限于:代码、文件、步骤)及其衍生内容的主体。
本文件中的关键词“必须”、“不得”、“要求”、“应”、“不应”、“可”、“不可”、“建议”、“旨在”、“仅(供)”和“可选”
应按照RFC2119中的说明进行解释。
本实验旨在提供网络安全技术的实践学习和技术研究。
本实验仅供个人或团体进行非商业性质的技术探索。
您必须承诺本实验的原理仅用于实验和安全技术测试和技术实验,不用于需保密或者重要生产环境。
您不得用于任何违反法律法规的活动,包括但不限于犯罪行为、欺诈、破坏计算机信息系统等。
您必须遵守《中华人民共和国网络安全法》,不得使用本网站任何技术进行违法犯罪活动。
您必须遵守《中华人民共和国刑法》第286条第1款规定,不得使用本网站的任何技术破坏计算机信息系统。
您必须遵守《中华人民共和国电子签名法》第32条,不得使用本网站的任何技术伪造、冒用、盗用他人的电子签名
您必须遵守中国以及其他所在国家和地区的法律法规,不得使用本网站的任何技术违反法律法规,或者给其他任何个人、团体造成问题或者损失。
本实验仅提供技术实验和安全技术测试之用,不对使用者的行为负责
本实验的原理发布在Github上,任何人均可自由获取和使用,作者不对实验的使用者行为负责。
本实验的原理可能存在技术问题、安全问题或其他问题,使用者需自行承担使用风险,并采取必要的安全措施保护自身和他人的利益。
作者对于使用本实验的原理所产生的任何直接或间接损失,包括但不限于利润损失、数据损失、业务中断等,不承担责任。
本网站保留在任何时候中断或终止本服务的权利,而无需提前通知使用者。
您如果违反上述条款的任何内容,您将完全独立承担带来的任何法律以及其他责任和后果。
请您在使用本服务前认真阅读并理解上述免责许可条款。若您同意并接受上述条款,请继续使用本实验。
如有任何疑问或需要进一步解释,请联系我们。
-
下载时间证书信任工具:数字证书安装工具,双击EXE,根据安装流程信任证书文件
-
安装泄露驱动签名证书:我不提供任何证书,你可以去查找(FuckCertVerifyTime)
-
下载驱动代码签名工具:亚洲诚信签名工具,打开软件选择[自定义时间戳]进行签名
-
Download Time Certificate Trust Tool: Digital Certificate Installation Tool
-
Install leaked driver signature certificate: **I do not provide any certificate **(FuckCertVerifiyTime)
-
Download the driver code signing tool: Asia Integrity Signature Tool, open and select [Custom Timestamp] to sign
(一般情况不需要这个操作,你只需参考前一个“简易使用方法”内的教程即可)
1、生成一张时间戳证书(教程XCA自制CA证书并签发时间戳证书),或者在这里申请一张:皮卡丘测试证书在线服务
2、下载自信任时间戳工具,解压并按照您的情况修改config.json
,然后以管理员权限运行:TimeStamping.exe
3、修改hook.ini
中的ServerURL
项为你自建的服务器地址,参考“简易使用方法”里面的教程,正常执行签名即可
(一般情况不需要这个操作,你只需参考前一个“简易使用方法”内的教程即可)
1、生成一张时间戳证书(教程XCA自制CA证书并签发时间戳证书),或者在这里申请一张:皮卡丘测试证书在线服务
2、下载自信任整合包签名,解压并按照您的情况修改config.json
,然后以管理员权限运行:TimeStamping.exe
3、修改hook.ini
中的ServerURL
项为你自建的服务器地址,参考“简易使用方法”里面的教程,正常执行签名即可
inf2cat /v /os:XP_X86,Vista_X86,Vista_X64,7_X86,7_X64,8_X86,8_X64,6_3_X86,6_3_X64,10_X86,10_X64 /driver:.
signtool timestamp /t "http://<ServerHost:Port>/{SHA1|SHA256}/YYYY-MM-DDTHH:mm:ss" <待签名程序>
signtool timestamp /tp 1 /tr "http://test.timer.us.kg/2011-01-01T00:00:00" test.exe
signtool.exe sign /f Cert.pfx /p password /tr "http://test.timer.us.kg/2011-01-01T00:00:00" /as /v test.exe
signtool.exe sign /f Cert.pfx /p password /fd sha256 /tr "http://test.timer.us.kg/2011-01-01T00:00:00" /td sha256 /as /v test.exe
-
适用于: Windows Vista、Windows 7;带安全启动的 Windows 8+ Windows 8、Windows 8.1、Windows 10 版本 1507、1511 以及安全启动 Windows 10 版本 1607、1703、1709 以及安全启动 Windows 10 版本 1803 及安全启动 架构: 仅 64 位,32 位不需要签名 64 位、32 位 64 位、32 位 64 位、32 位 需要签名: 嵌入文件或目录文件 嵌入文件或目录文件 嵌入文件或目录文件 嵌入文件或目录文件 签名算法: SHA2 SHA2 SHA2 SHA2 证书: 代码完整性信任的标准根 代码完整性信任的标准根 Microsoft 根证书颁发机构 2010、Microsoft 根证书颁发机构、Microsoft 根证书颁发机构 Microsoft 根证书颁发机构 2010、Microsoft 根证书颁发机构、Microsoft 根证书颁发机构 -
-
Windows 10 1607 之后UEFI引导模式,并且开启Secure Boot选项:
-
无法开启测试模式,不能通过修改BCD解决,可以使用EFIGuard
-
每次可以开机进入高级模式-选择禁用内核驱动强制签名启动
-
-
Windows 10 1607 之前,Win8/8.1/7/Vista,或者关闭Secure Boot:
-
开启测试模式:
bcdedit /enum all bcdedit /set {default} testsigning on bcdedit /set nointegritychecks on bcdedit /set testsigning on bcdedit /debug ON bcdedit /bootdebug ON
-
也可以每次可以开机进入高级模式-选择禁用内核驱动强制签名启动
-
-
-
-
-
{ "listen_path": "/TSA/", "listen_addr": "localhost", "listen_port": "1003", "server_urls": "http://test.timer.us.kg/", "server_cert": "TSA.crt", "server_keys": "TSA.key", "server_fake": "true", "windows_url": "", "linuxos_url": "", "signers_url": "", "githubs_url": "https://github.com/PIKACHUIM/FakeSign", "article_url": "https://code.52pika.cn/index.php/archives/277/", "service_url": "https://test.certs.us.kg/" }
-
git clone https://github.com/PIKACHUIM/FakeSign.git
-
编辑:
TimeTool/Develop/TimeStamping/Program.cs
如果要使用伪造服务器,则此处填写
true
,如果要使用真实时间,应当填写false
static readonly string supportFake = @"true";
-
输出:
TimeTool/Develop/TimeStamping/bin/Debug
- 创建一个CA和时间戳证书,参考XCA自制CA证书并签发时间戳证书
- 放置证书文件到当前的运行目录内,需要参考下面的文件说明:
- TSA.crt 证书Base64编码
- TSA.key 密钥Base64编码
- 双击:
TimeStamping.exe
即可运行
sudo dpkg --add-architecture i386
sudo apt-get install wine mono-complete winetricks wine32 winbind
-
sudo winetricks dotnet45
-
-
wine uninstaller wine64 uninstaller
安装上一步下载的MSI文件(wine-mono-7.4.0-x86.msi)
-
创建一个CA和时间戳证书,参考XCA自制CA证书并签发时间戳证书
放置证书文件到当前的运行目录内,需要参考下面的文件说明:
- TSA.crt 证书Base64编码
- TSA.key 密钥Base64编码
wine TimeStamping.exe
-
[TimeStamp] TimeStamp=2015-01-01T00:00:00 ServerURL=http://localhost:1003/TSA/
-
git clone https://github.com/PIKACHUIM/FakeSign.git
-
编辑:
SignTool/Hooktool/main.cpp
,取消注释下列行:将里面的
http://*********/fake/RSA/
修改为http://你的地址:端口/路径
wcscat(buf, L"http://*********/fake/RSA/");
-
输出:
SignTool/Hooktool/bin/Debug
[1] 时间戳签名库以及本地Demo服务器,可以倒填时间制造有效签名,JemmyloveJenny,吾爱破解,https://www.52pojie.cn/thread-908684-1-1.html
[2] 亚洲诚信数字签名工具修改版 自定义时间戳 驱动签名,JemmyloveJenny,吾爱破解,https://www.52pojie.cn/thread-1027420-1-1.html
[3] 关于Windows驱动签名认证的大致总结,ANY_LNK,BiliBili,https://www.bilibili.com/read/cv17812616
[4] 数字证书伪造与利用(仅方便用于驱动开发人员的调试,不得非法使用),MIAIONE,BiliBili,https://www.bilibili.com/read/cv9802857/