guardicore / monkey

Infection Monkey - An open-source adversary emulation platform
https://www.guardicore.com/infectionmonkey/
GNU General Public License v3.0
6.55k stars 764 forks source link

Use tempfile in Log4Shell, remove unnecessary code #3745

Closed shreyamalviya closed 9 months ago

shreyamalviya commented 9 months ago

Description

When constructing LDAPExploitServer in the Log4Shell plugin, simply use a temp directory instead of calling get_monkey_dir_path().

This fixes the TODO in infection_monkey/utils/monkey_dir.py (will result in the code getting removed) and breaks the dependency between plugins and infection_monkey/utils/, supporting #3725.

mssalvatore commented 9 months ago

Why not include the directory path in the new data structure for #3751? This could be considered information about the host machine.

shreyamalviya commented 9 months ago

Edited #3751 to include this