Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Mitigate Ransomware "WannaCry"

    Firewalling
    13
    26
    6861
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      cambas last edited by

      Hello:

      I was wandering If there is a way to try to mig¡tigate the attacks of ransomware "wannacry" on Pfsense ver 2.1.

      Can you suggest something?

      Thanks

      1 Reply Last reply Reply Quote 0
      • O
        oddballracing last edited by

        Hey cambas,

        As a fellow Admin of the old 2.1 lineage (2.1.2 specifically), i can say that your best bet on mitigating any attacks of malware is up to the user's due diligence and caution in how and what they browse, and that same caution applied to opening any email attention. That being said, i know that user's seem to find any recommendations provided by their IT departments to hold no bearing on their operation.

        So, systematically speaking, i can say that ensuring that staying up to date with security patches on operating systems, both for your router and all systems behind it be up to date. This instance specifically leverages an SMBv1 remote code exec vulnerability to spread between windows systems. Microsoft released patches for this as KB4012212 and as a rollup in KB4012215 for NT6.1 (Windows 7 and Server 2008 R2). I would also take steps to heavily restrict http/https access outbound through the firewall to limit the vulnerable sites that are accessible from within. The same would apply to whatever email servers and clients you manage, in order to restrict access to certain file types, and perform virus scans on the attachments (again having up to date definitions on these is VITAL!). Being that this is v2 of the ransom-ware taking advantage of this vulnerability, only recent virus detection codes for many of the common suites are detecting this on entry now.

        This is just a slice of what i can recommend, but I'm in the middle of my own mitigation and patching operations on several networks at the moment and need to put some time towards that.

        Nothing can definitively stop this garbage from getting you on the edge of the internet, only absolute isolation would achieve that feat - but that would not be the case if you're running pfSense, and i totally understand. I sincerely wish you the best in riding out this storm, but I would urge that you check the systems behind the firewall, starting with windows servers and user computers, as these are your most likely culprits for bringing the wolf in the door.

        1 Reply Last reply Reply Quote 0
        • BBcan177
          BBcan177 Moderator last edited by

          http://blog.talosintelligence.com/2017/05/wannacry.html

          Additionally, organizations should strongly consider blocking connections to TOR nodes and TOR traffic on network. Known TOR exit nodes are listed within the Security Intelligence feed of ASA Firepower devices. Enabling this to be blacklisted will prevent outbound communications to TOR networks.

          1 Reply Last reply Reply Quote 0
          • jimp
            jimp Rebel Alliance Developer Netgate last edited by

            You should also create DNS Resolver or DNS Forwarder host overrides to point the following domain names at a LIVE HTTP server on your local network (NOT at the firewall!)

            
            ifferfsodp9ifjaposdfjhgosurijfaewrwergwea.com
            iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com
            iuqssfsodp9ifjaposdfjhgosurijfaewrwergwea.com
            iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com
            ayylmaotjhsstasdfasdfasdfasdfasdfasdfasdf.com
            

            These are killswitch domains and if the malware can access these domains, it stops propagating. It does not require any specific response, only that it can make an HTTP request to those domains. The domains have been sinkholed already but on the outside chance there is a DoS against those you don't want to rely on the public servers being available.

            DO NOT BLOCK THESE DOMAINS, blocking solves nothing. It is not a C&C server, but a killswitch.

            EDIT: Added new killswitch domains

            1 Reply Last reply Reply Quote 0
            • A
              athurdent last edited by

              @BBcan177:

              http://blog.talosintelligence.com/2017/05/wannacry.html

              Additionally, organizations should strongly consider blocking connections to TOR nodes and TOR traffic on network. Known TOR exit nodes are listed within the Security Intelligence feed of ASA Firepower devices. Enabling this to be blacklisted will prevent outbound communications to TOR networks.

              Hmm, strange IP notation there, what could this mean? Some kind of regexp?

              188[.]166[.]23[.]127:443 - Tor Exit Node
              213.61.66[.]116 - Tor Exit Node
              
              1 Reply Last reply Reply Quote 0
              • jimp
                jimp Rebel Alliance Developer Netgate last edited by

                @athurdent:

                Hmm, strange IP notation there, what could this mean? Some kind of regexp?

                188[.]166[.]23[.]127:443 - Tor Exit Node
                213.61.66[.]116 - Tor Exit Node
                

                More likely they are trying to make it NOT create a link when copy/pasted, so (a) people don't click links to potentially malicious content and (b) so people don't easily spread those links by copy/pasting content from the source.

                1 Reply Last reply Reply Quote 0
                • A
                  athurdent last edited by

                  Great thanks!

                  1 Reply Last reply Reply Quote 0
                  • BBcan177
                    BBcan177 Moderator last edited by

                    @jimp:

                    You should also create DNS Resolver or DNS Forwarder host overrides to point the following domain names at a LIVE HTTP server on your local network (NOT at the firewall!)

                    
                    ifferfsodp9ifjaposdfjhgosurijfaewrwergwea.com
                    iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com
                    iuqssfsodp9ifjaposdfjhgosurijfaewrwergwea.com
                    iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com
                    ayylmaotjhsstasdfasdfasdfasdfasdfasdfasdf.com
                    

                    These are killswitch domains and if the malware can access these domains, it stops propagating. It does not require any specific response, only that it can make an HTTP request to those domains. The domains have been sinkholed already but on the outside chance there is a DoS against those you don't want to rely on the public servers being available.

                    DO NOT BLOCK THESE DOMAINS, blocking solves nothing. It is not a C&C server, but a killswitch.

                    EDIT: Added new killswitch domains

                    Keep in mind that this would override just that domain and not "www." 
                    Would need to create two forwards for each domain to be safe. Hopefully everyone has patched their software as recommended…

                    1 Reply Last reply Reply Quote 0
                    • GruensFroeschli
                      GruensFroeschli last edited by

                      Keep in mind that this killswitch is only valid for earlier version(s) of Wcry.
                      At least one currently circulating version doesn't have this killswitch anymore.

                      1 Reply Last reply Reply Quote 0
                      • johnpoz
                        johnpoz LAYER 8 Global Moderator last edited by

                        "At least one currently circulating version doesn't have this killswitch anymore."

                        That they would include a killswitch in the first place seems odd.. Why would I want to kill something that is meant to make me money ;)

                        1 Reply Last reply Reply Quote 0
                        • GruensFroeschli
                          GruensFroeschli last edited by

                          Was wondering the same ^^"

                          I could imagine that quite some parts of it are copy/paste code…

                          1 Reply Last reply Reply Quote 0
                          • jimp
                            jimp Rebel Alliance Developer Netgate last edited by

                            If they deployed it but they found that it wasn't working like they wanted, they could stop it and make changes before it spread too far and reduced their chances of a bigger payout by going undetected for a longer period. So a kill switch makes sense, but they didn't bother to actually register their killswitch domains, so…

                            1 Reply Last reply Reply Quote 0
                            • N
                              NOYB last edited by

                              @jimp:

                              If they deployed it but they found that it wasn't working like they wanted, they could stop it and make changes before it spread too far and reduced their chances of a bigger payout by going undetected for a longer period. So a kill switch makes sense, but they didn't bother to actually register their killswitch domains, so…

                              I was thinking it was their way of preventing a boomerang affect on them and their cohorts.  In which case there would be no need to register the domains.  Just make them available in environments they don't want affected.

                              1 Reply Last reply Reply Quote 0
                              • johnpoz
                                johnpoz LAYER 8 Global Moderator last edited by

                                "Just make them available in environments they don't want affected."

                                Wouldn't you just make sure places you don't want to be affected are updated against whatever exploit your using.  I guess if you were using an exploit that was not patched ;)  having a way to kill it would be good.  And Jimp makes a good point as well.

                                Both very viable answers to reason for killswitch - thanks.

                                1 Reply Last reply Reply Quote 0
                                • N
                                  NOYB last edited by

                                  @johnpoz:

                                  "Just make them available in environments they don't want affected."

                                  Wouldn't you just make sure places you don't want to be affected are updated against whatever exploit your using.  I guess if you were using an exploit that was not patched ;)  having a way to kill it would be good.  And Jimp makes a good point as well.

                                  Both very viable answers to reason for killswitch - thanks.

                                  In addition to perhaps a not yet patched exploit.  Perhaps the environments not to be affected are vast and not under direct control for patching.  A domain/web site based kill switch could also be used for targeting attack (exclude non targeted environments).  For instance nation states and cyber warfare.

                                  Though it could also be just as simple as an oversight to remove test/debug/example code.

                                  1 Reply Last reply Reply Quote 0
                                  • jimp
                                    jimp Rebel Alliance Developer Netgate last edited by

                                    They could also sell the killswitch to some places for more $$$

                                    1 Reply Last reply Reply Quote 0
                                    • N
                                      NOYB last edited by

                                      @jimp:

                                      They could also sell the killswitch to some places for more $$$

                                      Yup, lots of possibilities.

                                      What made me think of cyber warfare was a top 20 chart I saw with one particular nation affected way more than any other.  Another thought on cyber warfare could be nation C trying to stoke animosity between nations A and B.

                                      General public pawns will probably never know much of any of this.  But it is fun to speculate.

                                      Hmmm.  They would only be able to sell the kill switch once.  Then everyone would have it.  Also, why two kill switches?  Seems to me that may indicate targeting.

                                      1 Reply Last reply Reply Quote 0
                                      • N
                                        NOYB last edited by

                                        The simple reason so many companies were hit by the WannaCry 2.0 ransomware

                                        Daniel Howley
                                        Technology Editor

                                        Yahoo FinanceMay 16, 2017

                                        https://finance.yahoo.com/news/simple-reason-many-companies-hit-wannacry-2-0-ransomware-192836300.html

                                        Excuses, excuses.  It's their job/responsibility to operate a secure environment.  If they are unable or unwilling to allocate the necessary resources to accomplish that then it is their fault, and stupidity for taking the associated risk without being prepared to deal with the possible consequences.

                                        1 Reply Last reply Reply Quote 0
                                        • Z
                                          zoro_2009 last edited by

                                          <interrup>Whats a killswitch ?</interrup>

                                          1 Reply Last reply Reply Quote 0
                                          • jimp
                                            jimp Rebel Alliance Developer Netgate last edited by

                                            @zoro_2009:

                                            <interrup>Whats a killswitch ?</interrup>

                                            It's a condition that, if met, causes a program to stop executing.

                                            In this case, the malware checks to see if one of the domains is live (attempts an HTTP connection to it). If this succeeds, then it does not attempt to spread itself further.

                                            So by making sure the malware can access these "killswitch" domains, you effectively stop it from infecting more machines, giving you more time to get your systems patched/configured/etc to properly prevent them from being exploited, and to clean up existing infections.

                                            1 Reply Last reply Reply Quote 0
                                            • F
                                              fredfox_uk last edited by

                                              For a really good explanation of the killswitch take a read of this https://www.malwaretech.com/2017/05/how-to-accidentally-stop-a-global-cyber-attacks.html

                                              1 Reply Last reply Reply Quote 0
                                              • Z
                                                zoro_2009 last edited by

                                                thanks

                                                1 Reply Last reply Reply Quote 0
                                                • M
                                                  Mr. Jingles last edited by

                                                  @jimp:

                                                  It does not require any specific response, only that it can make an HTTP request to those domains.

                                                  []
                                                  DO NOT BLOCK THESE DOMAINS, blocking solves nothing. It is not a C&C server, but a killswitch.

                                                  Dear Jim,

                                                  Could I ask why blocking the domain doesn't solve anything? In my humble view of the world, if it can't connect to it because it's blocked, it can't make a HTTP request?

                                                  Thank you :)

                                                  1 Reply Last reply Reply Quote 0
                                                  • Derelict
                                                    Derelict LAYER 8 Netgate last edited by

                                                    How about you read jimp's post again.

                                                    1 Reply Last reply Reply Quote 0
                                                    • M
                                                      mrgoogleip last edited by

                                                      I know some people that pay bitcoins for his information  :'(

                                                      1 Reply Last reply Reply Quote 0
                                                      • johnpoz
                                                        johnpoz LAYER 8 Global Moderator last edited by

                                                        Exactly - pay attention to this part

                                                        " It is not a C&C server, but a killswitch."

                                                        This is why do not block the domain… But bring the domains online and let it make a http connection.

                                                        1 Reply Last reply Reply Quote 0
                                                        • First post
                                                          Last post

                                                        Products

                                                        • Platform Overview
                                                        • TNSR
                                                        • pfSense
                                                        • Appliances

                                                        Services

                                                        • Training
                                                        • Professional Services

                                                        Support

                                                        • Subscription Plans
                                                        • Contact Support
                                                        • Product Lifecycle
                                                        • Documentation

                                                        News

                                                        • Media Coverage
                                                        • Press
                                                        • Events

                                                        Resources

                                                        • Blog
                                                        • FAQ
                                                        • Find a Partner
                                                        • Resource Library
                                                        • Security Information

                                                        Company

                                                        • About Us
                                                        • Careers
                                                        • Partners
                                                        • Contact Us
                                                        • Legal
                                                        Our Mission

                                                        We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

                                                        Subscribe to our Newsletter

                                                        Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

                                                        © 2021 Rubicon Communications, LLC | Privacy Policy