"RealWin is a SCADA server product which includes a FlexView HMI and runs on current Microsoft Windows platforms (2000 and XP). It can operate on a single PC or multiple PCs connected through a TCP/IP network. It reads and maintains data returned from field devices using drivers, stores data for historical access, runs Command Sequence Language (CSL) scripts and generates alarms as defined in the system." A vulnerability in th way RealWin handles FC/INFOTAG and SET_CONTROL packets allows remote attackers to cause the product to crash and execute arbitrary code.
Credit:
The information has been provided by Reversemode.
The bug is a classic stack overflow while processing a specially crafted FC_INFOTAG/SET_CONTROL packet. RealWin server accepts connections from FlewWin clients which use a propietary protocol. We can exploit this flaw from remote without having valid credentials .
-----------
.text:0042BFFE call sub_419690 ; Get Packet.PayloadLen
.text:0042C00D lea edi, [esp+638h+var_2E0]
.text:0042C014 rep movsd
.text:0042C016 mov ecx, edx
.text:0042C018 and ecx, 3
.text:0042C01B rep movsb
-----------
Exploit:
////////////////////////////////////////////////////////////////////
//// DATAC RealWin 2.0 SCADA Software - Remote PreAuth Exploit -.
//// --------------------------------------------------------
//// This code can only be used for personal study
//// and/or research purposes on even days.
////
//// The author is not responsible for any illegal usage.
//// So if you flood your neighborhood that's your f******* problem =)
//// ---------------
//// Note
//// ---------------
//// ## The exploit has been tested against a build that seems pretty old.
//// ## Therefore this flaw may be not reproducible on newer versions.
////
//// http://www.dataconline.com
//// http://www.realflex.com/download/form.php
////
//// Ruben Santamarta www.reversemode.com
////