首页
社区
课程
招聘
[求助]我的Ring0监控程序源代码,VC++ 代码转 Delphi !!!
发表于: 2008-5-18 01:18 8762

[求助]我的Ring0监控程序源代码,VC++ 代码转 Delphi !!!

2008-5-18 01:18
8762
没人帮, 删了!!!!!!!!!!!!!

[课程]Linux pwn 探索篇!

收藏
免费 0
支持
分享
最新回复 (14)
雪    币: 189
活跃值: (4810)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
2
顶起, 大家来帮一下!!!!!!!!!
2008-5-19 03:44
0
雪    币: 2559
活跃值: (176)
能力值: ( LV5,RANK:60 )
在线值:
发帖
回帖
粉丝
3
好东西,谢谢楼主!
2008-5-19 10:57
0
雪    币: 189
活跃值: (4810)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
4
上面的代码有二句有问题!!!一直未解决1!!!!
2008-5-20 23:48
0
雪    币: 145
活跃值: (85)
能力值: ( LV5,RANK:60 )
在线值:
发帖
回帖
粉丝
5
求这位大大把VC版本的也发上来.
2008-5-21 18:26
0
雪    币: 201
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
运行立马黑屏重启
2008-5-21 21:12
0
雪    币: 189
活跃值: (4810)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
7
附件里有啊!!!
2008-5-23 03:14
0
雪    币: 225
活跃值: (173)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
8
controlbuff[1]:=DWORD(outputbuff[0]);    // // VC++的  controlbuff[1]=(DWORD)&outputbuff[0];
是这样吧
controlbuff[1]:=DWORD(@outputbuff);
2008-5-29 22:47
0
雪    币: 241
活跃值: (15)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
9
好像运行你PRMonitor后不久我的XP就蓝屏,并且重启也蓝屏,不得不重装。不过还是佩服你的编程能力,学习了~~
2008-5-30 08:46
0
雪    币: 189
活跃值: (4810)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
10
不是我写的, 我还未有这水平:

原文:偶写的Ring0监控程序PRMonitor源代码(ddk+sdk)
2008-5-30 23:28
0
雪    币: 427
活跃值: (412)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
11
PRMonitor后不久我的XP就蓝屏,并且重启也蓝屏

很强阿,不写恶意软件埋没人才。
2008-5-31 07:34
0
雪    币: 112
活跃值: (16)
能力值: ( LV9,RANK:290 )
在线值:
发帖
回帖
粉丝
12
{ *********************************************************************** }
{ 模块名称:MyDriver                                                       }
{ 模块功能:加载/卸载驱动程序                                              }
{ 版 本 号:v1.0.0                                                         }
{ 日    期:2008-5-18                                                      }
{ *********************************************************************** }
unit MyDriver;

interface

uses
  Windows,SysUtils,Tlhelp32,WinSvc;
  {功能:加载驱动程序
   参数:sztheDriverName:驱动程序完成路径.
        szSvrName      :驱动程序名称.}
  function InstallDriver(sztheDriverName,szSvrName:string):Boolean;
  {功能:卸载驱动程序
   参数:szSvrName      :驱动程序名称.}
  function UnInstallDriver(szSvrName:string):Boolean;
  
implementation

function InstallDriver(sztheDriverName,szSvrName:string):Boolean;
var
  hServiceMgr,hServiceTwdm:SC_HANDLE;
  szDir:array[0..1023]of char;
  lpsztheDriverName,p:PChar;
begin
  ZeroMemory(@szDir,1024);
  strcopy(szDir,Pchar(sztheDriverName));
	lpsztheDriverName:=@szDir;
  {打开服务控制管理器}
	hServiceMgr := OpenSCManager(nil, nil, SC_MANAGER_ALL_ACCESS );

  if hServiceMgr=0 then
    begin
      {OpenSCManager() Faild.}
      Result:=False;
      Exit;
    end;

	hServiceTwdm:=CreateService(hServiceMgr,
		                          PChar(szSvrName),     {SYSTEM\CurrentControlSet\Services驱动程序的在注册表中的名字}
                              PChar(szSvrName),     {注册表驱动程序的 DisplayName 值}
                              SERVICE_ALL_ACCESS,   {加载驱动程序的访问权限}
                              SERVICE_KERNEL_DRIVER,{表示加载的服务是驱动程序}
                              SERVICE_DEMAND_START, {注册表驱动程序的 Start 值}
                              SERVICE_ERROR_IGNORE, {注册表驱动程序的 ErrorControl 值}
                              lpsztheDriverName,    {注册表驱动程序的 ImagePath 值}
                              nil,nil,nil,nil,nil);

  if hServiceTwdm=0 then
    begin
      if GetLastError()=ERROR_SERVICE_EXISTS then
        begin
          {Service Exists}
          hServiceTwdm:=OpenService(hServiceMgr,PChar(szSvrName),SERVICE_ALL_ACCESS);
          if hServiceTwdm=0 then
            begin
              CloseServiceHandle(hServiceMgr);
              Result:=False;
              Exit;
            end;
        end
      else
        begin
          CloseServiceHandle(hServiceMgr);
          Result:=False;
          Exit;
        end;
    end;

  {Start the drivers}
  if hServiceTwdm<>0 then
    begin
      if StartService(hServiceTwdm,0,p)=False then
        begin
          if ERROR_SERVICE_ALREADY_RUNNING=GetLastError() then
            begin
              {no real problem}
            end
          else
            begin
              CloseServiceHandle(hServiceMgr);
              CloseServiceHandle(hServiceTwdm);
              Result:=False;
              Exit;
            end;
        end;

      CloseServiceHandle(hServiceMgr);
      CloseServiceHandle(hServiceTwdm);
    end;
    
  Result:=True;
end;

function UnInstallDriver(szSvrName:string):Boolean;
var
  hServiceMgr,hServiceTwdm:SC_HANDLE;
  SvrSta:SERVICE_STATUS;
begin
	hServiceMgr:=OpenSCManager(nil,nil,SC_MANAGER_ALL_ACCESS );
  if hServiceMgr=0 then
    begin
      {OpenSCManager() Faild.}
      Result:=False;
      Exit;
    end;

  hServiceTwdm:=OpenService(hServiceMgr,PChar(szSvrName),SERVICE_ALL_ACCESS );
  if hServiceTwdm=0 then
    begin
      {OpenService() Faild.}
      CloseServiceHandle(hServiceMgr);
      Result:=False;
      Exit;
    end;

  {停止驱动程序,如果停止失败,只有重新启动才能,再动态加载。}
  if ControlService(hServiceTwdm,SERVICE_CONTROL_STOP,SvrSta)=False then
    begin
      {ControlService() Faild.}
      CloseServiceHandle(hServiceTwdm);
      CloseServiceHandle(hServiceMgr);
      Result:=False;
      Exit;
    end;
  {动态卸载驱动程序.}
  if DeleteService(hServiceTwdm)=False then
    begin
      {DeleteSrevice() Faild.}
      CloseServiceHandle(hServiceTwdm);
      CloseServiceHandle(hServiceMgr);
      Result:=False;
      Exit;
    end;

  CloseServiceHandle(hServiceTwdm);
  CloseServiceHandle(hServiceMgr);
  Result:=True;
end;

end.



写的很龊,高手飘过!
从Rootkit那本书上面翻译过来的!
2008-6-1 12:01
0
雪    币: 189
活跃值: (4810)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
13
不是你指的问题!!!!!
2008-6-7 19:50
0
雪    币: 219
活跃值: (48)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
14
汗,兄弟真够大胆!要是我,绝对不会在真实的系统上直接运行,我会选择在虚拟机上运行
2008-8-20 19:41
0
雪    币: 402
活跃值: (143)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
15
拿了东西一定要留言。这是我向来的作风哈。哈哈哈!!!
谢谢!
最近驱动死我了!
2009-5-10 13:12
0
游客
登录 | 注册 方可回帖
返回
//