import json


def rule(event):
    if all(
        [
            event.deep_get("type", default="") == "EXECVE",
            any(
                [
                    all(
                        [
                            "truncate" in json.dumps(event.to_dict()),
                            "-s" in json.dumps(event.to_dict()),
                        ]
                    ),
                    all(
                        [
                            "dd" in json.dumps(event.to_dict()),
                            "if=" in json.dumps(event.to_dict()),
                            not "of=" in json.dumps(event.to_dict()),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
