Postfix Banner Faking

Posted on June 21st, 2007 by id_provoke.
Categories: Linux.

Change postfix welcome banner, this howto can tricky the attacker to attack your postfix.

Current banner : 220 mail.suhatman.com ESMTP Postfix

Wanted banner: 220 Microsoft ESMTP MAIL Service, Version: 5.0.2195.5329 ready at Tue, 18 Mar 2003 18:35:40 +0100

Okay next this step.

Open postfix’s main.cf (configuration file) and search for “smtpd_banner”. Change the banner to whatever you want.

The problem: Microsoft’s ESMTP sends a date back, Postfix can’t. However, the file

/src/global/mail_date.c returns a time in this form: “Mon, 9 Dec 1996 05:38:26 -0500 (EST)”.

So, if you really want to pretend to be Microsoft’s ESMTP do the following: Before compiling, open /src/smtpd/smtpd.c and search for the line

“smtpd_chat_reply(state, “220 %s”, var_smtpd_banner);”

and change it :
smtpd_chat_reply(state, “220 %s ready at %s”, var_smtpd_banner, mail_date(time((time_t *) 0));Now recompile, edit the main.cf to say ” Microsoft ESMTP MAIL Service, Version: 5.0.2195.5329″ and you’re done.

And this result

[root@provoke henry]# telnet mx2.suhatman.com 25
Trying 202.152.1.154…
Connected to mx2.suhatman.com (202.152.1.154).
Escape character is ‘^]’.
220 Microsoft ESMTP MAIL Service ready at Thu, 21 Jun 2007 08:35:42 +0700 (BBWI)
Now you can tricky the attaker ^^

6 comments.

Comment on June 21st, 2007.

gini nih kalo niat, sampe ngedit source C-nya…
gw suka gaya lo cuk huehueheuhue

Comment on April 7th, 2008.

Hello. Let’s get acquainted!
My name is Jessika.

Comment on April 11th, 2008.

Risky theme. I think you’ve hurt someone’s feelings, but what’s for me - I like it. No matter what they say if your opinion is true.

illekskem
Comment on May 15th, 2008.

Hello my friends :)
;)

Comment on May 16th, 2008.

Hanya koreksi saja. Yang benar adalah sebagai berikut :

smtpd_chat_reply(state, “220 %s ready at %s”, var_smtpd_banner, mail_date(time((time_t *) 0)));

Trackback on August 23rd, 2008.

hello…

wow…

Leave a Comment

Names and email addresses are required (email addresses aren't displayed), url's are optional.

Comments may contain the following xhtml tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>