The meterpreter API wants arguments in a seperate string (not an array,
mind you) just so it can concatenate them on the server side.
Originally, I worked around that by using Shellwords.shellwords to pull
out the first token. But! Shellwords.shellwords inexplicably and
inexcusably removes backslashes in ways that make it impossible to quote
things on Windows. This commit works around both of those things.
[Fixes#6902] [Closes#409]
Squashed commit of the following:
commit e29bf83196e39853d12b58d77db1ffdb26fbb6eb
Author: James Lee <egypt@metasploit.com>
Date: Tue May 22 10:01:12 2012 -0600
Add references to info output for post modules
commit e0147f0f05375d812ecfd55f9c2cb4bffabc1887
Author: James Lee <egypt@metasploit.com>
Date: Tue May 22 10:05:32 2012 -0600
Put references after description for consistency
Note the syntax change, need to chase this down before pushing upstream
and make sure nobody's relying on that.... and grep says everything's
cool.
[Closes#295]
Squashed commit of the following:
commit 33b7438731ae5377c95d3d752d76eca73bad20ef
Merge: 6d3e6dd 7811b0a
Author: Tod Beardsley <todb@metasploit.com>
Date: Fri May 18 16:55:49 2012 -0500
Merge branch 'master' into HEAD
commit 6d3e6dd6e215f8a4e0b1b53a29329748dad779af
Author: Aram Verstegen <aram.verstegen@gmail.com>
Date: Sat Apr 7 22:58:29 2012 +0200
Automatically configure payloads for wmap-enabled exploits
commit 410008bab7a4845d10d5077d0482899964088bd0
Author: Aram Verstegen <aram.verstegen@gmail.com>
Date: Sat Apr 7 22:58:06 2012 +0200
Exposed exploit_choose_payload as class method Exploit.choose_payload
Adding the payload generator, but not the post module -- couldn't get a
satisfactory test out of the module (see the comments on #251).
Please open a new request with the post module and a test scenario, like
a sample script or something to drop into /scripts/powershell.
I like the powershell stuff a lot; I imagine it's a popular set of
tools on high-value targets, like workstations of IT people.
[Closes#251]
Squashed commit of the following:
commit 46475c27a2d0a84b62167a65c9a158dfb7c9e755
Author: Tod Beardsley <todb@metasploit.com>
Date: Fri May 18 15:23:22 2012 -0500
Fixing whitespace on msfvenom case list.
commit 7e4c6613004e9b70e0ba4653e9eaa83470429c7e
Merge: 81a7d62 52183aa
Author: Tod Beardsley <todb@metasploit.com>
Date: Fri May 18 15:06:51 2012 -0500
Merge branch 'master' into rage-ps
commit 81a7d62c6dab8404c1c0566a8be84c7280edeef8
Author: RageLtMan <rageltman [at] sempervictus>
Date: Tue Mar 20 20:19:13 2012 -0400
powershell for msfvenom
commit 672c7bc37ea37a3b111f755ef17fe0c16047e488
Merge: 3e86dc4 ed542e2
Author: RageLtMan <rageltman [at] sempervictus>
Date: Tue Mar 20 20:08:12 2012 -0400
exe.rb merge cleanup
commit 3e86dc4c40da1df3d0ff4a9ab6fffe8eeda52544
Author: RageLtMan <rageltman [at] sempervictus>
Date: Tue Mar 20 20:06:03 2012 -0400
psh encoder cleanup
commit f619ed477fef7a2830b99ce6a9b27bb523c9d3ce
Author: RageLtMan <rageltman@sempervictus.com>
Date: Sun Feb 5 13:35:11 2012 -0500
method call fix for psh-net encoder
commit 7b035e6da0ead328aebbfdf9fbbebed506cdca18
Author: RageLtMan <rageltman@sempervictus.com>
Date: Fri Feb 3 18:53:54 2012 -0500
PS encoders: .net and architecture dependent native (psh-net, psh)
commit 7a2749bf2682686a87d37d240e61adece53fba8e
Merge: 32730b9 f89853d
Author: RageLtMan <rageltman@sempervictus.com>
Date: Fri Feb 3 18:38:03 2012 -0500
Merge branch 'master' into powershell
commit 32730b96be4c9bd73f1f45b5d2d4330b8fb72cb8
Merge: e69fcd1 f6a6963
Author: RageLtMan <rageltman@sempervictus.com>
Date: Wed Jan 25 10:33:17 2012 -0500
Merge branch 'master' of https://github.com/rapid7/metasploit-framework into powershell
commit e69fcd1a83412d6c0c96605b5acf0675e5b07205
Author: RageLtMan <rageltman@sempervictus.com>
Date: Wed Jan 25 07:59:38 2012 -0500
msfvenom psh addition
commit 9a5d8ead7e69c40ff5e9a73244165a5685ca47ec
Author: RageLtMan <rageltman@sempervictus.com>
Date: Wed Jan 25 07:29:38 2012 -0500
Proper author reference
commit 9fd8ac75a89ca2678b0d09192227eb23f00bf549
Author: RageLtMan <rageltman@sempervictus.com>
Date: Tue Jan 24 19:07:30 2012 -0500
Fix script handling
commit fa363dfe965382a9f89ff404398e38e8f164c11a
Author: RageLtMan <rageltman@sempervictus.com>
Date: Tue Jan 24 17:31:09 2012 -0500
added Msf::Post::Windows::Powershell, reworked post module to use mixin
commit e078d15b5464ff47ce616334d8cb1aa84a00df33
Author: RageLtMan <rageltman@sempervictus.com>
Date: Mon Jan 23 13:42:35 2012 -0500
vprint_good change
commit 355f8bb19a62d974c5c89079dd26dd4cbb756c0a
Author: RageLtMan <rageltman@sempervictus.com>
Date: Mon Jan 23 12:50:51 2012 -0500
exec powershell module
commit 5f9509444953f25352c994f90cae8a168878f7ea
Author: RageLtMan <rageltman@sempervictus.com>
Date: Mon Jan 23 12:45:41 2012 -0500
powershell encoder support - Redmine Feature #6049
The first process in Windows is usually [System Process] which has no
associated path, arch, or user, causing this code to skip all those
columns. Check for nil instead of blank to get around it. Need to
revisit this and make nonsense columns nil instead of an empty-string.