Commit Graph

20644 Commits

Author SHA1 Message Date
adfoster-r7 3cf3d0995e Land #18813, fix broken hosts and services help command 2024-02-12 11:50:14 +00:00
cgranleese-r7 5d165466ff Move CreateSession from advanced into basic options 2024-02-12 11:35:27 +00:00
Spencer McIntyre 5036d28b44 Validate hostnames before storing them
This proactively fixes a potential DoS condition where if a user were to
add a hostname containing a ; and followed by data that is not an IP
address that MSF may fail to start.

Example:
dns add-static 'foo;bar' 192.0.2.1
save
2024-02-09 14:52:41 -05:00
Zach Goldman 94223f05fc update relevant modules to work with sessions
separate out optional session logic

fixing session handling
2024-02-09 13:18:49 -06:00
adfoster-r7 72932bdae1 Fix broken hosts and services help command 2024-02-09 16:28:47 +00:00
sjanusz-r7 30fc29e0f5 Use PostgreSQL session type for modules 2024-02-09 15:38:06 +00:00
adfoster-r7 9caa2fac17 Land #18747, Add new mssql session type 2024-02-09 15:27:43 +00:00
Spencer McIntyre 99b2bfec1f Support -1 in the --session argument 2024-02-09 08:57:23 -05:00
Zach Goldman 2c60780dc0 Add MSSQL session Type 2024-02-09 07:27:01 -06:00
Spencer McIntyre 1b2a2af4d4 Fix unit tests on Ruby 3.2 because IPAddr =~ fails 2024-02-08 17:10:49 -05:00
Spencer McIntyre 56d2dfa46a Fix removing invalid DNS rule IDs 2024-02-08 17:00:40 -05:00
Spencer McIntyre 934b10a626 Fix a bug when dns -h is run 2024-02-08 16:52:45 -05:00
Spencer McIntyre 630301a0df Add versioning to the DNS configuration 2024-02-08 16:39:24 -05:00
Spencer McIntyre 1cab98f4c2 Support multiple addresses for a static hostname 2024-02-08 16:05:54 -05:00
Spencer McIntyre 62e960352f Refactor naming entries as rules 2024-02-08 13:05:53 -05:00
Spencer McIntyre 243ebcb3a6 Add some missing documentation 2024-02-08 13:05:53 -05:00
Spencer McIntyre c1a08b97d2 Load the termux hosts file path too 2024-02-08 13:05:50 -05:00
Spencer McIntyre 11ca24e290 Specify the record type for PTR lookups 2024-02-08 11:22:33 -05:00
Spencer McIntyre 5c9b454291 Change initialization to allow reseting
Change how the resolver is initialized so the instance can be reset to
sane default values loaded from the operating system.
2024-02-08 11:22:33 -05:00
Spencer McIntyre 2653a180e4 Update tests add new initialization methods 2024-02-08 11:22:33 -05:00
Spencer McIntyre 648a7b394d Update configuration saving and loading 2024-02-08 11:22:33 -05:00
Spencer McIntyre bd7d4f0099 Add commands to manage static hostname records 2024-02-08 11:22:33 -05:00
Spencer McIntyre fcd84a41aa Add a DNS resolver for static entries
Move support for static entries out of the cache so it can be controlled
like the other resolvers.
2024-02-08 11:22:33 -05:00
Spencer McIntyre d940bfd312 Show the number of cached dns records 2024-02-08 11:22:33 -05:00
Spencer McIntyre 2cf706e91f Use the dns entry index instead of unique IDs 2024-02-08 11:22:33 -05:00
Spencer McIntyre 43a7993215 Show the matching rule for DNS resolution 2024-02-08 11:22:33 -05:00
Spencer McIntyre 470a28921e Add dedicated help menus for subcommands with args 2024-02-08 11:22:33 -05:00
Spencer McIntyre 3c716041bd Add the blackhole resolver 2024-02-08 11:22:33 -05:00
Spencer McIntyre 3445c1b588 Add the system resolver for A and AAAA queries 2024-02-08 11:22:33 -05:00
Spencer McIntyre a5dc63617f Refactor resolver entries to unify them
Now resolution will match a single rule, but that rule can have multiple
servers.
2024-02-08 11:22:33 -05:00
Spencer McIntyre 464d2eef73 Add a method for upstream resolvers from query args 2024-02-08 11:22:33 -05:00
Spencer McIntyre 7fe10d8613 Switch to a more generic upstream resolvers model
Upstream resolvers can be DNS servers or something else.
2024-02-08 11:22:33 -05:00
Spencer McIntyre 282f97ba2d Add the flush-cache subcommand
Also rename purge to flush-entries and update descriptions to clarify
what exactly is being flushed.
2024-02-08 11:22:33 -05:00
Spencer McIntyre 319cff7d3a Change the DNS timeout from 30 to 5 seconds
Also, add the #to_i method for timeouts
This makes it compatible with Rex Sockets later on
2024-02-08 11:22:33 -05:00
Spencer McIntyre fd943f1401 Make the resolve subcommand more like Meterpreter
Make the dns resolve subcommand more like the resolve command in
Meterpreter. Also alphabetize things.
2024-02-08 11:22:33 -05:00
Spencer McIntyre c780bfcb66 Add a DNS query command for inspection 2024-02-08 11:22:32 -05:00
Spencer McIntyre 20f73867ca Print the default domain and search list too 2024-02-08 11:22:32 -05:00
Spencer McIntyre 6fdfd7147c Print the system nameservers too 2024-02-08 11:22:32 -05:00
Spencer McIntyre 9181d93807 Search for a resolv.conf file 2024-02-08 11:22:32 -05:00
adfoster-r7 8b71afdd53 Land #18759, Updates MySQL modules to now support the new MySQL session type 2024-02-08 12:39:51 +00:00
Metasploit d3bde6b172 Bump version of framework to 6.3.56 2024-02-08 03:38:37 -06:00
cgranleese-r7 02ae96edb0 Addresses RPORT not defaulting correctly 2024-02-07 16:07:15 +00:00
Dean Welch 792708c07b Remove all references to Msf::SymbolicModule 2024-02-07 15:08:47 +00:00
cgranleese-r7 b060809a8d Addresses logoff PR feedback 2024-02-07 12:51:04 +00:00
cgranleese-r7 e80f0ef8cd Removes session logic from mixins and uses client instead of datastore for rhost and rport 2024-02-06 14:11:16 +00:00
adfoster-r7 5975d668f6 Land #18773, Support CTRL + Z for interactive SQL REPL 2024-02-05 16:39:13 +00:00
sjanusz-r7 4039ae137a Support CTRL + Z for interactive SQL REPL 2024-02-05 11:14:51 +00:00
cgranleese-r7 0e9cad6d45 Adds MySQL session type 2024-02-02 14:39:37 +00:00
Jeffrey Martin bed552d26e set error on unsupported LDAP auth 2024-02-02 08:36:00 -06:00
adfoster-r7 48221e594d Land #18704, Leverage the module metadata cache in the module_sets 2024-02-02 14:16:46 +00:00