forked from andreipintica/TSSV2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TSSv2_SEC.psm1
631 lines (587 loc) · 36.6 KB
/
TSSv2_SEC.psm1
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
629
630
631
<# # File: TSSv2_SEC.psm1
.SYNOPSIS
SEC module for collecting ETW traces and various custom tracing functionality
.DESCRIPTION
Define ETW traces for Windows SEC components
Add any custom tracing functinaliy for tracing SEC components
For Developers:
1. Switch test: .\TSSv2.ps1 -Start -SEC_TEST1
2. Scenario test: .\TSSv2.ps1 -start -Scenario SEC_MyScenarioTest
3. CollectLog test: .\TSSv2.ps1 -CollectLog SEC_DefenderGet -DefenderDurInMin 2
.NOTES
Dev. Lead: ?
Authors : WalterE
Requires : PowerShell V4 (Supported from Windows 8.1/Windows Server 2012 R2)
Version : see $global:TssVerDateSEC
.LINK
TSSv2 https://internal.support.services.microsoft.com/en-us/help/4619187
#>
<# latest changes
2022.12.07.0 [we] _SEC: add -Scenario SEC_General
2022.07.25.0 [we] add Defender tracing using scripts\MDEClientAnalyzer.ps1
#>
$global:TssVerDateSEC= "2023.04.18.0"
#------------------------------------------------------------
#region ETW component trace Providers
#------------------------------------------------------------
#endregion ETW component trace Providers
#------------------------------------------------------------
#region Scenario definitions
#------------------------------------------------------------
$SEC_General_ETWTracingSwitchesStatus = [Ordered]@{
#'NET_Dummy' = $true
'CommonTask NET' = $True ## <------ the commontask can take one of "Dev", "NET", "ADS", "UEX", "DnD" and "SHA", or "Full" or "Mini"
'NetshScenario InternetClient_dbg' = $true
'Procmon' = $true
#'WPR General' = $true
'PerfMon ALL' = $true
'PSR' = $true
'Video' = $true
'SDP NET' = $True
'xray' = $True
'CollectComponentLog' = $True
}
#endregion Scenario definitions
#------------------------------------------------------------
#region Pre-Start / Post-Stop / Collect functions for trace components and scenarios
#------------------------------------------------------------
#endregion Pre-Start / Post-Stop
#------------------------------------------------------------
#region data collections
#------------------------------------------------------------
#region helper functions
Function StartGet-MSInfo ([boolean]$NFO = $true, [boolean]$TXT = $true, [string]$OutputLocation = $PWD.Path, [string]$Suffix = '') {
$Process = "msinfo32.exe"
if (test-path (join-path ([Environment]::GetFolderPath("System")) $Process)) {
$ProcessPath = (join-path ([Environment]::GetFolderPath("System")) $Process)
}
elseif (test-path (join-path ([Environment]::GetFolderPath("CommonProgramFiles")) "Microsoft Shared\MSInfo\$Process")) {
$ProcessPath = (join-path ([Environment]::GetFolderPath("CommonProgramFiles")) "Microsoft Shared\MSInfo\$Process")
}
else {
FwCheck-Command-verified "cmd.exe"
$ProcessPath = "cmd.exe /c start /wait $Process"
}
if ($TXT) {
$InfoFile = Join-Path -Path $OutputLocation -ChildPath ("msinfo32" + $Suffix + ".txt")
FwCheckAuthenticodeSignature $ProcessPath
&$ProcessPath /report "$InfoFile"
}
if ($NFO) {
$InfoFile = Join-Path -Path $OutputLocation -ChildPath ("msinfo32" + $Suffix + ".nfo")
FwCheckAuthenticodeSignature $ProcessPath
&$ProcessPath /nfo "$InfoFile"
}
}
function EndTimedoutProcess ($process, $ProcessWaitMin) {
$proc = Get-Process $process -EA SilentlyContinue
if ($proc) {
Write-Host "$(Get-Date -f 'yyyyMMdd HH:mm:ss') Waiting max $ProcessWaitMin minutes on $process processes to complete "
Wait-Process -InputObject $proc -Timeout ($ProcessWaitMin * 60) -EA SilentlyContinue
$ProcessToEnd = Get-Process | Where-Object { $_.Name -eq "$process" } -EA SilentlyContinue
if ($null -ne $ProcessToEnd) {
Write-Host "timeout reached ..."
foreach ($prc in $ProcessToEnd) { stop-Process $prc -Force -EA SilentlyContinue }
}
}
}
function Start-NetTraces {
if ($NetTraceI) {
New-Item -ItemType Directory -Path "$resultOutputDir\NetTraces" -ErrorAction SilentlyContinue | out-Null
$traceFile = "$resultOutputDir\NetTraces\NetTrace.etl"
Write-Host "$(Get-Date -f 'yyyyMMdd HH:mm:ss') Stopping any running network trace profiles"
FwCheck-Command-verified "netsh.exe"
$StopNetCommand = Start-Process -PassThru -WindowStyle minimized netsh.exe -ArgumentList "trace stop"
FwCheck-Command-verified "netsh.exe"
$StopWfpCommand = Start-Process -PassThru -WindowStyle minimized netsh.exe -ArgumentList "wfp capture stop"
start-sleep 1
$NetshProcess = Get-Process | Where-Object { $_.Name -eq "netsh" } -ErrorAction SilentlyContinue
if ($null -ne $NetshProcess) {
foreach ($process in $NetshProcess) { stop-Process $process -Force }
}
FwCheck-Command-verified "ipconfig.exe"
$FlushDns = Start-Process -PassThru -WindowStyle minimized ipconfig.exe -ArgumentList "/flushdns"
FwCheck-Command-verified "netsh.exe"
$CleanArpCache = Start-Process -PassThru -WindowStyle minimized netsh.exe -ArgumentList "interface ip delete arpcache"
start-sleep 1
Write-Host "$(Get-Date -f 'yyyyMMdd HH:mm:ss') Now starting a new network trace with Duration: $MinutesToRun min - Enter 'q' to stop"
if ($buildNumber -le 7601) {
FwCheck-Command-verified "netsh.exe"
$StartNetCommand = Start-Process -WindowStyle hidden netsh.exe -WorkingDirectory "$resultOutputDir\NetTraces" -ArgumentList "trace start overwrite=yes capture=yes scenario=InternetClient report=yes maxSize=500 traceFile=`"$traceFile`" fileMode=circular"
}
else {
FwCheck-Command-verified "netsh.exe"
$StartNetCommand = Start-Process -WindowStyle hidden netsh.exe -WorkingDirectory "$resultOutputDir\NetTraces" -ArgumentList "trace start overwrite=yes capture=yes scenario=InternetClient_dbg report=yes maxSize=500 traceFile=`"$traceFile`" fileMode=circular"
}
FwCheck-Command-verified "netsh.exe"
$StartWFLogging = Start-Process -WindowStyle hidden netsh.exe -WorkingDirectory "$resultOutputDir\NetTraces" -ArgumentList "advfirewall set allprofiles logging allowedconnections enable" # enable firewall logging for allowed traffic
FwCheck-Command-verified "netsh.exe"
$StartWFLogging = Start-Process -WindowStyle hidden netsh.exe -WorkingDirectory "$resultOutputDir\NetTraces" -ArgumentList "advfirewall set allprofiles logging droppedconnections enable" # enable firewall logging for dropped traffic
FwCheck-Command-verified "netsh.exe"
$StartWFTraces = Start-Process -WindowStyle hidden netsh.exe -WorkingDirectory "$resultOutputDir\NetTraces" -ArgumentList "wfp capture start file=wfpdiag.cab keywords=19" # start capturing WFP log
FwCheck-Command-verified "netstat.exe"
&netstat -anob | Out-File "$resultOutputDir\NetTraces\NetStatOutputAtStart.txt"
"Netstat output above was taken at: " + (Get-Date) | Out-File "$resultOutputDir\NetTraces\NetStatOutputAtStart.txt" -Append
if (($OSPreviousVersion) -and (!$MDfWS)) {
$OMSPath = "$env:ProgramFiles\Microsoft Monitoring Agent\Agent\Tools"
if (Test-Path -path $OMSPath) {
$MMAPathExists = "True"
Get-Service HealthService | Stop-Service -ErrorAction SilentlyContinue
&$OMSPath\StopTracing.cmd | Out-Null
&$OMSPath\StartTracing.cmd VER | Out-Null
Get-Service HealthService | Start-Service -ErrorAction SilentlyContinue
}
}
}
}
function Stop-NetTraces {
if ($NetTraceI) {
FwCheck-Command-verified "netstat.exe"
&netstat -anob | Out-File "$resultOutputDir\NetTraces\NetStatOutputAtStop.txt"
"Netstat output above was taken at: " + (Get-Date) | Out-File "$resultOutputDir\NetTraces\NetStatOutputAtStop.txt" -Append
FwCheck-Command-verified "netsh.exe"
$StartWFLogging = Start-Process -WindowStyle hidden netsh.exe -WorkingDirectory "$resultOutputDir\NetTraces" -ArgumentList "advfirewall set allprofiles logging allowedconnections disable" # disable firewall logging for allowed traffic
FwCheck-Command-verified "netsh.exe"
$StartWFLogging = Start-Process -WindowStyle hidden netsh.exe -WorkingDirectory "$resultOutputDir\NetTraces" -ArgumentList "advfirewall set allprofiles logging droppedconnections disable" # disable firewall logging for dropped traffic
FwCheck-Command-verified "netsh.exe"
Start-Process -NoNewWindow netsh.exe -WorkingDirectory "$resultOutputDir\NetTraces" -ArgumentList "wfp capture stop"
FwCheck-Command-verified "netsh.exe"
Write-Host "$(Get-Date -f 'yyyyMMdd HH:mm:ss') Note: Stopping network and wfp traces may take a while..."
Start-Process -WindowStyle Normal netsh.exe -WorkingDirectory "$resultOutputDir\NetTraces" -ArgumentList "trace stop"
Copy-Item $env:SystemRoot\system32\LogFiles\Firewall\pfirewall.log -Destination "$resultOutputDir\NetTraces\" -ErrorAction SilentlyContinue
if (($MMAPathExists) -and (!$MDfWS)) {
&$OMSPath\StopTracing.cmd | Out-Null
Copy-Item $env:SystemRoot\Logs\OpsMgrTrace\* -Destination "$resultOutputDir\NetTraces\" -ErrorAction SilentlyContinue
}
# Dump HOSTS file content to file
Copy-Item $env:SystemRoot\System32\Drivers\etc\hosts -Destination "$resultOutputDir\SystemInfoLogs" -ErrorAction SilentlyContinue
EndTimedoutProcess "netsh" 10
}
}
function StartTimer {
$TraceStartTime = "{0:dd/MM/yyyy h:mm:ss tt zzz}" -f (get-date)
##Write-Report -section "general" -subsection "traceStartTime" -displayname "Trace StartTime: " -value $TraceStartTime
$timeout = New-TimeSpan -Minutes $MinutesToRun
$sw = [diagnostics.stopwatch]::StartNew()
Create-OnDemandStartEvent
if ($RemoteRun) {
Write-Warning "Trace started... Note that you can stop this non-interactive mode by running 'MDEClientAnalyzer.cmd' from another window or session"
Wait-OnDemandStop
} else {
while ($sw.elapsed -lt $timeout) {
Start-Sleep -Seconds 1
$rem = $timeout.TotalSeconds - $sw.elapsed.TotalSeconds
Write-Progress -Activity "Collecting traces, run your scenario now and press 'q' to stop data collection at any time" -Status "Progress:" -SecondsRemaining $rem -PercentComplete (($sw.elapsed.Seconds / $timeout.TotalSeconds) * 100)
if ([console]::KeyAvailable) {
$key = [System.Console]::ReadKey()
if ( $key.key -eq 'q') {
Write-Warning " $(Get-Date -f 'yyyyMMdd HH:mm:ss') The trace collection action was ended by user exit command"
break
}
}
}
}
$TraceStopTime = "{0:dd/MM/yyyy h:mm:ss tt zzz}" -f (get-date)
##Write-Report -section "general" -subsection "traceStopTime" -displayname "Trace StopTime: " -value $TraceStopTime
}
function Create-OnDemandStopEvent {
Write-host "Another non-interactive trace is already running... stopping log collection and exiting."
Write-EventLog -LogName "Application" -Source "MDEClientAnalyzer" -EventID 2 -EntryType Information -Message "MDEClientAnalyzer is stopping a running log set" -Category 1
[Environment]::Exit(1)
}
function Create-OnDemandStartEvent {
Write-EventLog -LogName "Application" -Source "MDEClientAnalyzer" -EventID 1 -EntryType Information -Message "MDEClientAnalyzer is starting OnDemand traces" -Category 1
}
function Write-Report($section, $subsection, $displayName, $value, $alert) {
$subsectionNode = $script:xmlDoc.CreateNode("element", $subsection, "")
$subsectionNode.SetAttribute("displayName", $displayName)
$eventContext1 = $script:xmlDoc.CreateNode("element", "value", "")
$eventContext1.psbase.InnerText = $value
$subsectionNode.AppendChild($eventContext1) | out-Null
if ($value -eq "Running") {
$alert = "None"
} elseif (($value -eq "Stopped" -or $value -eq "StartPending")) {
$alert = "High"
}
if ($alert) {
$eventContext2 = $script:xmlDoc.CreateNode("element", "alert", "")
$eventContext2.psbase.InnerText = $alert
$subsectionNode.AppendChild($eventContext2) | out-Null
}
$checkresult = $DisplayName + ": " + $value
# Write message to the ConnectivityCheckFile
$checkresult | Out-File $connectivityCheckFile -append
$xmlRoot = $script:xmlDoc.SelectNodes("/MDEResults")
$InputNode = $xmlRoot.SelectSingleNode($section)
$InputNode.AppendChild($subsectionNode) | Out-Null
}
# Initialize XML log - for consumption by external parser
function InitXmlLog {
$script:xmlDoc = New-Object System.Xml.XmlDocument
$script:xmlDoc = [xml]"<?xml version=""1.0"" encoding=""utf-8""?><MDEResults><general></general><devInfo></devInfo><EDRCompInfo></EDRCompInfo><MDEDevConfig></MDEDevConfig><AVCompInfo></AVCompInfo><events></events></MDEResults>"
}
# Define C# functions to extract info from Windows Security Center (WSC)
# WSC_SECURITY_PROVIDER as defined in Wscapi.h or http://msdn.microsoft.com/en-us/library/bb432509(v=vs.85).aspx
# And http://msdn.microsoft.com/en-us/library/bb432506(v=vs.85).aspx
$wscDefinition = @"
[Flags]
public enum WSC_SECURITY_PROVIDER : int
{
WSC_SECURITY_PROVIDER_FIREWALL = 1, // The aggregation of all firewalls for this computer.
WSC_SECURITY_PROVIDER_AUTOUPDATE_SETTINGS = 2, // The automatic update settings for this computer.
WSC_SECURITY_PROVIDER_ANTIVIRUS = 4, // The aggregation of all antivirus products for this computer.
WSC_SECURITY_PROVIDER_ANTISPYWARE = 8, // The aggregation of all anti-spyware products for this computer.
WSC_SECURITY_PROVIDER_INTERNET_SETTINGS = 16, // The settings that restrict the access of web sites in each of the Internet zones for this computer.
WSC_SECURITY_PROVIDER_USER_ACCOUNT_CONTROL = 32, // The User Account Control (UAC) settings for this computer.
WSC_SECURITY_PROVIDER_SERVICE = 64, // The running state of the WSC service on this computer.
WSC_SECURITY_PROVIDER_NONE = 0, // None of the items that WSC monitors.
// All of the items that the WSC monitors.
WSC_SECURITY_PROVIDER_ALL = WSC_SECURITY_PROVIDER_FIREWALL | WSC_SECURITY_PROVIDER_AUTOUPDATE_SETTINGS | WSC_SECURITY_PROVIDER_ANTIVIRUS |
WSC_SECURITY_PROVIDER_ANTISPYWARE | WSC_SECURITY_PROVIDER_INTERNET_SETTINGS | WSC_SECURITY_PROVIDER_USER_ACCOUNT_CONTROL |
WSC_SECURITY_PROVIDER_SERVICE | WSC_SECURITY_PROVIDER_NONE
}
[Flags]
public enum WSC_SECURITY_PROVIDER_HEALTH : int
{
WSC_SECURITY_PROVIDER_HEALTH_GOOD, // The status of the security provider category is good and does not need user attention.
WSC_SECURITY_PROVIDER_HEALTH_NOTMONITORED, // The status of the security provider category is not monitored by WSC.
WSC_SECURITY_PROVIDER_HEALTH_POOR, // The status of the security provider category is poor and the computer may be at risk.
WSC_SECURITY_PROVIDER_HEALTH_SNOOZE, // The security provider category is in snooze state. Snooze indicates that WSC is not actively protecting the computer.
WSC_SECURITY_PROVIDER_HEALTH_UNKNOWN
}
[DllImport("wscapi.dll")]
private static extern int WscGetSecurityProviderHealth(int inValue, ref int outValue);
// code to call interop function and return the relevant result
public static WSC_SECURITY_PROVIDER_HEALTH GetSecurityProviderHealth(WSC_SECURITY_PROVIDER inputValue)
{
int inValue = (int)inputValue;
int outValue = -1;
int result = WscGetSecurityProviderHealth(inValue, ref outValue);
foreach (WSC_SECURITY_PROVIDER_HEALTH wsph in Enum.GetValues(typeof(WSC_SECURITY_PROVIDER_HEALTH)))
if ((int)wsph == outValue) return wsph;
return WSC_SECURITY_PROVIDER_HEALTH.WSC_SECURITY_PROVIDER_HEALTH_UNKNOWN;
}
"@
function Defender-Get-Logs {
New-Item -ItemType Directory -Path "$resultOutputDir\DefenderAV" -ErrorAction SilentlyContinue | out-Null
#New-Item -ItemType Directory -Path "$resultOutputDir\SystemInfoLogs" -ErrorAction SilentlyContinue | out-Null
StartGet-MSInfo -NFO $true -TXT $false -OutputLocation "$resultOutputDir\SystemInfoLogs"
FwCheck-Command-verified "gpresult.exe"
&gpresult /SCOPE COMPUTER /H "$resultOutputDir\SystemInfoLogs\GP.html"
if ($MpCmdRunCommand) {
Write-Host "Running MpCmdRun -GetFiles..."
FwCheckAuthenticodeSignature $MpCmdRunCommand
&$MpCmdRunCommand -getfiles | Out-File "$resultOutputDir\DefenderAV\GetFilesLog.txt" -Append
Copy-Item -Path "$MpCmdResultPath\MpSupportFiles.cab" -Destination "$resultOutputDir\DefenderAV" -verbose -ErrorVariable GetFilesErr | Out-File "$resultOutputDir\DefenderAV\GetFilesLog.txt" -Append
$GetFilesErr | Out-File "$resultOutputDir\DefenderAV\GetFilesLog.txt" -Append
#Copy-Item -path "C:\Users\Public\Downloads\Capture.npcap" -Destination "$resultOutputDir\DefenderAV" -ErrorAction SilentlyContinue -verbose -ErrorVariable CopyNpCap | Out-File "$resultOutputDir\DefenderAV\GetFilesLog.txt" -Append
#$CopyNpCap | Out-File "$resultOutputDir\DefenderAV\GetFilesLog.txt" -Append
# Dump Defender related polices
Get-ChildItem "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -recurse | Out-File "$resultOutputDir\DefenderAV\Policy-DefenderAV.txt"
Get-ChildItem "HKLM:\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\RestrictedServices\Configurable\" -recurse | Out-File "$resultOutputDir\DefenderAV\Policy-Firewall.txt"
Get-ChildItem "HKU:\S-1-5-18\SOFTWARE\Microsoft\Windows Defender" -recurse -ErrorAction SilentlyContinue | Out-File "$resultOutputDir\DefenderAV\Policy-SystemService.txt"
Get-ChildItem "HKU:\S-1-5-20\SOFTWARE\Microsoft\Windows Defender" -recurse -ErrorAction SilentlyContinue | Out-File "$resultOutputDir\DefenderAV\Policy-NetworkService.txt"
}
FwCheck-Command-verified "fltmc.exe"
&fltmc instances -v "$env:SystemDrive" > $resultOutputDir\SystemInfoLogs\filters.txt
if ($OSProductName.tolower() -notlike ("*server*")) {
Write-output "`r`n##################### Windows Security Center checks ######################" | Out-File $connectivityCheckFile -Append
$wscType = Add-Type -memberDefinition $wscDefinition -name "wscType" -UsingNamespace "System.Reflection", "System.Diagnostics" -PassThru
" Firewall: " + $wscType[0]::GetSecurityProviderHealth($wscType[1]::WSC_SECURITY_PROVIDER_FIREWALL) | Out-File $connectivityCheckFile -Append
" Auto-Update: " + $wscType[0]::GetSecurityProviderHealth($wscType[1]::WSC_SECURITY_PROVIDER_AUTOUPDATE_SETTINGS) | Out-File $connectivityCheckFile -Append
" Anti-Virus: " + $wscType[0]::GetSecurityProviderHealth($wscType[1]::WSC_SECURITY_PROVIDER_ANTIVIRUS) | Out-File $connectivityCheckFile -Append
" Anti-Spyware: " + $wscType[0]::GetSecurityProviderHealth($wscType[1]::WSC_SECURITY_PROVIDER_ANTISPYWARE) | Out-File $connectivityCheckFile -Append
" Internet Settings: " + $wscType[0]::GetSecurityProviderHealth($wscType[1]::WSC_SECURITY_PROVIDER_INTERNET_SETTINGS) | Out-File $connectivityCheckFile -Append
"User Account Control: " + $wscType[0]::GetSecurityProviderHealth($wscType[1]::WSC_SECURITY_PROVIDER_USER_ACCOUNT_CONTROL) | Out-File $connectivityCheckFile -Append
" WSC Service: " + $wscType[0]::GetSecurityProviderHealth($wscType[1]::WSC_SECURITY_PROVIDER_SERVICE) | Out-File $connectivityCheckFile -Append
if ($wscType[0]::GetSecurityProviderHealth($wscType[1]::WSC_SECURITY_PROVIDER_FIREWALL) -eq $wscType[2]::WSC_SECURITY_PROVIDER_HEALTH_POOR) {
Write-output "Windows Defender firewall settings not optimal" | Out-File $connectivityCheckFile -Append
}
if ($wscType[0]::GetSecurityProviderHealth($wscType[1]::WSC_SECURITY_PROVIDER_USER_ACCOUNT_CONTROL) -eq $wscType[2]::WSC_SECURITY_PROVIDER_HEALTH_POOR) {
Write-output "User Account Controller (UAC) is switched off" | Out-File $connectivityCheckFile -Append
}
if ($wscType[0]::GetSecurityProviderHealth($wscType[1]::WSC_SECURITY_PROVIDER_ANTIVIRUS) -eq $wscType[2]::WSC_SECURITY_PROVIDER_HEALTH_GOOD) {
Write-output "Windows Defender anti-virus is running and up-to-date" | Out-File $connectivityCheckFile -Append
}
}
}
#endregion helper functions
function CollectSEC_DefenderGetLog{
EnterFunc $MyInvocation.MyCommand.Name
$ProcessWaitMin = 5 # wait max minutes to complete
$NetTraceI = $True
If($global:BoundParameters.ContainsKey('DefenderDurInMin')){
$global:SEC_DefenderDurInMin = $global:DefenderDurInMin
} else {$global:SEC_DefenderDurInMin = 5}
$MinutesToRun = $global:SEC_DefenderDurInMin
InitXmlLog
LogInfo "[$($MyInvocation.MyCommand.Name)] . running Defender Get-Logs "
#Store paths for MpCmdRun.exe usage
if (((FwGet-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinDefend" -Value ImagePath) -and ($OSBuild -ge 14393)) -or ($MDfWS)) {
$MsMpEngPath = FwGet-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinDefend" -Value ImagePath
[System.IO.DirectoryInfo]$CurrentMpCmdPath = $MsMpEngPath -replace "MsMpEng.exe" -replace """"
$MpCmdRunCommand = Join-Path $CurrentMpCmdPath "MpCmdRun.exe"
$MpCmdResultPath = "$env:ProgramData\Microsoft\Windows Defender\Support"
}
elseif (Test-Path -path "$env:ProgramFiles\Microsoft Security Client\MpCmdRun.exe") {
$CurrentMpCmdPath = "$env:ProgramFiles\Microsoft Security Client\"
$MpCmdRunCommand = "$env:ProgramFiles\Microsoft Security Client\MpCmdRun.exe"
$MpCmdResultPath = "$env:ProgramData\Microsoft\Microsoft Antimalware\Support"
}
[string]$OSProductName = FwGet-RegistryValue -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Value ProductName
$resultOutputDir = Join-Path $global:LogFolder "MDEClientAnalyzerResult"
$SysLogs = Join-Path $resultOutputDir "SystemInfoLogs"
$connectivityCheckFile = Join-Path $SysLogs "MDEClientAnalyzer.txt"
#New-PSDrive HKU Registry HKEY_USERS -ErrorAction SilentlyContinue | Out-Null
New-PSDrive -Name HKU -PSProvider Registry -Root HKEY_USERS -ErrorAction SilentlyContinue | Out-Null
New-Item -ItemType Directory -Path "$resultOutputDir\SystemInfoLogs" -ErrorAction SilentlyContinue | out-Null
Start-NetTraces
StartTimer
Stop-NetTraces
Defender-Get-Logs
FwAddRegItem @("ATP") _Stop_
# Check if MSinfo is still running and allow to run until timeout is reached
EndTimedoutProcess "msinfo32" 5
LogInfo "[$($MyInvocation.MyCommand.Name)] . Done SEC_DefenderGetLog"
EndFunc $MyInvocation.MyCommand.Name
}
function CollectSEC_DefenderFullLog{
# invokes external script until fully integrated into TSSv2; requires \BIN\PsExec.exe and MDEClientAnalyzer.exe
EnterFunc $MyInvocation.MyCommand.Name
If($global:BoundParameters.ContainsKey('DefenderDurInMin')){
$global:SEC_DefenderDurInMin = $global:DefenderDurInMin
} else {$global:SEC_DefenderDurInMin = 5}
LogInfo "[$($MyInvocation.MyCommand.Name)] . calling MDEClientAnalyzer.ps1 with Duration=$global:SEC_DefenderDurInMin min"
if ($global:IsLiteMode) { Write-Host -ForegroundColor Magenta "[WARNING] psExec.exe and MDEClientAnalyzer.exe are not available in TSS Lite mode; expect reduced/incomplete output"}
.\scripts\tss_MDEClientAnalyzer.ps1 -DataPath $global:LogFolder -AcceptEula -r -i -m $SEC_DefenderDurInMin
LogInfo "[$($MyInvocation.MyCommand.Name)] . Done MDEClientAnalyzer.ps1"
FwAddRegItem @("ATP") _Stop_
EndFunc $MyInvocation.MyCommand.Name
}
#endregion data collections
#region Registry Key modules for FwAddRegItem
<# Example:
$global:KeysHyperV = @("HKLM:Software\Microsoft\Windows NT\CurrentVersion\Virtualization", "HKLM:System\CurrentControlSet\Services\vmsmp\Parameters")
#>
$global:KeysWinATP = @("HKLM:Software\Microsoft\Windows Advanced Threat Protection\Status")
#endregion Registry Key modules
#region groups of Eventlogs for FwAddEvtLog
<# Example:
$global:EvtLogsEFS = @("Microsoft-Windows-NTFS/Operational", "Microsoft-Windows-NTFS/WHC")
#>
#endregion groups of Eventlogs
Export-ModuleMember -Function * -Cmdlet * -Variable * -Alias *
# SIG # Begin signature block
# MIInkwYJKoZIhvcNAQcCoIInhDCCJ4ACAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCARJ0UqiuFN0lpg
# WqsQlrLp5SLg4Wbc9l1OLXDOkhJClKCCDXYwggX0MIID3KADAgECAhMzAAADTrU8
# esGEb+srAAAAAANOMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIF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