Commit Graph

13785 Commits

Author SHA1 Message Date
Spencer McIntyre 06b592cfa1 Update the session initialization method 2021-07-13 17:25:19 -04:00
Spencer McIntyre 15268366e1 Fix a bug in how sockets are closed 2021-07-13 17:10:54 -04:00
pingport80 56a3710e56 fix -Recurse 2021-07-13 20:07:00 +05:30
pingport80 0a4da1b657 add quotes to file paths 2021-07-13 18:54:12 +05:30
Tim W 39455827aa Land #15254, use obfuscated powershell protection bypasses 2021-07-12 12:20:17 +01:00
Spencer McIntyre 8ab78da7b5 Raise more descriptive exceptions 2021-07-09 17:14:54 -04:00
Spencer McIntyre 9e61bf5752 Update the rex-powershell gem and unit tests 2021-07-09 15:35:37 -04:00
dwelch-r7 6817d0a0ee Land #15382, Add tests for aux and exploit cmd_check and cmd_run 2021-07-09 11:03:12 +01:00
Jack Heysel 1a73cfbe25 Updated check method 2021-07-08 16:09:03 -05:00
pingport80 a166afd958 change powershell platform to windows from win 2021-07-08 22:37:14 +05:30
pingport80 4e52d2d55b fix minor issues which appeared while testing 2021-07-08 22:03:14 +05:30
Alan Foster e5241b412a Add tests for aux and exploit cmd_check and cmd_run 2021-07-08 17:32:52 +01:00
pingport80 66e8872ea8 add powershell support to get_processes 2021-07-08 20:21:08 +05:30
pingport80 02be075c2d add powershell support to get_processes 2021-07-08 16:19:53 +05:30
pingport80 14796f9438 add powershell support to some file system methods 2021-07-08 16:08:43 +05:30
William Vu ccf6ec9628 RuboCop selectively 2021-07-06 21:14:48 -05:00
William Vu e5fee3b0b8 Improve AutoCheck prints 2021-07-06 21:14:48 -05:00
Grant Willcox 0eb2b71244 Land #15320, Enables powershell sessions to use the read_file method 2021-07-06 13:37:29 -05:00
Grant Willcox b4fed72328 Add in a small additional fix to properly check session.platform until a full fix can be implemented 2021-07-06 13:37:01 -05:00
Grant Willcox 104ddd9b26 Bump version of Metasm while we are at it so this fixes both the current issue and also imports the related changes made in Metasm 2021-07-06 09:29:15 -05:00
Grant Willcox c3406514ab Apply fixes to prevent EXEs from being used as template files if they don't have any exports 2021-07-06 09:27:09 -05:00
miralayipouya 252325f1e3 Update payload.rb 2021-07-04 15:00:07 +04:30
Christophe De La Fuente daa5b32393 Update from review
- Remove `MeterpreterTryToFork` option logic
- Add `Prepend` code directly under `Payload` info
- Rebase to use the updated `PrependFork`
- Add logic to verify that shells specified in the options really exist
  on the remote host
2021-06-30 18:13:35 +02:00
Spencer McIntyre f66a64d2fb Update the ssh_login_pubkey module 2021-06-30 09:51:52 -04:00
Spencer McIntyre 46a877678d Refactor some channel related Meterpreter code
This makes some of the channel related Meterpreter code accessible to
other locations in the framework which enables other sessions to also
support pivoting capabilities.
2021-06-30 09:25:25 -04:00
Spencer McIntyre 7bddaeb74f Add documentation for the new session 2021-06-30 09:00:13 -04:00
Christophe De La Fuente eca20bec92 Update from code review
- Fix documentation typos
- Rename `MeterpreterBackground` Mettle option to `MeterpreterTryToFork`
2021-06-30 11:02:11 +02: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
Spencer McIntyre 208ab470e7 Switch from stderr to proper logging 2021-06-29 18:29:14 -04:00
bwatters 2effd46bc6 Updated with changes requested by adfoster 2021-06-29 14:51:40 -05:00
Spencer McIntyre 4c925ce686 Add the channel's #read method 2021-06-29 13:40:21 -04:00
Spencer McIntyre a6b5c89b1d Cleanup channels when the session is closed 2021-06-29 09:55:35 -04:00
Spencer McIntyre 2c2ae2581a Make the session a channel container 2021-06-28 17:43:57 -04:00
Spencer McIntyre 1aef1658b0 Handle ssh channel failures and timeouts 2021-06-28 16:47:14 -04:00
Spencer McIntyre 233d353403 Fix how the address of forwarded connections
The rstream is the command shell stream which is not the same as the
underlying network transport. In order for the session's connection
information to be reported properly (as represented by the output of
`sessions`) the SSH connection socket needs to be set as #sock.
2021-06-25 21:59:27 -04:00
Spencer McIntyre a6afac608b Squash some unnecessary code 2021-06-25 21:19:05 -04:00
Spencer McIntyre f01e4a4408 More work on SSH pivoting 2021-06-25 21:19:05 -04:00
Spencer McIntyre 10ad84434c Initial support for pivoting over SSH 2021-06-25 21:19:05 -04:00
bwatters a876500c5b Update comments and refactor substring range to Ruby 2.5 standards for RSPEC 2021-06-23 09:19:43 -05:00
Shelby Pace c3d4bb42bd Land #15358, use valid python binary in sshexec 2021-06-22 16:15:36 -05:00
bwatters 71db2fd698 Burn all silent rescue alls to the ground 2021-06-22 10:56:46 -05:00
bwatters e24dc806da Fixed append and file write for windows 2021-06-22 09:34:54 -05:00
adfoster-r7 fe41a6b518 Land #15350, fix shellcode_inject module 2021-06-21 09:03:26 +01:00
Spencer McIntyre b85031ff6a Fallback to Python3 in sshexec when it's available 2021-06-18 13:35:23 -04:00
pingport80 cc1abe9d1b adding generic process mixin to the windows process mixin 2021-06-17 21:24:13 +05:30
bwatters 8c09fc569f File tests work except for writing binary data; debugging commented out 2021-06-16 16:22:17 -05:00
Grant Willcox 66da3148d6 Land #15316, Add a call to setsid when forking a new process 2021-06-16 15:16:01 -05:00
Grant Willcox 62f9d15ba3 Land #15314, Add Exploit for CVE-2021-31181 (SharePoint RCE) 2021-06-16 10:39:49 -05:00
Grant Willcox dc32770fd5 Land #15340, Fix hosts deletion 2021-06-14 22:26:51 -05:00