The devices had DDoS malware programs installed on them—usually more than one—including some that reported back to an IRC (Internet Relay Chat) network and channel called AnonOps, the researchers said in a report published Tuesday.

This IRC network is used as a base of operations by Anonymous, a group that over the past seven years has launched politically motivated attacks against the websites of many private companies, government agencies and other organizations around the world.

The hacktivist group has argued in the past that flooding a website with requests to prevent others from accessing it is a legitimate form of protest. While that’s debatable, abusing the devices and bandwidth of unsuspecting people sounds like more than just electronic civil disobedience.

The Incapsula researchers don’t believe that the routers were hacked through a vulnerability in their firmware, but because they had been deployed in an insecure manner: with their management interfaces exposed to the Internet via SSH and HTTP using default credentials.

In fact, they found shell scripts running on the compromised devices that were designed to scan the Internet for other routers that could be accessed over SSH with default usernames and passwords.

“Facilitating the infiltration, all of these under-secured routers are clustered in the IP [Internet Protocol] neighborhoods of specific ISPs that provide them in bulk to end-users,” the researchers said. “For perpetrators, this is like shooting fish in a barrel, which makes each of the scans that much more effective.”

The problem of ISPs distributing insecure routers to their customers is a widespread one that hackers have exploited time and time again over the years.

Anonymous is not the only group of hackers to use compromised routers. Cybersecurity journalist Brian Krebs reported in January that another group called Lizard Squad had set up a DDoS-for-hire service using hacked home routers. Lizard Squad has taken responsibility for DDoS attacks against Sony’s PlayStation Network, Microsoft’s Xbox Live service and other high profile websites.

The botnet made up of Ubiquiti devices is most likely not the one used in January by Lizard Squad for its DDoS service, because they are powered by different malware programs, the Incapsula researchers said. However, days after Incapsula observed a surge in attacks from the Ubiquiti botnet in April, Lizard Squad hinted on Twitter that it has a more powerful botnet.

It’s possible, and even likely, that the hacked Ubiquiti routers are being used by multiple groups. This is supported by the presence of multiple DDoS malware programs on them.

Incapsula detected 40,269 different IP addresses from 1,600 ISPs in 109 countries associated with the botnet. The largest concentrations of infected devices are in Thailand (64 percent), Brazil (21 percent), the U.S. (4 percent) and India (3 percent).

The company also identified 60 servers used by hackers to control the routers, the majority of them in China and the U.S.

Users should make sure that their routers do not expose management interfaces over HTTP or SSH to the Internet. A tool on yougetsignal.com can be used to scan a router’s IP for open ports.

Users should also make sure that they change the default login credentials for their routers, the Incapsula researchers said. Ubiquiti provides information on how to do this in the user guides for its airOS devices.