Eryk Sun <eryk...@gmail.com> added the comment:

> If you can put files in the root of the hard drive where Windows was
> installed, surely you have other, easier attack vectors.

A rooted path is resolved relative to the process working directory, and Python 
can be started with any current working directory. 

The default access control set on the root directory of a filesystem allows any 
authenticated user to create files or directories, such as "D:\python3.dll". 
That's if a filesystem even supports security. Removable drives are often 
formatted as FAT32 or exFAT, and FAT filesystems have no security.

The system drive (almost always "C:") has to be an NTFS filesystem, and its 
root directory is locked down a bit more. It's at high integrity level with a 
no-write-up rule for files, but not for directories. Only a logon at elevated 
integrity level (high or system level) can create "C:\python3.dll". OTOH, any 
authenticated user is still allowed to create a directory, such as "C:\DLLs", 
and is granted the right to create files in it such as "C:\DLLs\python3.dll".

----------
nosy: +eryksun

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue29778>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to