Commit Graph

13785 Commits

Author SHA1 Message Date
Ashley Donaldson 44455fd165 Added some comments for clarity 2021-09-12 19:38:16 +10:00
Ashley Donaldson 4f8e435e69 Handle upgrading to Meterp on Windows 2012 command shell via WinRM
These shells appear not to reflect input back to the user, which messes with
assumptions when it comes to parsing them out. So we utilise the code that
determines whether reflection is happening on Windows too.
2021-09-12 17:10:09 +10:00
A Galway 81a86379d7 handles unverified shells & warns db/mingw not installed 2021-09-10 17:56:08 +01:00
Ashley Donaldson 16af8ad028 Honour the timeout parameter for reading from the shell 2021-09-10 22:39:27 +10:00
Ashley Donaldson 12546865de Support Ctrl+C now we're using Command Shell rather than Powershell 2021-09-10 18:15:43 +10:00
Ashley Donaldson 50e31917da Emulate a stream to make the base command shell happy 2021-09-10 17:45:08 +10:00
Ashley Donaldson 0927737948 Adapted WinRM module logging to MSF logging
Separated WinRM module into separate files
2021-09-10 15:54:50 +10:00
Ashley Donaldson 5cffa86e30 Removed unused code 2021-09-10 07:46:05 +10:00
A Galway 4a3fb6920e adds cmd_shell initial output reading to bootstrap 2021-09-09 16:34:21 +01:00
Ashley Donaldson 9ea3be903d Just use cmd, as powershell <= 3.0 doesn't actually use stdout/stderr 2021-09-09 22:40:43 +10:00
Ashley Donaldson c33b850ff8 Support terminating processes early by sending a Ctrl+C signal 2021-09-09 22:08:33 +10:00
Ashley Donaldson 51a8c834c3 Support Windows 2012 and earlier 2021-09-09 18:05:29 +10:00
adfoster-r7 059e39a6f0 Specify meterpreter compatibility command requirements 2021-09-08 22:59:25 +01:00
Grant Willcox 8cb2583039 Land #15654, Fully receive stage - Encrypted Payloads 2021-09-08 16:29:50 -05:00
bwatters d5fee988be Land #15560, Add a binary safe write_file method for powershell session type
Merge branch 'land-15560' into upstream-master
2021-09-08 14:07:44 -05:00
bwatters f5a8c7e918 Add missing end 2021-09-08 12:53:41 -05:00
space-r7 9879593598 wait for all data when receiving stage 2021-09-08 09:31:03 -05:00
Ashley Donaldson 2f0509f2b5 Modified shell to a PowerShell shell
This also resolves a bug with the session not upgrading to meterpreter
2021-09-08 08:19:43 +10:00
Ashley Donaldson 3acddf75b4 Suggested changes from code review
* Report socket info
* Use existing Event class
* Remove debugging prints
* Comment obscure constant
2021-09-08 07:36:59 +10:00
Jack Heysel e30ccafd86 Refeactor lfs.rb, revert rubocop changes on library files 2021-09-07 13:43:10 -04:00
Ashley Donaldson b8e98ca99c Increase responsiveness of WinRM shell, while also reducing number of requests sent.
Achieved by either waiting N seconds, or immediately after stdin is sent.
While we were sending them every 2 seconds, we could sometimes be held up
waiting for a stdout response before we could even send our stdin message.
2021-09-07 14:59:12 +10:00
Ashley Donaldson 7a75a91dc6 Request stdout on a separate thread, so we are alerted when the shell dies. 2021-09-06 09:33:44 +10:00
h00die 65aae010ce more libs for moodle and teacher priv esc to rce module 2021-09-04 13:31:11 -04:00
bwatters a7d255bbe5 Land #15627, Update some post libs to use library methods defined in file.rb
Merge branch 'land-15627' into upstream-master
2021-09-03 16:43:11 -05:00
Jack Heysel 99352ad107 Move methods from lfs.rb, fix fail_with types 2021-09-03 16:17:35 -05:00
Jack Heysel f9c4c35431 Update the target_suitable? method 2021-09-03 16:17:35 -05:00
Jack Heysel ba64dce5b7 Rubocop offenses 2021-09-03 16:17:30 -05:00
Jack Heysel 3c43bd409d Added docs an Git User-Agent FP 2021-09-03 16:15:39 -05:00
Jack Heysel 21d99a74fb beta commit 2021-09-03 16:15:38 -05:00
Spencer McIntyre 2c3f914d9c Land #15639, Fix rename_file for shell sessions 2021-09-03 13:46:27 -04:00
Grant Willcox c4ab16aa75 Fix typo in lib/msf/core/post/file.rb that was preventing normal cmd shells from being able to rename files. 2021-09-03 11:15:10 -05:00
Jeffrey Martin 3d87d77b8a Land #15636, Fix regression issue with serializing reported events 2021-09-03 11:08:20 -05:00
adfoster-r7 39950a8352 Remove explicit rhosts protocol validation 2021-09-03 15:30:57 +01:00
adfoster-r7 50330c1559 Land #15522, Add feature flagged support for fully interactive Meterpreter shells 2021-09-03 14:24:41 +01:00
adfoster-r7 4b818000fc Fix regression issue with serializing reported events 2021-09-03 13:09:14 +01:00
Spencer McIntyre e2beff1467 Warn when a DB option is ignored 2021-09-02 11:57:38 -04:00
Spencer McIntyre 01882da5de Add documentation and #filtered? 2021-09-02 11:57:38 -04:00
Spencer McIntyre dd86907b17 Move the prepend_db calls into the mixin 2021-09-02 11:57:38 -04:00
Spencer McIntyre a76eb67d89 Add the DB_SKIP_EXISTING option 2021-09-02 11:57:36 -04:00
Spencer McIntyre 2981e23d0a Initial DB_SKIP_EXISTING option 2021-09-02 11:56:53 -04:00
adfoster-r7 f3ad3e8292 Re-renamespace error handling, and validate rhost schemas 2021-09-02 13:00:05 +01:00
adfoster-r7 3b23951d62 Correctly handle inline payloads being set via datastore options, i.e. run payload=xyz 2021-09-02 13:00:05 +01:00
adfoster-r7 736457dbd4 Cleanup comments 2021-09-02 13:00:05 +01:00
adfoster-r7 30ba8f2f38 Add replicant functionality before running tests, to handle bug in self.replicant.datastore.option.values being nil 2021-09-02 13:00:04 +01:00
adfoster-r7 3cc56eb9bb Support setting PATH for http modules such as tomcat_mgr_deploy 2021-09-02 13:00:04 +01:00
adfoster-r7 327e2c1fe8 Handy truthy uri.path edgecase for smbshares 2021-09-02 13:00:04 +01:00
adfoster-r7 591574455d Validate cidr notation 2021-09-02 13:00:04 +01:00
adfoster-r7 15002c1a3c Track original unparsed rhosts value correctly 2021-09-02 13:00:04 +01:00
adfoster-r7 07ab195056 Preference module specified username/passwords over http basic auth 2021-09-02 13:00:03 +01:00
adfoster-r7 13a5d314de Add test for payload option validation 2021-09-02 13:00:03 +01:00