如何破解屏幕保护密码?(50分)

  • 主题发起人 主题发起人 lich007
  • 开始时间 开始时间
L

lich007

Unregistered / Unconfirmed
GUEST, unregistred user!
我记得曾经有过文章介绍如何查看修改win9x,windows2000的屏幕保护密码的,
请高手给出Delphi的算法。
 
屏保密码最多8位,再多设也无意义,可以试一下。
注册表中 HKEY_CURRENT_USER/Control Panel/desktop 找
ScreenSave_Data,鼠标双击它后出现“编辑二进制值”窗口,
在下面的键值框中看最右边的字符,(两行,具体看密码多少定)
两个字符为一组,数一下几组就知道密码有几位了。
假设密码为“12345”则那里会是这样的:79,DC,45,29,52
分别与 78,DE,46,2D,57,59,91,2B 进行异或(xor),
79 xor 78, -> 1
DC xor DE, -> 2
45 xor 46, -> 3
29 xor 2D, -> 4
52 xor 57, -> 5
就可得到密码了,从密钥可知,密码最长只有8位。

Function TfrmMagic.FindScreenSaverPwd():String;//查找屏幕保护的口令
var
BTmp:Array[0..15] of Byte;
STmp:Array[1..32] of Byte;
intCount:Integer;
i:Integer;
j:Integer;
strTmp:String;
bytTmp:Byte;
strResult:String;
Begin
BTmp[0]:=(72);
BTmp[1]:=(238);
BTmp[2]:=(118);
BTmp[3]:=(29);
BTmp[4]:=(103);
BTmp[5]:=(105);
BTmp[6]:=(161);
BTmp[7]:=(27);
BTmp[8]:=(122);
BTmp[9]:=(140);
BTmp[10]:=(71);
BTmp[11]:=(248);
BTmp[12]:=(84);
BTmp[13]:=(149);
BTmp[14]:=(151);
BTmp[15]:=(95);
for i:=1 to 32 do
begin
STmp:=0;
end;
MagicReg:=TRegistry.Create;
MagicReg.RootKey:=HKEY_CURRENT_USER;
MagicReg.OpenKey('Control Panel/desktop',True);
intCount:=MagicReg.ReadBinaryData('ScreenSave_Data',STmp,Sizeof(STmp));
if intCount>0 then
Begin
j:=1;
For i:=1 To trunc((IntCount-1)/2) Do
begin
if STmp<>00 then
Begin
strTmp:=Chr(STmp[j]);
j:=j+1;
strTmp:=strTmp + Chr(STmp[j]);
bytTmp:=gStrToByte(strTmp);
strResult:=strResult+Chr(bytTmp Xor BTmp[i-1]);
j:=j+1;
end;
end;
end;
MagicReg.CloseKey;
MagicReg.Free;
FindScreenSaverPwd:=strResult;
end
 
to forgot2002老兄: 给出的算法中gStrToByte(strTmp)是什么函数? 好像Delphi指出
编译出错。

另外此算法对windows2000的屏保是否起作用? 好像win2000的屏幕保护密码是
用登录口令替代的?
 
gStrToByte(strTmp)其实是写错了,就是StrToint(strTmp)
 
to lich007 我对forgot2002修正程序!已经可以用了!!
……99年我写过一个,现在不知道丢哪里去了!
function FindScreenSaverPwd:string;//查找屏幕保护的口令
const
BTmp : array[0..15] of Byte =( 72,238,118, 29,103,
105,161, 27,122,140,
71,248, 84,149,151,
95);
var
STmp : array[1..32] of Byte;
Count,i,j : Integer;
strTmp : string;
bytTmp : Byte;
PwdStr : string;
begin
PwdStr:='';
for i:=1 to 32 do STmp:=0;
with TRegistry.Create do
try
RootKey:=HKEY_CURRENT_USER;
OpenKey('Control Panel/desktop',False);
Count:=ReadBinaryData('ScreenSave_Data',STmp,Sizeof(STmp));
if Count>0 then
begin
j:=1;
for i:=1 to Trunc((Count-1)/2) do
if STmp<>00 then
begin
strTmp:=Chr(STmp[j]);
Inc(j);
strTmp:=strTmp + Chr(STmp[j]);
bytTmp:=StrToInt('$'+strTmp);
PwdStr:=PwdStr+Chr(bytTmp xor BTmp[i-1]);
Inc(j);
end;
end;
CloseKey;
finally
Free;
end;
Result:=PwdStr;
end;
 
在WIN98应该没问题,Win2000好像是登录口令,很难提取。
 
后退
顶部