Added Create-Lnk.ps1

This commit is contained in:
mgeeky 2020-08-04 19:07:30 +02:00
parent 690e468706
commit 0cf8652224
2 changed files with 26 additions and 0 deletions

24
red-teaming/Create-Lnk.ps1 Executable file
View File

@ -0,0 +1,24 @@
param (
[Parameter(Mandatory=$true)]
[string]
$TargetPath,
[Parameter(Mandatory=$true)]
[string]
$OutputLnk,
[Parameter(Mandatory=$false)]
[string]
$Arguments = "",
[Parameter(Mandatory=$false)]
[string]
$WorkingDirectory = ""
)
$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut($OutputLnk)
$Shortcut.TargetPath = $TargetPath
$Shortcut.Arguments = $Arguments
$Shortcut.WorkingDirectory = $WorkingDirectory
$Shortcut.Save()

2
red-teaming/README.md Normal file → Executable file
View File

@ -66,6 +66,8 @@ IEX (New-Object IO.StreamReader(New-Object IO.Compression.GzipStream($s, [IO.Com
- **`Count-PrivilegedGroupMembers.ps1`** - Counts number of members in predefined (or augumented from an input file) list of privileged, sensitive groups in Active Directory. Purely for statistics and overview purposes.
- **`Create-Lnk.ps1`** - Uttertly simple script to create LNK files. Handy when one needs to create some dodgy shortcuts acting as yet another stage in code execution step.
- **`delete-warning-div-macro.vbs`** - VBA Macro function to be used as a Social Engineering trick removing "Enable Content" warning message as the topmost floating text box with given name. ([gist](https://gist.github.com/mgeeky/9cb6acdec31c8a70cc037c84c77a359c))
- **`Disable-Amsi.ps1`** - Tries to evade AMSI by leveraging couple of publicly documented techniqus, but in an approach to avoid signatured or otherwise considered harmful keywords.