-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinstall-analyst-utils.ps1
More file actions
628 lines (610 loc) Β· 29 KB
/
install-analyst-utils.ps1
File metadata and controls
628 lines (610 loc) Β· 29 KB
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
# Purpose: Install tools on the Windows Analyst machine.
# At the bottom of this script you can see which functions will be executed.
# Modify to fit your needs.
# Paths below are used for packages that are installed manually by the script
$pestudioPath = "C:\Tools\pestudio.zip"
$zimmermanPath = "C:\Tools\Get-ZimmermanTools.zip"
$cyberChefPath = "C:\Tools\CyberChef.zip"
$vsCommunityPath = "C:\Tools\vs_community.exe"
$corkamiPath = "C:\users\vagrant\desktop\corkami.zip"
$ghostpackPath = "C:\Tools\ghostpack.zip"
$sysInternalsPath = "C:\Tools\SysInternals.zip"
$bloodhoundPath = "C:\Tools\Bloodhound.zip"
$neo4jPath = "C:\Tools\neo4j.zip"
$airstrikePath = "C:\Tools\airstrike.zip"
$dnspyex = "C:\Tools\dnspyex.zip"
$pythonPath = "C:\Python310"
mkdir C:\Tools\
#############################################################################################
#############################################################################################
# Helper functions
# Helper function to create shortcuts
function Set-Shortcut([String] $src, [String] $dst) {
$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut($dst)
$Shortcut.TargetPath = $src
$Shortcut.Save()
}
# Helper function to update PATH env var
function Update-PathEnvVar([String] $path){
$mOldPath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path
$mNewPath = "$mOldPath;$path"
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $mNewPath
$uOldPath = (Get-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Environment' -Name PATH).path
$uNewPath = "$uOldPath;$path"
Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Environment' -Name PATH -Value $uNewPath
}
#############################################################################################
# Install Choco
function Install-Choco {
If (-not (Test-Path "C:\ProgramData\chocolatey")) {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing Chocolatey"
Invoke-Expression ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
} else {
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Chocolatey is already installed."
}
}
#############################################################################################
# Choco packages to install
# Add or Remove packages as you like
function Install-ChocoEssentials {
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading and installing essential choco packages..."
##########################################################
$pkgs = 'NotepadPlusPlus',
'7zip',
'git',
'GoogleChrome',
'vscode.portable'
ForEach ($pkgName in $pkgs)
{
choco install -y --limit-output --ignore-checksums --no-progress $pkgName
}
RefreshEnv
$desk = 'C:\users\vagrant\desktop\'
Set-Shortcut -src 'C:\ProgramData\chocolatey\bin' -dst $desk'ChocoBins.lnk'
}
#############################################################################################
function Install-Python {
# https://docs.python.org/3/using/windows.html#installing-without-ui
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading and installing Python..."
Try {
(New-Object System.Net.WebClient).DownloadFile('https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe',
'C:\Users\vagrant\Downloads\python.exe')
Start-Process -FilePath "C:\Users\vagrant\Downloads\python.exe" -ArgumentList "/quiet InstallAllUsers=1 PrependPath=1 TargetDir=$pythonPath Include_doc=0 Include_test=0" -Wait -NoNewWindow
del C:\Users\vagrant\Downloads\python.exe
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Python installation successful!"
} Catch {
Write-Host "Python download failed :("
}
}
#############################################################################################
function Install-AnalysisMiscTools {
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading and installing analysis misc tools..."
##########################################################
$pkgs = 'processhacker',
'resourcehacker.portable',
'yara',
'die'
# 'dotpeek' Exception of type 'System.OutOfMemoryException' was thrown.
#########################################################
ForEach ($pkgName in $pkgs)
{
choco install -y --limit-output --ignore-checksums --no-progress $pkgName
}
}
#############################################################################################
function Install-Burp {
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading and installing Burp..."
##########################################################
$pkgs = 'burp-suite-free-edition'
#########################################################
ForEach ($pkgName in $pkgs)
{
choco install -y --limit-output --ignore-checksums --no-progress $pkgName
}
}
#############################################################################################
function Install-NetworkAnalysisTools {
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading and installing Network Analysis Tools..."
##########################################################
$pkgs = 'wireshark',
'network-miner'
#########################################################
ForEach ($pkgName in $pkgs)
{
choco install -y --limit-output --ignore-checksums --no-progress $pkgName
}
}
#############################################################################################
function Install-DebuggerDisassembler {
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading and installing Debuggers and Disassemblers..."
##########################################################
$pkgs = 'ghidra',
'x64dbg.portable'
# 'dotpeek' Exception of type 'System.OutOfMemoryException' was thrown.
#########################################################
ForEach ($pkgName in $pkgs)
{
choco install -y --limit-output --ignore-checksums --no-progress $pkgName
}
}
#############################################################################################
function Install-HasherezadeTools {
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading and installing Hasherezade Tools..."
##########################################################
$pkgs = 'pebear',
'pesieve',
'hollowshunter'
#########################################################
ForEach ($pkgName in $pkgs)
{
choco install -y --limit-output --ignore-checksums --no-progress $pkgName
}
}
#############################################################################################
function Get-DnSpyEx {
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading DnSpyEx.zip..."
Try {
(New-Object System.Net.WebClient).DownloadFile('https://github.com/dnSpyEx/dnSpy/releases/download/v6.3.0/dnSpy-net-win64.zip', $dnspyex)
Expand-Archive -LiteralPath $dnspyex -DestinationPath 'C:\Tools\dnspyex'
del $dnspyex
$desk = 'C:\users\vagrant\desktop\'
Set-Shortcut -src 'C:\Tools\dnspyex\dnSpy.exe' -dst $desk'DnSpyEx.lnk'
} Catch {
Write-Host "Error downloading dnspy :("
}
}
#############################################################################################
# Download PEStudio
function Get-PEStudio {
# https://www.winitor.com/
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading pestudio.zip..."
Try {
(New-Object System.Net.WebClient).DownloadFile('https://www.winitor.com/tools/pestudio/current/pestudio.zip', $pestudioPath)
} Catch {
Write-Host "HTTPS connection failed. Switching to HTTP :("
(New-Object System.Net.WebClient).DownloadFile('http://www.winitor.com/tools/pestudio/current/pestudio.zip', $pestudioPath)
}
Expand-Archive -LiteralPath $pestudioPath -DestinationPath 'C:\Tools'
del $pestudioPath
$desk = 'C:\users\vagrant\desktop\'
Set-Shortcut -src 'C:\Tools\pestudio\pestudio.exe' -dst $desk'pestudio.lnk'
}
#############################################################################################
# Download and Run Get-ZimmermanTools
Function Install-ZimmermanTools {
# https://github.com/EricZimmerman/Get-ZimmermanTools
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Get-ZimmermanTools.zip..."
Try {
(New-Object System.Net.WebClient).DownloadFile('https://f001.backblazeb2.com/file/EricZimmermanTools/Get-ZimmermanTools.zip', $zimmermanPath)
Expand-Archive -LiteralPath $zimmermanPath -DestinationPath 'C:\Tools\ZimmermanTools'
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Running Get-ZimmermanTools.ps1..."
. c:\tools\ZimmermanTools\Get-ZimmermanTools.ps1 -Dest C:\Tools\ZimmermanTools
Update-PathEnvVar -path "C:\Tools\ZimmermanTools"
Update-PathEnvVar -path "C:\Tools\ZimmermanTools\EvtxECmd"
Update-PathEnvVar -path "C:\Tools\ZimmermanTools\RECmd"
Update-PathEnvVar -path "C:\Tools\ZimmermanTools\SQLECmd"
} Catch {
Write-Host "HTTPS connection failed. Switching to HTTP :("
(New-Object System.Net.WebClient).DownloadFile('http://f001.backblazeb2.com/file/EricZimmermanTools/Get-ZimmermanTools.zip', $zimmermanPath)
}
}
#############################################################################################
function Get-CyberChef {
# https://github.com/gchq/CyberChef
# Download for offline usage
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading CyberChef.zip..."
Try {
# TODO implement functionality to update hardcoded version to latest release
# Get latest version of Cyberchef
$latestUri = Invoke-WebRequest -UseBasicParsing -Method Get -Uri ('https://github.com/gchq/CyberChef/releases/latest') -MaximumRedirection 0 -ErrorAction SilentlyContinue
if ($latestUri.StatusCode -eq 302)
{
$latestUri = $latestUri.Headers.Location
}
$latestVersion = $latestUri.split("/")[-1]
$cyberChefLatest = 'https://github.com/gchq/CyberChef/releases/download/'+ $latestVersion +'/CyberChef_'+ $latestVersion +'.zip'
(New-Object System.Net.WebClient).DownloadFile($cyberChefLatest, $cyberChefPath)
Expand-Archive -LiteralPath $cyberChefPath -DestinationPath 'C:\Tools\CyberChef'
del $cyberChefPath
} Catch {
Write-Host "CyberChef download failed..."
}
}
#############################################################################################
function Get-Airstrike {
# https://github.com/smokeme/airstrike
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading airstrike..."
Try {
(New-Object System.Net.WebClient).DownloadFile('https://github.com/smokeme/airstrike/archive/refs/heads/main.zip', $airstrikePath)
Expand-Archive -LiteralPath $airstrikePath 'C:\Tools\'
del $airstrikePath
} Catch {
Write-Host "Airstrike download failed..."
}
}
#############################################################################################
function Get-Ghostpack {
# https://github.com/r3motecontrol/Ghostpack-CompiledBinaries
# https://github.com/GhostPack
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Ghostpack.zip..."
Try {
(New-Object System.Net.WebClient).DownloadFile('https://github.com/r3motecontrol/Ghostpack-CompiledBinaries/archive/refs/heads/master.zip', $ghostpackPath)
Expand-Archive -LiteralPath $ghostpackPath 'C:\Tools\'
del $ghostpackPath
} Catch {
Write-Host "Ghostpack download failed..."
}
}
#############################################################################################
function Get-CorkamiPosters {
# https://github.com/corkami/pics
# Beautiful reference
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Corkami Posters..."
Try {
(New-Object System.Net.WebClient).DownloadFile('https://github.com/corkami/pics/archive/refs/heads/master.zip', $corkamiPath)
Expand-Archive -LiteralPath $corkamiPath -DestinationPath 'C:\users\vagrant\desktop\Corkami'
del $corkamiPath
} Catch {
Write-Host "Corkami Posters download failed..."
}
}
#############################################################################################
function Get-SysInternals {
# https://docs.microsoft.com/en-us/sysinternals/downloads/sysinternals-suite
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading SysInternals..."
Try {
(New-Object System.Net.WebClient).DownloadFile('https://download.sysinternals.com/files/SysinternalsSuite.zip', $sysInternalsPath)
Expand-Archive -LiteralPath $sysInternalsPath -DestinationPath 'C:\Tools\SysInternals'
del $sysInternalsPath
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Creating shortcuts for SysInternals..."
$desk = 'C:\users\vagrant\desktop\'
Set-Shortcut -src 'C:\Tools\SysInternals\Autoruns64.exe' -dst $desk'Autoruns64.lnk'
Set-Shortcut -src 'C:\Tools\SysInternals\procexp64.exe' -dst $desk'procexp64.lnk'
Set-Shortcut -src 'C:\Tools\SysInternals\tcpview64.exe' -dst $desk'tcpview64.lnk'
Set-Shortcut -src 'C:\Tools\SysInternals\strings64.exe' -dst $desk'strings64.lnk'
Set-Shortcut -src 'C:\Tools\SysInternals\Procmon64.exe' -dst $desk'Procmon64.lnk'
} Catch {
Write-Host "SysInternals download failed..."
}
}
#############################################################################################
function Get-Nim {
# https://github.com/dom96/choosenim
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Nim..."
Try {
mkdir C:\Tools\nim
# # TODO implement functionality to update hardcoded version to latest release
(New-Object System.Net.WebClient).DownloadFile(
'https://github.com/dom96/choosenim/releases/download/v0.8.2/choosenim-0.8.2_windows_amd64.exe',
'C:\Tools\nim\choosenim.exe')
# cmd /c C:\Tools\nim\choosenim.exe stable -y --firstInstall --noColor # TODO causes powershell.exe : out of memory error, fix it
} Catch {
Write-Host "Choosenim download failed..."
}
}
#############################################################################################
function Install-CommunityVS2022 {
# Prepare machine for C# and C++ development
# https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio?view=vs-2022
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community?view=vs-2022&preserve-view=true
# https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading and installing Visual Studio..."
Try {
(New-Object System.Net.WebClient).DownloadFile('https://aka.ms/vs/17/release/vs_community.exe', $vsCommunityPath)
Start-Process -FilePath $vsCommunityPath -ArgumentList (
'--wait','--passive','--norestart', '--installWhileDownloading',
'--installPath', 'C:\Tools\VS2022',
'--add', 'Microsoft.VisualStudio.Component.CoreEditor',
'--add', 'Microsoft.VisualStudio.Workload.ManagedDesktop', # C#
'--add', 'Microsoft.Net.Component.4.7.2.SDK',
'--add', 'Microsoft.Net.Component.4.7.2.TargetingPack',
'--add', 'Microsoft.VisualStudio.Workload.NativeDesktop', # C++
'--includeRecommended'
) -Wait
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Creating shortcut for Visual Studio..."
$desk = 'C:\users\vagrant\desktop\'
Set-Shortcust -src 'C:\Tools\VS2022\Common7\IDE\devenv.exe' -dst $desk'Visual Studio 2022.lnk'
} Catch {
Write-Host "VS Community bootstraper Download failed..."
}
}
#############################################################################################
function Install-GoLang {
# https://go.dev/doc/install
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading GoLang..."
Try {
mkdir C:\Tools\golang
# # TODO implement functionality to update hardcoded version to latest release
(New-Object System.Net.WebClient).DownloadFile(
'https://go.dev/dl/go1.18.1.windows-amd64.msi',
'C:\Tools\golang\go.msi')
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing GoLang..."
MsiExec.exe /i C:\Tools\golang\go.msi /qn
} Catch {
Write-Host "GoLang download failed..."
}
}
#############################################################################################
function Install-Bloodhound {
# https://bloodhound.readthedocs.io/en/latest/installation/windows.html
# https://community.chocolatey.org/packages/openjdk
# https://neo4j.com/download-center/#community
# http://localhost:7474/browser/
# neo4j: Default login is username 'neo4j' and password 'neo4j'
Try {
$wc = New-Object System.Net.WebClient
#---
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading & installing Bloodhound dependencies: OpenJDK..."
# TODO set JDK 11 version in a better way
choco install -y --limit-output --ignore-checksums --no-progress openjdk11 --version=11.0.15_10
#--------------------------------------------------------------------------------------
# Update env vars manually to solve 'Unable to determine the path to java.exe' error
# TODO did mass update of env vars to solve the issue, maybe there is a better way
$env:JAVA_HOME = 'C:\Program Files\OpenJDK\openjdk-11.0.15_10'
$env:Path += 'C:\Program Files\OpenJDK\openjdk-11.0.15_10\bin'
[System.Environment]::SetEnvironmentVariable('JAVA_HOME','C:\Program Files\OpenJDK\openjdk-11.0.15_10',
[System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('JAVA_HOME','C:\Program Files\OpenJDK\openjdk-11.0.15_10',
[System.EnvironmentVariableTarget]::User)
[System.Environment]::SetEnvironmentVariable('Path',$Env:Path+';C:\Program Files\OpenJDK\openjdk-11.0.15_10\bin',
[System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('Path',$Env:Path+';C:\Program Files\OpenJDK\openjdk-11.0.15_10\bin',
[System.EnvironmentVariableTarget]::User)
# refreshenv
#---
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Bloodhound dependencies: Neo4J..."
$wc.DownloadFile(
'https://neo4j.com/artifact.php?name=neo4j-community-4.4.6-windows.zip', $neo4jPath)
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing Bloodhound dependencies: Neo4J..."
Expand-Archive -LiteralPath $neo4jPath -DestinationPath 'C:\Tools\'
cmd /c c:\tools\neo4j-community-4.4.6\bin\neo4j.bat install-service
cmd /c net start neo4j
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Neo4j: http://localhost:7474/browser/"
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Neo4j: Default creds are: neo4j\neo4j"
#---
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Bloodhound..."
$wc.DownloadFile(
'https://github.com/BloodHoundAD/BloodHound/releases/download/4.1.0/BloodHound-win32-x64.zip',
$bloodhoundPath)
Expand-Archive -LiteralPath $bloodhoundPath -DestinationPath 'C:\Tools\'
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Creating shortcut for Bloodhound..."
Set-Shortcut -src 'c:\Tools\BloodHound-win32-x64\BloodHound.exe' -dst 'c:\users\vagrant\desktop\Bloodhound.lnk'
Set-Shortcut -src 'http://localhost:7474/browser/' -dst 'c:\users\vagrant\desktop\Neo4j Setup.lnk'
# clean up
del $bloodhoundPath
del $neo4jPath
} Catch {
Write-Host "GoLang download failed..."
}
}
#############################################################################################
function Install-AtomicRedTeam {
# https://github.com/redcanaryco/invoke-atomicredteam/wiki/Installing-Atomic-Red-Team
# https://github.com/redcanaryco/invoke-atomicredteam/wiki/Import-the-Module
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Atomic Red Team..."
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
IEX (IWR 'https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/install-atomicredteam.ps1' -UseBasicParsing);
Install-AtomicRedTeam -getAtomics -InstallPath "C:\Tools\AtomicRedTeam"
Set-Shortcut -src 'C:\Tools\AtomicRedTeam' -dst 'C:\users\vagrant\desktop\AtomicRedTeam.lnk'
}
#############################################################################################
function Install-Kansa {
# https://github.com/davehull/Kansa
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Kansa..."
Try {
(New-Object System.Net.WebClient).DownloadFile(
'https://github.com/davehull/Kansa/archive/refs/heads/master.zip',
'C:\Tools\Kansa.zip')
Expand-Archive -LiteralPath 'C:\Tools\Kansa.zip' -DestinationPath 'C:\Tools\'
del 'C:\Tools\Kansa.zip'
Set-Shortcut -src 'C:\Tools\Kansa-master' -dst 'C:\users\vagrant\desktop\Kansa.lnk'
} Catch {
Write-Host "Kansa Download failed"
}
}
#############################################################################################
function Install-Chainsaw {
# https://github.com/countercept/chainsaw
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Chainsaw..."
Try {
(New-Object System.Net.WebClient).DownloadFile(
'https://github.com/countercept/chainsaw/releases/download/v1.1.7/chainsaw_x86_64-pc-windows-msvc.zip',
'C:\Tools\chainsaw.zip')
Expand-Archive -LiteralPath 'C:\Tools\chainsaw.zip' -DestinationPath 'C:\Tools\'
del 'C:\Tools\chainsaw.zip'
Set-Shortcut -src 'C:\Tools\chainsaw' -dst 'C:\users\vagrant\desktop\chainsaw.lnk'
} Catch {
Write-Host "Chainsaw Download failed"
}
}
#############################################################################################
function Install-DeepBlueCLI {
# https://github.com/sans-blue-team/DeepBlueCLI.git
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading DeepBlueCLI..."
Try {
(New-Object System.Net.WebClient).DownloadFile(
'https://github.com/sans-blue-team/DeepBlueCLI/archive/refs/heads/master.zip',
'C:\Tools\DeepBlueCLI.zip')
Expand-Archive -LiteralPath 'C:\Tools\DeepBlueCLI.zip' -DestinationPath 'C:\Tools\'
del 'C:\Tools\DeepBlueCLI.zip'
Set-Shortcut -src 'C:\Tools\DeepBlueCLI-master' -dst 'C:\users\vagrant\desktop\DeepBlueCLI.lnk'
} Catch {
Write-Host "DeepBlueCLI Download failed"
}
}
#############################################################################################
function Install-Jadx {
# https://github.com/skylot/jadx
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Jadx..."
Try {
(New-Object System.Net.WebClient).DownloadFile(
'https://github.com/skylot/jadx/releases/download/v1.4.0/jadx-gui-1.4.0-with-jre-win.zip',
'C:\Tools\jadx.zip')
Expand-Archive -LiteralPath 'C:\Tools\jadx.zip' -DestinationPath 'C:\Tools\'
del 'C:\Tools\jadx.zip'
Set-Shortcut -src 'C:\Tools\jadx-gui-1.4.0.exe' -dst 'C:\users\vagrant\desktop\jadx-gui.lnk'
} Catch {
Write-Host "Jadx Download failed"
}
}
#############################################################################################
function Install-Frida {
# https://frida.re/docs/installation/
# Check dependency
if (Test-Path -Path $pythonPath) {
write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Python is already installed..."
} else {
write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Python not installed..."
Install-Python
}
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing Frida..."
Start-Process -FilePath "c:\Python310\Scripts\pip.exe" -ArgumentList "install -q frida-tools" -Wait -NoNewWindow
}
#############################################################################################
function Install-HxD {
# https://mh-nexus.de/en/hxd/
# https://forum.mh-nexus.de/viewtopic.php?t=885
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading HxD..."
Try {
(New-Object System.Net.WebClient).DownloadFile(
'https://mh-nexus.de/downloads/HxDPortableSetup.zip',
'C:\Tools\hxd.zip')
Expand-Archive -LiteralPath 'C:\Tools\hxd.zip' -DestinationPath 'C:\Tools\'
Start-Process -FilePath "C:\Tools\HxDPortableSetup.exe" -ArgumentList '/Silent /ALLUSERS /LANG=English /DIR="C:\Tools\HxD"' -Wait -NoNewWindow
del 'C:\Tools\hxd.zip'
del 'C:\Tools\HxDPortableSetup.exe'
} Catch {
Write-Host "HxD Download failed"
}
}
#############################################################################################
function Install-PEFile {
# https://pypi.org/project/pefile/
# Check dependency
if (Test-Path -Path $pythonPath) {
write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Python is already installed..."
} else {
write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Python not installed..."
Install-Python
}
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing PEFile..."
Start-Process -FilePath "c:\Python310\Scripts\pip.exe" -ArgumentList "install -q pefile" -Wait -NoNewWindow
}
#############################################################################################
function Install-APIMonitor {
# http://www.rohitab.com/downloads
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading API Monitor..."
Try {
(New-Object System.Net.WebClient).DownloadFile(
'http://www.rohitab.com/download/api-monitor-v2r13-x86-x64.zip',
'C:\Tools\api-monitor.zip')
Expand-Archive -LiteralPath 'C:\Tools\api-monitor.zip' -DestinationPath 'C:\Tools\'
del 'C:\Tools\api-monitor.zip'
} Catch {
Write-Host "HxD Download failed"
}
}
#############################################################################################
function Install-MalcodeAnalystPack {
# https://github.com/dzzie/MAP
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Malcode Analyst Pack..."
Try {
(New-Object System.Net.WebClient).DownloadFile(
'https://github.com/dzzie/MAP/releases/download/current/map_setup.exe',
'C:\Tools\map_setup.exe')
Start-Process -FilePath "C:\Tools\map_setup.exe" -ArgumentList '/Silent /ALLUSERS /DIR="C:\Tools\map"' -Wait -NoNewWindow
del 'C:\Tools\map_setup.exe'
# Update path env var
[Environment]::SetEnvironmentVariable("PATH", $Env:PATH + ";C:\Tools\map", [EnvironmentVariableTarget]::Machine)
[Environment]::SetEnvironmentVariable("PATH", $Env:PATH + ";C:\Tools\map", [EnvironmentVariableTarget]::User)
} Catch {
Write-Host "Malcode Analyst Pack Download failed"
}
}
#############################################################################################
function Install-AndroidPlatformTools {
# For ADB, fastboot, etc
# https://developer.android.com/studio/releases/platform-tools
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Android Platform Tools..."
Try {
(New-Object System.Net.WebClient).DownloadFile(
'https://dl.google.com/android/repository/platform-tools-latest-windows.zip',
'C:\Tools\platform-tools.zip')
Expand-Archive -LiteralPath 'C:\Tools\platform-tools.zip' -DestinationPath 'C:\Tools\Android\'
del 'C:\Tools\platform-tools.zip'
Update-PathEnvVar -path "C:\Tools\Android\platform-tools"
} Catch {
Write-Host "Android Platform Tools Download failed"
}
}
#############################################################################################
function Install-DummyFilesCreator {
# https://github.com/Humoud/dummy-files-creator
# Fork of https://github.com/matuzalemmuller/dummy-files-creator
# Check dependency
if (Test-Path -Path $pythonPath) {
write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Python is already installed..."
} else {
write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Python not installed..."
Install-Python
}
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Dummy Files Creator..."
Try {
(New-Object System.Net.WebClient).DownloadFile(
'https://github.com/Humoud/dummy-files-creator/archive/refs/heads/master.zip',
'C:\Tools\dummyfilescreator.zip')
Expand-Archive -LiteralPath 'C:\Tools\dummyfilescreator.zip' -DestinationPath 'C:\Tools\'
Start-Process -FilePath "cmd" -ArgumentList '/c cd C:\Tools\dummy-files-creator-master\spec && C:\Python310\Scripts\pip.exe install -q -r ..\requirements.txt && C:\Python310\Scripts\pyinstaller.exe --clean --windowed --onefile windows.spec' -Wait -NoNewWindow
cp 'C:\tools\dummy-files-creator-master\spec\dist\Dummy Files Creator.exe' C:\Tools\
Remove-Item C:\Tools\dummy-files-creator-master\ -Recurse
del 'C:\Tools\dummyfilescreator.zip'
} Catch {
Write-Host "Dummy Files Creator Download failed"
}
}
#############################################################################################
#############################################################################################
## Think of the below as "main"
## Include or exclude functions as you please
# Create shortcut for tools folder
Set-Shortcut -src 'C:\Tools' -dst 'C:\users\vagrant\desktop\Tools.lnk'
Install-Choco # Needed by other functions
Install-ChocoEssentials
###########
# Blue-ish
Install-AnalysisMiscTools
Install-ZimmermanTools
Install-Kansa
Install-Chainsaw
Install-DeepBlueCLI
Get-PEStudio
Install-NetworkAnalysisTools
Install-DebuggerDisassembler
Get-DnSpyEx
Install-HasherezadeTools
Install-HxD
Install-Jadx
Install-PEFile
Install-APIMonitor
Install-MalcodeAnalystPack
###########
# Red-ish
Install-Burp
Get-Ghostpack
Get-Nim
Get-Airstrike
Install-GoLang
Install-Bloodhound
Install-CommunityVS2022
Install-AtomicRedTeam
###########
# Misc
Get-CorkamiPosters
Get-CyberChef
Get-SysInternals
Install-Frida
Install-AndroidPlatformTools
Install-DummyFilesCreator
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Utilities installation complete!"