How was the SQL injection done? We blocked off admin login

We have the admin login only allowing logins from our HQ (IP limited). Yet, they have all been compromised?

  • In reply to Big_Buck:

    Hi Paul,

    just a final note, thanks to Pavol who pointed me to

    And yes I tested and proofed this (also on 17.5.12), TCP/8094 is open on the WAN interface! This could be another leak where the SQL-injection occurred.

  • In reply to JosefBergmann:

    Hello

    You REALY tested it on WAN ???

    I mean, you have no rule Firewall rule allowing such traffic on WAN, and all access via WAN are opted-out, and yet traffic can flow tru WAN via 8094 ?!?!?!

    Are you kidding me ?!?!?!

    Paul Jr

  • In reply to Big_Buck:

    Hi Paul,

    No I'm not kidding :) Just try it yourself, simple use one of the free online scanners to probe the TCP port 8094 on the WAN-IP of a Sophos XG, eg. https://ping.eu/port-chk/ or https://portchecker.co/ or others.

    It seems that this service is per default always open for any network, no matter if you have the SPX Encryption for email configured or not. And as the release notes shows, this service was vulnerable for "Blind pre-auth SQLi" bevor 17.5 MR12.

    You must actively change the "Allowed networks" in Email -> Encryption -> SPX portal settings! As a work around I've only allowed #Port1 do disable this service on the WAN.

    For me it's now enough. We stopped selling this boxes already bevor two years, but now we will also replace the remaining ones (to another brand).

  • In reply to JosefBergmann:

    Hi Paul/Josef;

    The fact is, SPX Portal is open by default. What other flowers are dormant in XG ?

    Regards
    Jan

  • In reply to JosefBergmann:

    Indeed.  Open.on one firewall.

    Should I expect both MTA mode and legacy mode behave the same ?  I.e. port 8094 open ?

    I have search Sophos web site regarding this, and the fact that port 8094 was always open have already been a major concern to many. 

    Well.  The other work around is to install another firewall between WAN and XG.  I mean, one that does only what it is asked to do.  And do not what it is not asked.  And one that has real log viewer.

    Paul Jr

  • In reply to Big_Buck:

    The more I test, the more i'm puzzled.  One of our firewalls test open at one time and closed afterward.  It is not consistent.

    Paul Jr

  • In reply to JosefBergmann:

    Hi,

    The attack specifically targeted the underlying code of the admin and user portals. We have no evidence the attacker targeted the SPX encryption portal which is different underlying code than the other two. However, the KBA states that "firewalls manually configured to expose a firewall service (e.g. SSL VPN) to the WAN zone that shares the same port as the admin or user portal were also affected". So if a customer exposed the SPX encryption portal on the admin or user portal, which is not the default, it becomes potentially susceptible.

    Regards,

  • In reply to FloSupport:

    Hello Flo

    Thanks for the answer.

    But from what I have posted already, it is not my case.

    All accesses to everything except VPN were opted out everywhere but LAN.  On all firewalls.

    So the attack description Sophos provided is certainly inacurate.

    So ???  What happened ?

    Paul Jr

     

  • In reply to FloSupport:

    Hi Flo,

    I've to disagree.

    We have here three XG devices (2x XG85, 1x XG105) were we never configured or used the SPX encryption. The boxes not even had at any time a subscription for that. So it must be the default, that the SPX portal is exposed with TCP/8094 to "any" networks. Attached the screenshots for the SPX portal and Admin access menus of a box.

    I do not say, the SPX service itself is usable, it is just fishy that a service (awarrensmtp) is listening on that port and that there was the fix mentioning SQLi on spxd (NC-59300) in the last firmware.

  • In reply to Big_Buck:

    Hi Paul,

    yes I found the internal server error on the XG85 webadmin because of this. In my opinion it is a absolut nogo to install such changes in a firewall without any prior information.

  • In reply to JosefBergmann:

    Same here, my home xg (Fullguard Plus license), never used mail system, port is opened because of (ANY), changed to PORT E0 to close. :-(

     

    NOT GOOD

     

    Running SFOS 18.0.0 GA-Build379.HF051220.1

  • In reply to twister5800:

    Hello twister5800,

    the same situation in my case.

    Isn't it a best practice firewall policy, in the recommended settings everything is forbidden and the necessary functions are activated by the administrator as needed?

    But it seems that in the case of XG Firewall, on the contrary, everything is allowed and attackers can enter without restriction?!?

    Sarcasm....

    Regards

    alda

  • In reply to alda:

    Hi Alda,

    alda

    Isn't it a best practice firewall policy, in the recommended settings everything is forbidden and the necessary functions are activated by the administrator as needed?

    Sarcasm....

    YES - completely agree, I would never buy a big house, not knowing which doors where setup, with no locks :-(

    Now it's like, when you get a new XG device, there is an important note in the box with this link:

    https://nmap.org/book/port-scanning-tutorial.html

    #sarcasm 

    Frustrated and disappointed right now, we stopped selling new fw with UTM and then XG, now customers come to hunt us down. It's been ad very bad year for Sophos with network devices, first broken RED's, CVE's and a multi-bug firewall's...management have forced me to look others ways like Fortinet. A FW need s to be reliable!

  • No rational answer yet from Sophos.

    Still swimming in the dark.

    Paul Jr