Rapid7 Vulnerability & Exploit Database

MDaemon WorldClient form2raw.cgi Stack Buffer Overflow

Back to Search

MDaemon WorldClient form2raw.cgi Stack Buffer Overflow



This module exploits a stack buffer overflow in Alt-N MDaemon SMTP server for versions 6.8.5 and earlier. When WorldClient HTTP server is installed (default), a CGI script is provided to accept html FORM based emails and deliver via MDaemon.exe, by writing the CGI output to the Raw Queue. When X-FromCheck is enabled (also default), the temporary form2raw.cgi data is copied by MDaemon.exe and a stack based overflow occurs when an excessively long From field is specified. The RawQueue is processed every 1 minute by default, to a maximum of 60 minutes. Keep this in mind when choosing payloads or setting WfsDelay... You'll need to wait. Furthermore, this exploit uses a direct memory jump into a nopsled (which isn't very reliable). Once the payload is written into the Raw Queue by Form2Raw, MDaemon will continue to crash/execute the payload until the CGI output is manually deleted from the queue in C:\MDaemon\RawFiles\*.raw.


  • aushack <patrick@osisecurity.com.au>






Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/windows/http/mdaemon_worldclient_form2raw
msf exploit(mdaemon_worldclient_form2raw) > show targets
msf exploit(mdaemon_worldclient_form2raw) > set TARGET < target-id >
msf exploit(mdaemon_worldclient_form2raw) > show options
    ...show and set options...
msf exploit(mdaemon_worldclient_form2raw) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security