Hi.
I've been seeing lately in the maillog various many scans targetting postfix/smtpd and I would like to add a new signature.
I read on CONTRIBUTING that I need to modify these files however I don't have enough experience programming:
This is part of the code for one of Postfix's attack detection parser:
Has anybody got experience modifying those files? I don't remember much about C preprocesor syntax. Last used past century.
The regex to match the string would be something like this in attack_scanner.l
In attack_parser.y I added a token POSTFIX_NON_SMTP_CMD:
Would the port maintainer be the person to go for further help?
I've been seeing lately in the maillog various many scans targetting postfix/smtpd and I would like to add a new signature.
Code:
Jun 21 12:00:56 acme postfix/submission/smtpd[20201]: warning: non-SMTP command from unknown[170.130.187.14]: GET / HTTP/1.1
Jun 21 14:31:24 acme postfix/submission/smtpd[22074]: warning: non-SMTP command from unknown[23.224.186.214]: \001\000\000i3t\000\000\000\000\000\022\000\020\000\000\rmy.i.p.p.p\000\005\000\005\001\000\000\0\000\005\000\005\001\000\000\0
I read on CONTRIBUTING that I need to modify these files however I don't have enough experience programming:
This is part of the code for one of Postfix's attack detection parser:
C:
/* postfix */
"warning: "({WORD}|{HOSTADDR})"[" { BEGIN(postfix_loginerr); return POSTFIX_SASL_LOGINERR_PREF; }
<postfix_loginerr>"]: SASL "[-A-Z0-9]+" authentication failed".* { BEGIN(INITIAL); return POSTFIX_SASL_LOGINERR_SUFF; }
"lost connection after AUTH from ".*"[" { return POSTFIX_NO_AUTH_PREF; }
Has anybody got experience modifying those files? I don't remember much about C preprocesor syntax. Last used past century.
The regex to match the string would be something like this in attack_scanner.l
Code:
"warning: non-SMTP command".* { BEGIN(INITIAL); return POSTFIX_NON_SMTP_CMD; }
In attack_parser.y I added a token POSTFIX_NON_SMTP_CMD:
Code:
%token POSTFIX_GREYLIST POSTFIX_GREYLIST_SUFF POSTFIX_NON_SMTP_CMD
Would the port maintainer be the person to go for further help?