def rule(event):
    if all(
        [
            "\\HarddiskVolumeShadowCopy" in event.deep_get("CommandLine", default=""),
            "System32\\config\\sam" in event.deep_get("CommandLine", default=""),
            any(
                [
                    "Copy-Item" in event.deep_get("CommandLine", default=""),
                    "cp $_." in event.deep_get("CommandLine", default=""),
                    "cpi $_." in event.deep_get("CommandLine", default=""),
                    "copy $_." in event.deep_get("CommandLine", default=""),
                    ".File]::Copy(" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
