-
Notifications
You must be signed in to change notification settings - Fork 3
/
Get-ZimmermanTools.ps1
92 lines (83 loc) · 2.75 KB
/
Get-ZimmermanTools.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
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
<#
.Synopsis
Get-ZimmermanTools.ps1 - automates download and extraction of Eric Zimmerman tools
.DESCRIPTION
Get-ZimmermanTools.ps1 - automates download and extraction of Eric Zimmerman tools
Tools are downloaded to location defined in -outDir parameter and extracted from
zip files. Zip files are removed after all tools are
.EXAMPLE
.\Get-ZimmermanTools.ps1 -imagePath D:\[root] -outDir c:\Utilities\Zimmerman
#>
param(
[string]$outDir = 'C:\Forensic Program Files\Zimmerman'
)
function Get-ZimmermanTools
{
$baseURI = 'https://f001.backblazeb2.com/file/EricZimmermanTools'
$filenames = @('AmcacheParser.zip',
'AppCompatCacheParser.zip',
'bstrings.zip',
'hasher.zip',
'JLECmd.zip',
'JumpListExplorer.zip',
'LECmd.zip',
'MFTECmd.zip',
'PECmd.zip',
'RecentFileCacheParser.zip',
'RegistryExplorer_RECmd.zip',
'RBCmd.zip',
'SDBExplorer.zip',
'ShellBagsExplorer.zip',
'TimelineExplorer.zip',
'VSCMount.zip',
'WxTCmd.zip'
)
### Testing for $outDir path and creating if it does not exist ###
If(!(Test-Path "$outDir")) {
New-Item -Path "$outDir" -ItemType Directory | Out-Null
}
# Forcing TLS 1.2
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# Loop over each file in $filename array
foreach($file in $filenames){
$url = "$baseURI/$file"
$savePath = "$outDir\$file"
# Download zip file
Try
{
(New-Object System.Net.WebClient).DownloadFile($url, $savePath)
}
catch
{
Write-Host "Download of $($file) failed. $($error[0])" -ForegroundColor Red
}
# Verify file exists
if(Test-Path $savePath){
# Extract file from archive
$error.clear()
Try
{
Expand-Archive -Path $savePath -DestinationPath $outDir -Force
}
Catch
{
Write-Host "Unzipping archive failed. $($error[0])" -ForegroundColor Red
}
if(!($error)){
# Remove zip files
Remove-Item -Path $savePath -Force
}
#Unblock Files
Get-ChildItem $outDir -Recurse | Unblock-File
}
}
}
Write-Host "Downloading and Extracting Files. Please wait for script to complete." -ForegroundColor Green
Try
{
Get-ZimmermanTools
}
Catch
{
Write-Output "Download failed. ##Error: $($error[0])"
}