(This Dec. 5 story corrects first paragraph to clarify alleged timing of malware installation)

FILE PHOTO: Facebook logos are seen on a screen in this picture illustration taken December 2, 2019. REUTERS/Johanna Geron/Illustration

(Reuters) - Facebook Inc on Thursday sued a Hong Kong company that it said used malware to bait people into clicking on celebrities’ photos and bogus advertising links, so it could run ads for counterfeit goods, diet pills and male enhancement supplements.

The social media company accused ILikeAd Media International Co software developer Chen Xiao Cong and marketer Huang Tao of using improper “celeb bait” and “cloaking” practices since at least 2016.

Facebook said this enabled the defendants to hijack users’ ad accounts, known as “account take over fraud,” violating its terms of service and advertising policies.

None of the defendants could immediately be reached for comment. The complaint filed in the federal court in San Francisco seeks unspecified damages and a Facebook ban.

Facebook said this kind of lawsuit is rare, and that it has since April notified hundreds of thousands of users that their accounts may have been compromised.

The Menlo Park, California-based company said it has also issued more than $4 million in refunds to customers whose accounts were used by ILikeAd to run unauthorized ads.

“Cloaking” involves disguising the content of a link by displaying one version of that content to Facebook and another version to users.

“Creating real world consequences for those who deceive users and engage in cloaking schemes is important in maintaining the integrity,” Jessica Romero, Facebook’s director of platform enforcement and litigation, said in a statement.

According to the complaint, ILikeAd promoted itself as a “one-stop comprehensive solution to advertisers” hoping to market their wares on Facebook.

The case is Facebook Inc v ILikeAd International Co et al, U.S. District Court, Northern District of California, No. 19-07971.