@@ -390,17 +390,22 @@ can be found `here
390390Rejected Ideas
391391==============
392392
393- Using a path as the debugger input
394- ----------------------------------
395-
396- We have selected that the mechanism for executing remote code is that tools
397- write the code directly in the remote process to eliminate a possible security
398- vulnerability in which the file to be executed can be altered by parties other
399- than the debugger process if permissions are not set correctly or filesystem
400- configurations allow for this to happen. It is also trivial to write code that
401- executes the contents of a file so the current mechanism doesn't disallow tools
402- that want to just execute files to just do so if they are ok with the security
403- profile of such operation.
393+ Using a script as the debugger input
394+ ------------------------------------
395+
396+ We have chosen to have debuggers write the code to be executed into a file
397+ whose path is written into a buffer in the remote process. This has been deemed
398+ more secure than writing the Python code to be executed itself into a buffer in
399+ the remote process, because it means that an attacker who has gained arbitrary
400+ writes in a process but not arbitrary code execution or file system
401+ manipulation can't escalate to arbitrary code execution through this interface.
402+
403+ This does require the attaching debugger to pay close attention to filesystem
404+ permissions when creating the file containing the code to be executed, however.
405+ If an attacker has the ability to overwrite the file, or to replace a symlink
406+ in the file path to point to somewhere attacker controlled, this would allow
407+ them to force their malicious code to be executed rather than the code the
408+ debugger intends to run.
404409
405410Thanks
406411======
0 commit comments