diff options
author | mattifestation <mattgraeber@gmail.com> | 2015-02-03 21:47:05 -0500 |
---|---|---|
committer | mattifestation <mattgraeber@gmail.com> | 2015-02-03 21:47:05 -0500 |
commit | 142afad54ea82ea385c4d8262de6a532d3206080 (patch) | |
tree | 83b3ce8043c95677d9fa3b4e843018914a9ff407 /CodeExecution/Invoke-Shellcode.ps1 | |
parent | 59b35d1470698b04168275b0ec65fb7905fa72f7 (diff) | |
download | PowerSploit-142afad54ea82ea385c4d8262de6a532d3206080.tar.gz PowerSploit-142afad54ea82ea385c4d8262de6a532d3206080.zip |
Added parameters back to the original Invoke-Shellcode
Diffstat (limited to 'CodeExecution/Invoke-Shellcode.ps1')
-rw-r--r-- | CodeExecution/Invoke-Shellcode.ps1 | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/CodeExecution/Invoke-Shellcode.ps1 b/CodeExecution/Invoke-Shellcode.ps1 index c27a8ab..6ca6def 100644 --- a/CodeExecution/Invoke-Shellcode.ps1 +++ b/CodeExecution/Invoke-Shellcode.ps1 @@ -5,4 +5,50 @@ # many scripts that have this path hardcoded. If you don't like it,
# fork PowerSploit and host it yourself.
-throw 'Something terrible may have just happened and you have no idea what because you just arbitrarily download crap from the Internet and execute it.'
\ No newline at end of file +function Invoke-Shellcode
+{
+
+[CmdletBinding( DefaultParameterSetName = 'RunLocal', SupportsShouldProcess = $True , ConfirmImpact = 'High')] Param (
+ [ValidateNotNullOrEmpty()]
+ [UInt16]
+ $ProcessID,
+
+ [Parameter( ParameterSetName = 'RunLocal' )]
+ [ValidateNotNullOrEmpty()]
+ [Byte[]]
+ $Shellcode,
+
+ [Parameter( ParameterSetName = 'Metasploit' )]
+ [ValidateSet( 'windows/meterpreter/reverse_http',
+ 'windows/meterpreter/reverse_https',
+ IgnoreCase = $True )]
+ [String]
+ $Payload = 'windows/meterpreter/reverse_http',
+
+ [Parameter( ParameterSetName = 'ListPayloads' )]
+ [Switch]
+ $ListMetasploitPayloads,
+
+ [Parameter( Mandatory = $True,
+ ParameterSetName = 'Metasploit' )]
+ [ValidateNotNullOrEmpty()]
+ [String]
+ $Lhost = '127.0.0.1',
+
+ [Parameter( Mandatory = $True,
+ ParameterSetName = 'Metasploit' )]
+ [ValidateRange( 1,65535 )]
+ [Int]
+ $Lport = 8443,
+
+ [Parameter( ParameterSetName = 'Metasploit' )]
+ [ValidateNotNull()]
+ [String]
+ $UserAgent = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)',
+
+ [Switch]
+ $Force = $False
+)
+
+throw 'Something terrible may have just happened and you have no idea what because you just arbitrarily download crap from the Internet and execute it.'
+}
|