Skip to content

Commit 446d0f3

Browse files
committed
Make the same changes for sonicwall
1 parent 7476ea9 commit 446d0f3

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

documentation/modules/auxiliary/scanner/sonicwall/login_scanner.md renamed to documentation/modules/auxiliary/scanner/sonicwall/sonicwall_login.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
## Description
22

3-
The module performs bruteforce attack against SonicWall NSv (Network Security Virtual).
4-
It allows to attack both regular SSLVPN user and admin as well. The module will automatically perform attack against SSLVPN user if `DOMAIN` parameter is not empty.
3+
The module will perform a bruteforce attack against SonicWall NSv (Network Security Virtual).
4+
It allows attacking both regular SSLVPN users and as well as admins. The module will automatically target SSLVPN users if the `DOMAIN` parameter is not empty.
55

66
## Vulnerable Application
77

88
- [SonicWall](https://www.sonicwall.com/resources/trials-landing/sonicwall-nsv-next-gen-virtual-firewall-trial)
99

1010
## Verification Steps
1111

12-
1. `use auxiliary/scanner/sonicwall/login_scanner`
12+
1. `use auxiliary/scanner/sonicwall/sonicwall_login`
1313
2. `set RHOSTS [IP]`
1414
3. either `set USERNAME [username]` or `set USERPASS_FILE [usernames file]`
1515
4. either `set PASSWORD [password]` or `set PASS_FILE [passwords file]`

lib/metasploit/framework/login_scanner/sonicwall.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ class SonicWall < HTTP
1616
PRIVATE_TYPES = [:password]
1717
REALM_KEY = nil
1818

19-
def initialize(scanner_config, domain)
20-
@domain = domain
19+
attr_accessor :domain
20+
21+
def initialize(scanner_config)
2122
super(scanner_config)
2223
end
2324

@@ -38,7 +39,7 @@ def auth_details_req
3839
# Admin and SSLVPN user login procedure differs only in usage of domain field in JSON data
3940
#
4041
params.merge!({
41-
'data' => JSON.pretty_generate(@domain.empty? ? {
42+
'data' => JSON.pretty_generate(@domain.blank? ? {
4243
'override' => false,
4344
'snwl' => true
4445
} : { 'domain' => @domain, 'override' => false, 'snwl' => true })

modules/auxiliary/scanner/sonicwall/login_scanner.rb renamed to modules/auxiliary/scanner/sonicwall/sonicwall_login.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ class MetasploitModule < Msf::Auxiliary
88
include Msf::Auxiliary::Report
99
include Msf::Auxiliary::Scanner
1010

11+
include Msf::Exploit::Deprecated
12+
moved_from 'auxiliary/scanner/sonicwall/login_scanner'
13+
1114
def initialize(info = {})
1215
super(
1316
update_info(
@@ -47,9 +50,10 @@ def get_scanner(ip)
4750
cred_details: cred_collection,
4851
stop_on_success: datastore['STOP_ON_SUCCESS'],
4952
bruteforce_speed: datastore['BRUTEFORCE_SPEED'],
50-
connection_timeout: datastore['HttpClientTimeout']
53+
connection_timeout: datastore['HttpClientTimeout'],
54+
domain: datastore['DOMAIN']
5155
)
52-
Metasploit::Framework::LoginScanner::SonicWall.new(configuration, datastore['DOMAIN'])
56+
Metasploit::Framework::LoginScanner::SonicWall.new(configuration)
5357
end
5458

5559
def process_credential(credential_data)

0 commit comments

Comments
 (0)