def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\atbroker.exe"),
                    event.deep_get("Image", default="").endswith("\\audiodg.exe"),
                    event.deep_get("Image", default="").endswith("\\bcdedit.exe"),
                    event.deep_get("Image", default="").endswith("\\bitsadmin.exe"),
                    event.deep_get("Image", default="").endswith("\\certreq.exe"),
                    event.deep_get("Image", default="").endswith("\\certutil.exe"),
                    event.deep_get("Image", default="").endswith("\\cmstp.exe"),
                    event.deep_get("Image", default="").endswith("\\conhost.exe"),
                    event.deep_get("Image", default="").endswith("\\consent.exe"),
                    event.deep_get("Image", default="").endswith("\\cscript.exe"),
                    event.deep_get("Image", default="").endswith("\\csrss.exe"),
                    event.deep_get("Image", default="").endswith("\\dashost.exe"),
                    event.deep_get("Image", default="").endswith("\\defrag.exe"),
                    event.deep_get("Image", default="").endswith("\\dfrgui.exe"),
                    event.deep_get("Image", default="").endswith("\\dism.exe"),
                    event.deep_get("Image", default="").endswith("\\dllhost.exe"),
                    event.deep_get("Image", default="").endswith("\\dllhst3g.exe"),
                    event.deep_get("Image", default="").endswith("\\dwm.exe"),
                    event.deep_get("Image", default="").endswith("\\eventvwr.exe"),
                    event.deep_get("Image", default="").endswith("\\fsquirt.exe"),
                    event.deep_get("Image", default="").endswith("\\finger.exe"),
                    event.deep_get("Image", default="").endswith("\\logonui.exe"),
                    event.deep_get("Image", default="").endswith("\\LsaIso.exe"),
                    event.deep_get("Image", default="").endswith("\\lsass.exe"),
                    event.deep_get("Image", default="").endswith("\\lsm.exe"),
                    event.deep_get("Image", default="").endswith("\\msiexec.exe"),
                    event.deep_get("Image", default="").endswith("\\ntoskrnl.exe"),
                    event.deep_get("Image", default="").endswith("\\powershell_ise.exe"),
                    event.deep_get("Image", default="").endswith("\\powershell.exe"),
                    event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                    event.deep_get("Image", default="").endswith("\\regsvr32.exe"),
                    event.deep_get("Image", default="").endswith("\\rundll32.exe"),
                    event.deep_get("Image", default="").endswith("\\runonce.exe"),
                    event.deep_get("Image", default="").endswith("\\RuntimeBroker.exe"),
                    event.deep_get("Image", default="").endswith("\\schtasks.exe"),
                    event.deep_get("Image", default="").endswith("\\services.exe"),
                    event.deep_get("Image", default="").endswith("\\sihost.exe"),
                    event.deep_get("Image", default="").endswith("\\smartscreen.exe"),
                    event.deep_get("Image", default="").endswith("\\smss.exe"),
                    event.deep_get("Image", default="").endswith("\\spoolsv.exe"),
                    event.deep_get("Image", default="").endswith("\\svchost.exe"),
                    event.deep_get("Image", default="").endswith("\\taskhost.exe"),
                    event.deep_get("Image", default="").endswith("\\taskhostw.exe"),
                    event.deep_get("Image", default="").endswith("\\Taskmgr.exe"),
                    event.deep_get("Image", default="").endswith("\\userinit.exe"),
                    event.deep_get("Image", default="").endswith("\\werfault.exe"),
                    event.deep_get("Image", default="").endswith("\\werfaultsecure.exe"),
                    event.deep_get("Image", default="").endswith("\\wininit.exe"),
                    event.deep_get("Image", default="").endswith("\\winlogon.exe"),
                    event.deep_get("Image", default="").endswith("\\winver.exe"),
                    event.deep_get("Image", default="").endswith("\\wlanext.exe"),
                    event.deep_get("Image", default="").endswith("\\wscript.exe"),
                    event.deep_get("Image", default="").endswith("\\wsl.exe"),
                    event.deep_get("Image", default="").endswith("\\wsmprovhost.exe"),
                ]
            ),
            not any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").startswith("C:\\$WINDOWS.~BT\\"),
                            event.deep_get("Image", default="").startswith("C:\\$WinREAgent\\"),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\SoftwareDistribution\\"
                            ),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\System32\\"
                            ),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\SystemTemp\\"
                            ),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\SysWOW64\\"
                            ),
                            event.deep_get("Image", default="").startswith("C:\\Windows\\uus\\"),
                            event.deep_get("Image", default="").startswith("C:\\Windows\\WinSxS\\"),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    "C:\\Program Files\\PowerShell\\7\\"
                                    in event.deep_get("Image", default=""),
                                    "C:\\Program Files\\PowerShell\\7-preview\\"
                                    in event.deep_get("Image", default=""),
                                    "C:\\Program Files\\WindowsApps\\Microsoft.PowerShellPreview"
                                    in event.deep_get("Image", default=""),
                                    "\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.PowerShellPreview"
                                    in event.deep_get("Image", default=""),
                                ]
                            ),
                            event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("Image", default="").startswith(
                                        "C:\\Program Files\\WindowsApps\\MicrosoftCorporationII.WindowsSubsystemForLinux"
                                    ),
                                    event.deep_get("Image", default="").startswith(
                                        "C:\\Program Files\\WSL\\"
                                    ),
                                ]
                            ),
                            event.deep_get("Image", default="").endswith("\\wsl.exe"),
                        ]
                    ),
                    all(
                        [
                            event.deep_get("Image", default="").startswith("C:\\Users\\'"),
                            "\\AppData\\Local\\Microsoft\\WindowsApps\\"
                            in event.deep_get("Image", default=""),
                            event.deep_get("Image", default="").endswith("\\wsl.exe"),
                        ]
                    ),
                ]
            ),
            not "\\SystemRoot\\System32\\" in event.deep_get("Image", default=""),
        ]
    ):
        return True
    return False
