# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one # or more contributor license agreements. Licensed under the Elastic License # 2.0; you may not use this file except in compliance with the Elastic License # 2.0. import sys from . import RtaMetadata, common metadata = RtaMetadata( uuid="900e2180-6eea-47cb-9960-fcd2156d54bd", platforms=["linux"], endpoint=[{"rule_id": "fa59e598-8adc-4798-af82-9f878934d975", "rule_name": "Potential VSingle Malware Infection"}], siem=[], techniques=["TA0011"], ) @common.requires_os(*metadata.platforms) def main() -> None: masquerade = "/tmp/wget" source = common.get_path("bin", "linux.ditto_and_spawn") common.copy_file(source, masquerade) # Execute command common.log("Launching fake builtin commands for vsingle malware infection") command = "/test/tmp/.sess_fake" common.execute([masquerade, command], timeout=10, kill=True, shell=True) # noqa: S604 # cleanup common.remove_file(masquerade) if __name__ == "__main__": sys.exit(main())