Repository navigation
Expand file tree
/
Copy pathsonar_scripts.json
More file actions
387 lines (387 loc) · 14.1 KB
/
Copy pathsonar_scripts.json
File metadata and controls
387 lines (387 loc) · 14.1 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
[
{
"guid": "c0492467-6226-46fa-a308-8b37090d54e8",
"filename": "inventory/Get-HardwareSummary.ps1",
"name": "Inventory - Hardware summary",
"description": "Short hardware report (model, serial, BIOS, CPU, RAM, disks with media type, TPM and OS build); inventory action that changes nothing and exits 0.",
"shell": "powershell",
"category": "Inventory",
"args": [],
"env": [],
"syntax": "",
"default_timeout": 90,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "a356201b-3e9d-4328-b8e6-717d104c6162",
"filename": "inventory/Get-InstalledSoftware.ps1",
"name": "Inventory - Installed software",
"description": "Lists machine-wide installed programs from the Uninstall registry keys (name, version, publisher, install date); as a check with -NameFilter it exits 1 when nothing matches, otherwise 0.",
"shell": "powershell",
"category": "Inventory",
"args": [
"-NameFilter '*'"
],
"env": [],
"syntax": "[-NameFilter <string>] [-MaxItems <int>]",
"default_timeout": 120,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "d10f8412-db2d-4051-b27f-977f781c29fa",
"filename": "inventory/Get-UptimePendingReboot.ps1",
"name": "Inventory - Uptime and pending reboot",
"description": "Reports last boot, uptime and pending reboot reasons; check exits 2 when a reboot is pending or uptime exceeds -MaxUptimeDays, otherwise 0.",
"shell": "powershell",
"category": "Inventory",
"args": [
"-MaxUptimeDays 30"
],
"env": [],
"syntax": "[-MaxUptimeDays <int>]",
"default_timeout": 90,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "c7ae25c4-4a3e-4642-8607-cbddd62a3e5e",
"filename": "inventory/Get-WindowsActivation.ps1",
"name": "Inventory - Windows activation",
"description": "Checks the Windows license status, channel and last 5 characters of the product key; check exits 0 licensed, 2 grace or notification, 1 unlicensed.",
"shell": "powershell",
"category": "Inventory",
"args": [],
"env": [],
"syntax": "",
"default_timeout": 120,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "66133397-fe41-4c4a-ace0-274313e4db1b",
"filename": "cleanup/Clear-TempFiles.ps1",
"name": "Cleanup - Clear temporary files",
"description": "Reports (default dry run) or deletes with -DryRun:$false temp files older than -OlderThanDays in Windows, user, Windows Update and error reporting folders, optionally the recycle bin; action that exits 0, or 1 on error.",
"shell": "powershell",
"category": "Cleanup",
"args": [
"-OlderThanDays 7"
],
"env": [],
"syntax": "[-OlderThanDays <int>] [-IncludeRecycleBin] [-DryRun:$false]",
"default_timeout": 600,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "64a7ad23-b2b6-4a10-8ba4-c48226efc786",
"filename": "cleanup/Test-DiskFreeSpace.ps1",
"name": "Cleanup - Disk free space",
"description": "Checks free space on local fixed drives; check exits 1 when a drive is below both -MinFreePercent and -MinFreeGB, 2 when below one of them, 3 when -Drive does not exist, otherwise 0.",
"shell": "powershell",
"category": "Cleanup",
"args": [
"-MinFreePercent 10",
"-MinFreeGB 10"
],
"env": [],
"syntax": "[-Drive <letter>] [-MinFreePercent <int>] [-MinFreeGB <int>]",
"default_timeout": 60,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "ba9b9aad-1b25-48c5-b417-441b6ab6846e",
"filename": "windows-update/Test-WindowsUpdateHealth.ps1",
"name": "Windows Update - Health check",
"description": "Check of the local Windows Update client (services, last successful scan and install, SoftwareDistribution size, pending reboot, WSUS policy yes/no); exit 0 OK, 1 FAIL, 2 WARN.",
"shell": "powershell",
"category": "Windows Update",
"args": [],
"env": [],
"syntax": "[-MaxScanAgeDays <int>] [-MaxInstallAgeDays <int>] [-MaxFolderSizeGB <double>]",
"default_timeout": 120,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "653da36b-2611-4d3b-8181-68373b3e02bb",
"filename": "windows-update/Test-LastUpdateInstall.ps1",
"name": "Windows Update - Last install age",
"description": "Check of the days since the last successful update install (definition updates ignored), optionally counting pending updates with -IncludePending (slow); exit 0 OK, 1 FAIL over MaxDays, 2 WARN over 75% of MaxDays.",
"shell": "powershell",
"category": "Windows Update",
"args": [
"-MaxDays 35"
],
"env": [],
"syntax": "[-MaxDays <int>] [-IncludePending] [-IncludeDefinitionUpdates]",
"default_timeout": 600,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "6ceb6461-4a64-4df2-b845-43a263abfbd3",
"filename": "windows-update/Reset-WindowsUpdateComponents.ps1",
"name": "Windows Update - Reset components",
"description": "Action that stops the update services, renames SoftwareDistribution and catroot2 to a dated backup (keeping only the newest) and starts the services again; dry run by default, pass -DryRun:$false to apply.",
"shell": "powershell",
"category": "Windows Update",
"args": [],
"env": [],
"syntax": "[-DryRun:$false] [-ServiceTimeoutSeconds <int>]",
"default_timeout": 600,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "94343065-0a30-4617-8759-a28c55fcc5bb",
"filename": "bitlocker/Test-BitLockerRecoveryKey.ps1",
"name": "BitLocker - Recovery key backup",
"description": "Check that the OS volume has a BitLocker recovery password and that its backup to AD DS or Entra ID is recorded in the event log, never printing the key; exit 0 OK, 1 FAIL no recovery password, 2 WARN no backup evidence, 3 not applicable.",
"shell": "powershell",
"category": "BitLocker",
"args": [],
"env": [],
"syntax": "[-LookbackDays <int>]",
"default_timeout": 60,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "05ac476b-74f1-465a-9488-fb5d1df051af",
"filename": "bitlocker/Test-TpmSecureBoot.ps1",
"name": "BitLocker - TPM and Secure Boot",
"description": "Check of TPM 2.0 readiness, firmware type and Secure Boot; exit 0 OK, 1 FAIL no ready TPM 2.0 or Secure Boot off on UEFI, 2 WARN legacy BIOS with TPM 2.0, 3 legacy BIOS without TPM.",
"shell": "powershell",
"category": "BitLocker",
"args": [],
"env": [],
"syntax": "",
"default_timeout": 60,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "e8887da9-3605-4005-a4bc-1520ae86b2ac",
"filename": "bitlocker/Get-BitLockerStatus.ps1",
"name": "BitLocker - Volume status",
"description": "Check of BitLocker on every fixed volume (protection, conversion, method, protector types, never keys); exit 0 OK, 1 FAIL when the OS volume is unprotected, 2 WARN for data volumes or encryption in progress, 3 not available.",
"shell": "powershell",
"category": "BitLocker",
"args": [],
"env": [],
"syntax": "[-RequireOsVolumeOnly:$false]",
"default_timeout": 60,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "e04da0af-997b-4b04-8c38-f806f320a16b",
"filename": "defender/Test-DefenderStatus.ps1",
"name": "Defender - Protection status",
"description": "Check of Microsoft Defender service, antivirus, real-time and tamper protection, running mode and signature age; exit 0 OK, 1 FAIL protection off, 2 WARN stale signatures or tamper protection off, 3 Defender not available.",
"shell": "powershell",
"category": "Defender",
"args": [],
"env": [],
"syntax": "[-MaxSignatureAgeDays <int>] [-AllowPassive]",
"default_timeout": 60,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "39fd4124-d357-41cc-876b-4019a30096e4",
"filename": "defender/Get-DefenderDetections.ps1",
"name": "Defender - Recent detections",
"description": "Check that lists recent Microsoft Defender detections (time, threat, severity, status, truncated path); exit 0 none or all remediated, 1 not readable, 2 active detection, 3 Defender not available.",
"shell": "powershell",
"category": "Defender",
"args": [
"-Days 7"
],
"env": [],
"syntax": "[-Days <int>]",
"default_timeout": 60,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "2c23af3c-230b-4a5d-8925-3ed3854148df",
"filename": "defender/Update-DefenderAndScan.ps1",
"name": "Defender - Update and scan",
"description": "Action that updates Microsoft Defender signatures and runs a quick or full scan, reporting versions and new detections; raise the timeout to 3600 for a full scan; exit 0 OK, 1 scan failed or threat not remediated, 2 update failed or threats remediated, 3 not available.",
"shell": "powershell",
"category": "Defender",
"args": [
"-ScanType Quick"
],
"env": [],
"syntax": "[-ScanType <Quick|Full|None>]",
"default_timeout": 1800,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "b129b67b-0037-4f3c-bb8d-a7d6a3e343d3",
"filename": "network/Get-ListeningPorts.ps1",
"name": "Network - Listening ports",
"description": "Lists listening TCP (and optionally UDP) ports with owning process and services; as a check, exits 1 when a port given in -AlertOnPort listens on a non-loopback address, else 0.",
"shell": "powershell",
"category": "Network",
"args": [],
"env": [],
"syntax": "[-IncludeUdp] [-AlertOnPort <int[]>]",
"default_timeout": 60,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "e3a123df-89a9-4905-8d70-9f938bc4705b",
"filename": "network/Reset-NetworkStack.ps1",
"name": "Network - Reset network stack",
"description": "Action that flushes the DNS cache and optionally resets Winsock and TCP/IP, defaulting to a dry run and rebooting only with -AllowReboot; exits 2 when a reboot is still required, 1 on error.",
"shell": "powershell",
"category": "Network",
"args": [],
"env": [],
"syntax": "[-ResetWinsock] [-ResetTcpIp] [-AllowReboot] [-DryRun:$false]",
"default_timeout": 120,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "d3b7cd54-562d-4b8c-ba65-2a9d6dc230b5",
"filename": "network/Test-NetworkConnectivity.ps1",
"name": "Network - Test connectivity",
"description": "Check of active adapters, gateway ping, DNS resolution and a TCP connection with latency; exits 1 on no adapter, DNS or TCP failure, 2 when the gateway does not answer ping, 0 otherwise.",
"shell": "powershell",
"category": "Network",
"args": [],
"env": [],
"syntax": "[-DnsName <string>] [-Target <string>] [-Port <int>] [-TimeoutMs <int>]",
"default_timeout": 60,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "88daaf46-ca57-4f3a-9141-6a2e8139d2ac",
"filename": "security/Test-FirewallProfiles.ps1",
"name": "Security - Firewall profiles",
"description": "Check of the Windows Firewall Domain, Private and Public profiles; exits 1 when a profile is disabled, 2 when inbound default is Allow or a disabled profile is covered by a third-party firewall, 0 otherwise.",
"shell": "powershell",
"category": "Security",
"args": [],
"env": [],
"syntax": "[-Profiles <Domain|Private|Public[]>]",
"default_timeout": 60,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "a9f8d3d0-f497-4810-ac62-78ab4d7d18d3",
"filename": "security/Get-LocalAdministrators.ps1",
"name": "Security - Local administrators",
"description": "Lists members of the local Administrators group (found by SID, any language) with type and source; as a check with -Allowed, exits 1 when a member matches no allowed pattern, else 0.",
"shell": "powershell",
"category": "Security",
"args": [],
"env": [],
"syntax": "[-Allowed <string[]>]",
"default_timeout": 60,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "cead6105-d0b4-470a-9c7f-f1108a22aa52",
"filename": "security/Test-RdpSecurity.ps1",
"name": "Security - RDP security",
"description": "Check of Remote Desktop settings (NLA, security layer, port, firewall profiles); exits 3 when RDP is disabled, 1 when enabled without NLA, 2 when open on the Public profile or using legacy RDP encryption, 0 otherwise.",
"shell": "powershell",
"category": "Security",
"args": [],
"env": [],
"syntax": "",
"default_timeout": 60,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "9d5800f9-ff6c-48b4-9338-942dab981a7d",
"filename": "security/Test-SMBv1Disabled.ps1",
"name": "Security - SMBv1 disabled",
"description": "Check that SMBv1 is disabled; exits 1 when the SMBv1 server is enabled or its state cannot be read, 2 when only the SMBv1 client is enabled, 0 otherwise.",
"shell": "powershell",
"category": "Security",
"args": [],
"env": [],
"syntax": "",
"default_timeout": 90,
"supported_platforms": [
"windows"
],
"run_as_user": false
},
{
"guid": "ba2725b8-7a9b-42fc-bd9f-77cd616f6037",
"filename": "services/Test-ServiceRunning.ps1",
"name": "Services - Service running",
"description": "Checks that the services named in -Name are running, optionally starting them with -Restart; check exits 0 all running, 1 any not running, 3 service does not exist.",
"shell": "powershell",
"category": "Services",
"args": [
"-Name Winmgmt"
],
"env": [],
"syntax": "-Name <service[,service]> [-Restart]",
"default_timeout": 90,
"supported_platforms": [
"windows"
],
"run_as_user": false
}
]