Skip to content

Commit

Permalink
Move CreateSession from advanced into basic options
Browse files Browse the repository at this point in the history
  • Loading branch information
cgranleese-r7 committed Feb 9, 2024
1 parent 9caa2fa commit 4b564d8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion lib/msf/base/sessions/command_shell_options.rb
Expand Up @@ -15,9 +15,14 @@ module CommandShellOptions
def initialize(info = {})
super(info)

register_options(
[
OptBool.new('CreateSession', [false, 'Create a new session for every successful login', true])
]
)

register_advanced_options(
[
OptBool.new('CreateSession', [false, 'Create a new session for every successful login', true]),
OptString.new('InitialAutoRunScript', "An initial script to run on session creation (before AutoRunScript)"),
OptString.new('AutoRunScript', "A script to run automatically on session creation."),
OptString.new('CommandShellCleanupCommand', "A command to run before the session is closed"),
Expand Down
1 change: 1 addition & 0 deletions modules/auxiliary/scanner/mssql/mssql_login.rb
Expand Up @@ -34,6 +34,7 @@ def initialize
)
register_options([
OptBool.new('TDSENCRYPTION', [ true, 'Use TLS/SSL for TDS data "Force Encryption"', true]),
OptBool.new('CreateSession', [false, 'Create a new session for every successful login', false])
])

options_to_deregister = %w[PASSWORD_SPRAY]
Expand Down
3 changes: 2 additions & 1 deletion modules/auxiliary/scanner/mysql/mysql_login.rb
Expand Up @@ -33,7 +33,8 @@ def initialize(info = {})

register_options(
[
Opt::Proxies
Opt::Proxies,
OptBool.new('CreateSession', [false, 'Create a new session for every successful login', false])
])

options_to_deregister = %w[PASSWORD_SPRAY]
Expand Down
1 change: 1 addition & 0 deletions modules/auxiliary/scanner/postgres/postgres_login.rb
Expand Up @@ -37,6 +37,7 @@ def initialize(info = {})
register_options(
[
Opt::Proxies,
OptBool.new('CreateSession', [false, 'Create a new session for every successful login', false]),
OptPath.new('USERPASS_FILE', [ false, "File containing (space-separated) users and passwords, one pair per line",
File.join(Msf::Config.data_directory, "wordlists", "postgres_default_userpass.txt") ]),
OptPath.new('USER_FILE', [ false, "File containing users, one per line",
Expand Down
1 change: 1 addition & 0 deletions modules/auxiliary/scanner/smb/smb_login.rb
Expand Up @@ -55,6 +55,7 @@ def initialize
register_options(
[
Opt::Proxies,
OptBool.new('CreateSession', [false, 'Create a new session for every successful login', false]),
OptBool.new('ABORT_ON_LOCKOUT', [ true, 'Abort the run when an account lockout is detected', false ]),
OptBool.new('PRESERVE_DOMAINS', [ false, 'Respect a username that contains a domain name.', true ]),
OptBool.new('RECORD_GUEST', [ false, 'Record guest-privileged random logins to the database', false ]),
Expand Down

0 comments on commit 4b564d8

Please sign in to comment.