A Formal Framework for Environmentally Sensitive Malware