4 ms·
This attack would be pretty easy to mitigate. Why does WoW allow you to run scripts in your chat window? Who needs that functionality? Yes, don't run untrusted
by danShumway 8y ago
This attack would be pretty easy to mitigate. Why does WoW allow you to run scripts in your chat window? Who needs that functionality?
Yes, don't run untrusted code as a user, but also developers should be practicing defense in depth[0]. This isn't like pasting something into a web browser's dev console or a Bash prompt, WoW has the ability to just outright turn this behavior off.
Look at something like the Signal source code, they flat out turn off webviews entirely[1]. So an entire class of phishing attacks just vanishes, regardless of what they're doing to block XSS or malicious links.
WoW should do the same thing - your chat window should not have access to its host environment, if it even needs the ability to run scripts in the first place.
[0]: https://en.wikipedia.org/wiki/Defense_in_depth_%28computing%29 https://en.wikipedia.org/wiki/Defense_in_depth_%28computing%...
[1]: https://github.com/signalapp/Signal-Desktop/blob/development/main.js#L726 https://github.com/signalapp/Signal-Desktop/blob/development...
- typomatic 8y ago> Why does WoW allow you to run scripts in your chat window? Who needs that functionality? The "chat" window in WoW is more like a shell interface/CLI than a pure chat window and it's been that way since the inception of WoW. The mod system is loosely dropped on top of it: basically add-ons in WoW amount to bash scripts. It's a pretty hacky system that seems like it was made to add modding capability as quickly as possible during development. The fact that such an integral system has never been rewritten isn't hard to believe.
- danShumway 8y agoI can buy that -- but wouldn't they still at some point want to make the main chat window for the game into some kind of safer wrapper around the bash prompt? This is coming from someone who doesn't play WoW; is it common for a mod to expose custom commands in chat or something? Or are mods maybe using it as a buffer to send commands? I guess if they're detecting and popping up a warning prompt, but they're not willing to get rid of the prompt and just always escape the input, there must be some stuff out there that utterly depends on players clicking "allow". That's baffling to me, but I am often baffled.
- Liquid_Fire 8y ago> is it common for a mod to expose custom commands in chat or something? Yes, it's quite common for mods to expose custom commands, although these are not raw Lua functions but rather "slash commands", e.g. /foo Other than for messaging/chat, the chat box can also be used for various commands for actions your character should perform, e.g. /wave, /target, /sleep and the game also has a built-in macro system that lets you combine several of these into a "macro" that you can then execute by pressing a single button. But these are all "safe", i.e. they don't eval raw Lua code. There are some WoW quest-tracking websites that will sometimes give you little snippets of Lua to execute via /run that will e.g. query the game about whether you completed the given quest, but in general normal users shouldn't need to use /run, it's more of a feature for mod developers.
- Bayart 8y agoIt's common to interact with UI code and gameplay macros through the text interface. The system might come off as insecure, but frankly that flexibility added a lot of value to WoW over its lifespan.
- vbezhenar 8y agoI really have no idea why it allows you to run scripts in chat window, LoL. It's useful for me, because I sometimes write addons and use it as kind of REPL, but surely this could be hidden behind "developer mode" in some Config.wtf file. I think that nobody really thought about it too much just like browsers allowed javascript: URLs in the past. Nowadays if you're pasting /run stuff into chat window, WoW asks confirmation whether you really want to execute it, so they took some measures to limit it. Also there are tons of useful `/run` scripts that some people probably use and that experience probably important enough to preserve that functionality.