def rule(event):
    if all(
        [
            "transport=dt_socket,address=" in event.deep_get("CommandLine", default=""),
            any(
                [
                    "jre1." in event.deep_get("CommandLine", default=""),
                    "jdk1." in event.deep_get("CommandLine", default=""),
                ]
            ),
            not any(
                [
                    "address=127.0.0.1" in event.deep_get("CommandLine", default=""),
                    "address=localhost" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
