Online Services

Category: Security

  • Wordfence In Depth: How Malware Becomes Scan Signatures

    One of the most effective ways the Wordfence team keeps the WordPress community and customers secure is through something we call the ‘Threat Defense Feed’. This is a combination of people, software, business processes and data. It’s an incredibly effective way to keep hackers out and provide our customers with early detection.

    Today I’m going to go into some depth describing how the malware detection part of the Threat Defense Feed works. This will be a fun journey into some of the internals here at Wordfence, and will give you insight into how we constantly innovate to keep you and your customers secure.

    The Decision to Vertically Integrate Threat Intelligence

    Some time ago the team and I realized that to give our customers the best protection available, we needed to know what attacks are occurring on the ground. We needed a constant flow of ‘footprints’ that hackers left behind that we could turn into threat intelligence and feed into our products to improve detection.

    We faced an important decision about where to get the forensic data we needed. We could either rely on hosting companies and open sources of malware samples, or we could go into the incident response business ourselves, getting what we needed from recently compromised sites while helping customers recover from a hack.

    The decision was obvious. So we kicked off an ambitious project to create a constant flow of new threat intelligence. We immediately entered the site cleaning market and built a highly competent team of forensic experts that can perform incident response, analyze hacked sites and get those customers back up and running with a clean site as quickly and effectively as possible.

    One of the products of our site cleaning activity is that our team finds malware samples and they feed that into a huge repository of malware that we have created. Our site cleaning customers are able to benefit from excellent customer service and an incredible forensic team at one of the lowest prices in the industry, because the malware we recover from their websites is used to help protect other Wordfence customers.

    In addition, we occasionally receive huge troves of malware from customers and hosting companies. We also feed these sample sets and those from several other sources into our malware repository on a continual basis.

    Removing Malware Duplicates and Creating Malware Signatures

    When our analysts add a new sample to the malware repository, we have an internal tool we use to run a scan on the sample. It uses all our existing malware signatures and lets our analyst know what we already detect. Malware that we already detect is removed from the repository and not included in our workflow.

    Then the malware sample is handed to our malware signature authors who are experts in creating highly optimized regular expressions that are used by our scan engine to detect malware. The sig authors perform another de-duplicating step to ensure that a recently added malware signature isn’t already detecting something they’re working on.

    Once our sig authors are sure what they have is 100% unique malware that we haven’t seen before, they hand craft a new malware signature to detect it. Each signature is checked for compatibility with different versions of PHP and the PCRE regular expression library.

    When we have created several new malware signatures this way, the sig authors get together and combine a batch of new malware signatures which they move into a beta state.

    Avoiding False Positives in Malware Detection

    One of the worst things that a security product can do is to produce false positives. In malware detection, a false positive is a situation where the scanner tells you that it has discovered malware but it really hasn’t. It wastes your time and it also desensitizes you so that you don’t take notice when a true positive shows up. So we put a lot of time into making sure that our malware signatures don’t create false positives.

    Once our sig authors have moved a batch of malware signatures into beta, they run their own set of tests on the batch of signatures. Our sig authors have WordPress installations set up with over 3000 of the most popular plugins and themes installed on each test machine. As part of the early beta test they do, they will enable the ‘beta’ flag in Wordfence so that it uses the beta signatures, and then run a scan on these test machines.

    If the scan runs on a clean test machine and comes back with no false positives, they move the scan to the next phase which is a formal software quality assurance step. At this point a senior member of our quality assurance team performs a series of final tests to ensure that the batch of beta malware samples does not produce any false positives and that they detect the ‘true positives’ that each signature is designed to detect.

    Moving Malware Signatures to Production

    Once our malware signatures have been hand crafted, subjected to intense testing by our sig authors and have passed final QA, they are released into production. This step is as simple as turning off the beta flag on the new batch of malware signatures and they become instantly available to our Premium customers. Thirty days later, those new premium malware signatures become available to our community customers at no charge.

    The graph below shows the total number of malware signatures we have in production over time at one week intervals. The red graph shows the number of Premium Wordfence signatures we have in production.

    As you can see our community threat defense feed receives malware signatures 30 days later and the number of community malware signatures has grown significantly since September as the Premium signatures have been feed into the community ruleset during the past 5 months.

    During the past few weeks our team has added a significant number of new Premium rules based on new malware we are seeing that infects sites and injects links to Japanese spam websites. The malware our team found has a significant number of variants requiring a large number of new rules to be created. Those will start entering the community feed over the coming weeks.

    People, Software, Processes and Data

    At Wordfence we are continuously working to find new ways to efficiently deliver actionable threat intelligence to our customers in real-time so that we can better secure you, your website and your customers. We have a research project underway at present that is working on finding new ways to further improve the process I’ve described above.

    The most important component of our Threat Defense Feed (or TDF) is our people. The team at Wordfence has done an incredible job of taking ownership of the TDF and continuously improving it and the products, like the Wordfence plugin, that use the threat intelligence that the TDF provides. The result is that over the past year you have seen a significant improvement in detection rates both on the Wordfence Firewall and in the malware scanner.

    We’re all very proud to count you among our customers and will continue to innovate so that we can better protect you, your customers and your investment.

    Mark Maunder – Wordfence Founder/CEO.

    Special thanks to Wordfence team member Åsa for designing the super awesome malware characters in the diagram above. 

    The post Wordfence In Depth: How Malware Becomes Scan Signatures appeared first on Wordfence.

  • A Big Thank You to our Premium Customers for Powering Wordfence and Helping Secure the Community

    At Wordfence we are intensely customer focused. A few years ago when we made our first non-founder hires, we hired two amazing people: Matt Barry and Tim Cantrell. Matt is a spectacular engineer and immediately took ownership of the Wordfence code base and eventually wrote the core of what is the Wordfence Firewall today. Matt is also amazing to work with – one of the smartest and nicest people you’ll ever have the pleasure of meeting.

    Tim is a customer service engineer, and since day 1, he has done a spectacular job. He is also just a super nice guy. We have all worked closely together since then, and today we are a team of almost 30 people including a much larger engineering organization and a sizable customer service team. Our core focus still reflects those early hiring decisions: Great engineering and excellent customer service – and Tim and Matt have driven much of that ethos from early on.

    In our organization, we behave very much like most commercial software companies. We focus on code quality, stability and innovation. We have a constant feedback loop from our customer service team that feeds your wisdom and insights back into Wordfence. But the one thing that makes us a bit different from many large software organizations is that only 6% of the websites who use our product are paying customers. Or put differently, 94% of our users use the free Wordfence product.

    When I published our post last week describing how we turn malware into new detection capability in Wordfence Scan, I included a chart that shows the number of malware signatures we have added over time in the past 5 months:

    One thing that struck me when looking at this chart is how clear it is that our Premium Wordfence customers are powering an incredible free product for the community. The chart above really shows just one of the final products of the organization’s work: scan signatures that continuously improve the malware detection capability that Wordfence has.

    As you can see in the chart, all malware signatures eventually, after 30 days become available to everyone in the community. That big jump in Premium signatures recently will also be reflected in the free signatures in a couple of weeks, and those signatures are not going away. They are gradually accumulating over time. The same is true for our firewall rules.

    As we grow the Wordfence engineering team, customer service team, QA team and other areas, our free customers are all benefiting because most of Wordfence’s features are available to the community completely free. These free features include:

    • The best malware scanner for WordPress in the business – which includes the ability to help clean hacked sites.
    • A powerful web application firewall that blocks a huge number of attack variants.
    • The ability to view your website traffic, web crawlers like Google and attacks on a live dashboard and react to them in real-time.
    • Brute force attack prevention.
    • A rate limiting firewall to help protect your content.
    • A range of other tools like whois lookup, diagnostic tools and much more.

    Our Wordfence Premium customers are the ones that are powering all these features and the team behind them. Our Premium customers also power the free support you receive on the WordPress.org support forums from our team.

    Our Premium customers have also powered the incredible free WordPress Security Learning Center that we have created with tons of content, including professionally produced videos. It’s all free and exists to help secure the WordPress community.

    And finally our Premium customers are the ones who power our ability to produce and publish ground-breaking research here, on this blog. We are also able to help our team attain new security certifications and maintain existing certifications. In addition our team can attend security conferences like RSA and DefCon to share insights with other security professionals.

    Our Premium customers also empower us to continue to maintain and build a team of security professionals that are the best in the business when it comes to WordPress security.

    So today I would like to extend a sincere and heartfelt thank you from our team and from all our community Wordfence users to our Premium customers for your support. Your decision to upgrade to the Premium version of Wordfence has empowered our team and the Wordfence product, and by extension your decision has helped secure the WordPress community and the 94% of our customers who use the free version.

    Thank you!

    From Mark Maunder, Wordfence Founder & CEO and the whole Wordfence Team.

    The post A Big Thank You to our Premium Customers for Powering Wordfence and Helping Secure the Community appeared first on Wordfence.

  • Remote Working: No Bad Hair Days at Wordfence

    The core team at Wordfence is now 13 full-time employees, and with contractors we are a team of 29. We are still at that really fun size where you can have a full team meeting and everyone has a chance to have their say. Every day feels like a hacker conference where everyone knows everyone else, and we are here to help our customers be more secure.

    I have spent a considerable amount of time thinking about why our team is so amazing. Did we get lucky? Is it our hiring process? Are awesome people predisposed to work in information security? Perhaps it’s a bit of all of that. But one thing that has occurred to me relatively recently is that the way we work is unique, and it may be a contributing factor.

    Our team is 100% remote, and all our interaction is either via collaborative applications or voice calls. We don’t do video calls. We either use voice calls on Slack or an application called TeamSpeak, which is the most reliable VOIP system we’ve found. TeamSpeak actually grew out of the gaming community.

    Improving Signal-to-Noise with Voice Only

    Being 100% remote and using voice-only communications has an interesting effect on an organization. It filters out a lot of noise. Communication becomes more about relating to others at a purely intellectual level. Whether you’re making a joke (I make very bad jokes), solving a problem or just sharing an idea, it’s not about who has the biggest presence in the meeting room or whether someone has a new hairstyle. You are interacting with your colleagues in a purely intellectual capacity, and that changes the dynamic quite radically.

    Our team is incredibly effective, and I think this way of interacting is one of the reasons why. It really improves the signal-to-noise ratio. If you think about a brick and mortar organization and how many daily distractions you have: Commuting to work, finding parking, walking into the office, sitting down to work while other people wander into your office to chat, the endless in-person meetings that could have been a 1 minute conversation.

    Working remotely with audio only strips away all that and makes you and your team incredibly effective.

    For larger team meetings, we use TeamSpeak, and we all use push-to-talk or PTT. What is great about this is you can have a barking dog or noisy kids or a construction crew in the background, and the rest of the team can’t hear it.  When you want to speak, you hit your PTT button and the audio quality is amazing. If it gets bad for some reason, we can see packet-loss for each person connected and so we can figure out within seconds where the problem is. It usually results in someone moving closer to their WiFi hub.

    For meetings with two or three people, we tend to use Slack voice calls. Those calls don’t require PTT and you can hear everyone all the time. That creates a closer feeling, kind of like a coffee shop. Now that Slack seems to have ironed out the bugs, Slack voice audio quality is usually awesome.

    Occasionally I’ll have to speak with someone outside the company and do a video call. That usually means making sure I don’t have any dog toys lying around the home office, getting rid of the heavy metal t-shirt and putting on something gray and boring and making sure I don’t have crazy hair. I find it’s quite a recalibration when you’re used to just walking up to your desk and doing quick and easy voice calls with anyone in the team. Suddenly you have to worry about looking at them or looking at your camera. You can’t just stare out your office window as you focus deeply on the idea they’re conveying, because they might wonder if you are not paying attention.

    Entering the Golden Age of Online Collaboration

    In the past 10 years, user-friendly mainstream tools like Slack have emerged that make remote working incredibly easy and allow a company to have a remote working culture. Adjusting to this new reality will take time, even for companies that appear to be innovators and technology leaders, which is perhaps why so many tech companies still insist on brick-and-mortar offices.

    Working remotely doesn’t come without challenges. There is the honey do list that your spouse or cohabitants may think you are permanently and constantly available to help with during your new job. A few conversations explaining that ‘remote’ doesn’t mean ‘pretend’ usually helps resolve that.

    If you have a family, working from home can be life changing because you get to spend more time with your kids. Some of our team were in jobs before joining Wordfence where they worked long hours and would really only spend quality time with their kids on weekends. Being able to be home based has been transformative for them.

    We have evolved the way we work and the tools we use over time. What we have today at Wordfence is an incredible remote working environment where we relate to each other at an intellectual level as remote workers and we trust each other and love working together. It is better than any workplace I could have ever imagined.

    If you are a developer, security analyst, QA guru or customer service engineer, Wordfence is hiring. We would love to hear from you.

    The post Remote Working: No Bad Hair Days at Wordfence appeared first on Wordfence.

  • Cloudflare Data Leak: How to Secure Your Site

    Cloudflare has experienced a data leak over a 5 month period that mixed sensitive data between websites and visitors. A visitor to one website using Cloudflare may have seen data from another website using Cloudflare that was being sent to a completely different site visitor.

    Some of the leaked data has been indexed by search engines who have been working over the past few days to try and remove the data from their caches.

    In this post I am going to explain in simple terms, what occurred and what you need to do about it.

    If you are a WordPress user and simply want to know how to secure your site, you can skip to the What Should I Do section below. I have included some information for non-WordPress site owners in that section too.

    What Happened in the Cloudflare Data Leak?

    Cloudflare provides a firewall and content distribution service. Their servers are between your website visitors and your own web server.

    Under normal circumstances, cloudflare returns the data each site visitor requested to that visitor. This may be public or sometimes private information and it is usually done over a secure channel. Each website visitor only sees the data they requested.

    From September 22nd, 2016 until February 18th 2017 (last Saturday), Cloudflares servers in some cases mixed data that belonged to one visitor to a website, with data belonging to another visitor that was visiting a completely different website.

    The worst data leakage occurred between the dates of February 13th and February 18th when one in every 3.3 million requests to Cloudflare’s servers was leaked.

    During the period when the leak occurred, visitors to certain websites would see what appeared to be garbage data mixed into the web page they were viewing. That garbage data was data from a memory leak. The data was in some cases sensitive and included security tokens and other sensitive information.

    According to Tavis Ormandy, the researcher who discovered this data leak:

    “The examples we’re finding are so bad, I cancelled some weekend plans to go into the office on Sunday to help build some tools to cleanup. I’ve informed cloudflare what I’m working on. I’m finding private messages from major dating sites, full messages from a well-known chat service, online password manager data, frames from adult video sites, hotel bookings. We’re talking full https requests, client IP addresses, full responses, cookies, passwords, keys, data, everything.”

    Data leakage occurred when a site visitor or search engine visited one of 3438 domains hosted behind Cloudflare’s servers, according to Cloudflare’s CTO who posted a comment on Hacker News. However, any of Cloudflare’s customer websites could have had their response data mixed into data returning from those 3438 websites. Tavis Ormandy confirms this in the same Hacker News thread.

    You can see an illustration of this data leakage in the diagram below. Any visitor to an ‘affected website’ which is one of the 3438 websites, could have had data from any one of over 5 million Cloudflare customer sites mixed into their response. Website 1 and Website 2 which are not ‘affected’ websites could have experienced data leakage to visitors of the ‘affected’ website.

    What Data Was Leaked?

    The data that was leaked could include passwords, cookies and authentication tokens. If an attacker is able to access the text of your cookies, they may be able to use them to sign into your website.

    Internal Cloudflare private keys used to secure data being transferred between Cloudflare machines were also leaked.

    At this point one should assume that there is a small chance that any private data transferred from any Cloudflare customer website to a site visitor may have been leaked between September 2016 and February of this year.

    According to Cloudflare, no private SSL customer keys were leaked from the memory of their servers. A private SSL key is a key used to secure visitor connections to your website. If the your private SSL key is leaked, an attacker could listen in on all traffic to and from your website.

    Has the Leaked Data Been Stored Somewhere?

    Unfortunately Google and other search engines have been crawling the web during the time that this leak was occurring on Cloudflare’s systems. Those search engines stored the leaked data when they indexed one of the 3438 affected websites.

    When viewing cached pages in Google, it is still possible at the time of writing (7pm Pacific Time on Feb 23rd) to view cached sensitive data in Google’s search results.

    Similarly it is possible to view sensitive Cloudflare data in DuckDuckGo’s search results.

    Since this leak was discovered, Google and other search engines have been working to try and remove the sensitive data from their caches. Based on what we are seeing this evening, there is still some data that needs to be removed.

    What Should I Do if I use Cloudflare on my Website?

    According to a conversation on Hacker News between the Cloudflare CTO and Tavis Ormandy, the security researcher who discovered this, any customer of Cloudflare’s could have been affected by this data leak.

    WordPress site owners: Change your wp-config.php salts. This will log everyone out and invalidate cookies and sessions

    If you are using WordPress, we recommend you edit your wp-config.php file and change all of the ‘salts’. This will automatically log all of your users out. This protects you and your site members in case any of their cookies have been stolen. Once you make this change, an attacker will no longer be able to use stolen session cookies from your site to sign in.

    You need to change the following section in your wp-config.php and save it:

    We suggest that you change the highlighted text in your wp-config.php to a long random string of characters and numbers. You can also use the link in the comment above the ‘define’ statements to generate a salt.

    Non-WordPress Site Owners: Invalidate Sessions

    If you use a different publishing platform, you will need to ensure that all sessions are invalidated. That means that your site visitor login cookies need to be made invalid. You will need to consult the documentation of your particular publishing platform to determine how to do this.

    Suggest your site members change their passwords and change your Admin passwords

    As a precautionary measure, you should suggest that your site members change their passwords. You should also change any admin level passwords.

    You may need to comply with any data breach reporting requirements you have

    This bug in Cloudflare’s systems is being described as a “data leak”. It is unclear at this point whether it is considered a “data breach”. A private database of customer personally identifiable information was not stolen. However, private data that may have included customer PII was leaked, no matter how small.

    If you have HIPAA, PCI or other reporting requirements that relate to data breaches, you may want to get advice on whether you are required to report this incident.

    Check the Search Results

    It is difficult to determine if any private information from your site has been stored in the search results. However, we recommend that as a precautionary measure you do a few Google searches with your domain name in quotes. Add the following text to the search:

    -site:example.com

    Replace example.com with your own site domain. Take note of the minus sign before the word ‘site’ above. This will exclude results from your own website. You can exclude results from other sites using the same operator several times. You can also try adding the following in quotes:

    “CF-Host-Origin-IP:”

    If you do find any results, report them immediately to Google for removal.

    Who Discovered This and How?

    Tavis Ormandy discovered this data leak in Cloudflare’s systems. He is a security researcher employed by Google’s Project Zero. Project Zero is a Google team who works on trying to find zero day (previously unknown) vulnerabilities.

    Tavis discovered the data leak while analyzing Google search results. He noticed data that appeared to be a raw memory dump and he and his colleagues took a closer look and discovered it was a data leak in Cloudflare’s servers that was leaking data between websites.

    Tavis is a well known researcher who has done ground breaking research in the computer security field over the past few years.

    Has This Problem Been Fixed by Cloudflare?

    The Cloudflare team have fixed the data leak on February 18th which was last Saturday. You can find a detailed technical post on Cloudflare’s blog describing what caused the leak and how it was fixed.

    According to Techcrunch, Cloudflare have not notified customers like Uber and OkCupid directly.

    Where Else Can I Read About This?

    The following are the most authoritative resources discussing this issue:

    How can I help?

    Please share this information with any other site owners you know to help them secure their websites. Specifically, if you know any WordPress site owners you should suggest that they invalidate their user sessions using the instructions above.

    As always I will be around to respond to any comments or questions you post below.

    The post Cloudflare Data Leak: How to Secure Your Site appeared first on Wordfence.