Onion Omega2 Login Brute-Force - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/http/onion_omega2_login metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Onion Omega2 Login Brute-Force
Module: auxiliary/scanner/http/onion_omega2_login
Source code: modules/auxiliary/scanner/http/onion_omega2_login.py
Disclosure date: 2019-03-27
Last modification time: 2021-05-17 17:04:49 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 80
List of CVEs: -
OnionOS login scanner module for Onion Omega2 devices.
Module Ranking and Traits
Module Ranking:
- normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.
Basic Usage
This module is a scanner module, and is capable of testing against multiple hosts.
msf > use auxiliary/scanner/http/onion_omega2_login
msf auxiliary(onion_omega2_login) > show options
... show and set options ...
msf auxiliary(onion_omega2_login) > set RHOSTS ip-range
msf auxiliary(onion_omega2_login) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(onion_omega2_login) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(onion_omega2_login) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(onion_omega2_login) > set RHOSTS file:/tmp/ip_list.txt
Required Options
- RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
Knowledge Base
Description
The onion_omega2_login module is used to brute-force credentials for Onion Omage2 devices.
Vulnerable Application
- Onion Omage2 HTTPd Service
Verification Steps
- Plug your Onion Omega2 device to a power source.
- First time setup can be found here
- Connect to its Wi-Fi network.
- Start
msfconsole
- Do:
use auxiliary/scanner/http/onion_omega2_login
- Do:
set RHOSTS 192.168.3.1
- Do:
set USERPASS_FILE <user pass dictionary>
- username and password separated by space and one pair per line.
- Do:
run
Sample userpass file:
text
root 123456
root password
root 123456789
root 12345678
root 12345
root 10601
root qwerty
root 123123
root 111111
root abc123
root 1234567
root dragon
root 1q2w3e4r
root sunshine
root 654321
root master
Scenario
msf5 > use auxiliary/scanner/http/onion_omega2_login
msf5 auxiliary(scanner/http/onion_omega2_login) > set RHOSTS 192.168.3.1
RHOSTS => 192.168.3.1
msf5 auxiliary(scanner/http/onion_omega2_login) > set USERPASS_FILE something.txt
USERPASS_FILE => something.txt
msf5 auxiliary(scanner/http/onion_omega2_login) > run
[*] Running for 192.168.3.1...
[*] 192.168.3.1:80 - [ 1/16] - root:123456 - Failure
[!] No active DB -- Credential data will not be saved!
[*] 192.168.3.1:80 - [ 2/16] - root:password - Failure
[*] 192.168.3.1:80 - [ 3/16] - root:123456789 - Failure
[*] 192.168.3.1:80 - [ 4/16] - root:12345678 - Failure
[*] 192.168.3.1:80 - [ 5/16] - root:12345 - Failure
[+] Ubus RPC Session: 403e133730879d23a2a0df022e19c19c
[+] 192.168.3.1:80 - [ 6/16] - root:10601 - Success
[*] 192.168.3.1:80 - [ 7/16] - root:qwerty - Failure
[*] 192.168.3.1:80 - [ 8/16] - root:123123 - Failure
[*] 192.168.3.1:80 - [ 9/16] - root:111111 - Failure
[*] 192.168.3.1:80 - [10/16] - root:abc123 - Failure
[*] 192.168.3.1:80 - [11/16] - root:1234567 - Failure
[*] 192.168.3.1:80 - [12/16] - root:dragon - Failure
[*] 192.168.3.1:80 - [13/16] - root:1q2w3e4r - Failure
[*] 192.168.3.1:80 - [14/16] - root:sunshine - Failure
[*] 192.168.3.1:80 - [15/16] - root:654321 - Failure
[*] 192.168.3.1:80 - [16/16] - root:master - Failure
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
Go back to menu.
Msfconsole Usage
Here is how the scanner/http/onion_omega2_login auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/http/onion_omega2_login
msf6 auxiliary(scanner/http/onion_omega2_login) > show info
Name: Onion Omega2 Login Brute-Force
Module: auxiliary/scanner/http/onion_omega2_login
License: Metasploit Framework License (BSD)
Rank: Normal
Disclosed: 2019-03-27
Provided by:
Not So Attractive <github.com/nsa>
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
BLANK_PASSWORDS false no Try blank passwords for all users
BRUTEFORCE_SPEED 5 yes How fast to bruteforce, from 0 to 5
DB_ALL_CREDS false no Try each user/password couple stored in the current database
DB_ALL_PASS false no Add all passwords in the current database to the list
DB_ALL_USERS false no Add all users in the current database to the list
PASSWORD no A specific password to authenticate with
PASS_FILE no File containing passwords, one per line
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
STOP_ON_SUCCESS false yes Stop guessing when a credential works for a host
THREADS 1 yes The number of concurrent threads (max one per host)
USERNAME no A specific username to authenticate as
USERPASS_FILE no File containing users and passwords separated by space, one pair per line
USER_AS_PASS false no Try the username as the password for all users
USER_FILE no File containing usernames, one per line
VERBOSE true yes Whether to print output for all attempts
rport 80 yes Port to target
sleep_interval no Time in seconds to wait between login attempts
userpass no A list of username/password combinations to try
Description:
OnionOS login scanner module for Onion Omega2 devices.
Module Options
This is a complete list of options available in the scanner/http/onion_omega2_login auxiliary module:
msf6 auxiliary(scanner/http/onion_omega2_login) > show options
Module options (auxiliary/scanner/http/onion_omega2_login):
Name Current Setting Required Description
---- --------------- -------- -----------
BLANK_PASSWORDS false no Try blank passwords for all users
BRUTEFORCE_SPEED 5 yes How fast to bruteforce, from 0 to 5
DB_ALL_CREDS false no Try each user/password couple stored in the current database
DB_ALL_PASS false no Add all passwords in the current database to the list
DB_ALL_USERS false no Add all users in the current database to the list
PASSWORD no A specific password to authenticate with
PASS_FILE no File containing passwords, one per line
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
STOP_ON_SUCCESS false yes Stop guessing when a credential works for a host
THREADS 1 yes The number of concurrent threads (max one per host)
USERNAME no A specific username to authenticate as
USERPASS_FILE no File containing users and passwords separated by space, one pair per line
USER_AS_PASS false no Try the username as the password for all users
USER_FILE no File containing usernames, one per line
VERBOSE true yes Whether to print output for all attempts
rport 80 yes Port to target
sleep_interval no Time in seconds to wait between login attempts
userpass no A list of username/password combinations to try
Advanced Options
Here is a complete list of advanced options supported by the scanner/http/onion_omega2_login auxiliary module:
msf6 auxiliary(scanner/http/onion_omega2_login) > show advanced
Module advanced options (auxiliary/scanner/http/onion_omega2_login):
Name Current Setting Required Description
---- --------------- -------- -----------
MaxGuessesPerService 0 no Maximum number of credentials to try per service instance. If set to zero or a non-number, this option will not be used.
MaxGuessesPerUser 0 no Maximum guesses for a particular username for the service instance. Note that users are considered unique among different services, so a user at 10.1.1.1:22 is different from one at 10.2.2.2:
22, and both will be tried up to the MaxGuessesPerUser limit. If set to zero or a non-number, this option will not be used.
MaxMinutesPerService 0 no Maximum time in minutes to bruteforce the service instance. If set to zero or a non-number, this option will not be used.
PASSWORD_SPRAY false yes Reverse the credential pairing order. For each password, attempt every possible user.
REMOVE_PASS_FILE false yes Automatically delete the PASS_FILE on module completion
REMOVE_USERPASS_FILE false yes Automatically delete the USERPASS_FILE on module completion
REMOVE_USER_FILE false yes Automatically delete the USER_FILE on module completion
ShowProgress true yes Display progress messages during a scan
ShowProgressPercent 10 yes The interval in percent that progress should be shown
TRANSITION_DELAY 0 no Amount of time (in minutes) to delay before transitioning to the next user in the array (or password when PASSWORD_SPRAY=true)
WORKSPACE no Specify the workspace for this module
Auxiliary Actions
This is a list of all auxiliary actions that the scanner/http/onion_omega2_login module can do:
msf6 auxiliary(scanner/http/onion_omega2_login) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/http/onion_omega2_login auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/http/onion_omega2_login) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
Go back to menu.
Error Messages
This module may fail with the following error messages:
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
Unhandled exception: ConnectionError
Here is a relevant code snippet related to the "Unhandled exception: ConnectionError" error message:
55: ubus_rpc_session = response['result'][1]['ubus_rpc_session']
56: module.log('Ubus RPC Session: ' + ubus_rpc_session, level='good')
57: else:
58: return False
59: except requests.exceptions.ConnectionError:
60: module.log("Unhandled exception: ConnectionError", level='error')
61: return False
62: except ValueError:
63: module.log("Unhandled exception: Response JSON DecodeError", level='error')
64: return False
65: except KeyError:
Unhandled exception: Response JSON DecodeError
Here is a relevant code snippet related to the "Unhandled exception: Response JSON DecodeError" error message:
58: return False
59: except requests.exceptions.ConnectionError:
60: module.log("Unhandled exception: ConnectionError", level='error')
61: return False
62: except ValueError:
63: module.log("Unhandled exception: Response JSON DecodeError", level='error')
64: return False
65: except KeyError:
66: module.log("Unhandled exception: Dictionary KerError in Response", level='error')
67: return False
68: else:
Unhandled exception: Dictionary KerError in Response
Here is a relevant code snippet related to the "Unhandled exception: Dictionary KerError in Response" error message:
61: return False
62: except ValueError:
63: module.log("Unhandled exception: Response JSON DecodeError", level='error')
64: return False
65: except KeyError:
66: module.log("Unhandled exception: Dictionary KerError in Response", level='error')
67: return False
68: else:
69: return True
70:
71:
Python requests module missing, cannot continue
Here is a relevant code snippet related to the "Python requests module missing, cannot continue" error message:
69: return True
70:
71:
72: def run(args):
73: if dependencies_missing:
74: module.log('Python requests module missing, cannot continue', level='error')
75: return
76: scanner = login_scanner.make_scanner(
77: lambda host, rport, username, password: valid_login(host, rport, username, password))
78: scanner(args)
79:
Go back to menu.
Related Pull Requests
- #15212 Merged Pull Request: Converts Python shebangs over to Python 3
- #12524 Merged Pull Request: Convert all python code to python3. Fixes #12506.
- #11661 Merged Pull Request: Add http login scanner for Onion Omega2 devices
Go back to menu.
See Also
Check also the following modules related to this module:
- exploit/linux/local/asan_suid_executable_priv_esc
- exploit/linux/local/ktsuss_suid_priv_esc
- exploit/multi/local/xorg_x11_suid_server
- exploit/multi/local/xorg_x11_suid_server_modulepath
- exploit/dialup/multi/login/manyargs
Authors
- Not So Attractive <github.com/nsa>
Version
This page has been produced using Metasploit Framework version 6.1.27-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.