查看“时间炸弹”的源代码
←
时间炸弹
跳转到导航
跳转到搜索
因为以下原因,你没有权限 编辑此页:
你请求的操作仅限属于此用户组的用户执行:
用户
你可以查看和复制此页面的源代码。
时间炸弹(或定时炸弹)是一种软件机制,在达到设定的时间段后使计算机程序无法使用。它常见于预发布软件中,用于阻止用户保留过时的测试版本。 == Windows == === Windows 9x === [[File:Win95-216-Timebomb.png|thumb|在 [[Windows 95 Build 216]] 中触发时间炸弹后出错]] 时间炸弹通过 {{code|IO.SYS}} 激活。触发时间炸弹后,Windows 将在启动时显示一条消息,指出预评估期已过期,然后立即关闭。除非使用正确的 BIOS 日期重新安装操作系统,否则操作系统将无法启动,因为 {{code|IO.SYS}} 会自行修补以进入无限循环。与 Windows NT 中的时间炸弹不同,Windows 9x 无法通过 [[winver|{{code|winver}}]] 找到到期日期。[[Windows 95 Build 216]] 是首个包含时间炸弹的已知版本。 从 [[Windows 98]] 开始,[[Windows 安装程序|安装程序]]还会检查日期,如果日期设置不正确,安装程序将拒绝安装。 === Windows NT === [[文件:NTexpiredcrash.png|thumb|Windows 显示 {{code|END_OF_NT_EVALUATION_PERIOD}} [[错误检查]]]] [[文件:Windows-10-build-10074-Timebomb-expired.png|thumb|在 [[Windows 10 Build 10074.0.fbl_impressive.150424-1350|Windows 10 Build 10074]] 中触发时间炸弹后出现错误]] 一旦触发了时间炸弹,就会显示 {{code|END_OF_NT_EVALUATION_PERIOD}} [[错误检查]],在经过一段时间后重启系统。用于实现时间炸弹的代码最早出现在 [[Windows NT 4.0 Build 1166.1|Windows NT 4.0 Build 1166]] 中,此版本用于最终发布的评估版。首个包括现代时间炸弹的版本是 [[Windows 2000 Build 1627.1]],不过 [[Windows NT 3.5]] 的[[Windows NT 3.5 Build 756.1#日语版本|日语]]和[[Windows NT 3.5 Build 807.1(朝鲜语 Beta)|朝鲜语]]预发行版本里,会弹出一个提示框,提醒用户在某个日期之后安装 Windows 的零售版本,这和当时其他版本不同。 在 [[Windows XP]] 测试版本中,尝试登录用户账户会导致出现过期提示。关闭提示会立即导致系统崩溃。然而,在开发重置前的 [[Windows Longhorn]] 版本中,当在过期日期之后尝试登录时,系统会退出用户登录并返回到登录界面。在开发重置后的版本中,例如 [[Windows Vista Build 5384.4.winmain beta2.060518-1455|Windows Vista Build 5384]],登录会弹出激活提示,关闭提示会注销用户。 在自 [[Windows 7 Build 6574.1.winmain.080320-1839|Build 6574]] 开始的 [[Windows 7]] 版本中,用户仍然可以登录系统,但会启动一个 30 分钟的“重启”循环(会导致[[错误检查]]),让用户有机会激活 Windows 或安装更新版本。 [[Windows 8]] 及以上版本包括了较为温和的“时间炸弹”变体;当前操作系统安装将被停用,电脑设置中的个性化选项将被禁用,且重启循环延长至一小时。此外,某些版本可能会稍微提高“[[Microsoft Windows 中的泄露防护#Windows 8 至 Windows 10 11 月更新|Microsoft 机密]]”披露警告的位置,以表明时间炸弹已被触发。 从[[Windows 10 v1507|原始版本]]到[[Windows 10 v1703|创意者更新]],大部分 [[Windows 10]] 版本都是外部测试签名;二进制签名检查会考虑证书的过期时间。当时间触发激活时,[[Windows 启动管理器]]和相关的引导加载程序会因为签名失效而无法正常工作。由于用户在不知情的情况下安装了在 Internet 上被广泛传播、几乎没有监管的公共 [[Windows 预览体验计划|Insider Preview 版本]](此问题自 [[Windows 10 Build 9841]] 起就存在,这是首个 Windows 10 Technical Preview 版本),所以在 [[Windows 10 Build 14964.1000.rs_prerelease.161102-1700|Build 14964]] 中,Windows 加密库({{code|mincrypt}};静态链接在代码完整性库和 Windows 启动管理器中)进行了修改,允许使用已过期的外部测试代码签名证书链,并给用户机会升级到最新的 Windows 版本。 尝试使用过期版本时会引发很多问题,外部测试代码签名证书会在其预期有效期之外进行验证。在当前日期和时间下运行这些版本可能导致的问题示例如下: * 像旧版的 [[Windows Defender]] 用户界面和内置的 Windows 诊断工具等应用,由于相关签名检查失败,会无法启动; * 即使应用本身是由 Microsoft 签名的,[[用户帐户控制]]也可能会提示不信任的可执行文件或阻止其运行。这种情况在[[全新安装体验]]和启动某些系统应用(如[[任务管理器]])时尤为常见; * 非关键的系统驱动程序,例如打印机后台程序,安装后将无法使用。如果需要使用这些驱动,可以手动安装,且必须绕过驱动签名强制检查。 ==== Detection ==== The expiration date and time of the timebomb can be retrieved by checking the value of the field <code>SystemExpirationDate</code> in the structure <code>KUSER_SHARED_DATA</code>,<ref>https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/ns-ntddk-kuser_shared_data</ref> which is accessible at address <code>0x7FFE0000</code> from the user mode.<ref>https://www.geoffchappell.com/studies/windows/km/ntoskrnl/inc/api/ntexapi_x/kuser_shared_data/index.htm</ref> If no timebomb is present, the field is set to zero; otherwise, it will be set to the file time{{efn|A file time is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC).<ref>https://learn.microsoft.com/en-us/windows/win32/sysinfo/file-times</ref>}} of the expiration date and time in UTC. ==== Technical Details and Security Research ==== On 20 January 2026, a security research whitepaper about the Windows timebomb mechanism called "TimeDefuser" was released. From the document, internal workings of timebomb can be summarized as the following: # Upon system boot, <code>ExInitializeTimeRefresh</code> kernel function initializes hardware-system clock synchronization and retrieves expiration date using version-specific mechanisms (i.e. registry, Windows Product Activation data, product policies) and populates two private kernel globals called <code>ExpNtExpirationDate</code> and <code>ExpNtExpiratonData</code>, along with the <code>SystemExpirationDate</code> field in the <code>KUSER_SHARED_DATA</code> structure. On [[Windows Vista]] and later, this is done by a helper function called <code>ExGetExpirationDate</code>. # In each following hour, the kernel runs the <code>ExpTimeRefreshWork</code> routine that performs hardware-system clock synchronization and additionally compares current system time against the expiration date stored in kernel memory. On Windows Vista and later, it also calls <code>ExGetExpirationDate</code>again and repopulates the fields in kernel memory that holds expiration data. # If the expiration date has passed, it sets an internal flag called <code>ExpNextExpirationIsFatal</code> and on Windows XP and earlier, it displays an error message to the user by <code>NtRaiseHardError</code>, indicating that the build has expired. # On subsequent execution, <code>ExpTimeRefreshWork</code> halts the system with the <code>END_OF_NT_EVALUATION_PERIOD</code> bugcheck. == macOS == [[Mac OS X Public Beta]] 是唯一已知具有时间炸弹的 [[MacOS 通述|macOS]] 版本。虽然时间炸弹阻止了用户登录到桌面,但它不会影响 Darwin 内核的各个方面或与用户界面无关的任何其他组件。 Mac OS X 到 [[Mac OS X Snow Leopard|Snow Leopard]] 的多个服务器版本也有一个到期日期,这会导致[[全新安装体验]]拒绝任何超过到期日期的串行密钥。 == iOS == === Earlier iOS builds (2.0 betas - ?) === iOS betas (up until a certain point) will not activate with Apple's servers past a certain date. === iOS 16.0+ === Some InternalUI builds of these versions have a timebomb designed to brick the device by deleting the <code>kernelcache</code> file on the Preboot partition past a certain date, or if enough time has passed. === All iOS versions === Past a certain date, iOS beta builds will prompt for updates, in the format "A new iOS update is now available. Please update from the iOS (version) beta." == 注 == {{notelist}} == 引用资料 == {{reflist}}
此页使用的模板:
模板:Code
(
查看源代码
)
模板:Efn
(
查看源代码
)(受保护)
模板:IfPNS
(
查看源代码
)
模板:Main other
(
查看源代码
)
模板:Notelist
(
查看源代码
)
模板:Reflist
(
查看源代码
)
模板:Reflist/styles.css
(
查看源代码
)
模块:Arguments
(
查看源代码
)
模块:Check for unknown parameters
(
查看源代码
)
模块:Lan2
(
查看源代码
)
模块:Namespace
(
查看源代码
)
模块:Namespace/data
(
查看源代码
)
返回
时间炸弹
。
导航菜单
个人工具
登录
命名空间
页面
讨论
大陆简体
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
批量上传文件
WinStory 门户
词条编写指南
深色模式
工具
链入页面
相关更改
特殊页面
页面信息
获取短URL