modules/auxiliary/admin/networking/cisco_asa_extrabacon.rb
Method version_offsets
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def version_offsets
# Payload offsets for supported ASA versions.
# See https://github.com/RiskSense-Ops/CVE-2016-6366
return {
'9.2(4)13' => ['197.207.10.8', '70.97.40.9', '72', '0.16.185.9', '240.30.185.9', '85.49.192.137', '0.80.8.8', '240.95.8.8', '85.137.229.87'],
Method initialize
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize
super(
'Name' => 'Cisco ASA Authentication Bypass (EXTRABACON)',
'Description' => %q{
This module patches the authentication functions of a Cisco ASA
Method build_payload
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def build_payload(vers_string, mode)
# adds offsets to the improved shellcode
# https://github.com/RiskSense-Ops/CVE-2016-6366/blob/master/shellcode.nasm
if mode == 'PASS_DISABLE'
Method run
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def run
vers_string = retrieve_asa_version
print_status("Building #{action.name} payload for version #{vers_string}...")
overflow = build_payload(vers_string, action.name)
Method run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def run
vers_string = retrieve_asa_version
print_status("Building #{action.name} payload for version #{vers_string}...")
overflow = build_payload(vers_string, action.name)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"