News for hackers. Stuff that matters.
Re:The Native File System API allows web apps to save direct... by cromwellian on Wednesday September 09, 2020 @01:28AM (#24417488)
Ugh, my Win32 security knowledge is non-existent, but this sounds horrible. Seems to me that nothing marked 'from web' and non-executable should be loadable into a memory segment which can be executed, and nothing in the system partition should be overridable like this. This sounds like a flaw in the OS design.

The real irony of the comments on HN that "it's dead on mobile because Apple won't support it", is iOS is one of the few operating systems where this kind of API is trust worth. I would not expect iOS to give Safari privileges to see any files other data files the Safari process itself created by user interaction, or something on say, a Permission-protected directory (e.g. Photos). Ditto for OSX.

If anything, the API really a selling point for OSX/iOS security architecture, in that it can be made safe.

Re:The Native File System API allows web apps to save direct... by elcritch on Wednesday September 09, 2020 @03:58AM (#24418508)
> Seems to me that nothing marked 'from web' and non-executable should be loadable into a memory segment which can be executed,

Welcome to modern macOS and Safari. It’s a good idea, but puts up a block to third part or open source software. For now you can right-click and override (who knows for how long before Apple wants 30% of the price of all your desktop software too). I’d be more okay with the Mac version if you could add custom chains of trust.

Re:The Native File System API allows web apps to save direct... by BrandoElFollito on Wednesday September 09, 2020 @08:41AM (#24420343)
> nothing marked 'from web' and non-executable should be loadable into a memory segment

How would you "mark something 'from web'"? This is a file after all.

There are ways to sign files (executable or not) but there is no 'from web' flag as far as I know.

Re:The Native File System API allows web apps to save direct... by vlovich123 on Wednesday September 09, 2020 @09:02AM (#24420531)
You would be incorrect.

File Quarantine on OSX:

> https://support.apple.com/en-us/HT201940

Alternate data stream on Windows:

> https://www.howtogeek.com/70012/what-causes-the-file-downloa...

I wouldn't be surprised if Linux had it but I haven't used desktop Linux in a long time so I don't know what to search for, but generally having browsers annotate their file streams isn't an uncommon thing to support for filesystems & browsers.

Re:The Native File System API allows web apps to save direct... by yjftsjthsd-h on Wednesday September 09, 2020 @10:33AM (#24421433)
A decent number of linux filesystems do support extended attributes, which is how I assume you'd do this (actually, looking at https://en.wikipedia.org/wiki/Extended_file_attributes a lot of OSs support xattrs), but I'm not aware of any browsers using them to mark downloads.
Re:The Native File System API allows web apps to save direct... by vlovich123 on Thursday September 10, 2020 @03:26PM (#24435649)
I'm not aware of any browsers that don't mark files downloaded from the web as such.
Re:The Native File System API allows web apps to save direct... by BrandoElFollito on Wednesday September 09, 2020 @09:35AM (#24420818)
OK thanks - so this is a NTFS feature, meaning that if the file is stored on an non-NTFS partition, or sent further that "flag" is cancelled.
Re:The Native File System API allows web apps to save direct... by fortran77 on Wednesday September 09, 2020 @08:53AM (#24420439)
Sure there is:

https://textslashplain.com/2016/04/04/downloads-and-the-mark...

Windows File System is very advanced and has metadata streams.

Re:The Native File System API allows web apps to save direct... by lultimouomo on Wednesday September 09, 2020 @08:53AM (#24420441)
> How would you "mark something 'from web'"? This is a file after all.

Files can have metadata, and most modern filesystems provide some kind of file attribute facility. On macOS browsers do exactly what described, setting a file attribute on downloaded files. The user will then be warned when trying to execute the file.