Skip to content

modules/auxiliary/admin/networking: Resolve RuboCop violations #20201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/auxiliary/admin/networking/arista_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def initialize(info = {})
'License' => MSF_LICENSE,
'Author' => [ 'h00die' ],
'Notes' => {
'Stability' => [],
'Stability' => [CRASH_SAFE],
'Reliability' => [],
'SideEffects' => []
}
Expand Down
9 changes: 6 additions & 3 deletions modules/auxiliary/admin/networking/brocade_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##


class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Brocade
include Msf::Exploit::Deprecated
Expand All @@ -18,7 +17,12 @@ def initialize(info = {})
This module imports a Brocade device configuration.
},
'License' => MSF_LICENSE,
'Author' => ['h00die']
'Author' => ['h00die'],
'Notes' => {
'Stability' => [CRASH_SAFE],
'SideEffects' => [],
'Reliability' => []
}
)
)

Expand All @@ -29,7 +33,6 @@ def initialize(info = {})
Opt::RPORT(22)
]
)

end

def run
Expand Down
5 changes: 4 additions & 1 deletion modules/auxiliary/admin/networking/cisco_asa_extrabacon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ def initialize
],
'DefaultAction' => 'PASS_DISABLE',
'Notes' => {
'AKA' => ['EXTRABACON']
'AKA' => ['EXTRABACON'],
'Stability' => [],
'SideEffects' => [IOC_IN_LOGS, CONFIG_CHANGES],
'Reliability' => []
}
)

Expand Down
9 changes: 6 additions & 3 deletions modules/auxiliary/admin/networking/cisco_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##


class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Cisco
include Msf::Exploit::Deprecated
Expand All @@ -18,7 +17,12 @@ def initialize(info = {})
This module imports a Cisco IOS or NXOS device configuration.
},
'License' => MSF_LICENSE,
'Author' => ['h00die']
'Author' => ['h00die'],
'Notes' => {
'Stability' => [CRASH_SAFE],
'SideEffects' => [],
'Reliability' => []
}
)
)

Expand All @@ -29,7 +33,6 @@ def initialize(info = {})
Opt::RPORT(22)
]
)

end

def run
Expand Down
43 changes: 22 additions & 21 deletions modules/auxiliary/admin/networking/cisco_dcnm_download.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,24 @@ def initialize(info = {})
work on a few versions below 10.4(2). Only version 11.0(1) requires authentication to exploit
(see References to understand why).
},
'Author' =>
[
'Pedro Ribeiro <pedrib[at]gmail.com>' # Vulnerability discovery and Metasploit module
],
'Author' => [
'Pedro Ribeiro <pedrib[at]gmail.com>' # Vulnerability discovery and Metasploit module
],
'License' => MSF_LICENSE,
'References' =>
[
[ 'CVE', '2019-1619' ],
[ 'CVE', '2019-1621' ],
[ 'URL', 'https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190626-dcnm-bypass' ],
[ 'URL', 'https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190626-dcnm-file-dwnld' ],
[ 'URL', 'https://raw.githubusercontent.com/pedrib/PoC/master/advisories/Cisco/cisco-dcnm-rce.txt' ],
[ 'URL', 'https://seclists.org/fulldisclosure/2019/Jul/7' ]
],
'DisclosureDate' => '2019-06-26'
'References' => [
[ 'CVE', '2019-1619' ],
[ 'CVE', '2019-1621' ],
[ 'URL', 'https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190626-dcnm-bypass' ],
[ 'URL', 'https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190626-dcnm-file-dwnld' ],
[ 'URL', 'https://raw.githubusercontent.com/pedrib/PoC/master/advisories/Cisco/cisco-dcnm-rce.txt' ],
[ 'URL', 'https://seclists.org/fulldisclosure/2019/Jul/7' ]
],
'DisclosureDate' => '2019-06-26',
'Notes' => {
'Stability' => [CRASH_SAFE],
'SideEffects' => [IOC_IN_LOGS],
'Reliability' => []
}
)
)

Expand All @@ -64,13 +67,11 @@ def auth_v11
}
)

if res && res.code == 200
# get the JSESSIONID cookie
if res.get_cookies
res.get_cookies.split(';').each do |cok|
if cok.include?('JSESSIONID')
return cok
end
# get the JSESSIONID cookie
if res && res.code == 200 && res.get_cookies
res.get_cookies.split(';').each do |cok|
if cok.include?('JSESSIONID')
return cok
end
end
end
Expand Down
26 changes: 14 additions & 12 deletions modules/auxiliary/admin/networking/cisco_secure_acs_bypass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,20 @@ def initialize(info = {})
Instances of Secure ACS running version 5.1 with patches 3, 4, or 5 as well
as version 5.2 with either no patches or patches 1 and 2 are vulnerable.
},
'References' =>
[
['BID', '47093'],
['CVE', '2011-0951'],
['URL', 'http://www.cisco.com/en/US/products/csa/cisco-sa-20110330-acs.html']
],
'Author' =>
[
'Jason Kratzer <pyoor[at]flinkd.org>'
],
'License' => MSF_LICENSE
'References' => [
['BID', '47093'],
['CVE', '2011-0951'],
['URL', 'http://www.cisco.com/en/US/products/csa/cisco-sa-20110330-acs.html']
],
'Author' => [
'Jason Kratzer <pyoor[at]flinkd.org>'
],
'License' => MSF_LICENSE,
'Notes' => {
'Stability' => [CRASH_SAFE],
'SideEffects' => [IOC_IN_LOGS, CONFIG_CHANGES],
'Reliability' => []
}
)
)

Expand Down Expand Up @@ -107,6 +110,5 @@ def run_host(_ip)
print_error("#{rhost} - Failed! The webserver issued a #{res.code} response.")
print_error('Please validate the TARGETURI option and try again.')
end

end
end
2 changes: 1 addition & 1 deletion modules/auxiliary/admin/networking/f5_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def initialize(info = {})
'License' => MSF_LICENSE,
'Author' => ['h00die'],
'Notes' => {
'Stability' => [],
'Stability' => [CRASH_SAFE],
'SideEffects' => [],
'Reliability' => []
}
Expand Down
2 changes: 1 addition & 1 deletion modules/auxiliary/admin/networking/juniper_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def initialize(info = {})
],
'DefaultAction' => 'JUNOS',
'Notes' => {
'Stability' => [],
'Stability' => [CRASH_SAFE],
'SideEffects' => [],
'Reliability' => []
}
Expand Down
2 changes: 1 addition & 1 deletion modules/auxiliary/admin/networking/mikrotik_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def initialize(info = {})
],
'DefaultAction' => 'ROUTEROS',
'Notes' => {
'Stability' => [],
'Stability' => [CRASH_SAFE],
'SideEffects' => [],
'Reliability' => []
}
Expand Down
2 changes: 1 addition & 1 deletion modules/auxiliary/admin/networking/vyos_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def initialize(info = {})
'Author' => [ 'h00die' ],
'Notes' => {
'Stability' => [CRASH_SAFE],
'SideEffects' => [IOC_IN_LOGS],
'SideEffects' => [],
'Reliability' => []
}
)
Expand Down
Loading