1 |
mrfroasty schrieb: |
2 |
> I finally got my hands on the subject, but I am not in a position to |
3 |
> play with regular expression. |
4 |
> |
5 |
> REGEX: |
6 |
> #failregex = USER \S+: no such user found from \S* ?\[<HOST>\] to \S+\s*$ |
7 |
> |
8 |
> This captures only this kinds of logs on auth.log: |
9 |
> #Aug 6 22:25:59 fileserver proftpd[18234]: fileserver.mzalendo.net |
10 |
> (202.102.135.54[202.102.135.54]) - USER !@#$%^&*: no such user found |
11 |
> from 202.102.135.54 [202.102.135.54] to 192.168.1.34:21 |
12 |
> |
13 |
> It misses this: |
14 |
> #Aug 7 20:47:18 fileserver proftpd[23323]: fileserver.mzalendo.net |
15 |
> (gendesktop.mzalendo.net[192.168.1.33]) - USER mysql (Login failed): |
16 |
> Incorrect password. |
17 |
> |
18 |
> Anyone with a smarter regex and interested to share it with me? |
19 |
> I will see if I can learn regex and try to manipulate this expressions. |
20 |
Not really. IMO all these brute-force-polling-logwatcher are pretty bad |
21 |
design. If proftpd uses pam you should search for pam_shield, it can |
22 |
recognize failed logins and insert the appropriate rules into your firewall. |
23 |
|
24 |
cheers |
25 |
Paul |
26 |
|
27 |
> |
28 |
> Thanks |
29 |
> |
30 |
> GR |
31 |
> mrfroasty |
32 |
> |