Commit Graph

56 Commits (4c72b096b656c424a3964a688b37cb5b5fb31d16)

Author SHA1 Message Date
Tab Assassin 7e5e0f7fc8 Retab lib 2013-08-30 16:28:33 -05:00
David Maloney c4475538e7 Report on TaskSession associations
add TaskSession objects so when we report
on a session, we know what Task created it, if there
was a task
2013-06-04 13:42:36 -05:00
James Lee db676f1a88 Whitespace at EOL 2013-03-07 18:20:08 -06:00
HD Moore d656e3185f Mark all libraries as defaulting to 8-bit strings 2012-06-29 00:18:28 -05:00
James Lee 29e01760f0 Wrap more database usage in with_connection block 2012-04-19 23:51:20 -06:00
James Lee 95c996c435 Make sure session.target_host gets resolved
Not sure why this isn't already resolved when we read it out of the
datastore.  May have something to do with the recent options madness.

[Fixes #6567]
2012-03-28 13:37:39 -06:00
James Lee 624e19fd8b Merge session-host-rework branch back to master
Squashed commit of the following:

commit 2f4e8df33c5b4baa8d6fd67b400778a3f93482aa
Author: James Lee <egypt@metasploit.com>
Date:   Tue Feb 28 16:31:03 2012 -0700

    Clean up some rdoc comments

    This adds categories for the various interfaces that meterpreter and
    shell sessions implement so they are grouped logically in the docs.

commit 9d31bc1b35845f7279148412f49bda56a39c9d9d
Author: James Lee <egypt@metasploit.com>
Date:   Tue Feb 28 13:00:25 2012 -0700

    Combine the docs into one output dir

    There's really no need to separate the API sections into their own
    directory.  Combining them makes it much easier to read.

commit eadd7fc136a9e7e4d9652d55dfb86e6f318332e0
Author: James Lee <egypt@metasploit.com>
Date:   Tue Feb 28 08:27:22 2012 -0700

    Keep the order of iface attributes the same accross rubies

    1.8 doesn't maintain insertion order for Hash keys like 1.9 does so we
    end up with ~random order for the display with the previous technique.
    Switch to an Array instead of a Hash so it's always the same.

commit 6f66dd40f39959711f9bacbda99717253a375d21
Author: James Lee <egypt@metasploit.com>
Date:   Tue Feb 28 08:23:35 2012 -0700

    Fix a few more compiler warnings

commit f39cb536a80c5000a5b9ca1fec5902300ae4b440
Author: James Lee <egypt@metasploit.com>
Date:   Tue Feb 28 08:17:39 2012 -0700

    Fix a type-safety warning

commit 1e52785f38146515409da3724f858b9603d19454
Author: James Lee <egypt@metasploit.com>
Date:   Mon Feb 27 15:21:36 2012 -0700

    LHOST should be OptAddress, not OptAddressRange

commit acef978aa4233c7bd0b00ef63646eb4da5457f67
Author: James Lee <egypt@metasploit.com>
Date:   Sun Feb 26 17:45:59 2012 -0700

    Fix a couple of warnings and a typo

commit 29d87f88790aa1b3e5db6df650ecfb3fb93c675b
Author: HD Moore <hdm@digitaloffense.net>
Date:   Mon Feb 27 11:54:29 2012 -0600

    Fix ctype vs content_type typo

commit 83b5400356c47dd1973e6be3aa343084dfd09c73
Author: Gregory Man <man.gregory@gmail.com>
Date:   Sun Feb 26 15:38:33 2012 +0200

    Fixed scripts/meterpreter/enum_firefox to work with firefox > 3.6.x

commit 49c2c80b347820d02348d694cc71f1b3028b4365
Author: Steve Tornio <swtornio@gmail.com>
Date:   Sun Feb 26 07:13:13 2012 -0600

    add osvdb ref

commit e18e1fe97b89c3a2b8c22bc6c18726853d2c2bee
Author: Matt Andreko <mandreko@gmail.com>
Date:   Sat Feb 25 18:02:56 2012 -0500

    Added aspx target to msfvenom.  This in turn added it to msfencode as well.
    Ref: https://github.com/rapid7/metasploit-framework/pull/188
    Tested on winxp with IIS in .net 1.1 and 2.0 modes

commit e6aa5072112d79bbf8a4d2289cf8d301db3932f5
Author: Joshua J. Drake <github.jdrake@qoop.org>
Date:   Sat Feb 25 13:00:48 2012 -0600

    Fixes #6308: Fall back to 127.0.0.1 when SocketError is raised from the resolver

commit b3371e8bfeea4d84f9d0cba100352b57d7e9e78b
Author: James Lee <egypt@metasploit.com>
Date:   Tue Feb 28 17:07:42 2012 -0700

    Simplify logic for whether an inner iface has the same address

commit 5417419f35a40d1c08ca11ca40744722692d3b0d
Author: James Lee <egypt@metasploit.com>
Date:   Tue Feb 28 16:58:16 2012 -0700

    Whitespace

commit 9036875c2918439ae23e11ee7b958e30ccc29545
Author: James Lee <egypt@metasploit.com>
Date:   Tue Feb 28 16:53:45 2012 -0700

    Set session info before worrying about address

    get_interfaces can take a while on Linux, grab uid and hostname earlier
    so we can give the user an idea of what they popped as soon as possible.

commit f34b51c6291031ab25b5bfb1ac6307a516ab0ee9
Author: James Lee <egypt@metasploit.com>
Date:   Tue Feb 28 16:48:42 2012 -0700

    Clean up rdoc

commit e61a0663454400ec66f59a80d18b0baff4cb8cd9
Author: HD Moore <hd_moore@rapid7.com>
Date:   Tue Feb 28 04:54:45 2012 -0600

    Ensure the architecture is only the first word (not the full WOW64
    message in some cases)

commit 4c701610976a92298c1182eecc9291a1b301e43b
Author: HD Moore <hd_moore@rapid7.com>
Date:   Tue Feb 28 04:49:17 2012 -0600

    More paranoia code, just in case RHOST is set to whitespace

commit c5ff89fe3dc9061e0fa9f761e6530f6571989d28
Author: HD Moore <hd_moore@rapid7.com>
Date:   Tue Feb 28 04:47:01 2012 -0600

    A few more small bug fixes to handle cases with an empty string target
    host resulting in a bad address

commit 462d0188a1298f29ac83b10349aec6737efc5b19
Author: HD Moore <hd_moore@rapid7.com>
Date:   Tue Feb 28 03:55:10 2012 -0600

    Fix up the logic (reversed by accident)

commit 2b2b0adaec2448423dbd3ec54d90a5721965e2df
Author: HD Moore <hd_moore@rapid7.com>
Date:   Mon Feb 27 23:29:52 2012 -0600

    Automatically parse system information and populate the db, identify and
    report NAT when detected, show the real session_host in the sessions -l
    listing

commit 547a4ab4c62dc3248f847dd5d305ad3b74157348
Author: HD Moore <hd_moore@rapid7.com>
Date:   Mon Feb 27 22:16:03 2012 -0600

    Fix typo introduced

commit 27a7b7961e61894bdecd55310a8f45d0917c5a5c
Author: HD Moore <hd_moore@rapid7.com>
Date:   Mon Feb 27 22:11:38 2012 -0600

    More session.session_host tweaks

commit e447302a1a9915795e89b5e29c89ff2ab9b6209b
Author: HD Moore <hd_moore@rapid7.com>
Date:   Mon Feb 27 22:08:20 2012 -0600

    Additional tunnel_peer changes

commit 93369fcffaf8c6b00d992526b4083acfce036bb3
Author: HD Moore <hd_moore@rapid7.com>
Date:   Mon Feb 27 22:06:21 2012 -0600

    Additional changes to session.session_host

commit c3552f66d158685909e2c8b51dfead7c240c4f40
Author: HD Moore <hd_moore@rapid7.com>
Date:   Mon Feb 27 22:00:19 2012 -0600

    Merge changes into the new branch
2012-02-28 18:29:39 -07:00
HD Moore 8a0eddc795 Handle closed_at in a consistent way as it applies to UTC (closes #5572)
git-svn-id: file:///home/svn/framework3/trunk@13955 4d416f70-5f16-0410-b530-b9f4589650da
2011-10-16 19:03:59 +00:00
HD Moore 9ce47c01bd Reverting the autoload changes until we can upgrade to a new ActiveSupport library or find a workaround
git-svn-id: file:///home/svn/framework3/trunk@12600 4d416f70-5f16-0410-b530-b9f4589650da
2011-05-12 20:03:55 +00:00
Joshua Drake fd4e6db85d Fixes 4373, Migrates lib/msf to use autoload instead of require (first try)
git-svn-id: file:///home/svn/framework3/trunk@12596 4d416f70-5f16-0410-b530-b9f4589650da
2011-05-12 19:07:35 +00:00
HD Moore d2d66f3285 This patch changes how VNC sessions are handled, making them a now-unique type that is not registered in the normal sense. This works around a corner case due to recent session work.
git-svn-id: file:///home/svn/framework3/trunk@12358 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-18 20:07:53 +00:00
Mike Smith d5d9d56081 Create a dedicated db table to track sessions & session events.
* Add new db tables for session & session_events
* Migrate existing session data from events db table
* Modify session report methods to log to the new tables


git-svn-id: file:///home/svn/framework3/trunk@12273 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-07 21:59:32 +00:00
HD Moore 0e04505232 Fixes #3027, a set of bugs introduced during the meterpreter posix work.
git-svn-id: file:///home/svn/framework3/trunk@10773 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-21 04:43:54 +00:00
HD Moore 25315ec3ea Store the module instance itself in an accessor on the session. You have to be careful when using this, as the contents can change if the owner of the module is still working with it.
git-svn-id: file:///home/svn/framework3/trunk@10386 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-20 03:51:38 +00:00
Tod Beardsley 01139ed655 Adding an autoroute meterpreter script, and enabling route housekeeping to be stored and retrived via Sessions directly, rather than through Rex::Socket::SwitchBoard.
git-svn-id: file:///home/svn/framework3/trunk@9663 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-02 17:38:56 +00:00
James Lee 1c9059eeb1 standardize job context as an Array and always copy datastore for jobs. fixes #2096 and fixes #2098
git-svn-id: file:///home/svn/framework3/trunk@9652 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-01 22:02:46 +00:00
James Lee 7061c782d3 make Session#inspect a little nicer
git-svn-id: file:///home/svn/framework3/trunk@8981 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-02 18:00:30 +00:00
HD Moore 9cc4cab9ec Duplicate the datastore and manually set user/pass in the telnet/ssh modules
git-svn-id: file:///home/svn/framework3/trunk@8943 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-27 22:57:29 +00:00
HD Moore 9277f060a7 Store a uuid for each module, track this in sessions
git-svn-id: file:///home/svn/framework3/trunk@8937 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-27 02:39:52 +00:00
James Lee e088d9ff68 change order of paths to src, dest in session up/download events
git-svn-id: file:///home/svn/framework3/trunk@8882 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-22 20:56:22 +00:00
James Lee 73cd20f8a6 add the skeleton for new session events. now the hard part is going to be triggering them for meterpreter sessions without mixing the Rex and Msf namespaces...
git-svn-id: file:///home/svn/framework3/trunk@8873 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-22 01:13:58 +00:00
HD Moore 9d918b3cbc Make the uuid more hash-like
git-svn-id: file:///home/svn/framework3/trunk@8859 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-20 19:04:21 +00:00
HD Moore 18075f9b68 Store session UUID and username
git-svn-id: file:///home/svn/framework3/trunk@8830 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-16 15:11:07 +00:00
HD Moore d03342fa49 Store the full module paths
git-svn-id: file:///home/svn/framework3/trunk@8827 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-15 23:40:12 +00:00
Joshua Drake ac06e2d667 only copy user_input and user_output if they are non-nil
git-svn-id: file:///home/svn/framework3/trunk@8806 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-12 21:47:27 +00:00
Joshua Drake 7a37934a01 process autorun scripts for telnet_login and ssh_login
1. create session.process_autoruns in Msf::Sessions::CommandShell
2. call process_autoruns from within the handler on_session code
4. set user_input and user_output in sessions base set_from_exploit method
5. remove on_session from Msf::Sessions::CommandShellOptions
6. include CommandShellOptions into telnet_login and ssh_login
7. call sess.process_autoruns from telnet_login and ssh_login
8. celebrate (while crossing fingers of course)!

git-svn-id: file:///home/svn/framework3/trunk@8692 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-02 18:07:50 +00:00
James Lee cded6cc59d log all output from sessions when reading from rpc
git-svn-id: file:///home/svn/framework3/trunk@8672 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-26 21:55:30 +00:00
James Lee 832d0bcbfa add exploit datastore to sessions so we can tell exactly how the session was created
git-svn-id: file:///home/svn/framework3/trunk@8651 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-26 01:09:23 +00:00
HD Moore 8ebc16bb4a Add the info field to the session object
git-svn-id: file:///home/svn/framework3/trunk@8649 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-25 23:20:33 +00:00
James Lee 4ad6c24a95 look for dead sesions with a reaper thread instead of on other session events, add Session#alive accessor for all session types; still need to figure out when a shell session is dead and set it accordingly. Add a reason argument to on_session_close to distinguish between killed sessions and dead sessions
git-svn-id: file:///home/svn/framework3/trunk@8596 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-23 05:59:30 +00:00
HD Moore 479f2939fc Track the target host/workspace through the entire tree, expose to RPC, and use this telnet_login
git-svn-id: file:///home/svn/framework3/trunk@8583 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-22 17:54:44 +00:00
James Lee 0708798598 more concise inspect output for Session objects
git-svn-id: file:///home/svn/framework3/trunk@7949 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-23 01:03:51 +00:00
James Lee 4f92d9f431 Revamp the event system and add some ui hooks. Sessions are still ghetto -- we get interact events (in a lame way) but no input or output events yet. see 619
git-svn-id: file:///home/svn/framework3/trunk@7947 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-22 18:52:48 +00:00
kris 248f1e9fc3 Remove "#{xxx.to_s}" redundancies ('s/\(#{[^}]*\)\.to_s}/\1}/g')
git-svn-id: file:///home/svn/framework3/trunk@6022 4d416f70-5f16-0410-b530-b9f4589650da
2008-12-19 07:11:08 +00:00
Ramon de C Valle f124597a56 Code cleanups
git-svn-id: file:///home/svn/framework3/trunk@5773 4d416f70-5f16-0410-b530-b9f4589650da
2008-10-19 21:03:39 +00:00
HD Moore 8a797e6bcc Support for killing sessions from the UI and killing all running jobs with jobs -a
git-svn-id: file:///home/svn/framework3/trunk@4361 4d416f70-5f16-0410-b530-b9f4589650da
2007-02-11 23:24:25 +00:00
Matt Miller 5676117bff last of normalized docs from last night
git-svn-id: file:///home/svn/incoming/trunk@3030 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-15 15:11:43 +00:00
Matt Miller ac9b0edf94 bug fix
git-svn-id: file:///home/svn/incoming/trunk@3012 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-03 00:18:12 +00:00
Matt Miller efc687de84 fix up handlers
git-svn-id: file:///home/svn/incoming/trunk@3007 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-02 17:32:34 +00:00
Matt Miller 6a5870ddcd updated comments to be more uniformed in class definition
git-svn-id: file:///home/svn/incoming/trunk@3004 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-02 16:49:45 +00:00
Matt Miller a6d6cedd1d automatic module subscription to events
git-svn-id: file:///home/svn/incoming/trunk@2980 4d416f70-5f16-0410-b530-b9f4589650da
2005-10-30 22:20:29 +00:00
Matt Miller b955e21a8b no .log
git-svn-id: file:///home/svn/incoming/trunk@2941 4d416f70-5f16-0410-b530-b9f4589650da
2005-10-02 04:06:31 +00:00
Matt Miller 1a8bb86843 improved session logging
git-svn-id: file:///home/svn/incoming/trunk@2939 4d416f70-5f16-0410-b530-b9f4589650da
2005-10-02 03:57:46 +00:00
Matt Miller db40a55547 session logging support
git-svn-id: file:///home/svn/incoming/trunk@2938 4d416f70-5f16-0410-b530-b9f4589650da
2005-10-02 03:21:26 +00:00
Matt Miller 6f6924e001 meterpreter comm session implemented, untested
git-svn-id: file:///home/svn/incoming/trunk@2920 4d416f70-5f16-0410-b530-b9f4589650da
2005-09-30 05:59:44 +00:00
Matt Miller c494a71957 find port/tag stagers
git-svn-id: file:///home/svn/incoming/trunk@2799 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-19 14:33:25 +00:00
Matt Miller 11724ac797 fixed stager merging, made things a bit more pimply
git-svn-id: file:///home/svn/incoming/trunk@2774 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-17 06:01:11 +00:00
Matt Miller 24c4a2513a some more madness
git-svn-id: file:///home/svn/incoming/trunk@2765 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-16 08:12:58 +00:00
Matt Miller 2f2363d141 it lives, major changes, fixed bugs, exploiting works with the test exploit
git-svn-id: file:///home/svn/incoming/trunk@2763 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-16 07:32:11 +00:00
Spoon M 7bbae355d6 mass require moving of /lib
git-svn-id: file:///home/svn/incoming/trunk@2690 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-09 21:18:49 +00:00