-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.ps1
28 lines (23 loc) · 1.07 KB
/
install.ps1
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
function Invoke-LeakGuard {
param (
[String]$dllpath,
[String]$address,
[String]$name,
[String]$token
)
write-host "LeakGuard"
write-host "https://github.com/xiosec/LeakGuard"
write-host "[*] copy $dllpath -> System32"
Copy-Item -Path $dllpath -Destination "$env:SystemRoot\System32"
write-host "[*] copy $name -> Notification Packages"
$registryPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa"
$notificationPackages = Get-ItemProperty -Path $registryPath -Name "Notification Packages"
if ($notificationPackages."Notification Packages" -notcontains $name) {
$notificationPackages."Notification Packages" += $name
Set-ItemProperty -Path $registryPath -Name "Notification Packages" -Value $notificationPackages."Notification Packages"
}
write-host "[*] create $address key!"
New-ItemProperty -Path $registryPath -Name "LeakGuard Address" -Value $address -PropertyType String -Force
write-host "[*] create $token key!"
New-ItemProperty -Path $registryPath -Name "LeakGuard Token" -Value $token -PropertyType String -Force
}