CN105893000A - 防止测试机系统时间被非法修改的方法 - Google Patents

防止测试机系统时间被非法修改的方法 Download PDF

Info

Publication number
CN105893000A
CN105893000A CN201410582998.0A CN201410582998A CN105893000A CN 105893000 A CN105893000 A CN 105893000A CN 201410582998 A CN201410582998 A CN 201410582998A CN 105893000 A CN105893000 A CN 105893000A
Authority
CN
China
Prior art keywords
function
code
system time
password
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410582998.0A
Other languages
English (en)
Inventor
周乃新
石志刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Chip Advanced Science And Technology Co Ltd
Original Assignee
Beijing Chip Advanced Science And Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Chip Advanced Science And Technology Co Ltd filed Critical Beijing Chip Advanced Science And Technology Co Ltd
Priority to CN201410582998.0A priority Critical patent/CN105893000A/zh
Publication of CN105893000A publication Critical patent/CN105893000A/zh
Pending legal-status Critical Current

Links

Abstract

本发明提供一种通过Windows API拦截手段防止测试机系统时间被修改的方法。首先通过注入手段将DLL模块注入拦截的程序,比如通过注册表键LoadAppInit_DLLs实现注入,然后获取需要拦截的目标API在NTDLL中的地址,即NtSetSystemTime函数的地址,修改该函数起始代码,使跳转到自己的代码,在自己的代码中要求密码验证,只有输入正确密码才能修改,因此可以达到防止非法修改系统时间的目的。

Description

防止测试机系统时间被非法修改的方法
技术领域
本发明涉及一种通过Windows API拦截手段防止测试机系统时间被非法修改的方法,属于集成电路测试生产线技术管理领域。
背景技术
在集成电路量产测试时,测试机系统时间会被记录到测试数据,测试数据需要保存作为日后电路故障的追溯;同时,测试数据上的时间也是测试成本合算的依据;比如,计算某个集成电路型号的测试成本,需要知道一颗集成电路的测试时间、以及一个批量的测试时间;测试时间也是生产线调度的依据,所以系统时间不能被恶意修改,维护系统时间非常重要。Windows API是Windows提供的应用程序编程接口函数;Windows系统API拦截是用来定制和增强系统功能的常用手段,但大部分拦截方法要么不够稳定、要么兼容性不佳、要么实现过程过于复杂,本发明拦截技术则能很好解决了上述技术难题。
发明内容
本发明提供一种通过Windows API拦截手段防止测试机系统时间被修改的方法,对Windows API简单可靠的拦截,步骤如下:
1.注入需要拦截的程序;
2.获取要拦截的目标API在NTDLL.DLL模块中的地址;
3.修改目标API入口代码,替换为跳转到自定义代码处的指令,跳转指令使用字节指令即可,无需使用汇编代码,非常简单;
4.在自定义代码执行个性功能。
进一步的,拦截CMD.EXE、RUNDLL.EXE,只要拦截这两个程序中的NtSetSystemTime,则能限制时间修改,在拦截代码中,可以提示输入密码,只要密码正确才接受修改,具体实施步骤如下:
1.将程序注入cmd.exe和rundll.exe;
2.对程序中ntdll.dll动态库的函数NtSetSystemTime进行拦截,使转向自定义的函数密码;
3.在自定义函数中要求输入密码;
4.密码正确则调用ntdlltmp的NtSetSystemTime函数进行时间设置,否则禁止修改时间。
本发明达到的技术效果是达到防止非法修改系统时间的目的,保证了测试生产线的测试时间的准确性、唯一性。
附图说明
为了更清楚地说明本发明的技术方案,下面结合附图和具体实施方案对本发明做进一步说明;
附图1是API拦截原理图
附图2是API拦截流程图
具体实施方式
下面将本发明结合附图作进一步详述:如附图1所示,首先要对WindowsAPI进行简单可靠的拦截,其实施步骤如下:
1.注入需要拦截的程序;
2.获取要拦截的目标API在NTDLL.DLL模块中的地址;
3.修改目标API入口代码,替换为跳转到自定义代码处的指令,跳转指令使用字节指令即可,无需使用汇编代码,非常简单;
4.在自定义代码执行个性功能;
为防止测试机系统时间被修改,需要拦截CMD.EXE、RUNDLL.EXE,只要拦截这两个程序中的NtSetSystemTime,则能很好地限制时间修改,在拦截代码中,可以提示输入密码,只要密码正确才接受修改,具体流程见附图2。
具体实施步骤如下:
1.将程序注入cmd.exe和rundll.exe;
2.对程序中ntdll.dll动态库的函数NtSetSystemTime进行拦截,使转向自定义的函数密码;
3.在自定义函数中要求输入密码;
4.密码正确则调用ntdlltmp的NtSetSystemTime函数进行时间设置,否则禁止修改时间。
本发明达到的技术效果是防止非法修改系统时间的目的,保证测试生产线测试机系统时间的准确性、唯一性。

Claims (2)

1.一种通过Windows API拦截手段防止测试机系统时间被修改的方法其特征在于如下步骤:
1)注入需要拦截的程序;
2)获取要拦截的目标API在NTDLL.DLL模块中的地址;
3)修改目标API入口代码,替换为跳转到自定义代码处的指令,跳转指令使用字节指令即可,无需使用汇编代码,非常简单;
4)在自定义代码执行个性功能。
2.根据权利要求1所述的步骤,其特征在于:依次执行以下步骤:
1)将程序注入cmd.exe和rundll.exe;
2)对程序中ntdll.dll动态库的函数NtSetSystemTime进行拦截,使转向自定义的函数密码;
3)在自定义函数中要求输入密码;
4)密码正确则调用ntdlltmp的NtSetSystemTime函数进行时间设置,否则禁止修改时间。
CN201410582998.0A 2014-10-28 2014-10-28 防止测试机系统时间被非法修改的方法 Pending CN105893000A (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410582998.0A CN105893000A (zh) 2014-10-28 2014-10-28 防止测试机系统时间被非法修改的方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410582998.0A CN105893000A (zh) 2014-10-28 2014-10-28 防止测试机系统时间被非法修改的方法

Publications (1)

Publication Number Publication Date
CN105893000A true CN105893000A (zh) 2016-08-24

Family

ID=57000553

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410582998.0A Pending CN105893000A (zh) 2014-10-28 2014-10-28 防止测试机系统时间被非法修改的方法

Country Status (1)

Country Link
CN (1) CN105893000A (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170437A (zh) * 2016-12-07 2018-06-15 腾讯科技(深圳)有限公司 一种应用管理方法及终端设备
CN111506437A (zh) * 2020-03-31 2020-08-07 北京安码科技有限公司 基于windows原始调用接口的靶场应用程序调用方法、系统、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983296A (zh) * 2005-12-12 2007-06-20 北京瑞星国际软件有限公司 用于防止非法程序窃取用户信息的方法及装置
CN102693394A (zh) * 2012-06-07 2012-09-26 奇智软件(北京)有限公司 一种用于拦截应用程序对服务的调用的方法和装置
CN102855430A (zh) * 2012-08-23 2013-01-02 福建升腾资讯有限公司 基于Windows系统的进程黑白名单控制方法
CN102855138A (zh) * 2012-07-20 2013-01-02 腾讯科技(深圳)有限公司 一种api的拦截方法、装置及移动终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983296A (zh) * 2005-12-12 2007-06-20 北京瑞星国际软件有限公司 用于防止非法程序窃取用户信息的方法及装置
CN102693394A (zh) * 2012-06-07 2012-09-26 奇智软件(北京)有限公司 一种用于拦截应用程序对服务的调用的方法和装置
CN102855138A (zh) * 2012-07-20 2013-01-02 腾讯科技(深圳)有限公司 一种api的拦截方法、装置及移动终端
CN102855430A (zh) * 2012-08-23 2013-01-02 福建升腾资讯有限公司 基于Windows系统的进程黑白名单控制方法

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170437A (zh) * 2016-12-07 2018-06-15 腾讯科技(深圳)有限公司 一种应用管理方法及终端设备
CN108170437B (zh) * 2016-12-07 2021-03-12 腾讯科技(深圳)有限公司 一种应用管理方法及终端设备
CN111506437A (zh) * 2020-03-31 2020-08-07 北京安码科技有限公司 基于windows原始调用接口的靶场应用程序调用方法、系统、电子设备及存储介质

Similar Documents

Publication Publication Date Title
US10635809B2 (en) Authenticating application legitimacy
Heiderich et al. Scriptless attacks: stealing the pie without touching the sill
CN104933362B (zh) Android应用软件API误用类漏洞自动化检测方法
CN106650452B (zh) 一种Android系统内置应用漏洞挖掘方法
CN107077565B (zh) 一种安全指示信息的配置方法及设备
CN104765612A (zh) 一种访问可信执行环境、可信应用的系统及方法
CN103996007A (zh) Android应用权限泄露漏洞的测试方法及系统
CN106355081A (zh) 一种安卓程序启动校验方法和装置
CN103177210A (zh) 一种在Android中植入动态污点分析模块的方法
Nirumand et al. VAnDroid: a framework for vulnerability analysis of Android applications using a model‐driven reverse engineering technique
Kaur et al. A security assessment of HCE-NFC enabled e-wallet banking android apps
US20180004940A1 (en) Method and apparatus for generating dynamic security module
CN105760758A (zh) 静态检测应用程序的检测系统及方法、及计算机程序产品
CN104102880A (zh) 一种检测Android权限提升攻击的应用程序重写方法和系统
CN104156481A (zh) 基于动态链接库注入的Android加密通信检测装置和方法
Wang et al. A new cross-site scripting detection mechanism integrated with HTML5 and CORS properties by using browser extensions
CN104217162A (zh) 一种智能终端恶意软件的检测方法及系统
Darvish et al. Security analysis of mobile money applications on android
Yang et al. {Iframes/Popups} Are Dangerous in Mobile {WebView}: Studying and Mitigating Differential Context Vulnerabilities
CN108197469B (zh) 校验应用程序的方法、装置和存储介质以及电子设备
Wang et al. One Size Does Not Fit All: Uncovering and Exploiting Cross Platform Discrepant {APIs} in {WeChat}
CN110855642A (zh) 应用漏洞检测方法、装置、电子设备及存储介质
CN105893000A (zh) 防止测试机系统时间被非法修改的方法
CN103970574B (zh) office程序的运行方法及装置、计算机系统
Jannett et al. DISTINCT: Identity theft using in-browser communications in dual-window single sign-on

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160824