Commit Graph

37 Commits

Author SHA1 Message Date
sjanusz-r7 566e12b69e Add error_callback to SSH Command Stream 2024-11-25 16:43:59 +00:00
sjanusz-r7 358e79bd3c Handle SSH errors by closing the session 2024-11-17 14:53:42 +00:00
Ashley Donaldson 7442655ab9 Override to TCP when encountering UDP-unfriendly comms 2023-11-07 15:58:45 +11:00
adfoster-r7 bbd881f999 Fix crashes on timeouts 2022-05-04 09:43:00 +01:00
Spencer McIntyre 12431d8479 Add a client reader for SSH server channels 2022-01-24 14:41:59 -05:00
Spencer McIntyre 5fdcdcaaa5 Delay rstream creation until the platform is known 2021-11-12 16:03:29 -05:00
Spencer McIntyre 726c5f26e3 SSH session consistency with auto-platform IDing 2021-11-12 16:03:27 -05:00
Spencer McIntyre f1103baf1d Support SSL TCP server channels in SSH 2021-11-12 09:05:17 -05:00
Ashley Donaldson 71d7e80529 Extend StreamServer to provide callbacks required by some modules 2021-10-25 12:38:45 +11:00
Ashley Donaldson b9e3f1951d Return immediately once the reverse listener is established 2021-10-25 12:38:45 +11:00
Ashley Donaldson e9386add64 Handle race condition whereby a port forward succeeds after we've exceeded our timeout.
Neatly cleans up the port.
2021-10-25 12:38:45 +11:00
Ashley Donaldson 68a074231e Use logging rather than printing 2021-10-25 12:38:44 +11:00
Ashley Donaldson dba6ce56bc Timeout is cursed - let's remove it 2021-10-25 12:38:44 +11:00
Ashley Donaldson 5a332b511e Fixed rubocop errors 2021-10-25 12:38:44 +11:00
Ashley Donaldson 10421dcc08 Report peer info of connections to SSH reverse port forwards 2021-10-25 12:38:43 +11:00
Ashley Donaldson 99309bab29 Fix reliability issue with SSH reverse listener 2021-10-25 12:38:43 +11:00
Ashley Donaldson fdfecdc8ff Initial work on reverse pivoting through SSH 2021-10-25 12:38:42 +11:00
Spencer McIntyre d230090e0d Add a WebSocket channel 2021-09-29 17:55:05 -04:00
Spencer McIntyre 0887188e12 Synchronize the initsock routine
This prevents the socket from being closed while negotiating SSL
2021-09-29 11:13:31 -04:00
Spencer McIntyre a5a5bfcbad Support pivoted SSL client channels 2021-09-29 11:13:31 -04:00
Spencer McIntyre 0314569e3d Fix rubocop issues in session files 2021-07-23 10:58:13 -04:00
Spencer McIntyre 0251dff80b Add more descriptive error messages and logging 2021-07-14 14:38:33 -04:00
Spencer McIntyre 7aa44a9a80 Add a couple more socket methods 2021-07-14 11:00:34 -04:00
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
Spencer McIntyre 8ab78da7b5 Raise more descriptive exceptions 2021-07-09 17:14:54 -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
Spencer McIntyre 208ab470e7 Switch from stderr to proper logging 2021-06-29 18:29:14 -04: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