Re:Show HN: Tiny 1k Rust binary on Windows
by poizan42 on Tuesday December 01, 2020 @05:52AM
(#25264149)
That's a DOS executable though, and won't run on 64-bit Windows.
[ Parent
| on HN ]
Re:Show HN: Tiny 1k Rust binary on Windows
by mytailorisrich on Tuesday December 01, 2020 @06:18AM
(#25264280)
Not out of the box but with something like vDos it should.
Re:Show HN: Tiny 1k Rust binary on Windows
by weinzierl on Tuesday December 01, 2020 @06:25AM
(#25264310)
Regular com programs won't run, but I'm waiting for the day the vulnerability is discovered that let's you run a specially crafted binary because of left over code from the old com launcher. Is the com extension still recognized in 64-bit windows?
Re:Show HN: Tiny 1k Rust binary on Windows
by poizan42 on Tuesday December 01, 2020 @06:38AM
(#25264368)
Considering that COM programs are headerless I can't imagine any way a specially crafted binary could do anything since there is no parsing going on. The "COM loader" just hands it off to NTVDM which does not exist on 64-bit Windows (there are 3rd-party implementations though)
And yes, the com extension is still recognized and will pop up a dialog telling you "This app can't run on your PC".
But actually .com and .exe files are handled equivalently, so you can just rename an .exe (i.e. PE executable) to .com and it will run - that doesn't make it a COM executable though...
Re:Show HN: Tiny 1k Rust binary on Windows
by zinekeller on Tuesday December 01, 2020 @06:31AM
(#25264346)
No, like really impossible on a hardware level (most 16-bit instructions are hidden on hardware level on entering 64-bit mode) and on a software level (NTVDM is separate from Windows NT from day one (since it only works on x86 hardware and not on DEC Alpha for example) and it was an optional component since Vista but only on an x86 installation though).