This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Help needed with strange traffic analysis and control

I'm running UTM 9 (latest version) on a PC as the firewall/router for my home network. My ISP is Comcast. Recently, I started using the Flow Monitor feature from the UTM Dashboard, and I've noticed some odd traffic that concerns me. I could use some advice on how to analyze this, and control it, if it is actually a problem.

The problem appears to be bursts of NTP traffic from the Internet to my WAN address that last about 5 minutes at a time. When they occur, they pretty much dwarf all my other traffic, according to the Flow Monitor chart. I don't know if this occurs at regular intervals or not. I should note that I am not running any NTP servers, either public or private, on my LAN, and I don't even have the UTM's NTP service turned on. My LAN includes Macs, IOS devices, TiVos, a PS3, and a wireless access point (secured with WPA2), but no Windows machines.

Here's an example of what I see in the Flow Monitor chart:

Chart.png

Here's the flow monitor table that corresponds to the chart:

Table.png

If I click on the NTP line in the table, I get a list of servers that looks like this:

Server Details.png

None of those computers are known to me. If I click on the traffic number in the NTP line of the chart, I get something like this:

Total Traffic for NTP
Download   IN   81 MB
Upload   OUT   83 MB

Does this mean something inside my LAN has sent 83 MB of NTP traffic out? I can't imagine what that would be, or why. Or is that just indicating that the incoming traffic has been "bounced back" at the UTM? Every time I check the total traffic, the download and upload values are very similar.

My first concern is the Block button in the Flow Monitor table. It does create a blocking rule in the Application Control Rules, but it doesn't reduce or eliminate the NTP traffic, according to the Flow Monitor chart/table. (If it's simply showing me the traffic hitting the UTM upstream of where the blocking rule is applied, then I wouldn't expect to see any change here.)

More concerning to me is that, if not for the Flow Monitor chart/table, I would have no idea this was even going on. None of this NTP traffic appears in my UTM firewall or intrusion protection logs. Even if I turn off the application control rule block, and add a firewall rule in position #1 to block and log Internet traffic to my External (WAN) address on TCP/UDP port 123 (the NTP port), it doesn't show up in the logs. However, I can go to the ShieldsUp website (grc.com) and manually probe port 123, and that does show up in the firewall log.

So, does anyone have an idea what's causing this traffic? If it's trying to get to something on my LAN, how do I figure out what the target is? What else should I be doing to try to capture/analyze this situation? If it's a problem, is there anything else I can do to control it? Any help would be appreciated.


This thread was automatically locked due to age.
  • Hi,

    'tcpdump' is available on the UTM console.

    I would recommend setting up 2 tcpdumps, one on your External interface, and other on your LAN interface... you can use ALT-F1, ALT-F2, etc. to create additional console 'screens' (or use SSH). make sure you run it as the 'root' user (use su or sudo after logging in as 'loginuser' if using SSH).

    tcpdump -i eth2 -nn port 123

    and another one using your LAN ethX interface.

    Barry
  • You could also create, as your top firewall rule, an ANY ANY NTP DROP rule, with logging enabled, and then look at the logs.

    Barry
  • What's in 'Allowed networks' in 'Networking Services >> NTP'?

    What's in 'NTP servers' on the 'Time & Date' tab of 'Management >> System Settings'?

    I'll just guess that someone is attempting a DoS attack on you by sending requests to NTP servers around the world from your (spoofed) IP.  Check out [ntp:questions] NTP Denial of Service attack 29 November 2011

    Fortunately, it looks like most everyone has applied the patch long ago.  Is there anything about Anti-DoS UDP Flooding in the Intrusion Prevention log?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • You could also create, as your top firewall rule, an ANY ANY NTP DROP rule, with logging enabled, and then look at the logs.


    Thanks, Barry. OK, I just tried that. Flow Monitor indicates huge amounts of NTP traffic hitting the UTM, but even with the rule exactly as you described, none of this traffic is showing up in the firewall log. How is that possible? (And for the record, the Application Control block rule was disabled, and then deleted by me several days ago, so that should be having no effect.)
  • What's in 'Allowed networks' in 'Networking Services >> NTP'?


    "Internal (Network)" is there, however, I have the service turned off.

    What's in 'NTP servers' on the 'Time & Date' tab of 'Management >> System Settings'?


    "NTP Server Pool", which I defined in Network Definitions as a DNS group pointing to us.pool.ntp.org.

    I'll just guess that someone is attempting a DoS attack on you by sending requests to NTP servers around the world from your (spoofed) IP.  Check out [ntp:questions] NTP Denial of Service attack 29 November 2011


    I had considered that possibility, but I can't think of any reason why I would be targeted. Another possibility I considered is that some botnet thinks a command-and-control server is running at my IP, and they're trying to communicate with it. I believe there's at least one botnet that attempts to disguise its traffic as NTP traffic. But that doesn't seem likely either. I should note that my ISP is Comcast, so I don't have a static IP address, but it is what they call "persistent". I've had this one for almost a year,

    Fortunately, it looks like most everyone has applied the patch long ago.  Is there anything about Anti-DoS UDP Flooding in the Intrusion Prevention log?


    No. In fact, the Intrusion Prevention log is currently empty. But intrusion protection is turned on, as are all three flood protection options.
  • 'tcpdump' is available on the UTM console.

    I would recommend setting up 2 tcpdumps, one on your External interface, and other on your LAN interface... you can use ALT-F1, ALT-F2, etc. to create additional console 'screens' (or use SSH). make sure you run it as the 'root' user (use su or sudo after logging in as 'loginuser' if using SSH).

    tcpdump -i eth2 -nn port 123

    and another one using your LAN ethX interface.

    I've never used tcpdump, although I'm basically familiar with what it does. I want to read up on it some more first, but I'll give that a shot later today and report the results.
  • I can't think of any reason why I would be targeted

    Out of the blue in March, a client with a Full Guard 120 was the target of an SMTP DoS attack from South and Central America that also spread to Spain and Portugal.  Instead of 2,000 to 3,000 spams a day, they were seeing 40,000+ and one day saw over 240,000.  There was no reason for the attack, but thank goodness for Country Blocking!

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA

  • I should note that my ISP is Comcast, so I don't have a static IP address, but 


    I'd run the tcpdumps first, and if the traffic is from random sources and is not entering the internal network, I'd recommend getting a new IP.
    You could call Comcast, or you could leave the modem off for 24 hours or so.

    Barry
  • I'd run the tcpdumps first, and if the traffic is from random sources and is not entering the internal network, I'd recommend getting a new IP.


    Well, that was interesting, although I'm not sure if I'm interpreting the results correctly. I ran tcpdump on my internal interface first:

    > sudo /usr/sbin/tcpdump -i eth0 -nn port 123

    And it was dead quiet. Not a thing going in or out. Just to make sure it was working, I opened the Date & Time system preference panel on one of my Macs (IP 192.168.1.100), which causes it to ask a time server for the time. And I saw that. It tried various servers, and got no responses, because my firewall rule was blocking them. Then I turned off the firewall rule briefly, and saw the time servers responding:

    01:45:50.428864 IP 192.168.1.100.52629 > 17.171.4.15.123: NTPv4, Client, length 48
    01:46:05.429343 IP 192.168.1.100.53375 > 17.151.16.20.123: NTPv4, Client, length 48
    01:46:20.428979 IP 192.168.1.100.61851 > 17.171.4.34.123: NTPv4, Client, length 48
    01:46:35.429456 IP 192.168.1.100.60896 > 17.171.4.13.123: NTPv4, Client, length 48
    01:46:50.429896 IP 192.168.1.100.56589 > 17.171.4.36.123: NTPv4, Client, length 48
    01:47:05.430339 IP 192.168.1.100.57448 > 17.151.16.12.123: NTPv4, Client, length 48
    01:47:20.430778 IP 192.168.1.100.62098 > 17.171.4.33.123: NTPv4, Client, length 48
    01:47:35.430741 IP 192.168.1.100.53591 > 17.151.16.14.123: NTPv4, Client, length 48

    01:47:50.431195 IP 192.168.1.100.50795 > 17.151.16.22.123: NTPv4, Client, length 48
    01:47:50.518498 IP 17.151.16.22.123 > 192.168.1.100.50795: NTPv4, Server, length 48
    01:47:51.524084 IP 192.168.1.100.123 > 17.171.4.15.123: NTPv4, Client, length 48
    01:47:51.562889 IP 17.171.4.15.123 > 192.168.1.100.123: NTPv4, Server, length 48
    01:47:52.523731 IP 192.168.1.100.123 > 17.171.4.15.123: NTPv4, Client, length 48
    01:47:52.567517 IP 17.171.4.15.123 > 192.168.1.100.123: NTPv4, Server, length 48

    So, I assume that's what it *ought* to look like. And it appears that NTP requests going out get a "Client" tag, and responses from the NTP servers get a "Server" tag.

    Next, I turned the firewall rule back on and tried a tcpdump on the external interface:

    > sudo /usr/sbin/tcpdump -i eth2 -nn port 123

    Within a few seconds, I had screenfulls of output. (My public IP is 50.147.56.108.) Here's a small sampling:

    01:52:39.488392 IP 50.147.56.108.123 > 50.28.8.223.123: NTPv4, Client, length 48
    01:52:39.488443 IP 50.147.56.108.123 > 67.207.128.163.123: NTPv4, Client, length 48
    01:52:39.488468 IP 50.147.56.108.123 > 50.112.150.45.123: NTPv4, Client, length 48
    01:52:39.488487 IP 50.147.56.108.123 > 64.233.245.204.123: NTPv4, Client, length 48
    01:52:39.488505 IP 50.147.56.108.123 > 173.8.103.243.123: NTPv4, Client, length 48
    01:52:39.488536 IP 50.147.56.108.123 > 216.119.146.38.123: NTPv4, Client, length 48
    01:52:39.490828 IP 50.147.56.108.123 > 69.64.58.101.123: NTPv4, Client, length 48
    01:52:39.490861 IP 50.147.56.108.123 > 216.37.64.3.123: NTPv4, Client, length 48
    01:52:39.518532 IP 216.119.146.38.123 > 50.147.56.108.123: NTPv4, Server, length 48
    01:52:39.530637 IP 216.37.64.3.123 > 50.147.56.108.123: NTPv4, Server, length 48
    01:52:39.532383 IP 50.28.8.223.123 > 50.147.56.108.123: NTPv4, Server, length 48
    01:52:39.541519 IP 64.233.245.204.123 > 50.147.56.108.123: NTPv4, Server, length 48
    01:52:39.556047 IP 173.8.103.243.123 > 50.147.56.108.123: NTPv4, Server, length 48
    01:52:39.565881 IP 67.207.128.163.123 > 50.147.56.108.123: NTPv4, Server, length 48
    01:52:39.577977 IP 50.112.150.45.123 > 50.147.56.108.123: NTPv4, Server, length 48

    This really has me confused. If I'm correctly interpreting this, based on what I saw on the internal interface, it looks to me like my UTM is initiating the NTP commands going out, and the servers are responding a short time later. In almost every case, when an IP address appears on a line labeled "Client", it shows up again a few lines later on a line labeled "Server". Can that possibly be right, or do I have that exactly backwards? Also, note that this all occurred with an ANY ANY NTP DROP rule, with logging enabled, in the #1 position.

    One more thing, which may have a bearing on all this. I mentioned in a previous reply that in System Settings:Time and Date, I had my NTP servers set to "NTP Server Pool", which I defined in Definitions & Users:Network Definitions as "us.pool.ntp.org". When I looked at my definition for "NTP Server Pool" just now, next to the blue (i) icon, it tells me "us.pool.ntp.org [128.255.70.89 (448 IPs total)]. So, I'm wondering -- I don't know how often the UTM wants to contact a NTP server to check the time, but is it possible that when it does, it's sending out requests to every one of those 448 NTP servers? Can anyone else confirm all this on their own UTM? I'm currently running firmware version 9.101.12.

    -- Bruce
  • Hi,
    I believe your interpretation is correct.

    The UTM is sending the NTP requests.
    Your firewall rule will not stop them because the UTM has hidden rules for it's own services.

    afaik, the UTM should not be sending out that many requests.

    If I hit the 'test configured servers' button on the bottom of the Time & Date page, it queries 3 servers, and a total of 25 or 30 packets show in tcpdump. (I'm running 9.006, fwiw.)

    HOWEVER, leaving tcpdump running, I do see about 1-2 packets every minute.

    EDIT: I thought this was excessive, but some googling finds http://www.linuxquestions.org/questions/linux-software-2/how-often-does-ntpd-sync-time-with-its-servers-829538/ which mentions running ntpd -q, which shows the 'poll' interval; mine is 128 seconds for 3 servers (so that means 3 queries average every 2 mins).

    Anyways, I'm going to leave iptraf running overnight and see how much bandwidth NTP is using.

    try running 'ntpd -q' on your firewall.

    Barry