def rule(event):
    if any(
        [
            all(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("/nc"),
                            event.deep_get("Image", default="").endswith("/ncat"),
                            event.deep_get("Image", default="").endswith("/netcat"),
                            event.deep_get("Image", default="").endswith("/socat"),
                        ]
                    ),
                    not any(
                        [
                            " --listen " in event.deep_get("CommandLine", default=""),
                            " -l " in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
            any(
                [
                    event.deep_get("Image", default="").endswith("/autorecon"),
                    event.deep_get("Image", default="").endswith("/hping"),
                    event.deep_get("Image", default="").endswith("/hping2"),
                    event.deep_get("Image", default="").endswith("/hping3"),
                    event.deep_get("Image", default="").endswith("/naabu"),
                    event.deep_get("Image", default="").endswith("/nmap"),
                    event.deep_get("Image", default="").endswith("/nping"),
                    event.deep_get("Image", default="").endswith("/telnet"),
                    event.deep_get("Image", default="").endswith("/zenmap"),
                ]
            ),
        ]
    ):
        return True
    return False
