def rule(event):
    if any(
        [
            any(
                [
                    "Get-PasswordVaultCredentials" in event.deep_get("ScriptBlockText", default=""),
                    "Get-CredManCreds" in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
            all(
                [
                    "New-Object" in event.deep_get("ScriptBlockText", default=""),
                    "Windows.Security.Credentials.PasswordVault"
                    in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
            all(
                [
                    "New-Object" in event.deep_get("ScriptBlockText", default=""),
                    "Microsoft.CSharp.CSharpCodeProvider"
                    in event.deep_get("ScriptBlockText", default=""),
                    "[System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory())"
                    in event.deep_get("ScriptBlockText", default=""),
                    "Collections.ArrayList" in event.deep_get("ScriptBlockText", default=""),
                    "System.CodeDom.Compiler.CompilerParameters"
                    in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
