#######################################################################

                             Luigi Auriemma

Application:  DATAC RealWin
              http://www.dataconline.com/software/realwin.php
              http://www.realflex.com
Versions:     <= 2.1 (Build 6.1.10.10)
Platforms:    Windows
Bug:          stack overflow
Exploitation: remote, versus server
Date:         21 Mar 2011 (found 25 Nov 2010)
Author:       Luigi Auriemma
              e-mail: aluigi@autistici.org
              web:    aluigi.org


#######################################################################


1) Introduction
2) Bug
3) The Code
4) Fix


#######################################################################

===============
1) Introduction
===============


"RealWin is a SCADA server package for medium / small applications."


#######################################################################

======
2) Bug
======


The part of the server listening on port 910 is vulnerable to a buffer
overflow happening during the handling of the
On_FC_SCRIPT_FCS_STARTPROG packets by the function 00439620 where the
input string is copied in a stack buffer of about 4 kilobytes.


#######################################################################

===========
3) The Code
===========


http://aluigi.org/poc/realwin_8.zip

  nc SERVER 910 < realwin_8.dat


#######################################################################

======
4) Fix
======


No fix.


#######################################################################
