Commit Graph

134 Commits (d396be963a18dc1cbf06904a0f340683083652b7)

Author SHA1 Message Date
HD Moore 68ccdc8386 Fix a stack trace when module_payloads.rb is run
This fixes a missing check for self.target being nil in the compatible_payloads method
2014-01-13 15:36:33 -08:00
jvazquez-r7 39844e90c3 Don't user merge! because can modify self.compat 2013-12-27 16:37:34 -06:00
jvazquez-r7 ed838d73a6 Allow targets to specify Compat[ible] payloads 2013-12-19 17:48:15 -06:00
Tod Beardsley 76f27ecde8 Require the deprecation mixin in all modules
Because rememberin to require it, and hoping against a race is not how we
roll any more.
2013-09-12 15:49:33 -05:00
Tab Assassin 7e5e0f7fc8 Retab lib 2013-08-30 16:28:33 -05:00
HD Moore 4706f8b54c Add fail_with() stub and move Failure from Exploit 2013-08-15 13:30:47 -05:00
sinn3r 83aec3b231 Remove module version display
Since modules no longer use the 'Version' key, there's no point to
collect and show them. It's all 0 anyway.

[See RM 8278]
2013-08-14 02:26:39 -05:00
Joe Vennix 67d8c1170b Remove unnecessary whitespace. 2013-07-18 13:43:30 -05:00
Joe Vennix f4b0ab8184 Adds 141 passing specs to Msf::Module#search_filter.
* tests exclusion functionality, type: matching, port: matching, app: matching,
   platform: matching, author: matching, text: matching, name: matching, and
   path: matching.
[RM #4790]
2013-07-18 12:47:08 -05:00
Tod Beardsley 6a5d1d06b2 Make the conditional correct for print_prefix
Fixes a bug introduced on #1936.
2013-06-11 16:16:17 -05:00
Tod Beardsley 9a08090b0f Inch toward making modules more testable 2013-06-10 16:02:19 -05:00
Tod Beardsley a852304ba3 DRY: Move check things to the common module level
While it makes lots of sense to bring check to all modules, of course
some modules will not be able to actually use it. Namely modules like
nop and payload modules. If you're feeling creative, you could probably
come up with semantically similar checks for those, too.
2013-05-23 11:42:41 -05:00
James Lee db676f1a88 Whitespace at EOL 2013-03-07 18:20:08 -06:00
sinn3r d36f642edc Add print_warning() 2012-10-12 21:48:15 -05:00
Luke Imhoff 555a9f2559 Refactor Msf::ModuleManager
[Fixes #36737359]

Refactor Msf::ModuleManager into concerns so its easier to understand and
duplicate code can be made DRY.  The refactoring also ensures that when
loading from directories, Fastlibs, or reloading, the wrapper module will
always be named so that activesupport/dependencies will function.
2012-10-01 13:09:30 -05:00
HD Moore d656e3185f Mark all libraries as defaulting to 8-bit strings 2012-06-29 00:18:28 -05:00
James Lee a2751e3ccd Rdoc fixes 2012-06-06 17:04:54 -06:00
Tod Beardsley 75785a8b9f Got tired of writing out Exploit-DB identifiers
There are 143 modules with exploit-db references, may as well make them
easier to write and find. This change introduces the EDB identifier.
2012-03-21 16:43:21 -05: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
sinn3r 955b02e227 Allow 'port' option in module searching (idea originally from Brandon Perry's blog) 2012-01-18 11:19:37 -06:00
HD Moore 89caed444b Add a helper method for modules to indicate IPv6 compatibility 2011-12-05 13:07:36 -06:00
HD Moore f714591b92 Purge the new version code, it triggers a stack and is a massive performance hit 2011-11-23 23:05:51 -06:00
Tod Beardsley 8ab41013d1 Updating the version information to check the SVN metadata first. 2011-11-23 23:05:51 -06:00
Chao Mu 9575bb3780 Fixes #5639. added vprint_debug to module.rb alongside the other vprint_ methods. It calls print_debug when datastore['verbose']
git-svn-id: file:///home/svn/framework3/trunk@13840 4d416f70-5f16-0410-b530-b9f4589650da
2011-10-09 05:34:30 +00:00
James Lee c39d75ceee fix a typo that causes stack traces whan searching for 'app:client'
git-svn-id: file:///home/svn/framework3/trunk@13220 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-19 08:35:25 +00:00
James Lee c412a836ed add VERBOSE option to all modules and vprint_* methods to use it
git-svn-id: file:///home/svn/framework3/trunk@13183 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-15 15:33:35 +00:00
HD Moore e6968c202a A couple bug fixes to enable cmd_interact and a new module for the VSFTPD backdoor
git-svn-id: file:///home/svn/framework3/trunk@13093 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-04 20:09:32 +00:00
James Lee 7ef6be45c4 fix some wacky inheritance problems with Msf::Module#inspect
git-svn-id: file:///home/svn/framework3/trunk@13006 4d416f70-5f16-0410-b530-b9f4589650da
2011-06-22 22:18:55 +00:00
HD Moore 618c438ffd Move keyward parsing into the module base class
git-svn-id: file:///home/svn/framework3/trunk@12753 4d416f70-5f16-0410-b530-b9f4589650da
2011-05-28 02:29:22 +00:00
HD Moore 52f7863890 Add keyword searching to msfconsole
git-svn-id: file:///home/svn/framework3/trunk@12752 4d416f70-5f16-0410-b530-b9f4589650da
2011-05-28 02:26:04 +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
James Lee 0a638aebfc make modules' class.inspect useful. this has bugged me for *years*
git-svn-id: file:///home/svn/framework3/trunk@12462 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-28 16:50:57 +00:00
James Lee ded3ff9c75 add support for actions in post modules. fixes #3965~
git-svn-id: file:///home/svn/framework3/trunk@12008 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-17 05:39:30 +00:00
James Lee c92ab3f6b5 only dup if we've got something to dup. fixes #3896
git-svn-id: file:///home/svn/framework3/trunk@11880 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-05 20:15:36 +00:00
HD Moore e7dbf28626 This patch adds a register_parent() method to the module class, making it easy to propogate things like ParentUUID, Workspace, and Owner down. The multi/handler post modules were updated to use this new api. This fixes an issue where the session generated by a post module would be registered to the wrong workspace.
git-svn-id: file:///home/svn/framework3/trunk@11846 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-28 04:24:35 +00:00
HD Moore 941c0f446f Change the CustomPrintPrefix to apply to lines (before the status/timestamp)
git-svn-id: file:///home/svn/framework3/trunk@11829 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-26 02:35:38 +00:00
HD Moore 880ffeb1f7 This updates the (C) for 2011, adds a CustomPrintPrefix option to set a unique prefix for a module and cleans up some post modules
git-svn-id: file:///home/svn/framework3/trunk@11828 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-26 02:02:34 +00:00
James Lee f0cc6ff596 big commit for converting meterpreter scripts to modules, see #3377. also fixes payload tab-completion and 'show payloads' after TARGET has changed
git-svn-id: file:///home/svn/framework3/trunk@11421 4d416f70-5f16-0410-b530-b9f4589650da
2010-12-27 17:46:42 +00:00
HD Moore e6da9729c0 Handle invalid dates
git-svn-id: file:///home/svn/framework3/trunk@10888 4d416f70-5f16-0410-b530-b9f4589650da
2010-11-03 15:31:28 +00:00
HD Moore b99be2dae6 Unbreak this
git-svn-id: file:///home/svn/framework3/trunk@10621 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-09 18:27:09 +00:00
HD Moore f19be2ca3f Try harder to figure out who ran the module
git-svn-id: file:///home/svn/framework3/trunk@10620 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-09 18:11:11 +00:00
Joshua Drake 224891387a add exploit number to prefix
git-svn-id: file:///home/svn/framework3/trunk@10443 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-23 02:16:29 +00:00
Joshua Drake 9dacf8116e remove rails dependency from module.replicant
git-svn-id: file:///home/svn/framework3/trunk@9969 4d416f70-5f16-0410-b530-b9f4589650da
2010-08-07 05:57:58 +00:00
HD Moore ac69cf72bb Clone the module_store while we are at it
git-svn-id: file:///home/svn/framework3/trunk@9832 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-14 20:18:39 +00:00
HD Moore 97d3c9da8b This may solve both of the scanner/bap cases for module cloning
git-svn-id: file:///home/svn/framework3/trunk@9831 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-14 20:16:22 +00:00
HD Moore 5c2f104ade Fix module.replicant(), closes #2252
git-svn-id: file:///home/svn/framework3/trunk@9824 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-14 17:06:12 +00:00
James Lee 2c5336dabb attach job_id to the exploit, not just the driver; regenerate the uuid when replicating a module; generate the payload after copying the exploit module for a new job; fixes #2203, see #2098 and #2096
git-svn-id: file:///home/svn/framework3/trunk@9714 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-07 16:37:23 +00:00
James Lee 618b377d58 let's try this again. don't convert datastore values to strings when copying, only dup things that are already Strings, see #2189, #2098, #2096
git-svn-id: file:///home/svn/framework3/trunk@9684 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-06 17:59:36 +00:00
James Lee 5df5991d95 revert r9651, fixes #2189. Clearly there is more going on when copying a datastore object
git-svn-id: file:///home/svn/framework3/trunk@9683 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-06 17:26:06 +00:00