Browse Source

AuditProcess removed

master
Dmitry Nefedov 4 months ago
parent
commit
bcfbd51f60
  1. 16
      Wrapper/Config/config_Windows_10.json
  2. 18
      Wrapper/Config/config_Windows_10_LTSC.json
  3. 16
      Wrapper/Config/config_Windows_11.json
  4. 18
      Wrapper/Localizations/de-DE/tooltip_Windows_10.json
  5. 18
      Wrapper/Localizations/de-DE/tooltip_Windows_11.json
  6. 18
      Wrapper/Localizations/en-US/tooltip_Windows_10.json
  7. 18
      Wrapper/Localizations/en-US/tooltip_Windows_11.json
  8. 18
      Wrapper/Localizations/ru-RU/tooltip_Windows_10.json
  9. 18
      Wrapper/Localizations/ru-RU/tooltip_Windows_11.json
  10. 51
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  11. 26
      src/Sophia_Script_for_Windows_10/Sophia.ps1
  12. 51
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
  13. 26
      src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1
  14. 51
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  15. 26
      src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1
  16. 51
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  17. 26
      src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1
  18. 62
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  19. 26
      src/Sophia_Script_for_Windows_11/Sophia.ps1
  20. 51
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1
  21. 26
      src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

16
Wrapper/Config/config_Windows_10.json

@ -2068,22 +2068,6 @@
"Preset": "Zero", "Preset": "Zero",
"WindowsDefault": "" "WindowsDefault": ""
}, },
{
"Region": "Microsoft Defender & Security",
"Control": "cmb",
"Required": "false",
"Function": "AuditProcess",
"Arg": {
"Zero": {
"Tag": "Enable"
},
"One": {
"Tag": "Disable"
}
},
"Preset": "Zero",
"WindowsDefault": "One"
},
{ {
"Region": "Microsoft Defender & Security", "Region": "Microsoft Defender & Security",
"Control": "cmb", "Control": "cmb",

18
Wrapper/Config/config_Windows_10_LTSC.json

@ -1893,24 +1893,6 @@
"LTSC2019": "true", "LTSC2019": "true",
"LTSC2021": "true" "LTSC2021": "true"
}, },
{
"Region": "Microsoft Defender & Security",
"Control": "cmb",
"Required": "false",
"Function": "AuditProcess",
"Arg": {
"Zero": {
"Tag": "Enable"
},
"One": {
"Tag": "Disable"
}
},
"Preset": "Zero",
"WindowsDefault": "One",
"LTSC2019": "true",
"LTSC2021": "true"
},
{ {
"Region": "Microsoft Defender & Security", "Region": "Microsoft Defender & Security",
"Control": "cmb", "Control": "cmb",

16
Wrapper/Config/config_Windows_11.json

@ -1946,22 +1946,6 @@
"Preset": "Zero", "Preset": "Zero",
"WindowsDefault": "" "WindowsDefault": ""
}, },
{
"Region": "Microsoft Defender & Security",
"Control": "cmb",
"Required": "false",
"Function": "AuditProcess",
"Arg": {
"Zero": {
"Tag": "Enable"
},
"One": {
"Tag": "Disable"
}
},
"Preset": "Zero",
"WindowsDefault": "One"
},
{ {
"Region": "Microsoft Defender & Security", "Region": "Microsoft Defender & Security",
"Control": "cmb", "Control": "cmb",

18
Wrapper/Localizations/de-DE/tooltip_Windows_10.json

@ -1812,27 +1812,13 @@
} }
} }
}, },
{
"Region": "Microsoft Defender & Security",
"Function": "AuditProcess",
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Aktiviert die Ereignisüberwachung, die beim Erstellen (Starten) eines Prozesses erzeugt werden."
},
"One": {
"Tag": "Disable",
"ToolTip": "Deaktiviert die Ereignisüberwachung, die beim Erstellen (Starten) eines Prozesses erzeugt wird (Standardeinstellung)."
}
}
},
{ {
"Region": "Microsoft Defender & Security", "Region": "Microsoft Defender & Security",
"Function": "CommandLineProcessAudit", "Function": "CommandLineProcessAudit",
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Enable", "Tag": "Enable",
"ToolTip": "Einbeziehung der Befehlszeile in Ereignisse der Prozesserstellung. Damit diese Funktion funktioniert, muss die Ereignisüberprüfung (ProcessAudit -Enable) aktiviert werden." "ToolTip": "Einbeziehung der Befehlszeile in Ereignisse der Prozesserstellung."
}, },
"One": { "One": {
"Tag": "Disable", "Tag": "Disable",
@ -1846,7 +1832,7 @@
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Enable", "Tag": "Enable",
"ToolTip": "Erstellt eine dauerhafte Ansicht \"Prozesserstellung\" in der Ereignisanzeige. Damit dies funktioniert, müssen Auditing-Ereignisse (AuditProcess -Enable) und Kommandozeilenereignisse bei der Prozesserstellung aktiviert sein." "ToolTip": "Erstellt eine dauerhafte Ansicht \"Prozesserstellung\" in der Ereignisanzeige. Damit diese Funktion funktioniert, müssen Ereignisse in der Befehlszeile (CommandLineProcessAudit -Enable) in den Ereignissen der Prozesserstellung aktiviert werden."
}, },
"One": { "One": {
"Tag": "Disable", "Tag": "Disable",

18
Wrapper/Localizations/de-DE/tooltip_Windows_11.json

@ -1707,27 +1707,13 @@
} }
} }
}, },
{
"Region": "Microsoft Defender & Security",
"Function": "AuditProcess",
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Aktiviert das Überwachen von Ereignissen, die beim Erstellen (Starten) eines Prozesses erzeugt werden."
},
"One": {
"Tag": "Disable",
"ToolTip": "Deaktiviert das Überwachen von Ereignissen, die beim Erstellen (Starten) eines Prozesses erzeugt werden."
}
}
},
{ {
"Region": "Microsoft Defender & Security", "Region": "Microsoft Defender & Security",
"Function": "CommandLineProcessAudit", "Function": "CommandLineProcessAudit",
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Enable", "Tag": "Enable",
"ToolTip": "Einbeziehung der Befehlszeile in Ereignisse der Prozesserstellung. Damit diese Funktion funktioniert, muss die Ereignisüberprüfung (ProcessAudit -Enable) aktiviert werden." "ToolTip": "Einbeziehung der Befehlszeile in Ereignisse der Prozesserstellung."
}, },
"One": { "One": {
"Tag": "Disable", "Tag": "Disable",
@ -1741,7 +1727,7 @@
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Enable", "Tag": "Enable",
"ToolTip": "Erstellt eine benutzerdefinierte Ansicht \"Prozesserstellung\", um ausgeführte Prozesse und ihre Argumente zu protokollieren. Damit diese Funktion funktioniert, müssen die Ereignisprüfung (AuditProcess -Enable) und die Befehlszeile (CommandLineProcessAudit -Enable) in Ereignissen zur Prozesserstellung aktiviert werden." "ToolTip": "Erstellt eine benutzerdefinierte Ansicht \"Prozesserstellung\", um ausgeführte Prozesse und ihre Argumente zu protokollieren. Damit diese Funktion funktioniert, müssen Ereignisse in der Befehlszeile (CommandLineProcessAudit -Enable) in den Ereignissen der Prozesserstellung aktiviert werden."
}, },
"One": { "One": {
"Tag": "Disable", "Tag": "Disable",

18
Wrapper/Localizations/en-US/tooltip_Windows_10.json

@ -1812,27 +1812,13 @@
} }
} }
}, },
{
"Region": "Microsoft Defender & Security",
"Function": "AuditProcess",
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Enable events auditing generated when a process is created (starts)."
},
"One": {
"Tag": "Disable",
"ToolTip": "Disable events auditing generated when a process is created (starts) (default value)."
}
}
},
{ {
"Region": "Microsoft Defender & Security", "Region": "Microsoft Defender & Security",
"Function": "CommandLineProcessAudit", "Function": "CommandLineProcessAudit",
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Enable", "Tag": "Enable",
"ToolTip": "Include command line in process creation events. In order this feature to work events auditing (ProcessAudit -Enable) will be enabled." "ToolTip": "Include command line in process creation events."
}, },
"One": { "One": {
"Tag": "Disable", "Tag": "Disable",
@ -1846,7 +1832,7 @@
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Enable", "Tag": "Enable",
"ToolTip": "Create the \"Process Creation\" сustom view in the Event Viewer to log executed processes and their arguments. In order this feature to work events auditing (AuditProcess -Enable) and command line (CommandLineProcessAudit -Enable) in process creation events will be enabled." "ToolTip": "Create the \"Process Creation\" сustom view in the Event Viewer to log executed processes and their arguments. In order this feature to work events command line (CommandLineProcessAudit -Enable) in process creation events will be enabled."
}, },
"One": { "One": {
"Tag": "Disable", "Tag": "Disable",

18
Wrapper/Localizations/en-US/tooltip_Windows_11.json

@ -1707,27 +1707,13 @@
} }
} }
}, },
{
"Region": "Microsoft Defender & Security",
"Function": "AuditProcess",
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Enable events auditing generated when a process is created (starts)."
},
"One": {
"Tag": "Disable",
"ToolTip": "Disable events auditing generated when a process is created (starts) (default value)."
}
}
},
{ {
"Region": "Microsoft Defender & Security", "Region": "Microsoft Defender & Security",
"Function": "CommandLineProcessAudit", "Function": "CommandLineProcessAudit",
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Enable", "Tag": "Enable",
"ToolTip": "Include command line in process creation events. In order this feature to work events auditing (ProcessAudit -Enable) will be enabled." "ToolTip": "Include command line in process creation events."
}, },
"One": { "One": {
"Tag": "Disable", "Tag": "Disable",
@ -1741,7 +1727,7 @@
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Enable", "Tag": "Enable",
"ToolTip": "Create the \"Process Creation\" Event Viewer сustom view to log executed processes and their arguments. In order this feature to work events auditing (AuditProcess -Enable) and command line (CommandLineProcessAudit -Enable) in process creation events will be enabled." "ToolTip": "Create the \"Process Creation\" Event Viewer сustom view to log executed processes and their arguments. In order this feature to work events command line (CommandLineProcessAudit -Enable) in process creation events will be enabled."
}, },
"One": { "One": {
"Tag": "Disable", "Tag": "Disable",

18
Wrapper/Localizations/ru-RU/tooltip_Windows_10.json

@ -1812,27 +1812,13 @@
} }
} }
}, },
{
"Region": "Microsoft Defender & Security",
"Function": "AuditProcess",
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Включить аудит событий, возникающих при создании или запуске процесса."
},
"One": {
"Tag": "Disable",
"ToolTip": "Выключить аудит событий, возникающих при создании или запуске процесса (значение по умолчанию)."
}
}
},
{ {
"Region": "Microsoft Defender & Security", "Region": "Microsoft Defender & Security",
"Function": "CommandLineProcessAudit", "Function": "CommandLineProcessAudit",
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Enable", "Tag": "Enable",
"ToolTip": "Включать командную строку в событиях создания процесса. Для того, чтобы работал данный функционал, будет включен аудит событий (AuditProcess -Enable)." "ToolTip": "Включать командную строку в событиях создания процесса."
}, },
"One": { "One": {
"Tag": "Disable", "Tag": "Disable",
@ -1846,7 +1832,7 @@
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Enable", "Tag": "Enable",
"ToolTip": "Создать настраиваемое представление \"Создание процесса\" в Просмотре событий. Для того, чтобы работал данный функционал, буден включен аудит событий (AuditProcess -Enable) и командной строки (CommandLineProcessAudit -Enable) в событиях создания процесса." "ToolTip": "Создать настраиваемое представление \"Создание процесса\" в Просмотре событий. Для того, чтобы работал данный функционал, буден включен командной строки (CommandLineProcessAudit -Enable) в событиях создания процесса."
}, },
"One": { "One": {
"Tag": "Disable", "Tag": "Disable",

18
Wrapper/Localizations/ru-RU/tooltip_Windows_11.json

@ -1707,27 +1707,13 @@
} }
} }
}, },
{
"Region": "Microsoft Defender & Security",
"Function": "AuditProcess",
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Включить аудит событий, возникающих при создании или запуске процесса."
},
"One": {
"Tag": "Disable",
"ToolTip": "Выключить аудит событий, возникающих при создании или запуске процесса (значение по умолчанию)."
}
}
},
{ {
"Region": "Microsoft Defender & Security", "Region": "Microsoft Defender & Security",
"Function": "CommandLineProcessAudit", "Function": "CommandLineProcessAudit",
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Enable", "Tag": "Enable",
"ToolTip": "Включать командную строку в событиях создания процесса. Для того, чтобы работал данный функционал, будет включен аудит событий (AuditProcess -Enable)." "ToolTip": "Включать командную строку в событиях создания процесса."
}, },
"One": { "One": {
"Tag": "Disable", "Tag": "Disable",
@ -1741,7 +1727,7 @@
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Enable", "Tag": "Enable",
"ToolTip": "Создать настраиваемое представление \"Создание процесса\" в Просмотре событий. Для того, чтобы работал данный функционал, буден включен аудит событий (AuditProcess -Enable) и командной строки (CommandLineProcessAudit -Enable) в событиях создания процесса." "ToolTip": "Создать настраиваемое представление \"Создание процесса\" в Просмотре событий. Для того, чтобы работал данный функционал, буден включен командной строки (CommandLineProcessAudit -Enable) в событиях создания процесса."
}, },
"One": { "One": {
"Tag": "Disable", "Tag": "Disable",

51
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -13867,57 +13867,6 @@ function DismissSmartScreenFilter
} }
} }
<#
.SYNOPSIS
Audit process creation
.PARAMETER Enable
Enable events auditing generated when a process is created (starts)
.PARAMETER Disable
Disable events auditing generated when a process is created (starts)
.EXAMPLE
AuditProcess -Enable
.EXAMPLE
AuditProcess -Disable
.NOTES
Machine-wide
#>
function AuditProcess
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
auditpol /set /subcategory:"{0CCE922B-69AE-11D9-BED3-505054503030}" /success:enable /failure:enable
}
"Disable"
{
auditpol /set /subcategory:"{0CCE922B-69AE-11D9-BED3-505054503030}" /success:disable /failure:disable
}
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Сommand line auditing Сommand line auditing

26
src/Sophia_Script_for_Windows_10/Sophia.ps1

@ -1268,34 +1268,16 @@ DismissMSAccount
# Отклонить предложение Microsoft Defender в "Безопасность Windows" включить фильтр SmartScreen для Microsoft Edge # Отклонить предложение Microsoft Defender в "Безопасность Windows" включить фильтр SmartScreen для Microsoft Edge
DismissSmartScreenFilter DismissSmartScreenFilter
# Enable events auditing generated when a process is created (starts) # Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments
# Включить аудит событий, возникающих при создании или запуске процесса # Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
AuditProcess -Enable
# Disable events auditing generated when a process is created (starts) (default value)
# Выключить аудит событий, возникающих при создании или запуске процесса (значение по умолчанию)
# AuditProcess -Disable
<#
Include command line in process creation events
In order this feature to work events auditing (ProcessAudit -Enable) will be enabled
Включать командную строку в событиях создания процесса
Для того, чтобы работал данный функционал, будет включен аудит событий (AuditProcess -Enable)
#>
CommandLineProcessAudit -Enable CommandLineProcessAudit -Enable
# Do not include command line in process creation events (default value) # Do not include command line in process creation events (default value)
# Не включать командную строку в событиях создания процесса (значение по умолчанию) # Не включать командную строку в событиях создания процесса (значение по умолчанию)
# CommandLineProcessAudit -Disable # CommandLineProcessAudit -Disable
<# # Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments
Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments # Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
In order this feature to work events auditing (AuditProcess -Enable) and command line (CommandLineProcessAudit -Enable) in process creation events will be enabled
Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
Для того, чтобы работал данный функционал, буден включен аудит событий (AuditProcess -Enable) и командной строки (CommandLineProcessAudit -Enable) в событиях создания процесса
#>
EventViewerCustomView -Enable EventViewerCustomView -Enable
# Remove the "Process Creation" custom view in the Event Viewer to log executed processes and their arguments (default value) # Remove the "Process Creation" custom view in the Event Viewer to log executed processes and their arguments (default value)

51
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -10421,57 +10421,6 @@ function DismissSmartScreenFilter
} }
} }
<#
.SYNOPSIS
Audit process creation
.PARAMETER Enable
Enable events auditing generated when a process is created (starts)
.PARAMETER Disable
Disable events auditing generated when a process is created (starts)
.EXAMPLE
AuditProcess -Enable
.EXAMPLE
AuditProcess -Disable
.NOTES
Machine-wide
#>
function AuditProcess
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
auditpol /set /subcategory:"{0CCE922B-69AE-11D9-BED3-505054503030}" /success:enable /failure:enable
}
"Disable"
{
auditpol /set /subcategory:"{0CCE922B-69AE-11D9-BED3-505054503030}" /success:disable /failure:disable
}
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Сommand line auditing Сommand line auditing

26
src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1

@ -928,34 +928,16 @@ DismissMSAccount
# Отклонить предложение Microsoft Defender в "Безопасность Windows" включить фильтр SmartScreen для Microsoft Edge # Отклонить предложение Microsoft Defender в "Безопасность Windows" включить фильтр SmartScreen для Microsoft Edge
DismissSmartScreenFilter DismissSmartScreenFilter
# Enable events auditing generated when a process is created (starts) # Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments
# Включить аудит событий, возникающих при создании или запуске процесса # Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
AuditProcess -Enable
# Disable events auditing generated when a process is created (starts) (default value)
# Выключить аудит событий, возникающих при создании или запуске процесса (значение по умолчанию)
# AuditProcess -Disable
<#
Include command line in process creation events
In order this feature to work events auditing (ProcessAudit -Enable) will be enabled
Включать командную строку в событиях создания процесса
Для того, чтобы работал данный функционал, будет включен аудит событий (AuditProcess -Enable)
#>
CommandLineProcessAudit -Enable CommandLineProcessAudit -Enable
# Do not include command line in process creation events (default value) # Do not include command line in process creation events (default value)
# Не включать командную строку в событиях создания процесса (значение по умолчанию) # Не включать командную строку в событиях создания процесса (значение по умолчанию)
# CommandLineProcessAudit -Disable # CommandLineProcessAudit -Disable
<# # Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments
Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments # Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
In order this feature to work events auditing (AuditProcess -Enable) and command line (CommandLineProcessAudit -Enable) in process creation events will be enabled
Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
Для того, чтобы работал данный функционал, буден включен аудит событий (AuditProcess -Enable) и командной строки (CommandLineProcessAudit -Enable) в событиях создания процесса
#>
EventViewerCustomView -Enable EventViewerCustomView -Enable
# Remove the "Process Creation" custom view in the Event Viewer to log executed processes and their arguments (default value) # Remove the "Process Creation" custom view in the Event Viewer to log executed processes and their arguments (default value)

51
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -11552,57 +11552,6 @@ function DismissSmartScreenFilter
} }
} }
<#
.SYNOPSIS
Audit process creation
.PARAMETER Enable
Enable events auditing generated when a process is created (starts)
.PARAMETER Disable
Disable events auditing generated when a process is created (starts)
.EXAMPLE
AuditProcess -Enable
.EXAMPLE
AuditProcess -Disable
.NOTES
Machine-wide
#>
function AuditProcess
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
auditpol /set /subcategory:"{0CCE922B-69AE-11D9-BED3-505054503030}" /success:enable /failure:enable
}
"Disable"
{
auditpol /set /subcategory:"{0CCE922B-69AE-11D9-BED3-505054503030}" /success:disable /failure:disable
}
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Сommand line auditing Сommand line auditing

26
src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1

@ -1067,34 +1067,16 @@ DismissMSAccount
# Отклонить предложение Microsoft Defender в "Безопасность Windows" включить фильтр SmartScreen для Microsoft Edge # Отклонить предложение Microsoft Defender в "Безопасность Windows" включить фильтр SmartScreen для Microsoft Edge
DismissSmartScreenFilter DismissSmartScreenFilter
# Enable events auditing generated when a process is created (starts) # Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments
# Включить аудит событий, возникающих при создании или запуске процесса # Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
AuditProcess -Enable
# Disable events auditing generated when a process is created (starts) (default value)
# Выключить аудит событий, возникающих при создании или запуске процесса (значение по умолчанию)
# AuditProcess -Disable
<#
Include command line in process creation events
In order this feature to work events auditing (ProcessAudit -Enable) will be enabled
Включать командную строку в событиях создания процесса
Для того, чтобы работал данный функционал, будет включен аудит событий (AuditProcess -Enable)
#>
CommandLineProcessAudit -Enable CommandLineProcessAudit -Enable
# Do not include command line in process creation events (default value) # Do not include command line in process creation events (default value)
# Не включать командную строку в событиях создания процесса (значение по умолчанию) # Не включать командную строку в событиях создания процесса (значение по умолчанию)
# CommandLineProcessAudit -Disable # CommandLineProcessAudit -Disable
<# # Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments
Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments # Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
In order this feature to work events auditing (AuditProcess -Enable) and command line (CommandLineProcessAudit -Enable) in process creation events will be enabled
Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
Для того, чтобы работал данный функционал, буден включен аудит событий (AuditProcess -Enable) и командной строки (CommandLineProcessAudit -Enable) в событиях создания процесса
#>
EventViewerCustomView -Enable EventViewerCustomView -Enable
# Remove the "Process Creation" custom view in the Event Viewer to log executed processes and their arguments (default value) # Remove the "Process Creation" custom view in the Event Viewer to log executed processes and their arguments (default value)

51
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -13893,57 +13893,6 @@ function DismissSmartScreenFilter
} }
} }
<#
.SYNOPSIS
Audit process creation
.PARAMETER Enable
Enable events auditing generated when a process is created (starts)
.PARAMETER Disable
Disable events auditing generated when a process is created (starts)
.EXAMPLE
AuditProcess -Enable
.EXAMPLE
AuditProcess -Disable
.NOTES
Machine-wide
#>
function AuditProcess
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
auditpol /set /subcategory:"{0CCE922B-69AE-11D9-BED3-505054503030}" /success:enable /failure:enable
}
"Disable"
{
auditpol /set /subcategory:"{0CCE922B-69AE-11D9-BED3-505054503030}" /success:disable /failure:disable
}
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Сommand line auditing Сommand line auditing

26
src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1

@ -1279,34 +1279,16 @@ DismissMSAccount
# Отклонить предложение Microsoft Defender в "Безопасность Windows" включить фильтр SmartScreen для Microsoft Edge # Отклонить предложение Microsoft Defender в "Безопасность Windows" включить фильтр SmartScreen для Microsoft Edge
DismissSmartScreenFilter DismissSmartScreenFilter
# Enable events auditing generated when a process is created (starts) # Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments
# Включить аудит событий, возникающих при создании или запуске процесса # Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
AuditProcess -Enable
# Disable events auditing generated when a process is created (starts) (default value)
# Выключить аудит событий, возникающих при создании или запуске процесса (значение по умолчанию)
# AuditProcess -Disable
<#
Include command line in process creation events
In order this feature to work events auditing (ProcessAudit -Enable) will be enabled
Включать командную строку в событиях создания процесса
Для того, чтобы работал данный функционал, будет включен аудит событий (AuditProcess -Enable)
#>
CommandLineProcessAudit -Enable CommandLineProcessAudit -Enable
# Do not include command line in process creation events (default value) # Do not include command line in process creation events (default value)
# Не включать командную строку в событиях создания процесса (значение по умолчанию) # Не включать командную строку в событиях создания процесса (значение по умолчанию)
# CommandLineProcessAudit -Disable # CommandLineProcessAudit -Disable
<# # Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments
Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments # Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
In order this feature to work events auditing (AuditProcess -Enable) and command line (CommandLineProcessAudit -Enable) in process creation events will be enabled
Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
Для того, чтобы работал данный функционал, буден включен аудит событий (AuditProcess -Enable) и командной строки (CommandLineProcessAudit -Enable) в событиях создания процесса
#>
EventViewerCustomView -Enable EventViewerCustomView -Enable
# Remove the "Process Creation" custom view in the Event Viewer to log executed processes and their arguments (default value) # Remove the "Process Creation" custom view in the Event Viewer to log executed processes and their arguments (default value)

62
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -13121,57 +13121,6 @@ function DismissSmartScreenFilter
} }
} }
<#
.SYNOPSIS
Audit process creation
.PARAMETER Enable
Enable events auditing generated when a process is created (starts)
.PARAMETER Disable
Disable events auditing generated when a process is created (starts)
.EXAMPLE
AuditProcess -Enable
.EXAMPLE
AuditProcess -Disable
.NOTES
Machine-wide
#>
function AuditProcess
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
auditpol /set /subcategory:"{0CCE922B-69AE-11D9-BED3-505054503030}" /success:enable /failure:enable
}
"Disable"
{
auditpol /set /subcategory:"{0CCE922B-69AE-11D9-BED3-505054503030}" /success:disable /failure:disable
}
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Сommand line auditing Сommand line auditing
@ -13226,7 +13175,9 @@ function CommandLineProcessAudit
} }
"Disable" "Disable"
{ {
auditpol /set /subcategory:"{0CCE922B-69AE-11D9-BED3-505054503030}" /success:disable /failure:disable
Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit -Name ProcessCreationIncludeCmdLine_Enabled -Force -ErrorAction Ignore Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit -Name ProcessCreationIncludeCmdLine_Enabled -Force -ErrorAction Ignore
Set-Policy -Scope Computer -Path SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit -Name ProcessCreationIncludeCmdLine_Enabled -Type CLEAR Set-Policy -Scope Computer -Path SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit -Name ProcessCreationIncludeCmdLine_Enabled -Type CLEAR
} }
} }
@ -13309,8 +13260,8 @@ function EventViewerCustomView
New-Item -Path "$env:ProgramData\Microsoft\Event Viewer\Views" -ItemType Directory -Force New-Item -Path "$env:ProgramData\Microsoft\Event Viewer\Views" -ItemType Directory -Force
} }
# Save ProcessCreation.xml in the UTF-8 without BOM encoding # Save ProcessCreation.xml in the UTF-8 with BOM encoding
Set-Content -Path "$env:ProgramData\Microsoft\Event Viewer\Views\ProcessCreation.xml" -Value $XML -Encoding Default -NoNewline -Force Set-Content -Path "$env:ProgramData\Microsoft\Event Viewer\Views\ProcessCreation.xml" -Value $XML -Encoding UTF8 -NoNewline -Force ###
} }
"Disable" "Disable"
{ {
@ -13883,7 +13834,7 @@ function DNSoverHTTPS
Local Security Authority protection Local Security Authority protection
.PARAMETER Enable .PARAMETER Enable
Enable Local Security Authority protection to prevent code injection Enable Local Security Authority protection to prevent code injection without UEFI lock ###
.PARAMETER Disable .PARAMETER Disable
Disable Local Security Authority protection Disable Local Security Authority protection
@ -13949,6 +13900,9 @@ function LocalSecurityAuthority
"Disable" "Disable"
{ {
Remove-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa -Name RunAsPPL, RunAsPPLBoot -Force -ErrorAction Ignore Remove-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa -Name RunAsPPL, RunAsPPLBoot -Force -ErrorAction Ignore
Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\System -Name RunAsPPL -Force -ErrorAction Ignore ###
Set-Policy -Scope User -Path Software\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -Type CLEAR
} }
} }
} }

26
src/Sophia_Script_for_Windows_11/Sophia.ps1

@ -1210,34 +1210,16 @@ DismissMSAccount
# Отклонить предложение Microsoft Defender в "Безопасность Windows" включить фильтр SmartScreen для Microsoft Edge # Отклонить предложение Microsoft Defender в "Безопасность Windows" включить фильтр SmartScreen для Microsoft Edge
DismissSmartScreenFilter DismissSmartScreenFilter
# Enable events auditing generated when a process is created (starts) # Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments
# Включить аудит событий, возникающих при создании или запуске процесса # Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
AuditProcess -Enable
# Disable events auditing generated when a process is created (starts) (default value)
# Выключить аудит событий, возникающих при создании или запуске процесса (значение по умолчанию)
# AuditProcess -Disable
<#
Include command line in process creation events
In order this feature to work events auditing (ProcessAudit -Enable) will be enabled
Включать командную строку в событиях создания процесса
Для того, чтобы работал данный функционал, будет включен аудит событий (AuditProcess -Enable)
#>
CommandLineProcessAudit -Enable CommandLineProcessAudit -Enable
# Do not include command line in process creation events (default value) # Do not include command line in process creation events (default value)
# Не включать командную строку в событиях создания процесса (значение по умолчанию) # Не включать командную строку в событиях создания процесса (значение по умолчанию)
# CommandLineProcessAudit -Disable # CommandLineProcessAudit -Disable
<# # Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments
Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments # Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
In order this feature to work events auditing (AuditProcess -Enable) and command line (CommandLineProcessAudit -Enable) in process creation events will be enabled
Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
Для того, чтобы работал данный функционал, буден включен аудит событий (AuditProcess -Enable) и командной строки (CommandLineProcessAudit -Enable) в событиях создания процесса
#>
EventViewerCustomView -Enable EventViewerCustomView -Enable
# Remove the "Process Creation" custom view in the Event Viewer to log executed processes and their arguments (default value) # Remove the "Process Creation" custom view in the Event Viewer to log executed processes and their arguments (default value)

51
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -13144,57 +13144,6 @@ function DismissSmartScreenFilter
} }
} }
<#
.SYNOPSIS
Audit process creation
.PARAMETER Enable
Enable events auditing generated when a process is created (starts)
.PARAMETER Disable
Disable events auditing generated when a process is created (starts)
.EXAMPLE
AuditProcess -Enable
.EXAMPLE
AuditProcess -Disable
.NOTES
Machine-wide
#>
function AuditProcess
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
auditpol /set /subcategory:"{0CCE922B-69AE-11D9-BED3-505054503030}" /success:enable /failure:enable
}
"Disable"
{
auditpol /set /subcategory:"{0CCE922B-69AE-11D9-BED3-505054503030}" /success:disable /failure:disable
}
}
}
<# <#
.SYNOPSIS .SYNOPSIS
Сommand line auditing Сommand line auditing

26
src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

@ -1221,34 +1221,16 @@ DismissMSAccount
# Отклонить предложение Microsoft Defender в "Безопасность Windows" включить фильтр SmartScreen для Microsoft Edge # Отклонить предложение Microsoft Defender в "Безопасность Windows" включить фильтр SmartScreen для Microsoft Edge
DismissSmartScreenFilter DismissSmartScreenFilter
# Enable events auditing generated when a process is created (starts) # Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments
# Включить аудит событий, возникающих при создании или запуске процесса # Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
AuditProcess -Enable
# Disable events auditing generated when a process is created (starts) (default value)
# Выключить аудит событий, возникающих при создании или запуске процесса (значение по умолчанию)
# AuditProcess -Disable
<#
Include command line in process creation events
In order this feature to work events auditing (ProcessAudit -Enable) will be enabled
Включать командную строку в событиях создания процесса
Для того, чтобы работал данный функционал, будет включен аудит событий (AuditProcess -Enable)
#>
CommandLineProcessAudit -Enable CommandLineProcessAudit -Enable
# Do not include command line in process creation events (default value) # Do not include command line in process creation events (default value)
# Не включать командную строку в событиях создания процесса (значение по умолчанию) # Не включать командную строку в событиях создания процесса (значение по умолчанию)
# CommandLineProcessAudit -Disable # CommandLineProcessAudit -Disable
<# # Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments
Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments # Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
In order this feature to work events auditing (AuditProcess -Enable) and command line (CommandLineProcessAudit -Enable) in process creation events will be enabled
Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов
Для того, чтобы работал данный функционал, буден включен аудит событий (AuditProcess -Enable) и командной строки (CommandLineProcessAudit -Enable) в событиях создания процесса
#>
EventViewerCustomView -Enable EventViewerCustomView -Enable
# Remove the "Process Creation" custom view in the Event Viewer to log executed processes and their arguments (default value) # Remove the "Process Creation" custom view in the Event Viewer to log executed processes and their arguments (default value)

Loading…
Cancel
Save