News for hackers. Stuff that matters.
Re:αcτµαlly pδrταblε εxεcµταblε by ChrisSD on Monday August 24, 2020 @12:27AM (#24257520)
> C compiler is installed

It's a great idea but that part is a big ask for any Windows user who doesn't develop desktop applications.

Re:αcτµαlly pδrταblε εxεcµταblε by int_19h on Monday August 24, 2020 @04:27AM (#24258526)
On Windows, though, there's C# compiler out of the box on every OS since Vista. And C# has a bunch of rarely-used syntax for things like raw pointers, that can work on more or less the same level as C, and even look pretty similar. It might be possible to do something with that.
Re:αcτµαlly pδrταblε εxεcµταblε by SyneRyder on Monday August 24, 2020 @05:01AM (#24258724)
Huh, I never knew this. For anyone else who didn't know, it's in the C:\Windows\Microsoft.NET\Framework64\ folders, it's the CSC.exe file included with each version of the .NET framework.

Edit: Good grief, there's even vbc.exe, which is a command line Visual Basic 2012 compiler. Also JSC.exe for Jscript, aspnet_compiler.exe for ASP and MSBuild. Kinda embarrassed that I didn't know this.

Re:αcτµαlly pδrταblε εxεcµταblε by int_19h on Tuesday August 25, 2020 @01:47PM (#24273942)
In case you're wondering why - it's because every version of Windows since Vista comes with .NET Framework, and .NET Framework has this API:

https://docs.microsoft.com/en-us/dotnet/api/system.codedom

If you look at the functionality provided there, it includes ability to compile generated code. This is implemented using those command-line compilers.

Re:αcτµαlly pδrταblε εxεcµταblε by scruffyherder on Tuesday August 25, 2020 @02:11AM (#24268517)
It’s been my go to toolset for ages. It’s the #1 reason to learn c# as it’s everywhere.

Also if we are talking exploit vectors, uuencode is great for people that let you have a clipboard. Get uudecode in c#, and paste in your arbitrary binaries and you’ll be in business In no time!

Re:αcτµαlly pδrταblε εxεcµταblε by modeless on Monday August 24, 2020 @12:58AM (#24257624)
True. I'm imagining this as useful mostly for build scripts or other developer tools. To the extent that it's useful at all.
Re:αcτµαlly pδrταblε εxεcµταblε by terminalcommand on Monday August 24, 2020 @11:24AM (#24261544)
It is actually pretty useful. If you’re given a locked down machine (for example in your company), you can write code in notepad, compile it with csc.exe and run it. As it is generated on the local machine, you may get to be able to execute it. (I tried this once when I was super bored at an intership, and a hello world program compiled and ran.)