Tens of AccessPress WordPress themes compromised as part of a supply chain attack

Wordpress Wordpress

Backdoors planted in multiple WordPress themes and plugins

In a classic supply chain attack, threat actors planted a backdoor in dozens of WordPress plugins and themes hosted on a developer’s website. The attack took place in the first half of September 2021, the attackers compromised 40 themes and 53 plugins belonging to AccessPress Themes. The issue has been tracked as CVE-2021-24867.

The security researchers from JetPack discovered the attack while investigating a compromised site using a theme by AccessPress Themes. On further investigation, the experts discovered that all the themes and most plugins from the company available on their own website were backdoored. The same components available on the WordPress.org directory appeared clean.

“The infected extensions contained a dropper for a webshell that gives the attackers full access to the infected sites. The dropper is located in the file inital.php located in the main plugin or theme directory. When run it installs a cookie based webshell in wp-includes/vars.php. The shell is installed as a function just in front of the wp_is_mobile() function with the name of wp_is_mobile_fix(). This is presumably to not arouse suspicion to anybody casually scrolling through the vars.php file.” reads the advisory published by JetPack.

The researchers also spotted another variant of the backdoor directly embedded in the theme/plugin’s functions.php file. This variant is likely an older version of the malware an uses the same mechanism with piecing together the payload from eight cookies.

Below is the list of themes and versions compromised by the attack. AccessPress Themes has yet to provide updates for any of these components and they have been removed from the WordPress.org repository.

Theme slugVersionaccessbuddy1.0.0accesspress-basic3.2.1accesspress-lite2.92accesspress-mag2.6.5accesspress-parallax4.5accesspress-ray1.19.5accesspress-root2.5accesspress-staple1.9.1accesspress-store2.4.9agency-lite1.1.6aplite1.0.6bingle1.0.4bloger1.2.6construction-lite1.2.5doko1.0.27enlighten1.3.5fashstore1.2.1fotography2.4.0gaga-corp1.0.8gaga-lite1.4.2one-paze2.2.8parallax-blog3.1.1574941215parallaxsome1.3.6punte1.1.2revolve1.3.1ripple1.2.0scrollme2.1.0sportsmag1.2.1storevilla1.4.1swing-lite1.1.9the-launcher1.3.2the-monday1.4.1uncode-lite1.3.1unicon-lite1.2.6vmag1.2.7vmagazine-lite1.3.5vmagazine-news1.0.5zigcy-baby1.0.6zigcy-cosmetics1.0.5zigcy-lite2.0.9

Researchers from security firm Sucuri published a separate analysis the revealed that some of the infected websites had spam payloads dating back almost three years. This circumstance suggests that threat actors behind the campaign were likely selling access to the websites to other cyber cybercrime groups.

“we found quite a few compromised sites that lined up with the same timeline for this hack. Some of the infected websites we found utilising this backdoor had old recycled spam payloads that we have seen on other websites as far back as three years.” states Sucuri. “If I had to guess, whoever was behind the initial compromise of AccessPress were likely selling access to backdoored websites on the black market to spammers who recycled the same old malware that they always use on websites.”

In order to check if a website has been affected by this attack, administrators can perform the following actions recommended by Sucuri experts:

Check your wp-includes/vars.php file around lines 146-158. If you see a “wp_is_mobile_fix” function there with some obfuscated code, you’ve been compromisedYou can also query your file system for “wp_is_mobile_fix” or “wp-theme-connect” to see if there are any affected filesThe post Tens of AccessPress WordPress themes compromised as part of a supply chain attack appeared first on Security Affairs.