Guest User!

You are not Sophos Staff.

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

Strange PTR DNS quaries

Hi

My IDS has been reporting strange DNS queries to a malware domain every night at 12:05
BLACKLIST DNS reverse lookup response for known malware domain spheral.ru - Win.Trojan.Glupteba

The IDS says the source is my internal DNS computer, but when I look at the logs on it, it was responding to a PTR request made from the UTM (I have the UTM forwarding to the internal DNS)

I have been trying to find if a client asking for that DNS requests.
For a test, I have disabled other networks (DMZs, phones, wifi) from using the UTM as the DNS host as a test to see if another network was causing the request. The requests still happened.

I checked the logs
Web Filtering: in that minute time frame I did not see any strange requests. The UTM proxy does its own DNS lookup for web browsing) 
IDS logs: catches the internal DNS computer going out, but not the UTM making the request
Firewall logs: Show the DNS requests going out, but not the request going to the UTM (No details just A made a Dns request to B)
TCPDUMP: Running TCP dump over all interfaces for DNS traffic shows the initial request originating from the UTM. (tcpdump udp port 53 -nn -w capture.cap )
Web application: No request made at all around that time

So I guess my question is,
What in the UTM causes it to do PRT lookups on IP addresses, I saw it making a lot of these requests? And is there a log to see the requests made by the UTM, and why?

Thanks for any help, tonight I'm going to try disabling web filter proxy, and turn off all web application servers, see if that can help narrow down the cause. 

UTM 9.213-4


This thread was automatically locked due to age.
  • You say that IPS caught this issue and not ATP?  Please show a representative line from the log.

    Are you running the SMTP Proxy?

    Cheers - Bob
  • Hi

    Thank you. Yeah here are the logs, No smtp proxy

    SNORT
    2015:10:22-01:05:13 keywest snort[4656]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="BLACKLIST DNS reverse lookup response for known malware domain spheral.ru - Win.Trojan.Glupteba" group="241" srcip="195.88.208.108" 

    DNS Server
    It got over written today already, but it showed the UTM making the initial request

    TCPDump
    This was the capture on all interfaces for UDP 53 traffic from yesterday, For some reason I don't see the UTM making the request to the internal DNS server, It looks like it was mainly capturing on the external interface.
    192.168.12.1 is UTM, 192.168.12.3 is internal DNS


    I ran TCPdump again today with just focusing on the internal LAN, you can see the UTM make the initial request


    I have Web Filter logs, but I did not see anything strange on them.
  • Update
    I Disabled Site to site VPNs
    I Disabled All Interfaces, other then LAN and WAN
    I Disabled Web Filtering
    I Disabled All WebServer Proxys


     Snort
    2015:10:23-01:05:14 keywest snort[4656]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="BLACKLIST DNS reverse lookup response for known malware domain spheral.ru - Win.Trojan.Glupteba" group="241" srcip="195.2.253.139" dstip="192.168.12.3" proto="17" srcport="53" dstport="61432" sid="31600" class="A Network Trojan was Detected" priority="1" generator="1" msgid="0"

    2015:10:23-01:05:18 keywest snort[4656]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop"

    Internal DNS 
    10/23/2015 1:05:13 AM 0DA8 PACKET  000000F062F725B0 UDP Rcv 192.168.12.1    3993   Q [0001   D   NOERROR] PTR    (3)139(3)253(1)2(3)195(7)in-addr(4)arpa(0)


    The UTM was still doing a lot of reverse PTR lookups when I turned off everything, even doing some A record lookups. even to a suspicious cloudfront.net site that virustotal flagged,  the only thing I did not disable was all my NAT rules, even though the interface where most of those go (the DMZ) was disabled.

    I will try disabling all of those tomorrow. If I disable all of the NAT and firewall rules and the look ups keeps happening, the only thing I can think of  is the UTM is doing it by itself, I don't know what that means.
  • I'm still not certain of all that ATP does, but this was an incident caught by ATP rules in Snort, so that's where it was logged.  I've also seen ATP reports in the App Control and DNS logs.  What does the line under 'Advanced Threat Protection' on the 'Network Protection' page say?

    Cheers - Bob
  • Thanks again Bob for your help. I'm sorry, I'm a little confused where you want me to look. It it looks like the SMTP proxy is running but only for creating daily executive reports. Email Protection is disabled.






    Advanced Threat Protection : Turned on, but empty, no reports on it. ( Dashboard reports system OK) 
    Application Control: Nothing around that time.
    Configuration daemon: Nothing around that time
    DHCP server: Nothing unusual 
    DNS Proxy: I dont see any of the IPs show up, I do see several requests that look like this for internal IPs
    2015:10:23-01:17:03 keywest named[4487]: client 127.0.0.1#49435 (152.11.168.192.in-addr.arpa): view norpz: RFC 1918 response from Internet for 152.11.168.192.in-addr.arpa 
    Endpoint Protection: Nothing unusual
    Fallback: Nothing unusual
    Firewall:  Just this line 3 times
    /var/log/packetfilter.log:2015:10:23-01:05:18 keywest ulogd[3546]: id="2014" severity="info" sys="SecureNet" sub="packetfilter" name="DNS request" action="DNS request" fwrule="60011" initf="eth2" srcmac="00:15:5d:0b:5a:03" dstmac="00:1a:8c:37:48:e2" srcip="192.168.12.3" dstip="195.88.208.108" proto="17" length="83" tos="0x00" prec="0x00" ttl="128" srcport="62983" dstport="53"
    HTTP daemon: Nothing unusual
    IPSec VPN: Normal
    IPS: 
    2015:10:23-01:05:14 keywest snort[4656]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="BLACKLIST DNS reverse lookup response for known malware domain spheral.ru - Win.Trojan.Glupteba" group="241" srcip="195.2.253.139" dstip="192.168.12.3" proto="17" srcport="53" dstport="61432" sid="31600" class="A Network Trojan was Detected" priority="1" generator="1" msgid="0"
    2015:10:23-01:05:18 keywest snort[4656]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="BLACKLIST DNS reverse lookup response for known malware domain spheral.ru - Win.Trojan.Glupteba" group="241" srcip="195.88.208.108" 
    Kernal: Nothing
    SMTP Proxy: There is some activity around this time, where it looks like it is trying to produce a Daily Executive Report... I dont see why this would cause a lookup to the Black listed IP..
    2015:10:21-01:05:48 keywest exim-in[5119]: 2015-10-21 01:05:48 SMTP connection from [127.0.0.1]:52555 (TCP/IP connection count = 1)
    2015:10:21-01:05:48 keywest exim-in[4343]: 2015-10-21 01:05:48 [127.0.0.1] F= R= Accepted: from relay
    2015:10:21-01:05:48 keywest exim-in[4343]: 2015-10-21 01:05:48 [127.0.0.1] F= R= Accepted: from relay
    2015:10:21-01:05:48 keywest exim-in[4343]: 2015-10-21 01:05:48 1Zolau-000183-2F Firewall_Keywest@Acme.com H=localhost [127.0.0.1]:52555 P=esmtp S=565699 id=3052-04330-1445403948@firewall_Keywest.acme.com

    System Messages
    2015:10:23-01:05:01 keywest /usr/sbin/cron[4015]: (root) CMD (   /usr/local/bin/reporter/system-reporter.pl)
    2015:10:23-01:05:21 keywest ips-reporter[3513]: [CRIT-852] Intrusion Prevention Alert (Packet dropped)
    2015:10:23-01:05:23 keywest ips-reporter[3513]: [CRIT-852] Intrusion Prevention Alert (Packet dropped)
    2015:10:23-01:05:23 keywest ips-reporter[3513]: [CRIT-852] Intrusion Prevention Alert (Packet dropped)
    2015:10:23-01:05:23 keywest ips-reporter[3513]: [CRIT-852] Intrusion Prevention Alert (Packet dropped)
    2015:10:23-01:05:23 keywest ips-reporter[3513]: [CRIT-852] Intrusion Prevention Alert (Packet dropped)
    2015:10:23-01:05:25 keywest ips-reporter[3513]: [CRIT-852] Intrusion Prevention Alert (Packet dropped)
    2015:10:23-01:05:42 keywest report_render[4016]: [INFO-720] Daily Executive Report

    WebApplication
    Nothing, was turned off

    WebFiltering
    Nothing, was turned off
  • I was thinking about Email because that could be a reason for the UTM to request reverse DNS for an IP.  If Email Protection is not activated, that shouldn't be what caused this.

    Yes, all ATP results are in the log for the process that caught the apparent attack.  For a better understanding of ATP, check out What’s new in Sophos UTM Accelerated (9.2): #5 – Advanced Threat Protection (ATP).

    2015:10:23-01:17:03 keywest named[4487]: client 127.0.0.1#49435 (152.11.168.192.in-addr.arpa): view norpz: RFC 1918 response from Internet for 152.11.168.192.in-addr.arpa

    This is off-topic, but you might want to consider DNS Best Practice.

    2015:10:23-01:05:14 keywest snort[4656]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="BLACKLIST DNS reverse lookup response for known malware domain spheral.ru - Win.Trojan.Glupteba" group="241" srcip="195.2.253.139" dstip="192.168.12.3" proto="17" srcport="53" dstport="61432" sid="31600" class="A Network Trojan was Detected" priority="1" generator="1" msgid="0"
     2015:10:23-01:05:18 keywest snort[4656]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="BLACKLIST DNS reverse lookup response for known malware domain spheral.ru - Win.Trojan.Glupteba" group="241" srcip="195.88.208.108"

    In a sense, I think this is a false positive.  Your UTM is certainly not infected with a Windows Trojan.  My guess would be that you were being probed by 195.88.208.108.  Do you see anything else related to that IP in the Firewall log or Daily Executive Report for the 22nd?  12:05AM would be about the time the Daily Executive Report would have been doing rDNS lookups.  What do you see in 'Bandwidth Usage' for that IP as a Server and a Client?

    Cheers - Bob
  • Thanks again Bob
    Sorry for the delay.

    It showed up as a server, But only DNS traffic, Nothing else.


    Yeah it is strange that the lookup happens right before sending out executive reports. Ill try disabling the report and see if that helps.
  • I wasn't thinking right.  Instead of the one IP, try 195.2.252.0/23.

    Cheers - Bob
  • Same thing just UDP 53 traffic.
  • Hmm, so after disabling the nightly report, the IDS did not go off.. So its looking like the lookup is happening for preparation of the report.

    Now I need to find why would it do a lookup for an IP that, for what i can tell, has not communicated with the UTM.

    Thanks again bob for your help in figuring this out.