Client Side
Last updated
Last updated
Steps to reproduce the doc macros attack using vba script
Create new file using Microsoft Word.
Create a new macro - View > Macros:
Give the macro name > Select Macros in document > Click on Create:
Write the Macro script within the payload:
Save the file in doc\docm format which considered less secured, so the victim will just need to press enable to initiate the macros .
I've created useful python script which generates the VBA script content with Powercat Revshell payload given Local Host and Port:
Libraries are virtual containers for users' content.
This attack leverage .Library-ms file which will connect to attacker controlled WebDAV and be sent to a victim. Once the victim opens the file, he will think the WebDAV is a local windows folder. Then in the next stage the victim will click a malicious .lnk file using the WebDAV.
First creating the .Library-ms file:
<libraryDescription>
: This is the root element that defines the overall structure of a Windows library configuration.
<name>
: Refers to a string identifier for the library.
<version>
: Specifies the version of the library schema.
<isLibraryPinned>
: Indicates whether the library is pinned in the user's navigation pane.
<iconReference>
: Points to the resource for the icon associated with the library.
<templateInfo>
: Contains metadata about the library's folder type template.
<folderType>
: Defines the folder type or classification of the library using a GUID, which influences its behavior and appearance. These tag determine the columns and details that appear in Windows Explorer.
<searchConnectorDescriptionList>
: A wrapper for a collection of search remote connectors that the library can use.
<searchConnectorDescription>
: Defines individual search connectors, specifying details like save location and support status.
<isDefaultSaveLocation>
: Indicates whether this search connector is the default location for saving files, set to true here.
<isSupported>
: used for compatibility.
<simpleLocation>
: Specifies the search connector’s location in a simplified format.
<url>
: Points to the URL of the attacker's WebDAV server.
Serving the WebDAV Server including malicious files such .lnk
file that runs PowerShell.