
The attackers use social engineering tactics to lure the target into opening the file. It involves an infected sheet with a malicious command hidden in a formula, sent as part of an Excel file attachment. Since the first wave of macro 4.0 attacks in mid-February 2020, a large number of cyber criminals have co-opted this technique.
Macro excel code#
Because of this, malware authors often sneak a malicious payload via the macro code into an Excel document and deliver it as an email attachment, like they did in the very first macro 4.0 incident. They are used regularly across various business processes and are unlikely to be disabled or deprecated. What makes this such a pervasive attack vector is that Excel 4.0 macros are an essential formula component of Excel’s core capability. Threat actors can easily weaponize this 30-year-old feature to create new attack techniques as they can obfuscate XML code to conceal the suspicious macros.
:max_bytes(150000):strip_icc()/Macro-tools-excel-56a8f8955f9b58b7d0f6d519.jpg)
Like its predecessor, the Visual Basic for Application (VBA) macro, Excel 4.0 macro is increasingly being exploited to store hidden malware. This piece of programming code is a solution to automating repetitive tasks in Excel, but unfortunately, also a covert backdoor to malware delivery. You can always ask an expert in the Excel Tech Community or get support in the Answers community.Excel 4.0 macro, also known as XLM 4.0 macro, is a benign record-and-playback feature of Microsoft Excel that was introduced back in 1992. To edit a macro, in the Developer tab, click Macros, select the name of the macro, and click Edit. On the Developer tab, in the Code group, click Stop Recording. On the Developer tab, click Record Macro. In the Customize the Ribbon category, in the Main Tabs list, select the Developer check box, and then click Save. Go to Excel > Preferences… > Ribbon & Toolbar. By default, the Developer tab is not visible, so do the following: Make sure the Developer tab is visible on the ribbon.
Macro excel how to#
To learn about how to run a macro, see Run a macro. To learn more about creating macros, see Create or delete a macro. This time, see if anything different happens! Some of the code will probably be clear to you, and some of it may be a little mysterious.Įxperiment with the code, close the Visual Basic Editor, and run your macro again. See how the actions that you recorded appear as code. To edit a macro, in the Code group on the Developer tab, click Macros, select the name of the macro, and click Edit. You can learn a little about the Visual Basic programming language by editing a macro. On the Developer tab, click Stop Recording. Perform the actions you want to automate, such as entering boilerplate text or filling down a column of data. Optionally, enter a name for the macro in the Macro name box, enter a shortcut key in the Shortcut key box, and a description in the Description box, and then click OK to start recording.

In the Code group on the Developer tab, click Record Macro. For more information, see Show the Developer tab. Macros and VBA tools can be found on the Developer tab, which is hidden by default, so the first step is to enable it.
