lghtly
驱动牛犊
驱动牛犊
  • 注册日期2004-10-14
  • 最后登录2005-11-29
  • 粉丝0
  • 关注0
  • 积分1分
  • 威望1点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:2496回复:21

有谁对内核中进程间通信了解的?

楼主#
更多 发布于:2005-03-14 18:58
有谁对内核中进程间通信了解的?进程间用Port(此Port不同于网络间通信的端口)进行通信是其消息格式是什莫?
bmyyyud
驱动老牛
驱动老牛
  • 注册日期2002-02-22
  • 最后登录2010-01-21
  • 粉丝0
  • 关注0
  • 积分1000分
  • 威望130点
  • 贡献值0点
  • 好评度106点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2005-03-15 08:24
内核中没有进程,只有线程,只有内核线程
滚滚长江东逝水 浪花淘尽英雄 是非成败转头空 青山依旧在 几度夕阳红 白发渔樵江渚上 惯看秋月春风 一壶浊酒喜相逢 古今多少事 尽付笑谈中
lghtly
驱动牛犊
驱动牛犊
  • 注册日期2004-10-14
  • 最后登录2005-11-29
  • 粉丝0
  • 关注0
  • 积分1分
  • 威望1点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2005-03-15 18:41
谢谢楼上兄弟,问题提法确实不对,有谁对中进程间通信了解的?进程间用Port(此Port不同于网络间通信的端口)进行通信是其消息格式是什莫?
AllenZh
驱动老牛
驱动老牛
  • 注册日期2001-08-19
  • 最后登录2015-11-27
  • 粉丝19
  • 关注10
  • 积分1316分
  • 威望2387点
  • 贡献值7点
  • 好评度321点
  • 原创分0分
  • 专家分0分
地板#
发布于:2005-03-15 19:59
谢谢楼上兄弟,问题提法确实不对,有谁对中进程间通信了解的?进程间用Port(此Port不同于网络间通信的端口)进行通信是其消息格式是什莫?
 

应用程序间的进程间通信通常有:消息,管道,事件,共享内存,socket等等。
而驱动程序之间可以有: 共享内存,事件等等
1,承接Windows下驱动/应用开发 2,本人原创虚拟鼠标/键盘,触摸屏,虚拟显卡,Mirror驱动,XP无盘的SCSI虚拟磁盘驱动等 3,windows下有尝技术服务(包括BUG调试,员工培训等) 欢迎深圳和海外企业联系.msn:mfczmh@sina.com
lifeship
驱动小牛
驱动小牛
  • 注册日期2002-10-18
  • 最后登录2005-07-19
  • 粉丝0
  • 关注0
  • 积分6分
  • 威望2点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2005-03-15 21:37
内核对象,应用层和内核是通用的阿
杯汝前来,  老子今朝,  放荡形骸!  甚长年抱渴,  咽如焦釜,  于今喜醉,  气似奔雷!  慢说刘伶,  古今达者,  醉后何妨死便埋! 
bmyyyud
驱动老牛
驱动老牛
  • 注册日期2002-02-22
  • 最后登录2010-01-21
  • 粉丝0
  • 关注0
  • 积分1000分
  • 威望130点
  • 贡献值0点
  • 好评度106点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2005-03-16 08:44
谢谢楼上兄弟,问题提法确实不对,有谁对中进程间通信了解的?进程间用Port(此Port不同于网络间通信的端口)进行通信是其消息格式是什莫?
 

进程间通讯本机用LPC,通过网络用RPC。
具体的方法就是AllenZh大侠所说的:
应用程序间的进程间通信通常有:消息,管道,事件,共享内存,socket等等。
而驱动程序之间可以有: 共享内存,事件等等
进行通信是其消息格式一般不用去管它:系统会照顾的,只要传送你自己的数据就可以
滚滚长江东逝水 浪花淘尽英雄 是非成败转头空 青山依旧在 几度夕阳红 白发渔樵江渚上 惯看秋月春风 一壶浊酒喜相逢 古今多少事 尽付笑谈中
wywwwl
驱动大牛
驱动大牛
  • 注册日期2002-08-16
  • 最后登录2018-04-07
  • 粉丝1
  • 关注0
  • 积分-10分
  • 威望135点
  • 贡献值6点
  • 好评度76点
  • 原创分0分
  • 专家分0分
  • 社区居民
6楼#
发布于:2005-03-16 09:24
内核中没有进程,只有线程,只有内核线程

怎么能没有进程呢?难道不能建立一个吗?
琢磨悟真知
bmyyyud
驱动老牛
驱动老牛
  • 注册日期2002-02-22
  • 最后登录2010-01-21
  • 粉丝0
  • 关注0
  • 积分1000分
  • 威望130点
  • 贡献值0点
  • 好评度106点
  • 原创分0分
  • 专家分0分
7楼#
发布于:2005-03-16 09:29
[quote]内核中没有进程,只有线程,只有内核线程

怎么能没有进程呢?难道不能建立一个吗? [/quote]
嘿嘿。。。
滚滚长江东逝水 浪花淘尽英雄 是非成败转头空 青山依旧在 几度夕阳红 白发渔樵江渚上 惯看秋月春风 一壶浊酒喜相逢 古今多少事 尽付笑谈中
wywwwl
驱动大牛
驱动大牛
  • 注册日期2002-08-16
  • 最后登录2018-04-07
  • 粉丝1
  • 关注0
  • 积分-10分
  • 威望135点
  • 贡献值6点
  • 好评度76点
  • 原创分0分
  • 专家分0分
  • 社区居民
8楼#
发布于:2005-03-16 09:35
[quote][quote]内核中没有进程,只有线程,只有内核线程

怎么能没有进程呢?难道不能建立一个吗? [/quote]
嘿嘿。。。 [/quote]
嘿嘿表示啥
琢磨悟真知
bmyyyud
驱动老牛
驱动老牛
  • 注册日期2002-02-22
  • 最后登录2010-01-21
  • 粉丝0
  • 关注0
  • 积分1000分
  • 威望130点
  • 贡献值0点
  • 好评度106点
  • 原创分0分
  • 专家分0分
9楼#
发布于:2005-03-16 09:42
内核中怎么建立进程及其环境呢?
滚滚长江东逝水 浪花淘尽英雄 是非成败转头空 青山依旧在 几度夕阳红 白发渔樵江渚上 惯看秋月春风 一壶浊酒喜相逢 古今多少事 尽付笑谈中
wywwwl
驱动大牛
驱动大牛
  • 注册日期2002-08-16
  • 最后登录2018-04-07
  • 粉丝1
  • 关注0
  • 积分-10分
  • 威望135点
  • 贡献值6点
  • 好评度76点
  • 原创分0分
  • 专家分0分
  • 社区居民
10楼#
发布于:2005-03-16 10:10
内核中怎么建立进程及其环境呢?

说的对。

不过:
Drivers that create device-dedicated threads call this routine, either when they initialize or when I/O requests begin to come in to such a driver\'s Dispatch routines. For example, a driver might create such a thread when it receives an asynchronous device control request.

PsCreateSystemThread creates a kernel-mode thread that begins a separate thread of execution within the system. Such a system thread has no TEB or user-mode context and runs only in kernel mode.

If the input ProcessHandle is NULL, the created thread is associated with the system process. Such a thread continues running until either the system is shut down or the thread terminates itself by calling PsTerminateSystemThread.

Driver routines that run in a process context other than that of the system process should set the OBJ_KERNEL_HANDLE flag within the Attributes parameter of PsCreateSystemThread before calling it. This restricts the use of the handle returned by PsCreateSystemThread to processes running in kernel mode and thereby prevents an unintended access of this handle by the process in whose context the driver is running.

Callers of this routine must be running at IRQL PASSIVE_LEVEL.
琢磨悟真知
bmyyyud
驱动老牛
驱动老牛
  • 注册日期2002-02-22
  • 最后登录2010-01-21
  • 粉丝0
  • 关注0
  • 积分1000分
  • 威望130点
  • 贡献值0点
  • 好评度106点
  • 原创分0分
  • 专家分0分
11楼#
发布于:2005-03-16 10:28
[quote]内核中怎么建立进程及其环境呢?

说的对。

不过:
Drivers that create device-dedicated threads call this routine, either when they initialize or when I/O requests begin to come in to such a driver\'s Dispatch routines. For example, a driver might create such a thread when it receives an asynchronous device control request.

PsCreateSystemThread creates a kernel-mode thread that begins a separate thread of execution within the system. Such a system thread has no TEB or user-mode context and runs only in kernel mode.

If the input ProcessHandle is NULL, the created thread is associated with the system process. Such a thread continues running until either the system is shut down or the thread terminates itself by calling PsTerminateSystemThread.

Driver routines that run in a process context other than that of the system process should set the OBJ_KERNEL_HANDLE flag within the Attributes parameter of PsCreateSystemThread before calling it. This restricts the use of the handle returned by PsCreateSystemThread to processes running in kernel mode and thereby prevents an unintended access of this handle by the process in whose context the driver is running.

Callers of this routine must be running at IRQL PASSIVE_LEVEL.
 [/quote]
这是线程不是进程
滚滚长江东逝水 浪花淘尽英雄 是非成败转头空 青山依旧在 几度夕阳红 白发渔樵江渚上 惯看秋月春风 一壶浊酒喜相逢 古今多少事 尽付笑谈中
wywwwl
驱动大牛
驱动大牛
  • 注册日期2002-08-16
  • 最后登录2018-04-07
  • 粉丝1
  • 关注0
  • 积分-10分
  • 威望135点
  • 贡献值6点
  • 好评度76点
  • 原创分0分
  • 专家分0分
  • 社区居民
12楼#
发布于:2005-03-16 10:31
[quote][quote]内核中怎么建立进程及其环境呢?

说的对。

不过:
Drivers that create device-dedicated threads call this routine, either when they initialize or when I/O requests begin to come in to such a driver\'s Dispatch routines. For example, a driver might create such a thread when it receives an asynchronous device control request.

PsCreateSystemThread creates a kernel-mode thread that begins a separate thread of execution within the system. Such a system thread has no TEB or user-mode context and runs only in kernel mode.

If the input ProcessHandle is NULL, the created thread is associated with the system process. Such a thread continues running until either the system is shut down or the thread terminates itself by calling PsTerminateSystemThread.

Driver routines that run in a process context other than that of the system process should set the OBJ_KERNEL_HANDLE flag within the Attributes parameter of PsCreateSystemThread before calling it. This restricts the use of the handle returned by PsCreateSystemThread to processes running in kernel mode and thereby prevents an unintended access of this handle by the process in whose context the driver is running.

Callers of this routine must be running at IRQL PASSIVE_LEVEL.
 [/quote]
这是线程不是进程 [/quote]
我知道啊,你看看 If the input ProcessHandle is NULL, the created thread is associated with the system process.
这里的“system process”如何解释??
琢磨悟真知
bmyyyud
驱动老牛
驱动老牛
  • 注册日期2002-02-22
  • 最后登录2010-01-21
  • 粉丝0
  • 关注0
  • 积分1000分
  • 威望130点
  • 贡献值0点
  • 好评度106点
  • 原创分0分
  • 专家分0分
13楼#
发布于:2005-03-16 11:09
[quote][quote][quote]内核中怎么建立进程及其环境呢?

说的对。

不过:
Drivers that create device-dedicated threads call this routine, either when they initialize or when I/O requests begin to come in to such a driver\'s Dispatch routines. For example, a driver might create such a thread when it receives an asynchronous device control request.

PsCreateSystemThread creates a kernel-mode thread that begins a separate thread of execution within the system. Such a system thread has no TEB or user-mode context and runs only in kernel mode.

If the input ProcessHandle is NULL, the created thread is associated with the system process. Such a thread continues running until either the system is shut down or the thread terminates itself by calling PsTerminateSystemThread.

Driver routines that run in a process context other than that of the system process should set the OBJ_KERNEL_HANDLE flag within the Attributes parameter of PsCreateSystemThread before calling it. This restricts the use of the handle returned by PsCreateSystemThread to processes running in kernel mode and thereby prevents an unintended access of this handle by the process in whose context the driver is running.

Callers of this routine must be running at IRQL PASSIVE_LEVEL.
 [/quote]
这是线程不是进程 [/quote]
我知道啊,你看看 If the input ProcessHandle is NULL, the created thread is associated with the system process.
这里的“system process”如何解释?? [/quote]
确实有个system进程,而且运行在核心态,这样的话还有个核心进程Idle。
滚滚长江东逝水 浪花淘尽英雄 是非成败转头空 青山依旧在 几度夕阳红 白发渔樵江渚上 惯看秋月春风 一壶浊酒喜相逢 古今多少事 尽付笑谈中
lghtly
驱动牛犊
驱动牛犊
  • 注册日期2004-10-14
  • 最后登录2005-11-29
  • 粉丝0
  • 关注0
  • 积分1分
  • 威望1点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
14楼#
发布于:2005-03-16 11:11
[quote]谢谢楼上兄弟,问题提法确实不对,有谁对中进程间通信了解的?进程间用Port(此Port不同于网络间通信的端口)进行通信是其消息格式是什莫?
 

进程间通讯本机用LPC,通过网络用RPC。
具体的方法就是AllenZh大侠所说的:
应用程序间的进程间通信通常有:消息,管道,事件,共享内存,socket等等。
而驱动程序之间可以有: 共享内存,事件等等
进行通信是其消息格式一般不用去管它:系统会照顾的,只要传送你自己的数据就可以
 [/quote]

可我就是要拦截其他进程间的通信,并对其通信内容进行分析的,所以要知道其消息格式,如任务管理器中的结束任务功能就是任务管理器通知smss.exe/csrss.exe去结束任务的,我要从消息中分析出他要结束那个程序(任务、进程)


bmyyyud
驱动老牛
驱动老牛
  • 注册日期2002-02-22
  • 最后登录2010-01-21
  • 粉丝0
  • 关注0
  • 积分1000分
  • 威望130点
  • 贡献值0点
  • 好评度106点
  • 原创分0分
  • 专家分0分
15楼#
发布于:2005-03-16 11:11
但我们创建不了这样的进程
滚滚长江东逝水 浪花淘尽英雄 是非成败转头空 青山依旧在 几度夕阳红 白发渔樵江渚上 惯看秋月春风 一壶浊酒喜相逢 古今多少事 尽付笑谈中
wywwwl
驱动大牛
驱动大牛
  • 注册日期2002-08-16
  • 最后登录2018-04-07
  • 粉丝1
  • 关注0
  • 积分-10分
  • 威望135点
  • 贡献值6点
  • 好评度76点
  • 原创分0分
  • 专家分0分
  • 社区居民
16楼#
发布于:2005-03-16 11:19
但我们创建不了这样的进程

 :D
琢磨悟真知
wywwwl
驱动大牛
驱动大牛
  • 注册日期2002-08-16
  • 最后登录2018-04-07
  • 粉丝1
  • 关注0
  • 积分-10分
  • 威望135点
  • 贡献值6点
  • 好评度76点
  • 原创分0分
  • 专家分0分
  • 社区居民
17楼#
发布于:2005-03-16 11:24
[quote][quote]谢谢楼上兄弟,问题提法确实不对,有谁对中进程间通信了解的?进程间用Port(此Port不同于网络间通信的端口)进行通信是其消息格式是什莫?
 

进程间通讯本机用LPC,通过网络用RPC。
具体的方法就是AllenZh大侠所说的:
应用程序间的进程间通信通常有:消息,管道,事件,共享内存,socket等等。
而驱动程序之间可以有: 共享内存,事件等等
进行通信是其消息格式一般不用去管它:系统会照顾的,只要传送你自己的数据就可以
 [/quote]

可我就是要拦截其他进程间的通信,并对其通信内容进行分析的,所以要知道其消息格式,如任务管理器中的结束任务功能就是任务管理器通知smss.exe/csrss.exe去结束任务的,我要从消息中分析出他要结束那个程序(任务、进程)


 [/quote]
你是做进程控制吗?拦截进程简的通信实在是太大了,有些可能实现不了的,例如2个应用程序之间数据加密通信,你拦不了。
琢磨悟真知
bmyyyud
驱动老牛
驱动老牛
  • 注册日期2002-02-22
  • 最后登录2010-01-21
  • 粉丝0
  • 关注0
  • 积分1000分
  • 威望130点
  • 贡献值0点
  • 好评度106点
  • 原创分0分
  • 专家分0分
18楼#
发布于:2005-03-16 11:28
[quote][quote]谢谢楼上兄弟,问题提法确实不对,有谁对中进程间通信了解的?进程间用Port(此Port不同于网络间通信的端口)进行通信是其消息格式是什莫?
 

进程间通讯本机用LPC,通过网络用RPC。
具体的方法就是AllenZh大侠所说的:
应用程序间的进程间通信通常有:消息,管道,事件,共享内存,socket等等。
而驱动程序之间可以有: 共享内存,事件等等
进行通信是其消息格式一般不用去管它:系统会照顾的,只要传送你自己的数据就可以
 [/quote]

可我就是要拦截其他进程间的通信,并对其通信内容进行分析的,所以要知道其消息格式,如任务管理器中的结束任务功能就是任务管理器通知smss.exe/csrss.exe去结束任务的,我要从消息中分析出他要结束那个程序(任务、进程)


 [/quote]
你去拦截ntdll中的NtTerminateProcess吧
滚滚长江东逝水 浪花淘尽英雄 是非成败转头空 青山依旧在 几度夕阳红 白发渔樵江渚上 惯看秋月春风 一壶浊酒喜相逢 古今多少事 尽付笑谈中
linweiwww
驱动牛犊
驱动牛犊
  • 注册日期2005-01-04
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分4分
  • 威望5点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
19楼#
发布于:2005-03-16 13:39
要是你对两个程序一无所知,不知道他们之间是通过什么机制进行通信的,就没法拦截!
上一页
游客

返回顶部