Commit Graph

11360 Commits

Author SHA1 Message Date
bwatters b7fcb8951f Rubocop changes 2022-01-06 15:45:59 -06:00
VanSnitza 94182b1d1a resolve msftidy warning and adding option for dumping resonse telegrams 2022-01-06 18:50:47 +01:00
VanSnitza 9ac90539d9 Adding Modbus Service Device ID 0x2B
Modbus specification usually requires devices to implement Command 0x2B which give clear text info about a device. Some real world devices implement it others don't .
2022-01-06 13:52:55 +01:00
bwatters 809dc1754d Fix the bug 2022-01-05 16:57:17 -06:00
Christophe De La Fuente 86acad0034 Update Gemfile to pull the new ruby_smb gem and add progress indicator 2022-01-03 21:39:54 +01:00
Christophe De La Fuente bb333df3e5 Update Gemfile.lock to pull new ruby_smb updates & fix some issues with Ruby 3 2022-01-03 21:39:54 +01:00
Christophe De La Fuente ae2e4d723b Add NTDS technique 2022-01-03 21:39:33 +01:00
Christophe De La Fuente da88388e01 Add actions 2022-01-03 21:39:33 +01:00
h00die 990e4a1e7a pihole new module and lib 2022-01-02 11:48:41 -05:00
h00die c3e0f455ec some cleanup for rubocop 2021-12-30 15:35:22 -05:00
Spencer McIntyre d08714d474 Land #15961, Initial Rex LDAP Server 2021-12-28 14:50:03 -05:00
Spencer McIntyre d82b9ecb47 Add module docs for the ldap server module 2021-12-28 13:52:12 -05:00
bwatters 6727c1b344 Land #15954, Add Grafana file read (CVE-2021-43798)
Merge branch 'land-15954' into upstream-master
2021-12-20 09:54:15 -06:00
h00die cb348f06c4 move grafana plugins out to data 2021-12-19 16:18:05 -05:00
h00die eb723098ce report which plugin was successful 2021-12-19 15:56:30 -05:00
RageLtMan 60fdf2a7da Rubocop pass on LDAP pieces 2021-12-18 09:03:56 -05:00
RageLtMan 0e90c3e573 Address @adfoster-r7's change requests
Due to how this stack is being broken up into LDAP core, scanner
update, and exploit work, changes requested in #15972 actually
apply in this branch and get rebased to the remaining ones.

Address requests to clean up the textual messages, LDIF file read,
sourcing of LDAP methods from net-ldap, and YARD-related placement
of attr_* annotations.
2021-12-18 07:52:33 -05:00
Spencer McIntyre 60de839b60 Update Log4Shell references and VCenter URI 2021-12-17 15:55:02 -05:00
RageLtMan 0cb381e35d Address the easy parts of @zeroSteiner's review 2021-12-16 19:32:04 -05:00
RageLtMan f8902321ba Update log4shell scanner with native LDAP service
Implement the new Rex::Protocol::LDAP::Server to handle log4shell
callbacks from vulnerable hosts.
2021-12-16 19:20:03 -05:00
RageLtMan db8f4ffa6f Native LDAP infrastructure to support log4shell
In order to detect scan callbacks, serve payloads, and otherwise
interact with the LDAP protocol handler in JNDI, Metasploit needs
a native LDAP service properly exposed to various parts of the
Framework and users/consumers.

Implement Rex::Protocol::LDAP::Server with TCP and UDP socket
handlers abstracted to a common access pattern between L4 stacks.
Extend the socket clients to hold a state attibute for LDAP bind
authentication, and use the UDP client abstraction to implement
consistent callback semantics for data receipt from a client and
handling response on the other side. The server utilizes Rex'
native sockets, permitting full pivot and proxy support over the
Switchboard.

Implement the Msf::Exploit::Remote::LDAP::Server mixin to manage
service abstraction and shared methods exposed to Metasploit
modules.
Note: during implementation of this functionality, it was
discovered that the Scanner mixin's :replicant method resulted in
:dup calls to the Rex::ServiceManager service created by this new
mixin (and any others leveraging ServiceManager). As a result,
double-bind attempts created failures in service instantiation from
the duplicated MetasploitModules which also dropped the @service
instance variable reference to the actual running service; leaving
the socket inexorably bound until Framework was halted and Ruby
released the FDs. See https://github.com/rapid7/rex-core/pull/19
and the Issues/Pull Requests sections of R7's MSF GitHub.

Expose the new LDAP infrastructure to users by way of a basic LDAP
server MetasploitModule which consumes a tiny sample LDIF (provided)
and performs queries against it. This is intended to be a template
for future work such as LDAP authentication capture, protocol proxy
for MITM and intercept, and other more specific implementations for
exploits and auxiliary modules.

For feature completeness, provide a Rex::Socket override for
Net::LDAP::Connection until we have a proper, native to Rex, LDAP
client class implemented.

Testing:
  Basic functionality only, this is an early effort which will be
extended for feature-completeness over time
2021-12-16 18:47:52 -05:00
space-r7 184795513f Land #15831, add more ssh session support 2021-12-16 15:39:55 -06:00
Spencer McIntyre 9ade6c22a4 Land #15970, Update log4shell docs and option 2021-12-16 12:59:22 -05:00
Spencer McIntyre a2624f9309 Appease rubocop 2021-12-16 12:59:12 -05:00
adfoster-r7 f463c19f33 Update log4shell documentation and default uri file wordlist for scanning 2021-12-16 17:52:39 +00:00
bwatters fd2f27aa94 Land #15958, Log4Shell HTTP Scanner
Merge branch 'land-15958' into upstream-master
2021-12-16 10:45:23 -06:00
Spencer McIntyre e6b7669114 Address PR feedback from module hacking 2021-12-16 11:12:11 -05:00
h00die e6d145241b fix file names in wp modules 2021-12-15 16:42:46 -05:00
h00die 8b914a6d71 grafana dir trav module and docs 2021-12-15 16:33:14 -05:00
Spencer McIntyre a73d842564 Check the host is responding before continuing 2021-12-15 16:11:26 -05:00
Spencer McIntyre 4cde008953 Add VMWare VCenter Log4Shell scan support 2021-12-15 15:13:46 -05:00
Spencer McIntyre a694381ab1 Allow templatized URIs 2021-12-15 11:58:41 -05:00
Spencer McIntyre 9bdb34d964 Add a TIMEOUT option and fix reading lines 2021-12-15 10:47:29 -05:00
Spencer McIntyre 5dc8fa34b8 Add module docs and validate SRVHOST is usable 2021-12-15 09:05:51 -05:00
Spencer McIntyre 3c88e30ade Fix a socket binding issue 2021-12-15 08:45:25 -05:00
Spencer McIntyre 476a51248d Add error handing for client connections 2021-12-15 08:45:25 -05:00
Spencer McIntyre 5e5e73a1d8 Add module metadata and more checks 2021-12-15 08:45:25 -05:00
Spencer McIntyre 725904c825 Support an input URI list for scanning 2021-12-15 08:45:25 -05:00
Spencer McIntyre 0bf355a191 Extract the java version as proof 2021-12-15 08:45:24 -05:00
Spencer McIntyre b06b96731d Support scanning multiple HTTP headers 2021-12-15 08:45:24 -05:00
Spencer McIntyre 50f0f3a5d0 Initial layout of a Log4Shell scanner 2021-12-15 08:45:24 -05:00
h00die 980230e5f1 wps_hide_login fixes and notes to other modules 2021-12-14 16:40:52 -05:00
h00die e8e5fe4a3e more grafana 2021-12-14 14:46:54 -05:00
h00die a5dc2a4c5e grafana working module 2021-12-13 05:27:29 -05:00
h00die 6c10ad460c wps_hide_login module 2021-12-11 14:25:07 -05:00
adfoster-r7 7dd5d5d3c2 Land #1585, Fix SMB SpiderShare Enum 2021-12-03 13:07:09 +00:00
sjanusz 84c9a30c40 Fix depth check 2021-11-29 17:54:54 +00:00
sjanusz 0ea203fcfe Add rport comment, change table creation, rubocop lint 2021-11-29 17:00:48 +00:00
sjanusz ce3215e35b Fix broken files check, make return dirs consistent 2021-11-26 12:51:07 +00:00
sjanusz 147ca34308 Fix empty list check & add return statement to rescue 2021-11-25 11:38:22 +00:00