def rule(event):
    if any(
        [
            all(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("/nc"),
                            event.deep_get("Image", default="").endswith("/netcat"),
                        ]
                    ),
                    not "l" in event.deep_get("CommandLine", default=""),
                ]
            ),
            any(
                [
                    event.deep_get("Image", default="").endswith("/nmap"),
                    event.deep_get("Image", default="").endswith("/telnet"),
                ]
            ),
        ]
    ):
        return True
    return False
