Commit Graph

70 Commits

Author SHA1 Message Date
Dean Welch 792708c07b Remove all references to Msf::SymbolicModule 2024-02-07 15:08:47 +00:00
Dean Welch d60993f7e8 Enable using modules when deferred loading is turned on 2023-10-06 16:04:34 +01:00
Dean Welch d9817e825e Add error handling when loading payloads 2023-07-26 12:01:46 +01:00
Dean Welch d452f49f09 Handle nil error when creating adapted payloads 2023-07-05 17:28:05 +01:00
Dean Welch 8527eea15d Add lazy loading for payloads 2023-06-16 12:04:48 +00:00
Dean Welch 3036a53697 Change name to single_name for consistency 2023-05-12 16:59:33 +01:00
Dean Welch f6855f6aa4 Split recalculate out into multiple functions 2023-05-12 16:30:14 +01:00
Spencer McIntyre eb03c9f131 Add the powershell adapters 2022-05-09 11:55:57 -04:00
Spencer McIntyre bad55a858c Add the new adapter payload type 2022-02-23 16:38:57 -05:00
dwelch-r7 1617b3ec9b Use zeitwerk for lib/msf/core folder 2020-12-07 10:31:45 +00:00
dwelch-r7 df7483af6c Remove sizes hash and calculation of payload sizes on boot 2020-09-10 12:57:40 +01:00
Shelby Pace 41bc3851a2 remove mingw check, add general dependency check 2019-11-18 09:33:43 -06:00
Shelby Pace d1e9538f9c use stager_name 2019-11-11 09:32:28 -06:00
Shelby Pace 7d5deafcee add check for cipher 2019-11-11 09:11:51 -06:00
Shelby Pace fe1b802cf9 check for dependency in stager/stage 2019-10-10 12:16:09 -05:00
Shelby Pace 7342a4579a add dependency check code 2019-10-10 12:16:09 -05:00
h00die d25d8e77b8 12291 sempervictus words 2019-09-07 23:54:19 -04:00
Brent Cook a985da9318 expand scope of errors caught to include all StandardErrors 2019-09-07 07:38:37 -04:00
Brent Cook 1d91e7f53c make payload generation failures at boot time non-fatal
Currently, if any payload fails to generate that has a dynamic size, it causes a Framework instance to throw an exception on start. This can happen for a number of reasons, and more often than not it is enviromental (files missing, Y2k38 bugs, etc.). Instead of failing entirely, catch the exception and log as an error, don't register the payload, but continue booting.
2019-09-07 07:21:40 -04:00
HD Moore 376d05f797 Avoid instantiating the module during recalculate 2015-03-12 01:02:37 -05:00
HD Moore d46635ff8b Restore a comment lost in the code churn 2015-03-07 21:25:35 -06:00
HD Moore 853bf1b569 Accidental carry over from stale master 2015-03-07 20:48:22 -06:00
HD Moore 2e49791bef This implements payload size caching, speeding up framework loads 2015-03-07 20:44:19 -06:00
sinn3r 31191bef39 Fix #4865, undef method 'ancestors' in lib/msf/core/payload_set.rb
Fix #4865
2015-03-05 12:49:51 -06:00
Luke Imhoff 0c00c7cc50 Fully-qualifiy Msf::MODULE_TYPES constants
MSP-11126

Fully-qualify `Msf::MODULE_TYPES`, `Msf::MODULE_ANY`,
Msf::MODULE_ENCODER`, `Msf::MODULE_EXPLOIT`, `Msf::MODULE_NOP`,
`Msf::MODULE_AUX`, `Msf::MODULE_PAYLOAD`, `Msf::MODULE_POST` so that
their usage isn't dependent on nested lexical scoping.
2014-10-17 12:43:40 -05:00
Tab Assassin 7e5e0f7fc8 Retab lib 2013-08-30 16:28:33 -05:00
Luke Imhoff 2b70ec2e08 Payload compatible cache_in_memory
[#47720609]

Msf::PayloadSet#add_module does NOT return an annotated module class as
Msf::ModuleSet#add_module does because a payload module is defined as a
ruby Module instead of a ruby Class.   Since add_module doesn't always
return an annotated_class, the logic in
Msf::ModuleManager#on_module_load needed to change to NOT use
annotated_class and create #add_module as return [void].  Thus, it is
necessary to pass in all the metasploit module metadata to
Msf::ModuleManager#cache_in_memory instead of assuming they can be
derived from the (payload) Module or (other) Class.
2013-05-22 16:06:02 -05:00
James Lee 0d9b120bac Get rid of the suffix
This makes blob cache a little cleaner

[FixRM #7898]
2013-05-02 16:55:14 -05:00
James Lee f4476cb1b7 Really fix payload recalculation
Instead of deleting all non-symbolics before the re-adding phase of
PayloadSet#recalculate, store a list of old module names, populate a
list of new ones during the re-adding phase, and finally remove any
non-symbolic module that was in the old list but wasn't in the new list.

Also includes a minor refactoring to make ModuleManager its own thing
instead of being an awkard subclass of ModuleSet. Now PayloadSet doesn't
need to know about the existence of framework.modules, which makes the
separation a little more natural.

[FixRM #7037]
2012-12-03 22:23:40 -06:00
HD Moore 0230ef60f6 Cosmetic 2012-07-15 15:46:54 -05:00
HD Moore d6c6a3d0c5 Correct an issue with payload recalc during iteration 2012-07-15 15:45:25 -05:00
HD Moore d656e3185f Mark all libraries as defaulting to 8-bit strings 2012-06-29 00:18:28 -05:00
HD Moore 8425c8438d Switch to a MDM/SQL-based module cache 2012-06-16 14:51:09 -05:00
James Lee 63934c34ec check for a ancestors instead of a straight comparison of classes when matching payloads for generics, fixes #3477
git-svn-id: file:///home/svn/framework3/trunk@11585 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-17 17:15:43 +00:00
HD Moore b460843929 Fixes #574. Uses compatible_payloads as the initial list for finding a match
git-svn-id: file:///home/svn/framework3/trunk@7604 4d416f70-5f16-0410-b530-b9f4589650da
2009-11-25 02:24:41 +00:00
HD Moore d09d151f31 Disable stager + single chaining, it causes confusion and often breaks.
git-svn-id: file:///home/svn/framework3/trunk@7400 4d416f70-5f16-0410-b530-b9f4589650da
2009-11-07 22:13:04 +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
Matt Miller bf935736b6 fix flushing to account for suffix
git-svn-id: file:///home/svn/framework3/trunk@5078 4d416f70-5f16-0410-b530-b9f4589650da
2007-08-13 01:32:32 +00:00
Matt Miller 7b65a56d65 initial support for metasm integration, ported sample payload to use it
git-svn-id: file:///home/svn/framework3/trunk@5076 4d416f70-5f16-0410-b530-b9f4589650da
2007-08-11 00:37:50 +00:00
Matt Miller ea06abe5bb support for generic payloads
git-svn-id: file:///home/svn/framework3/trunk@3843 4d416f70-5f16-0410-b530-b9f4589650da
2006-08-26 02:13:25 +00:00
Matt Miller e22b38ee8c one other change
git-svn-id: file:///home/svn/incoming/trunk@3555 4d416f70-5f16-0410-b530-b9f4589650da
2006-03-07 07:07:00 +00:00
Matt Miller 8b4ddab401 fix for module caching issues with rexploit
git-svn-id: file:///home/svn/incoming/trunk@3554 4d416f70-5f16-0410-b530-b9f4589650da
2006-03-07 07:05:41 +00:00
Matt Miller 3a37749de6 support for demand-loading of modules to improve load speed, expect problems
git-svn-id: file:///home/svn/incoming/trunk@3534 4d416f70-5f16-0410-b530-b9f4589650da
2006-02-21 03:10:58 +00:00
bmc 553144418a * two tiny optimizations:
* Platform is far more frequently the reason for skipping, so make that first.
  * compact!, the builtin for deleting nil entries in an array


git-svn-id: file:///home/svn/incoming/trunk@3532 4d416f70-5f16-0410-b530-b9f4589650da
2006-02-19 04:09:18 +00:00
Matt Miller be449c54a5 stagers stat works
git-svn-id: file:///home/svn/incoming/trunk@3183 4d416f70-5f16-0410-b530-b9f4589650da
2005-12-06 19:37:59 +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 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 1c3fc58349 updated logging levels and defined guidelines
git-svn-id: file:///home/svn/incoming/trunk@3002 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-02 00:27:59 +00:00
Matt Miller 712f7ef776 more docs
git-svn-id: file:///home/svn/incoming/trunk@2974 4d416f70-5f16-0410-b530-b9f4589650da
2005-10-19 03:37:22 +00:00
Matt Miller b06a2ca030 initial support for compat filtering, may be buggy
git-svn-id: file:///home/svn/incoming/trunk@2971 4d416f70-5f16-0410-b530-b9f4589650da
2005-10-19 01:48:10 +00:00