Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Not A Bug
-
Affects Version/s: 1.0.7
-
Fix Version/s: None
-
Component/s: freeswitch-core
-
Labels:None
-
Environment:Windows Server 2003
-
Platform:Win32/VS
-
CPU Info:PIII
-
FreeSWITCH GIT Revision:4630e3b
-
Reproduced with GIT HEAD?:4630e3b
Description
FreeSWITCH is very vulnerable for DoS attacks.
Today leaving my home for a scheduled meeting I've noticed unusual network activity linked to my server, running FreeSWITCH. I was lucky - I've noticed that. The bad news is - I was too late for the meeting... I tried to investigate what's going on and it took 45 min to fix the problem. Why it took so long? Server was unresponsive and close to complete halt, swapping memory to and from HD... Reason? FS was in huge memory leak mode, requesting more and more memory form the system. Processor was very busy too. Finally I killed FS (it did not respond to the common '...' exit request from console).
What happened? A rogue host from the Internet was sending a flood of UDP packets to the server via opened 5060 port. And FS was endlessly allocating memory... From FS log and/or its console there was no indication which external host (no IP whatsoever) was doing that. There was no indication from FS, that it making the huge allocation of memory or even any attempts to stop it. If I did not block access to it from the Internet, server would crash...
Unfortunately I've seen similar behavior from FreeSWITCH more then once. And I have to say, this is completely unacceptable behavior, taking into consideration, that FS currently runs on a server, that serves other services too (web, mail, etc) and I can't afford to loose all of those services for a long time because FS is wide open to DoS.
What I expect form the FS:
1. Never endlessly allocate the memory for serving requests coming from a host, when there is a clear indication that it's attacking FS (it doesn't care about responses, it's just sending a flood of requests, tens or may be hundreds of packets per sec)
2. Indicate the IP address of attacker (in console and/or in log). It will help person, who tires to stop the DoS attack to see which IP should be blocked immediately (with firewall or with other means). I had problems to find out IP of attacker because there is no tool in Windows, that will show IP of arriving packets and Wireshark simply crashed, when I tried to launch it...
3. FS should monitor (routine time to time check) its memory allocation and stops accepting new requests, when some specified limit is reached (until memory is de-allocated, or FS is reconfigured to take more). It will at least protect the server (running other important services) from a complete halt.
With FreeSWITCH I have experienced two types of attacks:
1. Logical attacks, when attacker tries to register, to make calls or do other tasks, which make some sense. In 2011-11-11 I've opened ticket, looking for protection from such attacks (http://jira.freeswitch.org/browse/FS-3588). It still unresolved.
2. DoS attacks, when attacker doesn't care about any SIP logic. It simply sends a flood of UDP packets to crash server. This request is exactly about such scenario.
The problem again - big flood of UDP requests (I don't know content of any of them) makes FS to endlessly allocate system memory without any limits. Packets are sent via purposely opened SIP port 5060. All packets are sent by attacker without checking any replies form FS (attack continued after host was blocked with firewall). In other instances the IP's of the attackers were different. By now all of them are blocked with router, but it's just a matter of time when other will try to do the same. Please help to stop it.
Today leaving my home for a scheduled meeting I've noticed unusual network activity linked to my server, running FreeSWITCH. I was lucky - I've noticed that. The bad news is - I was too late for the meeting... I tried to investigate what's going on and it took 45 min to fix the problem. Why it took so long? Server was unresponsive and close to complete halt, swapping memory to and from HD... Reason? FS was in huge memory leak mode, requesting more and more memory form the system. Processor was very busy too. Finally I killed FS (it did not respond to the common '...' exit request from console).
What happened? A rogue host from the Internet was sending a flood of UDP packets to the server via opened 5060 port. And FS was endlessly allocating memory... From FS log and/or its console there was no indication which external host (no IP whatsoever) was doing that. There was no indication from FS, that it making the huge allocation of memory or even any attempts to stop it. If I did not block access to it from the Internet, server would crash...
Unfortunately I've seen similar behavior from FreeSWITCH more then once. And I have to say, this is completely unacceptable behavior, taking into consideration, that FS currently runs on a server, that serves other services too (web, mail, etc) and I can't afford to loose all of those services for a long time because FS is wide open to DoS.
What I expect form the FS:
1. Never endlessly allocate the memory for serving requests coming from a host, when there is a clear indication that it's attacking FS (it doesn't care about responses, it's just sending a flood of requests, tens or may be hundreds of packets per sec)
2. Indicate the IP address of attacker (in console and/or in log). It will help person, who tires to stop the DoS attack to see which IP should be blocked immediately (with firewall or with other means). I had problems to find out IP of attacker because there is no tool in Windows, that will show IP of arriving packets and Wireshark simply crashed, when I tried to launch it...
3. FS should monitor (routine time to time check) its memory allocation and stops accepting new requests, when some specified limit is reached (until memory is de-allocated, or FS is reconfigured to take more). It will at least protect the server (running other important services) from a complete halt.
With FreeSWITCH I have experienced two types of attacks:
1. Logical attacks, when attacker tries to register, to make calls or do other tasks, which make some sense. In 2011-11-11 I've opened ticket, looking for protection from such attacks (http://jira.freeswitch.org/browse/FS-3588). It still unresolved.
2. DoS attacks, when attacker doesn't care about any SIP logic. It simply sends a flood of UDP packets to crash server. This request is exactly about such scenario.
The problem again - big flood of UDP requests (I don't know content of any of them) makes FS to endlessly allocate system memory without any limits. Packets are sent via purposely opened SIP port 5060. All packets are sent by attacker without checking any replies form FS (attack continued after host was blocked with firewall). In other instances the IP's of the attackers were different. By now all of them are blocked with router, but it's just a matter of time when other will try to do the same. Please help to stop it.
So you just have a list of demands and present them as if you are blaming on us that you have an inadequate security measure in place.
Patches welcome.......