Commit Graph

1136 Commits

Author SHA1 Message Date
adfoster-r7 b461f08ba3 Land #18980, improves basic shell help command 2024-03-20 21:27:12 +00:00
Zach Goldman c16b8e6e64 adds help command to basic shells 2024-03-20 14:18:36 -05:00
Dean Welch 689caf4bd1 Add upload/download/delete/mkdir/rmdir to smb session 2024-03-12 11:56:29 +00:00
Dean Welch 2399c2a393 Fix smb session autorun 2024-03-05 15:07:53 +00:00
cgranleese-r7 d52220cccb Fixes the create session datastore option from appearing for payloads 2024-02-22 14:58:41 +00:00
sjanusz-r7 085071da02 Convert generic SQL mixin into a class 2024-02-21 18:01:55 +00:00
sjanusz-r7 1b7c2bbaec SQL sessions consolidation 2024-02-21 16:16:14 +00:00
Dean Welch bf1608a4ad Show session/rhost options separate from each other 2024-02-21 12:51:11 +00:00
Dean Welch e288592beb Add yard docs and small tidy up 2024-02-20 16:15:16 +00:00
Dean Welch 175d584ff7 Consolidate option dump remove condition datastore condition on tests 2024-02-20 14:09:17 +00:00
Dean Welch fa5c4c0193 lowercase session types 2024-02-14 15:45:34 +00:00
adfoster-r7 1794a5fbee Land #18763, Mssql session modules 2024-02-14 10:54:04 +00:00
Zach Goldman d18520adc6 update rhost and rport calls 2024-02-13 13:00:38 -06:00
cgranleese-r7 5d165466ff Move CreateSession from advanced into basic options 2024-02-12 11:35:27 +00:00
Zach Goldman 2c60780dc0 Add MSSQL session Type 2024-02-09 07:27:01 -06:00
cgranleese-r7 0e9cad6d45 Adds MySQL session type 2024-02-02 14:39:37 +00:00
adfoster-r7 15d0d4f0df Land #18663, Add new PostgreSQL Session Type 2024-01-24 10:46:26 +00:00
sjanusz-r7 a5dcf5a2f4 Fix PostgreSQL autoruns 2024-01-22 10:47:34 +00:00
sjanusz-r7 23a9938283 Add PostgreSQL session type 2024-01-19 10:29:37 +00:00
adfoster-r7 1ac2b3b8e1 Fix unitialized exploit driver exception 2024-01-16 22:35:15 +00:00
adfoster-r7 6f5ec8a069 Land #18656, Force reload_all to load unloaded modules before refreshing modules 2024-01-10 20:24:54 +00:00
h00die 6a851855a8 spelling fixes for lib folder 2024-01-06 15:54:49 -05:00
Dean Welch 7c448ceb50 Force reload_all to load any unloaded modules 2024-01-03 15:49:37 +00:00
Dean Welch cc8fdc0427 Add alias for run_simple to exploit_simple 2023-12-04 17:55:15 +00:00
Dean Welch cd8cc75cf3 Add smb session type 2023-12-04 17:55:11 +00:00
Christophe De La Fuente 0d591a3136 Land #18526, Add a command to customise DNS resolution 2023-11-23 17:46:16 +01:00
Dean Welch ea41ec7a5d Fix tests leaving behind threads 2023-11-07 17:43:43 +00:00
Ashley Donaldson 7442655ab9 Override to TCP when encountering UDP-unfriendly comms 2023-11-07 15:58:45 +11:00
Dean Welch c7e0e094fa Add core session commands and test suite 2023-11-06 16:34:37 +00:00
Dean Welch 3f3531d119 Add test for command shell sessions 2023-10-31 16:35:58 +00:00
dwelch-r7 7baabd08db Land #18364, Add support for filtering sessions 2023-10-19 16:40:42 +01:00
Zach Goldman b4b73529d3 add -e flag for stale sessions
remove single flag

pivot to search flag

added support for search session type

adds search session id support

remove stale references

reshuffle code

fix time parsing, add command support

fix search list, reduce duplicated code

testing added

killall with search lists table of killed sessions

sessions are no longer represented by ids

addresses feedback on code structure and search behavior

some test reshuffling, switch raised errors to printed ones

add checkin validation, rest of cmd_sessions tests

add time parsing test

refactoring

test reformatting and adjusted error validation

make error handling more explicit, add test context

fixes

sub quotes, make constant

rubocopping

switch before and after to greater than and less than

mbetter incorporate constants

update example
2023-10-19 09:41:18 -05:00
Dean Welch 9eb4385a25 Get stats from the cache instead of from frameworks list of loaded modules 2023-10-06 16:04:38 +01:00
Dean Welch d60993f7e8 Enable using modules when deferred loading is turned on 2023-10-06 16:04:34 +01:00
Simon Janusz faa3dd6b85 Land #18372, Fix error downloading a file from generic shell 2023-10-05 17:47:27 +01:00
bwatters 6aeffa5a17 Land #18363, Add support to msfvenom for "-f octal
Merge branch 'land-18363' into upstream-master
2023-10-03 16:21:57 -05:00
h00die d64ed33cdf code spell for a bunch of modules 2023-09-24 17:42:00 -04:00
joev 75e9a0a834 Add support for base32/64 comments.
* Explicitly documents lack of support for VB style comments.
2023-09-21 08:50:58 -06:00
joev 1d2dde9f81 Add comment support for "octal" format.
* Adds failing test that discovers several additional violations.
2023-09-20 17:24:00 -06:00
joev b1606264da Fix incorrect parameter docstring. 2023-09-20 14:30:05 -06:00
adfoster-r7 a60e048e78 Fix msfrpc hanging when updating saved command history 2023-09-15 12:42:40 +01:00
Carmix 1efb3f733f solves #18371 2023-09-15 11:36:15 +02:00
joev 0b73e4ca7a Add support to msfvenom for "-f octal". 2023-09-13 12:17:22 -06:00
Spencer McIntyre 39382c4652 Land #17600, Add AWS Instance Connect Sessions
Implement AWS Instance Connect Sessions
2023-08-03 12:06:29 -04:00
cgranleese-r7 5756241fb3 Land #18223, Fix broken msfconsole histories when switching between shell sessions 2023-08-03 16:40:01 +01:00
adfoster-r7 9a40e2612b Land #17129, Add OSX Aarch64 Payload support 2023-08-02 18:37:56 +01:00
Spencer McIntyre 396029a58e Fix connectivity issues
The connection needs to slowly send data to the remote end for
stability. Additionally, the `exit` command should be issued when
closing the connction so it is reset back to the logon prompt.
2023-08-01 15:04:32 -04:00
Spencer McIntyre cd70044e36 Automatically login to the serial connection 2023-08-01 15:04:32 -04:00
RageLtMan 2352ce6740 Implement AWS Instance Connect Sessions
AWS EC2 Nitro instances (and possibly others) support serial proxy
over SSH using the Instance Connect API:
https://docs.amazonaws.cn/en_us/AWSEC2/latest/UserGuide/
connect-to-serial-console.html

This process consists of sending an SSH pubkey to the serial proxy
control plane, connecting to a well-known URL with the instance ID
and port number as username, and the SSH private key as credential.
The resulting session is a "fragile" SSH context which does not
tolerate Channel-closing, requiring some special handling in Msf to
safeguard the initial Net::SSH::CommandStream.

Implement a BindAwsInstanceConnect Handler which loads an SSH key
from the local FS or generates a new one on the fly, passes the
pubkey to the InstanceConnect API, and then establishes SSH comms
with the InstanceConnect SSH proxy.

Implement a AwsInstanceConnectBind to handle resulting connetions,
derived from SshCommandShellBind, with an updated #bootstrap which
avoids meddling with the fragile CommandStream/Channel.

Testing:
  Got serial console to the ttyS0 login prompt of a Nitro EC2 VM.
  Logged in using previously-known credentials.
  Verified console operations.

Notes:
  Handler keeps firing, same as the SSM session concern.
  There is a limit to the number of sessions which an instance can
hold (possibly only one).
2023-08-01 15:04:03 -04:00
adfoster-r7 449af8daa7 Fix broken msfconsole histories when switching between shell sessions 2023-07-27 16:12:57 +01:00