BatBadBut: You can't securely execute commands on Windows
1–10 of 43 posts
Re: BatBadBut: You can't securely execute commands on Windows
#2The API could even be a more modern pointer+length interface rather than null termination, to sidestep that class of mistakes/exploits (CWE-170).
https://www.daviddeley.com/autohotkey/parameters/parameters.... is a great read on how fragmented this all seems to be.
Re: BatBadBut: You can't securely execute commands on Windows
#3Re: BatBadBut: You can't securely execute commands on Windows
#4Re: BatBadBut: You can't securely execute commands on Windows
#5This seems more like a gap in the windows API than in the programming languages.
Re: BatBadBut: You can't securely execute commands on Windows
#6Re: BatBadBut: You can't securely execute commands on Windows
#7Is there any reason Windows couldn't add an equivalent of execvpe for arguments and environment to be passed as arrays, which newer programs could then use directly? The OS could handle safely re-quoting as a string for older programs that need compatibility, rather than leaving it up to the language or programmer to hopefully do right. Which seems pretty difficult, based on the fact that seven major languages got a…
Re: BatBadBut: You can't securely execute commands on Windows
#8This seems more like a gap in the windows API than in the programming languages.
Re: BatBadBut: You can't securely execute commands on Windows
#9Is there any reason Windows couldn't add an equivalent of execvpe for arguments and environment to be passed as arrays, which newer programs could then use directly? The OS could handle safely re-quoting as a string for older programs that need compatibility, rather than leaving it up to the language or programmer to hopefully do right. Which seems pretty difficult, based on the fact that seven major languages got a…
I fail to see how this would help. If i understand correctly, the issue is how cmd.exe interprets the args, not how the args get to it.
Re: BatBadBut: You can't securely execute commands on Windows
#10This seems more like a gap in the windows API than in the programming languages.
Is linux really any different? I think the escaping rules are just better known.