Web server hackers install rogue Apache modules and SSH backdoors, researchers say

The original SSH binary files get replaced with credential-stealing versions, researchers warn

A group of hackers that are infecting Web servers with rogue Apache modules are also backdooring their Secure Shell (SSH) services in order to steal login credentials from administrators and users.

The hackers are replacing all of the SSH binary files on the compromised servers with backdoored versions that are designed to send the hostname, username and password for incoming and outgoing SSH connections to attacker-controlled servers, security researchers from Web security firm Sucuri said Wednesday in a blog post.

"I saw some SSHD [SSH daemon] backdoors in the past in very small scale or part of public rootkits, but not like this one," Daniel Cid, Sucuri's chief technology officer, said Thursday via email. "They do not only modify the ssh daemon, but every ssh binary (ssh, ssh-agent, sshd) and their main goal is to steal passwords."

This allows the attackers to regain control of a compromised server if the passwords get changed or to compromise additional servers if users access them from the compromised server via SSH.

In many cases investigated by Sucuri, the server administrator had removed the rogue Apache module and changed his password, but the infection re-appeared a few days later, Cid said.

"It's a clever trick to get new credentials once you have root access," Denis Sinegubko, the creator of the Unkmask Parasites website security scanner, said Wednesday via email. This might also suggest that the attackers gained initial access to those servers by guessing, brute forcing or stealing valid credentials and not by exploiting some security vulnerability, he said.

Sinegubko documented a wave of incidents that involved attackers obtaining administrator (root) access to Web servers and installing rogue Apache modules during August and September 2012. The purpose of the modules was to inject rogue iframes into legitimate websites hosted on those servers.

This website infection method continued to be used during the following months and the attacks were linked to a cybercriminal toolkit called DarkLeech that was being sold on hacker forums.

It's not clear whether the SSH backdoor is actually a new feature of DarkLeech. The backdoor was not part of an early version of the toolkit analyzed by Sucuri researchers, but it keeps changing so it's hard to know for sure, Cid said.

It's hard to say with certainty how the servers with the SSH backdoor had been compromised in the first place, because in most cases the server logs were gone by the time Sucuri had the chance to analyze them, Cid said. However, the infection was often found on servers that had weak root passwords or were running outdated versions of Plesk -- a Web-hosting control panel.

On servers that use the RPM Package Manager administrators should run the "rpm -Va" command in order to check the integrity of their software packages, Cid said. "If you see any change to the SSH binaries, it is a red flag," he said.

Simply checking when the files were last modified using the "ls -la" command won't reveal anything suspicious because the attackers change the mtime (last modification time) timestamps of the backdoor files to match those of the original files, Cid said.

If this SSH backdoor is found on a server, it's better to completely reinstall it from scratch because you never know what else might be there, the researcher said.

Join the Good Gear Guide newsletter!

Error: Please check your email address.

Tags intrusionsecurityAccess control and authenticationSucurisoftwareWeb serversspywaremalware

Our Back to Business guide highlights the best products for you to boost your productivity at home, on the road, at the office, or in the classroom.

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Lucian Constantin

IDG News Service
Show Comments

Essentials

Microsoft L5V-00027 Sculpt Ergonomic Keyboard Desktop

Learn more >

Lexar® JumpDrive® S57 USB 3.0 flash drive

Learn more >

Mobile

Lexar® JumpDrive® S45 USB 3.0 flash drive 

Learn more >

Exec

HD Pan/Tilt Wi-Fi Camera with Night Vision NC450

Learn more >

Lexar® JumpDrive® C20c USB Type-C flash drive 

Learn more >

Lexar® Professional 1800x microSDHC™/microSDXC™ UHS-II cards 

Learn more >

Audio-Technica ATH-ANC70 Noise Cancelling Headphones

Learn more >

Budget

Back To Business Guide

Click for more ›

Most Popular Reviews

Latest News Articles

Resources

PCW Evaluation Team

Azadeh Williams

HP OfficeJet Pro 8730

A smarter way to print for busy small business owners, combining speedy printing with scanning and copying, making it easier to produce high quality documents and images at a touch of a button.

Andrew Grant

HP OfficeJet Pro 8730

I've had a multifunction printer in the office going on 10 years now. It was a neat bit of kit back in the day -- print, copy, scan, fax -- when printing over WiFi felt a bit like magic. It’s seen better days though and an upgrade’s well overdue. This HP OfficeJet Pro 8730 looks like it ticks all the same boxes: print, copy, scan, and fax. (Really? Does anyone fax anything any more? I guess it's good to know the facility’s there, just in case.) Printing over WiFi is more-or- less standard these days.

Ed Dawson

HP OfficeJet Pro 8730

As a freelance writer who is always on the go, I like my technology to be both efficient and effective so I can do my job well. The HP OfficeJet Pro 8730 Inkjet Printer ticks all the boxes in terms of form factor, performance and user interface.

Michael Hargreaves

Windows 10 for Business / Dell XPS 13

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Aysha Strobbe

Windows 10 / HP Spectre x360

Ultimately, I think the Windows 10 environment is excellent for me as it caters for so many different uses. The inclusion of the Xbox app is also great for when you need some downtime too!

Mark Escubio

Windows 10 / Lenovo Yoga 910

For me, the Xbox Play Anywhere is a great new feature as it allows you to play your current Xbox games with higher resolutions and better graphics without forking out extra cash for another copy. Although available titles are still scarce, but I’m sure it will grow in time.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?