What are macros and why are they dangerous

Macros are mini-applications made with the Visual Basic for Application program that allow you to automate some Excel functionality

There are various tools with which hackers target victims, and one of them is macros. These are mini-programs, found in most writing and calculation software, such as Word and Excel, which if modified can also contain malware.

Normally a macro attack starts from an email. Users receive an attachment in the email message. They open the Excel file, which looks like a harmless document, and end up spreading the virus on their machines. With all that follows for the personal data of the users. Macros, in fact, precisely because of their function, can be altered and used as a "Trojan horse" to infect computers. Despite the fact that they represent a danger to computer security, they can be easily defused in Microsoft Excel and other office software.

What are macros used for

What are they used for? Writing and calculation programs, as we have seen, contain a portion of code, usually written in the VBA (Visual Basic for Application) programming language, which is used to automate a number of functions, so that they are easily and quickly accessible the next time they are used. All users have to do is register them through a specific command within the software. And so far there are no problems.

Malicious Macros

The danger comes from Excel documents created by other people. The reason is quite simple. Hackers could make malicious macros by modifying the VBA code ad hoc. If opened by victims, the compromised file can infect both Office and the affected machines. For example, the code can penetrate within the programs of the office suite and propagate to each new document. Or, in the most severe cases, it can even access your email inbox and send copies of malicious files to other people.

How to Protect Yourself

Macros, as useful as they are, are very vulnerable and can be a means for hackers to spread malware. But there is an effective way to protect yourself. Most companies, such as Microsoft, have improved the security of their programs over the years. Excel, in fact, disables the reading of macros by default. You just need to check that the function is enabled. In this way, every time you try to open a document that contains macros, the program blocks them and displays a warning to the user.

The main advice, however, to avoid falling into the trap of hackers, is to avoid downloading files from unknown sources. It is also important to limit the opening of macros only to documents from trusted people.