4 ms·
Ok, but why are the Excel macros so risky? It’s often because the underlying software or OS was written in C/C++.
by docandrew 4y ago
Ok, but why are the Excel macros so risky? It’s often because the underlying software or OS was written in C/C++.
- snicker7 4y agoYou can be socially engineered to open a mallacious excel.
- delusional 4y agoWhat? No it isn't. It's because the users think they're opening a document to look at some data and suddenly it's an executable transferring money via their bank account. And that's all working as designed. Someone built it like that. There's no bug anywhere in that chain, just as extremely rickety system with no affordances for human intervention. No separation of what is trusted and what is not.
- Jtsummers 4y agoExcel macros are risky because they offer a kind of privilege escalation. Most Excel built-in functions (that is, what you write into the cells) have limited reach. They impact that cell and (by reference) other cells, but not the underlying filesystem and other things. Even looking at the database ones, I'm not seeing a single function that writes to the DB but plenty that read from it, that's "safe" in that it would be very hard to abuse these kinds of things to screw with other systems or the host system. But macros can run arbitrary code and access whatever the user can access in a way most Excel functions cannot and can trigger arbitrary effects. The equivalent of `rm -r ~/` is not possible in straight Excel, but is feasible with a macro. C and C++ have nothing to do with that, it's the underlying privilege model that permits it. There's a good case to be made for using better languages than C and C++ for large classes of software. Don't weaken it by making absurd claims.
- docandrew 4y agoBroken security model/sandboxing aside (which is inexcusable), the use of C/C++ expands the attack surface - there are some excel exploits though that take advantage of C vulns like buffer overflows: https://www.exploit-db.com/exploits/18087 https://www.exploit-db.com/exploits/18087
- P5fRxh5kUvp2th 4y ago> There's a good case to be made for using better languages than C and C++ for large classes of software. Don't weaken it by making absurd claims. And this idea can be applied to so many things. Seriously, very often things have enough downsides that you don't need to exaggerate things that are not downsides. You're actually weakening your side by doing so because if people cannot trust even that bit of honesty, why would they trust anything you say? be trustworthy is the first rule in convincing others.