|
|
|
[原创]Windows进程/线程浅谈
最初由 EDD 发布 支持! |
|
[征集]HOW TO REMOVE INTERNET EXPLORER FROM WINDOWS 2000 AT INSTALL
好像很不错,支持翻译,谁来领一下? |
|
[原创]浅谈程序脱壳后的优化
支持CC版主多出精品。 |
|
[声明]近期一伙骗子冒充看雪论坛办培训班,敬请各位勿上当
报警吧!对这种人还有什么说的. |
|
[翻译]多态变形技术教学_2
非常难得的技术文章, 楼主辛苦了. 只是想要很好的理解文章内容真是得下一番功夫才行. |
|
[求助]怎样用汇编实现字符比较?
字符比较的话用2进制比较. |
|
[原创]Windows系统编程之异步I/O和完成端口
没什么说的,向版主学习! |
|
哪位朋友有msdn 2005宇宙版?
最初由 lemony 发布 做驱动的话,直接装DDK,记得安装帮助文件就行了。 |
|
如何汉化一个软件
CCDebuger真乃汉化高手! |
|
找看雪学习PJ
打着看雪的旗号,真是无耻! |
|
[ZT]Visual Assist X v10.3.1527.0 ,v10.3.1532.0
大略看了一下,没发现什么问题,不错!谢林版! |
|
Orien v2.11 脱壳机
支持Loveboom系列脱壳机! |
|
想问一下关于FS段寄存器的问题/
段寄存器中存储的是索引值,通过这个索引值在段描述符表中找到该段的描述信息,包括段基地址,段界限,段属性等。段基地址和段属性在保护模式下都是32位的。 |
|
想问一下关于FS段寄存器的问题/
基于X86平台的32位操作系统的内存管理是“平坦”模式, 分段已经没有什么意义了,但是X86规定操作系统必须分段,所以就简单的把代码段和数据段分成了0x00000000 - 0xFFFFFFFF。你可以在Softice中验证这一点。 |
|
|
|
关于天翼之链talesweaver.dat文件的研究,请高人指点
调用zlib的uncompress函数。 |
|
怎么用VC写驱动啊?
以下转自驱动开发网: 用VC++6.0直接生成driver 作者:Arthur Tu 2003年9月28日星期日 标题:用VC++ 6.0来编译WDM驱动(限于2K DDK) Version 1.03 如果转贴,务必加上以下内容: *************************************** 作者:Arthur Tu 出处:驱动开发网 www.driverdevelop.com *************************************** 内容: 用VC++ 6.0来编辑(不是编译)Driver的源文件是很不错的选择,尤其是搭配用Visual Assist,更方便了。编辑完了,就在VC++里面build,就更方便了。 我在M$的站点参考了些,DS生成的dsw、和build生成的log文件,都有参考。实际上,M$站点上就是根据build的log文件来改VC的Setting的。Me too 限于2K DDK,因为XP DDK和2003 DDK不需要VC++6.0了。并且我用VC6来build的时候,会告诉你“Compiler version not supported by Windows DDK”,不过没有进一步去尝试。(注:有个bt的方式,照样添加XP的setting,当然路径要设置对,然后用UltraEdit修改dsp文件,根据配置把对应的cl、midl、rc、link什么的改为XP DDK的,嘿嘿) DDK自己带了link,98、2K DDK似乎都是VC5的,如果像我这样做,实际上是用VC6的link了。 不考虑source、dir、make文件。 DDK的build,其实算是一个调用nmake工具,而nmake去调相应的文件如cl.exe、link.exe等。 cl的选项设置,主要注意DDK的include路径问题,link的选项,就是要让link去link出一个sys而不是exe,呵呵 预备工作: 1、安装了DDK(呵呵,说句废话)。目录名字最好不要带空格。 2、建立一个workspace,把自己的c、h、rc等文件加进去。 3、Configurations,添加Checked、Free,不要Debug、Release(其实这并没有什么必要,Checked、Debug,看你怎么叫了)。 剩下的就是改各个设置,让VC为你build出一个sys文件了。 我们一个一个的来。所有的改动,都在Project->Setting下面。主要集中在C/C++和Link下。 1、 General,就一个,Not Using MFC; 2、 Debug,没有什么可改的; 3、 C/C++: 1.1 General: 3.1.1 Warning level,用Level3,驱动嘛,稳定压倒一切,而且DDK sample就是warning 3的,Warnings as errors选上; 3.1.2 Optimizations,对checked,我是Disable(Debug),省的用SoftIce的时候会有变量说Watch不了,对Free的,我是Customize,后面会讲到; 3.1.3 Debug Info,Free当然是没有了,你要加上是你的事了,Checked,我用C7;VC默认的Program Database for \"Edit & Continue\",和link的/driver选项冲突; 3.1.4 Preprocessor definitions,有些我并没有弄清楚,有些可能是DS用的,大概说说。下面是我某个dsw用的。 RDRDBG, SRVDBG, FPO=0, WIN32=100, STD_CALL, CONDITION_HANDLING=1, NT_UP=1, NT_INST=0, _NT1X_=100, WINNT=1, _WIN32_WINNT=0x0400, WIN32_LEAN_AND_MEAN=1, DEVL=1, _DLL=1, _X86_=1, $(CPU)=1, NTVERSION=\'WDM\', WINVER=0x500, NTDEBUG=ntsd,DBG=1 STD_CALL不必说了,driver的函数全部是__stdcall的,其实在其他地方有设置的。 WINVER=0x500,是因为你是for 2K的。XP的是0x501,不过没有用,反正不能用VC6了。 _X86_=1,没有的话,嘿嘿。Alpha等CPU不是这个值了。 DBG,free的话,就不要定义,或为0。 FPO,checked的为0,free的为1。我想应该是指Fram-Pointer Omission吧 NTDEBUG= checked ? ntsd : ntsdnodebug WIN32_LEAN_AND_MEAN, Exclude rarely-used stuff from Windows headers,non-mfc的,用这个能减少build的时间。多些definitions也没有关系,不影响其他的就好 NT_UP,为0表示是MP,多处理器的,1表示你在单处理器用的。 NT_INST, set to turn on instrumentation 根据driver类型,你可能还要加上别的preprocessor definitions,比如NDIS的IMD,就要NDIS50, NDIS_MINIPORT_DRIVER, NDIS50_MINIPORT。 3.1.5 Project Options 你只需要最后添加几个就好了,包括/QIfdiv- /QIf /QI0f,可以在MSDN上查到。值得一提是VC产生的workspace的debug setting,默认有个GZ选项,Catch Release-Build Errors in Debug Build,编译的时候会说error LNK2001: unresolved external symbol __chkesp,去掉就好了。 1.2 C++ Language 没有什么说的,不要RTTI, exception handling看你用没有用了。 1.3 Code Generation 把Calling convention用__stdcall,其余不管了(记得STD_CALL吗); 1.4 Customize 没有什么可说的,我一般是function-level linking,因为加了GF选项,Eliminate duplicate strings我也就不选了; 1.5 Listing Files 就Listing file type可说一下。你要想看汇编代码的话,可以在这里改改; 1.6 Optimizations checked自然是disable了,free的,我选是Full optimization和Frame_Popinter Omission,以及Only __inline,其实这看个人了; 1.7 Precompiled Headers 这个就不说了,看MSDN吧,默认也可以; 1.8 Preprocessor Preprocessor definitions前面已经说了,重点在Additional include directories上,$(BASEDIR)incddkwdm, $(BASEDIR)incddk, $(BASEDIR)inc, $(BASEDIR)incwin98, ....inc,这是我某个dsw的,所以,BASEDIR的环境变量要设置好,我就顺便用DS的工具来start VC,它恰好帮你设置了,当然你也可以直接写上你的DDK的安装路径。找不到include 路径,会引发一大堆错误,比如WDM.H有错误等。。。是很多人问的问题; 4、 好了,轮到Link了 4.1 General 选Ignore all default libraries,你可以选上generate map file, map文件有时候很有用的;Checked的当然要选上generate debug info, Link incrementally不选;Objects/library modules,添加wdm.lib等,ntoskrnl.lib好像输出了诸如sprintf、strcat等一些函数(注1),根据driver可能还要其他的,比如ndis.lib;别忘了Output file name改成yourname.sys,可不是yourname.exe啊 4.2 Debug 就checked要改改,选上Debug info,我是选Both formats的; 4.3 Input 重点之一,Additional lib path,$(BASEDIR)libchki386,这是我的一个dsw用的,checked填checked lib的路径,free填freelib的路径 4.4 Output 在Entry-point symbol,填DriverEntry,或_DriveEntry@8,一样; 根据link的输出来看,Base address应该填0x10000,Stack,Reserve的应该填0x40000,Commit填0x1000;Version Info,自己填吧; 4.5 Project Options,重点,很多选项要直接在这里添加。要添加的包括: /machine:IX86,CPU相关的 /debug:full,/debugtype:both 根据M$站点的说法,为了使WinDbg能找到你的symbol,这两是都要的,而且还要单独用linker来link一次,VC不认/debug: full,free就没有这个问题了。根据M$的方法,可以这样:写个lnk文件,在Post-build step,再link一次,添加link @yourlnk.lnk,这个lnk文件,可以从log文件提取,如果不用WinDbg,就无所谓了; /driver,Use this linker option to build a Windows NT kernel mode driver,MSDN说的 /IGNORE:4001,4037,4039,4065,4070,4078,4087,4089,4096,4210 查MSDN /MERGE:_PAGE=PAGE /MERGE:_TEXT=.text /SECTION:INIT,d,DriverEntry就可以放到INIT section去。 /FULLBUILD /RELEASE,在文件头添加checksum /FORCE:MULTIPLE /OPT:REF /OPT:ICF /align:0x20 /osversion:5.00 /subsystem:native 特别注意/subsystem:native和/driver不要漏了。 一长串的/ignore可以让你即使选warning level 4也能通过,warning level 4有点变态的 其实上面说的大部分是废话:),大部分选项,你看看build输出的log文件,就能知道了。这样你也可以根据你的driver,自己添加一些必要的选项。 越写越觉得自己无知 有什么不对的地方,请指出。 另外还有用个bat文件在VC下build的方法等,不多说了。 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值