def rule(event):
    if any(
        [
            any(
                [
                    " tcp 139" in event.deep_get("CommandLine", default=""),
                    " tcp 445" in event.deep_get("CommandLine", default=""),
                    " tcp 3389" in event.deep_get("CommandLine", default=""),
                    " tcp 5985" in event.deep_get("CommandLine", default=""),
                    " tcp 5986" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    " start " in event.deep_get("CommandLine", default=""),
                    "--all" in event.deep_get("CommandLine", default=""),
                    "--config" in event.deep_get("CommandLine", default=""),
                    ".yml" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("ngrok.exe"),
                    any(
                        [
                            " tcp " in event.deep_get("CommandLine", default=""),
                            " http " in event.deep_get("CommandLine", default=""),
                            " authtoken " in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
            any(
                [
                    ".exe authtoken " in event.deep_get("CommandLine", default=""),
                    ".exe start --all" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
