![]() |
|
#1
|
|||
|
|||
![]()
I recently tried customizing Word's Ribbon UI:
My procedure:
🚨 RED FLAG: My antivirus immediately flagged the .dotm file as potentially harmful. It detected security vulnerabilities that could be exploited by malicious code. The warning suggested immediate removal of the file. It is worth noting that my .dotm file contains only one simple module, which displays a message box. My Questions:
For now, I've removed the custom template for safety. I would love to hear from security experts on how to achieve this safely in 2025. The old methods seem too risky in today's threat landscape. |
#2
|
|||
|
|||
![]()
Your antivirus was not objecting to your ribbon modification. It is objecting to the presence of the VBA code. Macros have been used for malicious code for a very long time.
Antivirus software can't tell the difference between malicious code and safe code. There is no secure way of writing or distributing VBA code. The best you can do is sign your code with a code signing certificate. |
#3
|
|||
|
|||
![]() Quote:
If Microsoft Office applications weren't originally designed for end-user ribbon modifications, aren't we potentially creating security vulnerabilities by manipulating the UI architecture? Several security considerations come to mind: Architectural Concerns:
Security Model Questions:
Enterprise Security Implications:
|
#4
|
|||
|
|||
![]()
The Microsoft Office applications were originally designed for end-user ribbon modifications.
As I originally stated, it is NOT modifying the ribbon that is the issue, it is the use of VBA that is the security issue. VBA is only a security issue because Office is used by lots of people who are routinely careless about security. There are other methods of customizing Office:
Microsoft has wanted to kill off VBA for a long time, but every time it tries to replace VBA with a modern technology it has only limited success. However, use of, and interest in, VBA has dwindled in recent years so perhaps they'll finally get their wish. Customizing the Ribbon is only a security risk if it requires code to be executed, and it is the code that is executed that is the security risk not the Ribbon XML. I doubt that any bad actor would bother to modify the ribbon when code can be executed automatically simply by opening a document. |
#5
|
|||
|
|||
![]() Quote:
I didn’t realize that Microsoft Office was originally designed with end-user ribbon modifications in mind. If you happen to have any documentation or references about that, I’d love to check it out. It’s always interesting to learn more about the design decisions behind these tools. I completely agree that VBA is the bigger security concern, especially given how widely Office is used and how easily users can overlook security risks. That said, I’ve also heard that XML-based customizations (like ribbon modifications) could potentially be exploited if not handled carefully. I’m not an expert on this, but it seems like both VBA and XML could have their own vulnerabilities depending on how they’re used. It’s cool to hear about the alternatives like VSTO and Office JS Apps. Office JS Apps sound promising, especially since they’re cross-platform, but I can see how the lack of depth in the API compared to COM might be a drawback. And yeah, it’s no surprise that Microsoft has been trying to move away from VBA for a while now. It’s interesting how it’s stuck around for so long, but it does seem like its usage is finally declining. Maybe this time they’ll succeed in phasing it out. You’re absolutely right that the ribbon itself isn’t the security risk—it’s the code that gets executed. I doubt most bad actors would bother with ribbon modifications when they can just embed malicious code directly in a document. Still, I wonder if there’s any risk in how XML customizations are handled, especially if they’re not properly secured. Anyway, thanks again for sharing your thoughts—this has been really helpful! If you have any more insights or resources, I’d love to hear them. |
#6
|
|||
|
|||
![]() Quote:
Quote:
|
#7
|
||||
|
||||
![]()
You've asked a bunch of questions and some are relatively painless to answer.
Quote:
Quote:
Quote:
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#8
|
|||
|
|||
![]() Quote:
I’ve been thinking about how to handle deploying macros in an organization, especially with the rise of AI-generated code. Do you have any suggested workflows for rolling out new macros to multiple users? I ask because I’ve seen cases where users rely on AI to generate VBA code, and while it’s great for quick solutions, it can also lead to security issues. For example, I once came across a Word macro that someone created using AI—it automatically searched selected text on Google. At first glance, it seemed harmless, but it ended up triggering antivirus alerts because it was flagged for potentially malicious behavior (turned out there was a trojan in the code). So, I’m curious: How do you balance the convenience of AI tools with the need for secure, reliable macros? Do you have any tips for ensuring macros are safe before deploying them across an organization? Looking forward to hearing your thoughts! |
#9
|
|||
|
|||
![]() Quote:
Quote:
|
#10
|
|||
|
|||
![]() Quote:
Thank you for sharing your insights and advice on balancing the convenience of AI tools with the need for secure and reliable macros. Your emphasis on understanding code, using code signing certificates, and managing risks is invaluable. I also appreciate your practical tips, such as setting macro security to disable unsigned macros and the importance of educating IT staff. Your perspective on managed risks and the proactive steps you outlined are incredibly helpful for anyone navigating this space. Thanks again for your thoughtful contribution! |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Customizing Ribbon to load Templates | Paralegal101 | Word | 1 | 12-10-2020 06:13 AM |
Customizing the ribbon: Message tab on reply | oleander | Outlook | 0 | 10-15-2018 10:17 AM |
How to import the customized ribbon to Word without overwriting the existing Ribbon? | SharonSh | Word VBA | 0 | 09-26-2013 11:47 PM |
![]() |
Mixer | Excel | 3 | 03-19-2013 01:52 AM |
![]() |
netmouse | Word | 2 | 02-25-2009 06:40 AM |