From 0cf8652224f87ee9d8e1de68f0d82f85cb623fdc Mon Sep 17 00:00:00 2001 From: mgeeky Date: Tue, 4 Aug 2020 19:07:30 +0200 Subject: [PATCH] Added Create-Lnk.ps1 --- red-teaming/Create-Lnk.ps1 | 24 ++++++++++++++++++++++++ red-teaming/README.md | 2 ++ 2 files changed, 26 insertions(+) create mode 100755 red-teaming/Create-Lnk.ps1 mode change 100644 => 100755 red-teaming/README.md diff --git a/red-teaming/Create-Lnk.ps1 b/red-teaming/Create-Lnk.ps1 new file mode 100755 index 0000000..53352a1 --- /dev/null +++ b/red-teaming/Create-Lnk.ps1 @@ -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() \ No newline at end of file diff --git a/red-teaming/README.md b/red-teaming/README.md old mode 100644 new mode 100755 index ab5982e..4d0116c --- a/red-teaming/README.md +++ b/red-teaming/README.md @@ -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.