Commit Graph

28 Commits (95f67dba7a421adde3b8264926bf249b07d4ccc6)

Author SHA1 Message Date
sinn3r f6f0050f56 Fix #3886 - Backtrace for #check when session is invalid
If the user supplies an invalid session (as in not on the session
list), it will cause a backtrace, because the setup method from
Msf::PostMixin isn't actually called.

We have thought about implementing this in a new OptSession instead.
But you can't use or even pass framework to option_container.rb, so
this is NOT possible.

The original PR was #3956.
2014-12-02 17:22:46 -06:00
Joe Vennix b1b8cba4c5
Rescue an IOError on channel double-close.
This was causing output from python meterpreter
commands run on OSX to be discarded when the error
was raised, making cmd_exec not-so-useful.
2014-10-01 22:35:41 -05:00
jvazquez-r7 c19deddfb1 Delete debug messages 2014-07-08 16:24:45 -05:00
jvazquez-r7 c25c5f6806 Make linux gather post modules compatible with meterpreter 2014-07-08 16:23:57 -05:00
Tod Beardsley 4d3f871e9d
Land #2961, get_env and get_envs Post mixin
This unbreaks the changes introduced by #2782 by introducing
get_env and get_envs for shell sessions (not just meterpreter sessions).
2014-03-20 10:53:50 -05:00
David Maloney f66709b5bb
make bypassuac module clean itself up
since the IO redirection hangs our original process
we have the moudle wait for the session then kills
the spawning process and delete the exe we dropped
2014-02-27 12:54:40 -06:00
Meatballs a5cb03e409
Copy Meterpreter return hash
Dont add a key if no value is found
2014-02-08 12:12:45 +00:00
Meatballs 6e197ce535
Post get_envs library methods 2014-02-08 11:37:25 +00:00
sinn3r 2ee1764ceb Add method rhost, rport, and peer for post modules
[SeeRM #8761]
2014-02-03 01:05:43 -06:00
Tab Assassin adf9ff356c Merge for retab 2013-09-05 13:41:23 -05:00
Tab Assassin 7e5e0f7fc8 Retab lib 2013-08-30 16:28:33 -05:00
James Lee 63adde2429 Fix load order in posts, hopefully forever 2013-08-29 13:37:50 -05:00
jvazquez-r7 0e2380c115 Fix method documentation 2013-07-05 11:19:53 -05:00
sinn3r 0f37bbe78e Add has_pid? function
[SeeRM:#8123] - Add commonly used function has_pid?. Related to
redmine issue 8123.
2013-07-02 14:33:15 -05:00
James Lee db676f1a88 Whitespace at EOL 2013-03-07 18:20:08 -06:00
Stephen Haywood b6d64b770a Adding documentation to the post modules library. 2012-08-23 23:57:55 -04:00
James Lee 6b0196eccc Add a require for File in Common 2012-07-17 15:48:06 -06:00
HD Moore d656e3185f Mark all libraries as defaulting to 8-bit strings 2012-06-29 00:18:28 -05:00
James Lee 1be9ce8649 Fixes command parsing in Post::Common
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.
2012-06-07 22:24:59 -06:00
James Lee fc7293baae Arguments have to be joined with a space
Fixes cmd_exec() calls with more than one argument
2012-06-04 18:12:45 -06:00
HD Moore 139136e033 Fix a handful of typos in the regex/parsing code 2012-02-26 02:10:06 -06:00
Tod Beardsley 33c53b1f3f Updates vm checking 2012-01-26 13:02:39 -06:00
James Lee b49c451cd7 derp, this is a string
git-svn-id: file:///home/svn/framework3/trunk@13104 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-06 00:19:29 +00:00
James Lee d876b8d297 if the command we're running has spaces and we got no options for it, split it up correctly using Shellwords, fixes issues with running commands on java meterp
git-svn-id: file:///home/svn/framework3/trunk@13102 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-05 17:17:27 +00:00
James Lee d68e855bb6 don't try to chomp nil when the command failed (happens when a session dies)
git-svn-id: file:///home/svn/framework3/trunk@13085 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-01 23:46:54 +00:00
Carlos Perez ec3e1efbc8 Expanded cmd_exec to work also on shell sessions and handle command time out.
git-svn-id: file:///home/svn/framework3/trunk@12775 4d416f70-5f16-0410-b530-b9f4589650da
2011-05-30 22:11:43 +00:00
Carlos Perez a237122869 for Java version of Meterpreter options can not be included with the command, they have to be given apart updating mixin for this behavior
git-svn-id: file:///home/svn/framework3/trunk@11581 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-15 05:08:42 +00:00
Carlos Perez e48aa7856a Migration of Meterpreter mixin to post module mixin
git-svn-id: file:///home/svn/framework3/trunk@11550 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-12 00:10:32 +00:00