Skip to content

set VERBOSE failing/not working as expected (always giving output) #21099

@g0tmi1k

Description

@g0tmi1k

Setup

Making a very small quick user list.

$ cat <<EOF>user.txt
user1
user2
user3
user4
user5
EOF
$ 

Default

Working as expected.

$ msfconsole -q -x 'setg RHOSTS 10.0.0.10; use auxiliary/scanner/smtp/smtp_enum; set USER_FILE user.txt; advanced; run; exit;'
RHOSTS => 10.0.0.10
USER_FILE => user.txt

Module advanced options (auxiliary/scanner/smtp/smtp_enum):

   Name                     Current Setting  Required  Description
   ----                     ---------------  --------  -----------
   CHOST                                     no        The local client address
   CPORT                                     no        The local client port
   ConnectTimeout           10               yes       Maximum number of seconds to establish a TCP connection
   Proxies                                   no        A proxy chain of format type:host:port[,type:host:port][...]. Supported proxies: sapni, socks4, socks5, socks5h, http
   SSL                      false            no        Negotiate SSL/TLS for outgoing connections
   SSLCipher                                 no        String for SSL cipher - "DHE-RSA-AES256-SHA" or "ADH"
   SSLKeyLogFile                             no        The SSL key log file
   SSLServerNameIndication                   no        SSL/TLS Server Name Indication (SNI)
   SSLVerifyMode            PEER             no        SSL verification method (Accepted: CLIENT_ONCE, FAIL_IF_NO_PEER_CERT, NONE, PEER)
   SSLVersion               Auto             yes       Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
   ShowProgress             true             yes       Display progress messages during a scan
   ShowProgressPercent      10               yes       The interval in percent that progress should be shown
   VERBOSE                  false            no        Enable detailed status messages
   WORKSPACE                                 no        Specify the workspace for this module


View the full module info with the info, or info -d command.

[*] 10.0.0.10:25          - 10.0.0.10:25 Banner: 220 metasploitable.localdomain ESMTP Postfix (Ubuntu)
[*] 10.0.0.10:25          - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
$

Enabling VERBOSE

again, working as expected, this time, as you can see, there is much more verbose output (and matches up in advanced output)

$ msfconsole -q -x 'set VERBOSE true; setg RHOSTS 10.0.0.10; use auxiliary/scanner/smtp/smtp_enum; set USER_FILE user.txt; advanced; run; exit;'
VERBOSE => true
RHOSTS => 10.0.0.10
USER_FILE => user.txt

Module advanced options (auxiliary/scanner/smtp/smtp_enum):

   Name                     Current Setting  Required  Description
   ----                     ---------------  --------  -----------
   CHOST                                     no        The local client address
   CPORT                                     no        The local client port
   ConnectTimeout           10               yes       Maximum number of seconds to establish a TCP connection
   Proxies                                   no        A proxy chain of format type:host:port[,type:host:port][...]. Supported proxies: sapni, socks4, socks5, socks5h, http
   SSL                      false            no        Negotiate SSL/TLS for outgoing connections
   SSLCipher                                 no        String for SSL cipher - "DHE-RSA-AES256-SHA" or "ADH"
   SSLKeyLogFile                             no        The SSL key log file
   SSLServerNameIndication                   no        SSL/TLS Server Name Indication (SNI)
   SSLVerifyMode            PEER             no        SSL verification method (Accepted: CLIENT_ONCE, FAIL_IF_NO_PEER_CERT, NONE, PEER)
   SSLVersion               Auto             yes       Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
   ShowProgress             true             yes       Display progress messages during a scan
   ShowProgressPercent      10               yes       The interval in percent that progress should be shown
   VERBOSE                  true             no        Enable detailed status messages
   WORKSPACE                                 no        Specify the workspace for this module


View the full module info with the info, or info -d command.

[*] 10.0.0.10:25          - 10.0.0.10:25 Banner: 220 metasploitable.localdomain ESMTP Postfix (Ubuntu)
[*] 10.0.0.10:25          - 10.0.0.10:25 Domain Name: metasploitable.localdomain
[*] 10.0.0.10:25          - 10.0.0.10:25 - SMTP - Trying MAIL FROM: root@metasploitable.localdomain / RCPT TO: user1...
[*] 10.0.0.10:25          - 10.0.0.10:25 - SMTP - Trying MAIL FROM: root@metasploitable.localdomain / RCPT TO: user2...
[*] 10.0.0.10:25          - 10.0.0.10:25 - SMTP - Trying MAIL FROM: root@metasploitable.localdomain / RCPT TO: user3...
[*] 10.0.0.10:25          - 10.0.0.10:25 - SMTP - Trying MAIL FROM: root@metasploitable.localdomain / RCPT TO: user4...
[*] 10.0.0.10:25          - 10.0.0.10:25 - SMTP - Trying MAIL FROM: root@metasploitable.localdomain / RCPT TO: user5...
[*] 10.0.0.10:25          - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
$

Disabling VERBOSE

Now, this is where it doesn't do as expected.
advanced is reporting its disabled.
However, the output is verbose.

$ msfconsole -q -x 'set VERBOSE false; setg RHOSTS 10.0.0.10; use auxiliary/scanner/smtp/smtp_enum; set USER_FILE user.txt; advanced; run; exit;'
VERBOSE => false
RHOSTS => 10.0.0.10
USER_FILE => user.txt

Module advanced options (auxiliary/scanner/smtp/smtp_enum):

   Name                     Current Setting  Required  Description
   ----                     ---------------  --------  -----------
   CHOST                                     no        The local client address
   CPORT                                     no        The local client port
   ConnectTimeout           10               yes       Maximum number of seconds to establish a TCP connection
   Proxies                                   no        A proxy chain of format type:host:port[,type:host:port][...]. Supported proxies: sapni, socks4, socks5, socks5h, http
   SSL                      false            no        Negotiate SSL/TLS for outgoing connections
   SSLCipher                                 no        String for SSL cipher - "DHE-RSA-AES256-SHA" or "ADH"
   SSLKeyLogFile                             no        The SSL key log file
   SSLServerNameIndication                   no        SSL/TLS Server Name Indication (SNI)
   SSLVerifyMode            PEER             no        SSL verification method (Accepted: CLIENT_ONCE, FAIL_IF_NO_PEER_CERT, NONE, PEER)
   SSLVersion               Auto             yes       Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
   ShowProgress             true             yes       Display progress messages during a scan
   ShowProgressPercent      10               yes       The interval in percent that progress should be shown
   VERBOSE                  false            no        Enable detailed status messages
   WORKSPACE                                 no        Specify the workspace for this module


View the full module info with the info, or info -d command.

[*] 10.0.0.10:25          - 10.0.0.10:25 Banner: 220 metasploitable.localdomain ESMTP Postfix (Ubuntu)
[*] 10.0.0.10:25          - 10.0.0.10:25 Domain Name: metasploitable.localdomain
[*] 10.0.0.10:25          - 10.0.0.10:25 - SMTP - Trying MAIL FROM: root@metasploitable.localdomain / RCPT TO: user1...
[*] 10.0.0.10:25          - 10.0.0.10:25 - SMTP - Trying MAIL FROM: root@metasploitable.localdomain / RCPT TO: user2...
[*] 10.0.0.10:25          - 10.0.0.10:25 - SMTP - Trying MAIL FROM: root@metasploitable.localdomain / RCPT TO: user3...
[*] 10.0.0.10:25          - 10.0.0.10:25 - SMTP - Trying MAIL FROM: root@metasploitable.localdomain / RCPT TO: user4...
[*] 10.0.0.10:25          - 10.0.0.10:25 - SMTP - Trying MAIL FROM: root@metasploitable.localdomain / RCPT TO: user5...
[*] 10.0.0.10:25          - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
$

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions