Say I've found a perfect SSRF vulnerability in a web application that lets me send web requests to any URL, any host, any port, any scheme. I can use the file:// scheme to get the contents of local files, such as file:///C:/Windows/win.ini.
I would like to get full remote code execution though, and to do that I need to be able to write local files, to do something like create a scheduled task. (Or is there a better way to get RCE, assuming the only ports listening on the machine, other than the web server, are default Windows ones?)
My question is, using the file:// scheme, can I modify files, or just read them?
If the answer to that is no, I was thinking about doing an SMB relay attack (host a malicious SMB server on the internet, then trigger the SSRF to file://my-malicious-server/hackme, and relay the provided credentials back to the server itself). Would this work, and if so, what URL scheme could I use to establish an SMB connection with the server?