Commit Graph

1574 Commits

Author SHA1 Message Date
Grant Willcox 9e2d7f655b
Update data to fix more things found during review process 2022-04-05 12:48:11 -05:00
Grant Willcox db4b22df5e
Update the exploit code to output errors in a better format, and fix a potential issue when trying to delete folders recursively. Also update exploit module to try kill msiexec.exe if its still running to prevent it holding onto handles when it shouldn't be. 2022-04-04 17:58:52 -05:00
Grant Willcox 8daecca5c3
Update code with latest changes 2022-04-01 12:11:05 -05:00
Grant Willcox 24342e764c
Update solution file so that we can only build the DLL for x64 bit platforms since that is the only one we support at this time 2022-03-31 12:31:55 -05:00
Grant Willcox 743138abed
Add in initial fixes from review and remove extra BREAKAWAY_FROM_JOB code changes not directly related to this PR as we'll raise a separate PR for those 2022-03-31 12:13:29 -05:00
Grant Willcox 5695863901
Add in updated source code for exploiting domain joined systems 2022-03-28 16:17:58 -05:00
Grant Willcox bab215fccb
Remove .vs directory and associated files as there is no need for us to ship those files 2022-03-25 14:11:17 -05:00
Grant Willcox 3d871e0ea9
Remove unneeded DLL from source code 2022-03-24 11:59:20 -05:00
Grant Willcox b504585979
Add in source code 2022-03-24 11:56:18 -05:00
Spencer McIntyre 443bf1249a Remove all the old CVE-2021-1732 data 2022-02-18 15:25:39 -05:00
Spencer McIntyre d92259f868 One exploit for CVE-2021-1732 and CVE-2022-21882 2022-02-18 15:23:38 -05:00
RageLtMan 5eb2c3233d Authors cleanup 2021-12-29 10:56:44 -05:00
RageLtMan 4f07a2fbea First "working" 2021-44228 exploit module state
Clean up the Java code for PayloadFactory - the `main()` function
is actually not required, the error seen on initial attempts to
compile was some sort of PEBKAC or weird things in classpaths.

Update the module to start the HTTP server before issuing the HTTP
request starting the call chain which eventually executes the Java
PayloadFactory - that chain is quick and races with the service's
startup time to get the JAR containing the Payload and its factory.

Minor misc cleanup.
Give credit where due: we stand on the shoulders of giants.

Testing:
  LDAP request is serviced with response containing our JAR URL and
trigger parameters for the factory to instantiate Payload.class and
call its `main()` function.
  HTTP request is serviced to deliver the JAR.
  Payload handler on MSF-side is tripped with incoming connection.
2021-12-29 09:10:07 -05:00
RageLtMan 4874943e7f Implement infrastructure for payload delivery
Per the discussion with @schierlm on GitHub (mihi), the most direct
way to deliver and instantiate our Java payload in the target is
via remote code loading of the JAR using HTTP. This requires a
bootstrap class, a Factory, which instantiates our Payload.class
by calling its main() function on-load from the HTTP endpoint
serving the remote-code-loaded JAR.

Implement a basic PayloadFactory class and include and its sources
in the Metasploit tree.

Using @schierlm's own code from ~10y ago, implement injection of
the PayloadFactory class into our JAR-encoded payloads. Then,
using more of his code from the same module (2011-3544), implement
a secondary service within the exploit module (Rex::ServiceManager
services don't stack well in Msf namespace as they all get assigned
to self.service - faux pas on our end) to serve HTTP requests with
the injected JAR. Finally, generate an appropriate URL target for
the remote code loaded JAR for injection into the LDAP response and
leveraging a final piece of @schierlm's hackery, generate a valid
URI path (updating the datastore is ill advised @ runtime, but its
needed here for the correct service cleanup routines to fire).

Note: during development, i figured out a way to use Rjb for native
Java object serialization to buffers which we can use in Ruby, so i
stashed that away in the Exploit::Java mixin for posterity and left
a reference to it in the module for future endeavors.

Testing:
  Verified that the generated jar is served at the generated URL
  Verified that the generated JAR can be executed at the CLI for
both metasploit.Payload and metasploit.PayloadFactory
  Currently not triggering the remote code load (per wireshark and
our own HTTP service) when delivering the LDAP response, so tuning
that is the next leg of this effort.
2021-12-29 09:10:07 -05:00
Jake Baines e7810acb1e
Pulled offsets out of dll into module. Auto-find lsass.exe when pid is 0 2021-12-18 10:56:46 -08:00
Jake Baines deab4ce90e
Initial commit of Dellicious port 2021-12-08 07:33:16 -08:00
bwatters b1f6937542 Updated exploit to compile on target, added control over directory creation
Added a method to get source code for the write and compile method
2021-12-01 14:54:47 -06:00
bwatters bf1b3b377c Add cve-2021-3493 module 2021-12-01 14:54:47 -06:00
Grant Willcox 9f9942feb6
Make adjustments to dllmain.c from reviews and recompile the DLL again 2021-11-09 10:49:14 -06:00
Grant Willcox 780a9370a2
First draft of code, documentation, and exploit DLL plus exploit code 2021-11-09 10:36:40 -06:00
Grant Willcox 517b586f8b
Add in new definitions to external/source/include/windows/definitions.h including a proper THREADINFOCLASS definition, additional SYSTEM_INFORMATION_CLASS definitions, and a BIG_POOL_INFO definition 2021-11-08 16:46:52 -06:00
Grant Willcox ab1316ac10
Update README.md with some minor additional notes
Add in a minor additional note about needing to potentially create one of the directories in case people run into errors as I encountered this during some recent testing.
2021-11-04 12:02:56 -05:00
sjanusz 2c7aa022d4
Add PoC for CVE-2021-22555 Netfilter Priv Escalation 2021-10-04 16:48:23 +01:00
Grant Willcox 3bca3b0bcb
Update exploit code to use & after the command to execute as root so it executes in the background and doesn't hang Metasploit. Also update the logic of the code to check the response from executing the exploit and respond accordingly and update the documentation to match 2021-08-31 15:07:37 -05:00
Grant Willcox bd490d35ed
Add support for Linux 5.11.x on Fedora 2021-08-23 15:09:10 -05:00
Grant Willcox e46611cffb
Add in support for exploiting Fedora 32 with Linux kernel 5.10.12 2021-08-20 18:04:59 -05:00
Grant Willcox 75ae2b76f5
Add support for Fedora 32 Linux Kernel 5.9.8-100 and also fix an error where the wrong file was being used for Fedora 32 Linux Kernel 5.8.8. 2021-08-20 16:50:20 -05:00
Grant Willcox 5abf407228
Add support for Fedora 32 with Linux Kernel 5.8.8-200 2021-08-20 15:42:34 -05:00
Grant Willcox dd806a9d61
Add in support for Fedora 32 running kernel 5.7.11-200 2021-08-20 13:37:52 -05:00
Grant Willcox b60ad3ee26
Fix up mistakes I noticed whilst doing edits on the code as well as some mistakes identified during peer review 2021-08-19 13:55:54 -05:00
Grant Willcox d5df47692c
Add in first copy of the exploit along with the supporting source code and binaries. Documentation to come 2021-08-17 18:01:14 -05:00
Christophe De La Fuente ccaedd6c9a Last additions and improvements
- add binaries
- add documentation
- backup `runc` binary in the exploit C file
- add `MeterpreterBackground` options to set Mettle `background` option
- add `WsfDelay` logic
- refactor code
- add cleanup logic
- add restore `runc` binary logic
2021-06-30 11:02:11 +02:00
Christophe De La Fuente 1b59b8c83e Rebase and fix conflicts in lib/msf/core/post/common.rb 2021-06-30 11:02:11 +02:00
bwatters 8e1391f098
Land #15216, Fix targeting for CVE-2021-21551
Merge branch 'land-15216' into upstream-master
2021-05-21 14:56:08 -05:00
bwatters 72375d1f67 Land #15024, Add RCE Exploit For CVE-2020-0796 (SMBGhost)
Merge branch 'land-15024' into upstream-master
2021-05-20 17:02:04 -05:00
Spencer McIntyre 5e13fdb7dc Couple of minor cleanups for the assembly stub 2021-05-20 17:20:57 -04:00
Spencer McIntyre 78d47b11f2 Add targeting for Windows 10 v21H1 2021-05-18 12:56:02 -04:00
Spencer McIntyre c5b022e2f2 Fix Windows 10 versioning by using ranges 2021-05-18 10:28:27 -04:00
Spencer McIntyre d990e884af Add and test even more targets 2021-05-13 17:27:58 -04:00
Spencer McIntyre eb89550f85 Clear up some target offset discrepancies 2021-05-13 16:06:15 -04:00
Spencer McIntyre 7d841a0f79 Add a target for Windows 7 x64 2021-05-13 14:24:15 -04:00
Spencer McIntyre 4825407d21 Add a target for Windows 8.1 x64 2021-05-13 12:56:47 -04:00
Spencer McIntyre 8a1341060d Fix a couple of errors from not cleaning up 2021-05-13 12:34:14 -04:00
Spencer McIntyre ff2516a7f2 Update CVE-2021-1732 to reduce code reuse 2021-05-12 16:41:43 -04:00
Spencer McIntyre 477749f77f Refactor the code to be reusable and add docs 2021-05-12 16:36:17 -04:00
Spencer McIntyre d3de52da59 The exploit is now functional for Win10 v1803-20H2 2021-05-12 16:14:59 -04:00
Spencer McIntyre 5b39cead93 Add the UpgradeToken functionality 2021-05-12 14:53:41 -04:00
Spencer McIntyre 7f0a1d1707 Initial commit of CVE-2021-21551
This is still a work in progress but the initial requirements are
falling into place.
2021-05-12 12:28:20 -04:00
Spencer McIntyre a9d3120aa9 Combine the shellcode move operations 2021-04-13 16:46:26 -04:00
Spencer McIntyre ec962cf2be Adjust the hal heap base address calculation 2021-04-13 13:11:24 -04:00