开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 10484|回复: 12
收起左侧

[分享] 给大家分享一下64进程保护和隐藏

[复制链接]

结帖率:100% (4/4)
发表于 2017-10-22 08:56:29 | 显示全部楼层 |阅读模式   四川省宜宾市
本帖最后由 赵五 于 2017-10-22 11:49 编辑

关于64位驱动保护隐藏,大家一定不陌生,不少人甚至在定制板块发帖定制,那么,什么是驱动保护隐藏呢?为什么会出现蓝屏呢?我给大家说说
+0x288 Win32WindowStation : Ptr64 Void
+0x290 InheritedFromUniqueProcessId : Ptr64 Void
+0x298 LdtInformation : Ptr64 Void
+0x2a0 Spare : Ptr64 Void
+0x2a8 ConsoleHostProcess : Uint8B
+0x2b0 DeviceMap : Ptr64 Void
+0x2b8 EtwDataSource : Ptr64 Void
+0x2c0 FreeTebHint : Ptr64 Void
+0x2c8 FreeUmsTebHint : Ptr64 Void
+0x2d0 PageDirectoryPte : _HARDWARE_PTE
+0x2d0 Filler : Uint8B
+0x2d8 Session : Ptr64 Void
+0x2e0 ImageFileName : [15] UChar
+0x2ef PriorityClass : UChar
+0x2f0 JobLinks : _LIST_ENTRY
+0x300 LockedPagesList : Ptr64 Void
+0x308 ThreadListHead : _LIST_ENTRY
+0x318 SecurityPort : Ptr64 Void
+0x320 Wow64Process : Ptr64 Void
+0x328 ActiveThreads : Uint4B
+0x32c ImagePathHash : Uint4B
+0x330 DefaultHardErrorProcessing : Uint4B
+0x334 LastThreadExitStatus : Int4B
+0x338 Peb : Ptr64 _PEB
+0x340 PrefetchTrace : _EX_FAST_REF
+0x348 ReadOperationCount : _LARGE_INTEGER
+0x350 WriteOperationCount : _LARGE_INTEGER
+0x358 OtherOperationCount : _LARGE_INTEGER
+0x360 ReadTransferCount : _LARGE_INTEGER
+0x368 WriteTransferCount : _LARGE_INTEGER
+0x370 OtherTransferCount : _LARGE_INTEGER
+0x378 CommitChargeLimit : Uint8B
+0x380 CommitChargePeak : Uint8B
+0x388 AweInfo : Ptr64 Void
+0x390 SeAuditProcessCreationInfo : _SE_AUDIT_PROCESS_CREATION_INFO
+0x398 Vm : _MMSUPPORT
+0x420 MmProcessLinks : _LIST_ENTRY
+0x430 HighestUserAddress : Ptr64 Void
+0x438 ModifiedPageCount : Uint4B
+0x43c Flags2 : Uint4B
+0x43c JobNotReallyActive : Pos 0, 1 Bit
+0x43c AccountingFolded : Pos 1, 1 Bit
+0x43c NewProcessReported : Pos 2, 1 Bit
+0x43c ExitProcessReported : Pos 3, 1 Bit
+0x43c ReportCommitChanges : Pos 4, 1 Bit
+0x43c LastReportMemory : Pos 5, 1 Bit
+0x43c ReportPhysicalPageChanges : Pos 6, 1 Bit
+0x43c HandleTableRundown : Pos 7, 1 Bit
+0x43c NeedsHandleRundown : Pos 8, 1 Bit
+0x43c RefTraceEnabled : Pos 9, 1 Bit
+0x43c NumaAware : Pos 10, 1 Bit
+0x43c ProtectedProcess : Pos 11, 1 Bit
+0x43c DefaultPagePriority : Pos 12, 3 Bits
+0x43c PrimaryTokenFrozen : Pos 15, 1 Bit
+0x43c ProcessVerifierTarget : Pos 16, 1 Bit
+0x43c StackRandomizationDisabled : Pos 17, 1 Bit
+0x43c AffinityPermanent : Pos 18, 1 Bit
+0x43c AffinityUpdateEnable : Pos 19, 1 Bit
+0x43c PropagateNode : Pos 20, 1 Bit
+0x43c ExplicitAffinity : Pos 21, 1 Bit
+0x440 Flags : Uint4B
+0x440 CreateReported : Pos 0, 1 Bit
+0x440 NoDebugInherit : Pos 1, 1 Bit
+0x440 ProcessExiting : Pos 2, 1 Bit
+0x440 ProcessDelete : Pos 3, 1 Bit
+0x440 Wow64SplitPages : Pos 4, 1 Bit
+0x440 VmDeleted : Pos 5, 1 Bit
+0x440 OutswapEnabled : Pos 6, 1 Bit
+0x440 Outswapped : Pos 7, 1 Bit
+0x440 ForkFailed : Pos 8, 1 Bit
+0x440 Wow64VaSpace4Gb : Pos 9, 1 Bit
+0x440 AddressSpaceInitialized : Pos 10, 2 Bits
+0x440 SetTimerResolution : Pos 12, 1 Bit
+0x440 BreakOnTermination : Pos 13, 1 Bit
+0x440 DeprioritizeViews : Pos 14, 1 Bit
+0x440 WriteWatch : Pos 15, 1 Bit
+0x440 ProcessInSession : Pos 16, 1 Bit
+0x440 OverrideAddressSpace : Pos 17, 1 Bit
+0x440 HasAddressSpace : Pos 18, 1 Bit
+0x440 LaunchPrefetched : Pos 19, 1 Bit
+0x440 InjectInpageErrors : Pos 20, 1 Bit
+0x440 VmTopDown : Pos 21, 1 Bit
+0x440 ImageNotifyDone : Pos 22, 1 Bit
+0x440 PdeUpdateNeeded : Pos 23, 1 Bit
+0x440 VdmAllowed : Pos 24, 1 Bit
+0x440 CrossSessionCreate : Pos 25, 1 Bit
+0x440 ProcessInserted : Pos 26, 1 Bit
+0x440 DefaultIoPriority : Pos 27, 3 Bits
+0x440 ProcessSelfDelete : Pos 30, 1 Bit
+0x440 SetTimerResolutionLink : Pos 31, 1 Bit
+0x444 ExitStatus : Int4B
+0x448 VadRoot : _MM_AVL_TABLE
+0x488 AlpcContext : _ALPC_PROCESS_CONTEXT
+0x4a8 TimerResolutionLink : _LIST_ENTRY
+0x4b8 RequestedTimerResolution : Uint4B
+0x4bc ActiveThreadsHighWatermark : Uint4B
+0x4c0 SmallestTimerResolution : Uint4B
+0x4c8 TimerResolutionStackRecord : Ptr64 _PO_DIAG_STACK_RECORD

这 么 长 的 一 份 列 表 , 我 们 只 要 关 注 两 个 成 员 : ActiveProcessLinks 和 Flag 。
ActiveProcessLinks 把各个 EPROCESS 结构体连接成“双向链表”(双向链表也叫双链表,是链表的一种,它的每个数据结点中都有两个指针,分别指向直接后继和直接前驱。所以,从双向链表中的任意一个结点开始,都可以很方便地访问它的前驱结点和后继结点。一般我们都构造双向循环链表ZwQuerySystemInformation
枚举进程时就是枚举这条链表,如果将某个 EPROCESS(每个进程都有一个 EPROCESS 结构,里面保存着进程的各种信息,和相关结构的指针。EPROCESS 结构位于系统地址空间,所以访问这个结构需要有ring0的权限。使用 Win2k DDK 的 KD (内核调试器)我们可以得到 EPROCESS 结构的定义。) 从中摘除,ZwQuerySystemInformation
就无法枚举到被摘链的进程了,而依靠此函数的一堆 RING3 的枚举进程函数也失效了;而把
Flag 置 0 后,OpenProcess 函数就会返回失败。

不过需要注意的是,用 用 DKOM  来保护进程会
有很大的隐患,比如用 调用 CreateProcess  会 失败,而且 进程 退出 但 不取消保护的话,有一定
机率 导致蓝屏。一句话,DKOM  保护进程 和 隐藏进程 只适用于 ROOTKIT ,而不 适用于 正规软
件。
举个例子:

  1. //摘除双向链表的指定项
  2. VOID RemoveListEntry(PLIST_ENTRY ListEntry)
  3. {
  4. KIRQL OldIrql;
  5. OldIrql = KeRaiseIrqlToDpcLevel();
  6. if (ListEntry->Flink != ListEntry &&
  7. //这部分是核心代码
  8. {
  9. //这部分是核心代码
  10. }
  11. //这部分是核心代码
复制代码
如上代码即为摘除双链表的部分C++代码,
效果如下如所示(加载驱动后,用 WIN64AST 查看进程,可以发现 进程处于隐藏
状态;用任务管理器结束 进程,会提示出错)



多选投票: ( 最多可选 2 项 ), 共有 21 人参与投票

投票已经结束

9.09% (2)
9.09% (2)
81.82% (18)
您所在的用户组没有投票权限

点评

注意,核心代码版权归作者所有!   四川省宜宾市  发表于 2017-10-22 08:57
结帖率:0% (0/1)

签到天数: 5 天

发表于 2023-7-31 19:40:43 | 显示全部楼层   重庆市重庆市
不懂
回复

使用道具 举报

发表于 2022-5-15 12:11:36 | 显示全部楼层   四川省德阳市

感谢66666666666666666
回复

使用道具 举报

签到天数: 9 天

发表于 2019-11-14 01:08:14 | 显示全部楼层   广东省东莞市
没有一个真正能用的 期待大神发个福利
回复

使用道具 举报

发表于 2019-10-29 06:36:03 | 显示全部楼层   贵州省遵义市
回复

使用道具 举报

发表于 2019-4-16 02:56:02 | 显示全部楼层   四川省南充市
不明白意思。能做个列子吗
回复

使用道具 举报

结帖率:91% (39/43)

签到天数: 14 天

发表于 2017-11-22 16:44:18 | 显示全部楼层   福建省泉州市
有易语言写法吗?
回复

使用道具 举报

结帖率:100% (4/4)
发表于 2017-10-24 23:12:47 | 显示全部楼层   四川省眉山市
不错 写的很好
回复

使用道具 举报

结帖率:87% (20/23)

签到天数: 7 天

发表于 2017-10-22 12:23:54 | 显示全部楼层   广东省东莞市
不知道这个可以不?


mx31FCF.png
回复

使用道具 举报

发表于 2017-10-22 09:27:09 | 显示全部楼层   湖南省永州市
看不懂
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

关闭

精易论坛 - 有你更精彩上一条 /2 下一条

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报QQ: 793400750,邮箱:wp@125.la
网站简介:精易论坛成立于2009年,是一个程序设计学习交流技术论坛,隶属于揭阳市揭东区精易科技有限公司所有。
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备2025452707号) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表