<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0046)http://www.xfocus.net/articles/200312/646.html -->
<HTML><HEAD><TITLE>一种可以穿透还原卡和还原软件的代码</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META
content="安全焦点, xfocus, 陷阱网络, honeynet, honeypot, 调查取证, forensic, 入侵检测, intrusion detection, 无线安全, wireless security, 安全论坛, security forums, 安全工具, security tools, 攻击程序, exploits, 安全公告, security advisories, 安全漏洞, security vulnerabilities, 安全教程, security tutorials, 安全培训, security training, 安全帮助, security help, 安全标准, security standards, 安全代码, security code, 安全资源, security resources, 安全编程, security programming, 加密, cryptography,还原"
name=Keywords><LINK href="一种可以穿透还原卡和还原软件的代码.files/plone.css" type=text/css
rel=stylesheet>
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV class=top>
<DIV class=searchBox>
<FORM name=searchform action=http://www.google.com/search method=get><INPUT
type=hidden value=www.xfocus.net name=domains> <INPUT type=hidden
value=www.xfocus.net name=sitesearch> <INPUT name=q> <INPUT type=submit value="Google Search" name=btnG> </FORM></DIV><IMG height=80
alt="xfocus logo" src="" width=180 border=0> <IMG height=20 alt="xfocus title"
src="一种可以穿透还原卡和还原软件的代码.files/title.gif" width=230 border=0> </DIV>
<DIV class=tabs><A class=plain href="http://www.xfocus.net/index.html">首页</A> <A
class=plain href="http://www.xfocus.net/releases/index.html">焦点原创</A> <A
class=selected href="http://www.xfocus.net/articles/index.html">安全文摘</A> <A
class=plain href="http://www.xfocus.net/tools/index.html">安全工具</A> <A
class=plain href="http://www.xfocus.net/vuls/index.html">安全漏洞</A> <A class=plain
href="http://www.xfocus.net/projects/index.html">焦点项目</A> <A class=plain
href="https://www.xfocus.net/bbs/index.php?lang=cn">焦点论坛</A> <A class=plain
href="http://www.xfocus.net/about/index.html">关于我们</A> </DIV>
<DIV class=personalBar><A
href="https://www.xfocus.net/php/add_article.php">添加文章</A> <A
href="http://www.xfocus.org/">English Version</A> </DIV>
<TABLE class=columns>
<TBODY>
<TR>
<TD class=left>
<DIV class=box>
<H5> 文章分类 </H5>
<DIV class=body>
<DIV class="content odd">
<DIV style="WHITE-SPACE: nowrap"><IMG
src="一种可以穿透还原卡和还原软件的代码.files/folder_icon.gif" border=0> <A
href="http://www.xfocus.net/articles/4.html">专题文章</A><BR><IMG
src="一种可以穿透还原卡和还原软件的代码.files/folder_icon.gif" border=0> <A
href="http://www.xfocus.net/articles/2.html">漏洞分析</A><BR><IMG
src="一种可以穿透还原卡和还原软件的代码.files/folder_icon.gif" border=0> <A
href="http://www.xfocus.net/articles/3.html">安全配置</A><BR><IMG
src="一种可以穿透还原卡和还原软件的代码.files/folder_icon.gif" border=0> <A
href="http://www.xfocus.net/articles/1.html"><B>黑客教学
<<</B></A><BR><IMG src="一种可以穿透还原卡和还原软件的代码.files/folder_icon.gif"
border=0> <A href="http://www.xfocus.net/articles/5.html">编程技术</A><BR><IMG
src="一种可以穿透还原卡和还原软件的代码.files/folder_icon.gif" border=0> <A
href="http://www.xfocus.net/articles/7.html">工具介绍</A><BR><IMG
src="一种可以穿透还原卡和还原软件的代码.files/folder_icon.gif" border=0> <A
href="http://www.xfocus.net/articles/6.html">火墙技术</A><BR><IMG
src="一种可以穿透还原卡和还原软件的代码.files/folder_icon.gif" border=0> <A
href="http://www.xfocus.net/articles/8.html">入侵检测</A><BR><IMG
src="一种可以穿透还原卡和还原软件的代码.files/folder_icon.gif" border=0> <A
href="http://www.xfocus.net/articles/9.html">破解专题</A><BR><IMG
src="一种可以穿透还原卡和还原软件的代码.files/folder_icon.gif" border=0> <A
href="http://www.xfocus.net/articles/11.html">焦点公告</A><BR><IMG
src="一种可以穿透还原卡和还原软件的代码.files/folder_icon.gif" border=0> <A
href="http://www.xfocus.net/articles/12.html">焦点峰会</A><BR></DIV></DIV></DIV></DIV>
<DIV class=box>
<H5> 文章推荐 </H5>
<DIV class=body>
<DIV class="content odd"><IMG
src="一种可以穿透还原卡和还原软件的代码.files/document_icon.gif" border=0> <A
href="http://www.xfocus.net/articles/200308/593.html">技术挑战<一></A><BR><IMG
src="一种可以穿透还原卡和还原软件的代码.files/document_icon.gif" border=0> <A
href="http://www.xfocus.net/articles/200306/562.html">任意用户模式下执行 ring 0
代码</A><BR><IMG src="一种可以穿透还原卡和还原软件的代码.files/document_icon.gif" border=0>
<A
href="http://www.xfocus.net/articles/200307/563.html">IIS的NSIISLOG.DLL溢出问题分析</A><BR></DIV></DIV></DIV></TD>
<TD class=main>
<H1>一种可以穿透还原卡和还原软件的代码</H1><BR>创建时间:2003-12-07<BR>文章属性:原创<BR>文章提交:<A
href="https://www.xfocus.net/bbs/index.php?lang=cn&act=Profile&do=03&MID=37072">wind_men</A>
(tyhhyf_at_hotmail.com)<BR><BR>一种可以穿透还原卡和还原软件的代码<BR>CVC/GB 风般的男人<BR>还原卡和还原软件被广泛运用于各种公共场合的电脑上,比如学校机房和网吧。这些还原卡和还原软件(以下我简称为虚拟还原技术)能够记录下一切对硬盘的写操作,不论您对硬盘进行拷贝还是移动删除甚至是格式化分区等操作,只要一重新启动,一切都会恢复到这个操作之前的情况,因此有些虚拟还原厂商还会在广告词中加上一句“可以防范一切电脑病毒”。这种虚拟还原的方法在大部分时候的确可以对公共机房的电脑起到很好的保护作用,难道真的没有一种方法能够穿透这种保护机制么?答案是否定的,下面请听我一一道来。<BR>一、虚拟还原技术的原理<BR>本文所说的是一种普遍运用于还原卡或还原软件上的技术,当然,不同品牌不同厂商生产的可能不尽相同,但原理却是相通的。<BR>首先,还原卡和还原软件会抢先夺取引导权,将原来的0头0道1扇保存在一个其他的扇区,(具体备份到那个扇区是不一定的),将自己的代码写入0头0道1扇,从而能在操作系统之前得到执行权,这一点类似于一个引导型病毒;然后,我们来看看虚拟还原技术在操作系统之前都做了些什么:<BR>1.将中断向量表中的INT13H的入口地址保存;<BR>2.把自己用于代替INT13H的代码写入内存,并记住入口地址,当然这种“写入内存”并不是普通的“写”,而是一种我们称为“常驻”的方法,有关“常驻程序”的实现方法我们不另外花篇幅来描述了,如果你还不了解的话请自己找有关资料,也可以到<A
href="http://www.hackart.org/"
target=_blank>http://www.hackart.org/</A>或<A href="http://www.lsky.net/"
target=_blank>http://www.lsky.net/</A>找风般的男人交流;<BR>3.将中断向量表中INT13H的入口地址改为这段常驻程序的入口地址。补充一点,虚拟还原程序在修改INT13H的入口后往往都会修改一些其他中断入口,当然也是通过常驻程序来实现的,这些中断用来实现对中断向量表中INT13H入口地址监控,一旦发现被修改,就马上把它改回,这样做同样是用来防止被有心人破解。<BR>好了,你已经看出来了,这段用来替代BIOS提供的INT13H的代码才是虚拟还原技术的关键,那么这段代码到底实现了些什么了,以下是本人对此拙浅的理解:<BR>1.拦截所有INT13H中对硬盘0头0道1扇的操作<BR>这些包括读写操作,把所有的对0头0道1扇的操作改为对虚拟还原程序备份的那个扇区的操作,这样做的目的是保护虚拟还原代码不被破坏,并且不能被有心人读出进行破解,即使你用扇区编辑工具查看主引导区,实际上你看到的是这个备份的主引导区。<BR>2.拦截所有INT13H中的写硬盘操作<BR>这里包括对8G以下的硬盘的普通通过磁头、磁道、扇区定位的INT13H中的写操作,和扩展INT13H中基于扇区地址方式的对大硬盘的写操作,甚至包括扩展INT13H中对一些非IDE接口的硬盘的写操作。<BR>至于拦截后做什么是虚拟还原技术实现的关键,在早期的DOS系统当中完全可以“什么都不做”,也就是说当用户写硬盘时实际上是什么都没做,但现在的操作系统都要对硬盘进行一些必要的写操作,比如对虚拟内存的写操作。众所周知,虚拟内存实际上就是硬盘,而如果禁止操作系统写硬盘的话显然后果是不堪设想的。所以,大多数虚拟还原厂商用的方法是占用一些硬盘空间,把硬盘所进行的写操作做�
评论0