[SR-Users] dictionary attacks

2010-10-24 Thread Juha Heinanen
while doing some tests, i noticed that one of my proxies started to receive lots of register requests with different user names starting from a letter. there was also invite attempts in the logs. they came from ip 202.82.16.99 which according to traceroute is somewhere in china. should we start

Re: [SR-Users] dictionary attacks

2010-10-24 Thread Uriel Rozenbaum
Juha, I think we should be specially careful about black-lists. We receive many of these attacks in a per-day basis and a lot of them are from residential addresses or university, so I'm guessing some kind of worm or trojan performing the attack from various IPs. If you have the time, try

Re: [SR-Users] dictionary attacks

2010-10-24 Thread Sergey Okhapkin
I'm second for fail2ban. I block IP addresses with failed registration attempts for 1 hour. Here is my setup: kamailio.cfg: if (is_method(REGISTER)) { if(www_authorize(, subscriber) 0) { if($rc == -1) { xlog(L_INFO,Invalid username from

Re: [SR-Users] dictionary attacks

2010-10-24 Thread Daniel-Constantin Mierla
I watched live an attack on voipuser.org while running 3.1 before release. It lasted 18 hours. I didn't want to ban it because was useful for testing and see if it reveals any weak. In most of the cases it hit pike module. I got some data and plan to make an article about it soon. Anyhow, as

Re: [SR-Users] udp_send Invalid argument

2010-10-24 Thread Juha Heinanen
Daniel-Constantin Mierla writes: iirc, it was always the same from the time of ser 0.8. If you don;t change the protocol, the core tries to send from the same socket it received. You have to use mhomed=1 in order to have detection of outgoing interface. 3.x has significant improvements for

Re: [SR-Users] dictionary attacks

2010-10-24 Thread Iñaki Baz Castillo
2010/10/24 Daniel-Constantin Mierla mico...@gmail.com: Using fail2ban together with IP tables has the advantage of dropping the packets before getting to application and eating cpu I have a testing platfotm with Kamailio and fail2ban working more or less as explained in this thread. But I

Re: [SR-Users] dictionary attacks

2010-10-24 Thread Alex Balashov
On 10/24/2010 12:18 PM, Iñaki Baz Castillo wrote: Of course, the perfect solution would be Kamailio acting as fail2ban. This is, pike module inserting dynamic rules in iptables. Opinnions? You could spawn a Perl script that does it, but it'd be kind of slow. I think to come up with a good

Re: [SR-Users] dictionary attacks

2010-10-24 Thread Daniel-Constantin Mierla
probably omitted by mistake, but please keep the mailing list cc-ed. On 10/24/10 3:38 PM, Sergey Okhapkin wrote: Note that I check return code of www_authorize to be -1 (invalid user) and block IP in this case only. Other error codes should not block the IP address. This one remembered me that

Re: [SR-Users] dictionary attacks

2010-10-24 Thread Sergey Okhapkin
Correction - auth module is merged in 3.1, but auth_db modules are still separate. On Sunday 24 October 2010, Daniel-Constantin Mierla wrote: probably omitted by mistake, but please keep the mailing list cc-ed. On 10/24/10 3:38 PM, Sergey Okhapkin wrote: Note that I check return code of

Re: [SR-Users] dictionary attacks

2010-10-24 Thread Alex Balashov
On 10/24/2010 03:34 PM, Daniel-Constantin Mierla wrote: what do you mean by outside process? For example, with app_lua, the interpreter is linked to the code, so is no external process, it is like cfg interpreter, just that it resides in a module, not in core. Oh, I did not realise it is so

Re: [SR-Users] dictionary attacks

2010-10-24 Thread Daniel-Constantin Mierla
On 10/24/10 10:12 PM, Sergey Okhapkin wrote: Correction - auth module is merged in 3.1, but auth_db modules are still separate. yes, only auth modules were merged, like I wrote. auth_db functions use return codes and API functions from auth module. Cheers, Daniel On Sunday 24 October 2010,

Re: [SR-Users] dictionary attacks

2010-10-24 Thread Sergey Okhapkin
I'm working on migration of my kamailio.cfg from v1.4 to 3.1 and stuck with weird problem: 0(25026) ERROR: auth_db [authdb_mod.c:236]: empty parameter 1 not allowed 0(25026) ERROR: core [route.c:1161]: fixing failed (code=-1) at cfg:/usr/local/etc/kamailio/kamailio.cfg.31:433 0(25026) ERROR:

[SR-Users] realm param for auth functons (was: Re: dictionary attacks)

2010-10-24 Thread Daniel-Constantin Mierla
please start a new email each time you have a different topic, do not reply to old messages, otherwise the subject is misleading and the discussion gets in former email thread. Use as first parameter $fd for proxy_authorize() and $td for www_authorize() (same for challenge counterpaths) --

Re: [SR-Users] dictionary attacks

2010-10-24 Thread Alex Balashov
On 10/24/2010 04:44 PM, Sergey Okhapkin wrote: I'm working on migration of my kamailio.cfg from v1.4 to 3.1 and stuck with weird problem: 0(25026) ERROR: auth_db [authdb_mod.c:236]: empty parameter 1 not allowed 0(25026) ERROR:core [route.c:1161]: fixing failed (code=-1) at

Re: [SR-Users] realm param for auth functons (was: Re: dictionary attacks)

2010-10-24 Thread Sergey Okhapkin
Thanks! Kamailio is up. Now I need to make it working... :-) On Sunday 24 October 2010, Daniel-Constantin Mierla wrote: please start a new email each time you have a different topic, do not reply to old messages, otherwise the subject is misleading and the discussion gets in former email