Commit Graph

267 Commits

Author SHA1 Message Date
Adam Cammack 995c56098d Allow multiple moved_from deprecations
Each `moved_from` deprecation in a module with more that one will now
print their respective warnings.
2020-02-06 10:23:32 -06:00
Brent Cook 945f26e898 prefer delete_prefix over creating 2 new strings 2019-12-02 09:03:58 -06:00
William Vu c9cc8c547f Remove "now" from moved_from message
It's confusing to the user, since they think the prompt will change.
Thanks, @h00die.
2019-11-01 10:22:40 -05:00
Brent Cook 0ed09cc9bf Land #11927, Add Brocade post module and config parser 2019-09-24 05:59:21 -05:00
Adam Cammack bcccfd86b8 Teach module cache about realname
Also uses the class refname where appropriate since an instances refname
reflects the alias currently in use and if a module is reloaded while
using an alias the old behavior would generate spurious cache entries
that would not be cleaned up or modified. Specifically, this could
register a self-referential alias that would cause a stack overflow when
trying to `use` such an alias.

Additionally, some other `fullname`s were changed to `realname`s for
clarity.
2019-08-26 13:26:48 -05:00
Adam Cammack 6a8f6d7a57 Unify spec and lib 2019-08-22 18:03:13 -05:00
Adam Cammack d8e8a33b46 Rewrite Msf::Module::Deprecated w/ alerts, aliases
Less janky, and allows module moves without copying!
2019-08-22 17:58:20 -05:00
Adam Cammack 969ad7aa8a Add Msf::Module::Alert for alerting users 2019-08-22 17:58:20 -05:00
William Vu 29d6c270d4 Fix setting PAYLOAD clearing target DefaultOptions 2019-07-24 17:38:14 -05:00
h00die cf90f8250d reimport brocade module 2019-06-09 15:09:06 -04:00
Adam Cammack deb31d77c3 Use the aliased name on instantiated modules
This creates a way for modules and the framework to see what name the
user entered to interact with a module.
2019-06-03 13:55:02 -05:00
Adam Cammack cf59022936 Add aliases to modules
This allows modules that can be addressed by name to register possible
aliases for themselves by defining an `Aliases` constant in the top
level of the module.
2019-06-03 13:40:27 -05:00
Jacob Robles 5d2cd40010 Update MSB reference
Previous MSB references were redirecting to docs.microsoft.com
2019-05-23 07:00:23 -05:00
h00die a0b1ca1767 detect unifi in ssh sessions 2019-03-12 20:35:32 -04:00
Brent Cook 16e800a7c4 Implement deregistering an option by alias
Rather than having to 'unregister' both 'RHOST' and 'RHOSTS' for modules using a network-connecting mixin, this allows just unregistering one option by exposing the alias key lookup to the module options library and allowing it to remove the datastore options for the module from validation.

Noted while testing #11108 that the module's unregister options were incomplete, and there were a few more like it. This allows modules operating in this style to work without modifications.
2019-02-13 05:07:20 -06:00
Jeffrey Martin 35ec947c17 remove is_server/is_client and app search term 2019-01-31 12:14:25 -06:00
Christopher Lee b11bcd92a4 Broken into 3 modules, addressed review comments 2018-12-03 10:25:21 -06:00
Christopher Lee 5b926bcbcf Addressed feedback 2018-11-30 13:18:02 -06:00
Christopher Lee 6225c04b99 Address review feedback, fix bugs 2018-11-30 11:36:39 -06:00
William Vu 6c74820843 Land #10773, session.platform TypeError fix
This also adds an "unknown" platform class.
2018-10-08 14:38:31 -05:00
William Vu ccfdfb6a5c Clean up new "unknown" platform and current use 2018-10-08 14:31:31 -05:00
h00die 023f7db9ba explicitly declare rank 0 2018-10-08 13:16:14 -04:00
h00die cd9ef01c9a add default case unknown platform and new cisco ios proof 2018-10-08 13:07:45 -04:00
Wei Chen c7efd57144 Sync up with master 2018-10-06 08:27:01 -05:00
Wei Chen e34371c7d3 Add a newline 2018-09-26 21:19:49 -05:00
Wei Chen 9064fac1ff Fix code based on Will's feedback 2018-09-26 21:13:37 -05:00
Wei Chen 583874d370 Update use of reliability/side-effects/stability metadata 2018-09-26 18:54:08 -05:00
Wei Chen 04ff0931d7 Add metadata place holders for reliability/side-effects/stability 2018-09-26 17:42:54 -05:00
Wei Chen 02ef565730 Update evasion_module_type branch 2018-09-24 08:20:32 -05:00
Brent Cook 86f5b25d8f Land #10563, Add 'Notes' metadata section 2018-09-17 11:18:08 -05:00
Erin Bleiweiss 184d1d5954 Leave notes type as a plain hash 2018-09-14 11:17:37 -05:00
Erin Bleiweiss 1eb703b1b5 Refactor initialization of module's notes attribute 2018-09-06 16:15:52 -05:00
William Vu e2428b5c20 Fix target DisableNops not being passed to payload 2018-09-05 18:07:54 -05:00
Jacob Robles 0a2b0f8cec Remove trailing comma
Fix issue causes target.ret to be an array
2018-09-04 07:43:43 -05:00
Erin Bleiweiss 5c7f59e2f9 Remove AKA formatters from references 2018-08-31 16:54:16 -05:00
Erin Bleiweiss 420041f287 Don't refer to AKA as 'alias' in order to not overlap nomenclature with upcoming 'alias' feature 2018-08-31 16:54:07 -05:00
Erin Bleiweiss 3f9e19c6af Restructure Notes into NotesContainer object 2018-08-31 16:51:59 -05:00
Erin Bleiweiss 3c115f1bfc Update json parsing rules for external modules 2018-08-31 16:48:56 -05:00
Erin Bleiweiss 659e4f2b34 Build json correctly for new notes field 2018-08-31 16:47:00 -05:00
William Vu 7e496ae067 Import target DefaultOptions into the datastore 2018-08-16 12:18:02 -05:00
Wei Chen f176dd03b5 Add a new module type to support evasion (WIP) 2018-08-02 11:54:38 -05:00
James Barnett 65d42380d3 Merge branch 'master' into remote_creds_data 2018-07-19 16:25:06 -05:00
William Vu 38daeb1b9f Fix #10283, SOUNDTRACK and LOGO refs
Some dupe code came in from master. Fixing and refactoring.
2018-07-17 19:36:35 -05:00
William Vu 07203dccc6 Clean up some things 2018-07-17 19:11:26 -05:00
Brendan Coles f9daabcee3 Add support for SOUNDTRACK and LOGO to module refs 2018-07-10 17:23:07 +00:00
James Barnett 9f2f61c481 Implement create_credential_and_login in the dataproxy 2018-06-14 13:28:03 -05:00
Adam Cammack 1d168a84e5 Add 'unknown' fallback check status
`check` is not a fan of `fail_with`, so fallback when the external
module exits unsuccessfully.
2018-05-14 11:00:40 -05:00
Adam Cammack 780b956dd1 Return results of external module runs
This will allow us to grab check results or more interesting things in
the future, if we decide that modules can have return values for more
types of things. Or this may go away and checks will use the reporting
interface like everything else.
2018-05-10 18:29:14 -05:00
Adam Cammack 271a2344db Refactor external module API to be more reliable
Also:
  Grabs exit status
  Less boilerplate required for modules
2018-05-09 13:30:13 -05:00
Adam Cammack 7c67d2b0b4 Add external module API for reporting passwords 2018-05-04 16:24:57 -05:00