Commit Graph

4923 Commits

Author SHA1 Message Date
Spencer McIntyre 626bbebde2 Remove the remaining mimikatz extension code 2021-06-16 09:10:34 -04:00
Spencer McIntyre 7f4ca31021 Fix a typo and add missing build tuples 2021-06-16 09:04:11 -04:00
Spencer McIntyre 582d64abe8 Add some documentation for the new code 2021-06-16 09:04:11 -04:00
Spencer McIntyre 2e07dc7686 Search extensions for missing Meterpreter commands 2021-06-16 09:04:11 -04:00
Spencer McIntyre 8f8337552a Suggest a Meterpreter payload for an extension 2021-06-16 09:04:11 -04:00
adfoster-r7 11fb9e8e87 Land #15194, Fix RPORT tab completion crash when connected to remote dataservice 2021-06-01 13:47:08 +01:00
A Galway 134e820322 removes obsolete has_host? usage 2021-06-01 12:02:58 +01:00
Spencer McIntyre 882c2722af Land #15251, Add file_stat to linux shell sessions 2021-05-28 14:54:57 -04:00
pingport80 d9989903f7 add stat for linux shell sessions
update file.rb and file_stat.rb

update file_stat.rb

fix Zeitwerk:NameError

upadte `setuid?` to use stat

Update lib/msf/core/post/file_stat.rb

Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>

add inheritance and change time conversions to integers

Update lib/msf/core/post/file.rb

Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>

add some checks

fix one error in `Rex::Post::FileStat`

add NotImplemented raise
2021-05-28 14:24:36 -04:00
Gaurav Purswani 379b0825b3 Merge branch 'master' into separate_session_history 2021-05-27 20:20:01 +05:30
Spencer McIntyre 0ea33ffee0 Consolidate session and shell context changes 2021-05-27 20:08:14 +05:30
Spencer McIntyre 675fbf8ab6 Use a #switch_context method in the HistoryManager 2021-05-27 20:08:14 +05:30
Spencer McIntyre f2b69a559b Add and use a #with_context method 2021-05-27 20:08:09 +05:30
Spencer McIntyre ff1334ed14 Consolidate history management for sessions 2021-05-27 20:08:09 +05:30
pingport80 eed82f5d17 add 'name' key to history contexts 2021-05-27 20:02:48 +05:30
pingport80 26f4d66897 add history_manager support for meterpreter 2021-05-27 20:02:38 +05:30
pingport80 ae74c44436 add history manager and fix pry history issue using that 2021-05-27 20:02:28 +05:30
pingport80 8eef55d5ce add separate history and history handler for meterpreter 2021-05-27 20:02:19 +05:30
Shelby Pace 9f2dae38c8 Land #15079, add meterpreter compat requirements 2021-05-24 16:00:08 -05:00
Spencer McIntyre 92d981fff2 Land #15111, Fix unreliable sessions -c output
Fixes #15097
2021-05-05 09:27:49 -04:00
Tim W 5f92746b7d add Process.capture_output 2021-05-04 20:48:58 +01:00
Spencer McIntyre fdf6f20e44 Remove the static command maps
I didn't know we had command name maps already defined when I wrote the
class that did it all dynamically. Since it's done though I think it
makes sense to keep the dynamic version to avoid repetition.
2021-04-29 16:26:55 -04:00
Jeffrey Martin cf6a401b9d more flexible time parse
Acunetix reports may serialize time in multiple patterns
Previously
```
<StartTime><![CDATA[8/5/2016, 23:45:12]]></StartTime>
```
Recently
```
<StartTime><![CDATA[2021-03-29T01:23:45.112233+01:00]]></StartTime>
```
2021-04-29 10:28:44 -05:00
Tim W 142ba7f123 Fix #15097, fix unreliable sessions -c output 2021-04-28 19:06:29 +01:00
cgranleese-r7 7e2485260f Fixes meterpreter tab completion issue 2021-04-28 10:52:05 +01:00
Grant Willcox 74624c0758 Strip history lines before comparing to ensure more accurate comparisons. Also change logic so that lines that start with a space aren't logged to the history, giving users an option to optionally not log sensitive commands to the history file 2021-04-26 13:35:06 -05:00
pingport80 8894d4bf12 Remove leading and trailing spaces from readline input 2021-04-26 13:34:42 -05:00
Spencer McIntyre da01a839d1 Set required commands spec for all post mixins 2021-04-26 12:28:18 -04:00
Spencer McIntyre 14a35a0bb3 Add documentation to the two Meterpreter mappers 2021-04-22 17:54:27 -04:00
Spencer McIntyre 1c8dcc357b Work around an old Windows Meterpreter bug 2021-04-22 17:54:21 -04:00
Spencer McIntyre a16e248d45 Add the new Meterpreter command mapper 2021-04-21 15:53:06 -04:00
Spencer McIntyre 4978ad1f13 Be backwards compatible with the Windows Meterpreter
The older Windows Meterpreter had a bug where the core command IDs would
not be properly returned and added to the command array. Until the major
version of the payloads gem is bumped to ensure that all instances have
that change, skip validating Windows core command IDs. Any commands that
skip the proactive validation and fail, will continue to fail as they
did before.
2021-04-15 11:12:50 -04:00
Spencer McIntyre f941ccaf1c Raise more descriptive meterpreter related error messages 2021-04-14 12:42:33 -04:00
dwelch-r7 c267a7fc2d Fix issue with Rex::Proto::NTP namespacing 2021-04-06 14:45:11 +01:00
Alan Foster 2e92bd1227 Fix switching between pry and irb 2021-03-25 20:08:26 +00:00
Grant Willcox 26055e12ff Land #14934, Fix encoding issues when downloading a utf-8 directory directly within Meterpreter 2021-03-23 14:04:41 -05:00
Tim W 95c384c0cb fix downloading utf-8 file into a ascii name 2021-03-23 17:35:25 +00:00
Spencer McIntyre 79967f2179 Land #14844, Move on_session_open event to after the session has been bootstrapped 2021-03-23 08:50:18 -04:00
Tim W afecde20d5 Fix #14888, fix downloading a utf-8 directory directly 2021-03-22 22:16:32 +00:00
cgranleese-r7 799ea56316 replace ::Rex::Socket.gethostbyname with Socket.getaddrinfo 2021-03-19 11:01:27 +00:00
Grant Willcox 50ef32c121 Land #14888, Fix #13798 and #14128 by fixing unicode issues on Meterpreter caused by unicode file/directory names 2021-03-15 16:46:21 -05:00
adfoster-r7 ce48d758b4 Land #14887, Fix RequestError class undefined method issue 2021-03-15 15:20:58 +00:00
dwelch-r7 6aaf44c902 rubocop files and make the exclusions more localised 2021-03-15 13:27:37 +00:00
Tim W 54c07c301a Fix #13798, Fix #14128, fix meterpreter > ls within a unicode directory 2021-03-13 10:58:04 +00:00
Shelby Pace f46c7b81fe convert const name to str before check 2021-03-12 18:01:22 -06:00
Tim W 1a7704787f Fix #13798, Fix #14128, fix meterpreter > download * on utf-8 filenames 2021-03-12 19:51:40 +00:00
dwelch-r7 a4dec77536 replace print_error with print_warning when loading duplicate extensions 2021-03-10 12:11:48 +00:00
Alan Foster af330874f5 Prefix time module with namespace resolution operator 2021-03-04 13:19:09 +00:00
Grant Willcox 5576a2c4e9 Land #14843, Extract PseudoShell into its own file for zeitwerk 2021-03-03 16:57:27 -06:00
dwelch-r7 1e8ec469fb Extract PseudoShell into it's own file for zeitwerk to pick it up properly 2021-03-02 12:39:41 +00:00