Part of the Application security glossary:

The pharma hack is an exploit that takes advantage of vulnerabilities in WordPress or Joomla documents, causing search engines, notably the one hosted by Google, to return ads for pharmaceutical products along with legitimate listings. The hack can be difficult to detect because it does not affect the displayed pages of the compromised Web site or blog.

The purpose of the pharma hack is to make pharmaceutical sales sites they are promoting appear higher in Google results than they otherwise would. The Google search engine ranks the list of hits for a given Web site according to (among other factors) the number of external sites that link to it. By inserting the rogue code into an unsuspecting victim's site, the hack in effect links that site to the cracker's site. If done on a large enough scale, this tactic can result in the cracker's Web site showing up near the tops of various hit lists resulting from keyword-based searches.

In WordPress, the pharma hack comprises files in the plugins folder that contain malicious code that runs other, disguised code in the database. The code is disguised by reversing the order of the strings, thereby making the problem difficult to detect as a hack. In order for the hack to work, the malicious files must exist in the plugins folder. Once activated, the hack pings Google to find out how many links exist for a particular listed Web page. The more links a page has, the more "desirable" a target it makes, and the greater is the likelihood that it will be hacked.

In order to find out if a given site has been compromised by the pharma hack, experts recommend entering a specific character sequence into the Google search engine. Type "site" followed by a colon, then the domain name followed by a space, then "Viagra" and finally hit the search button. If the site has been affected, unusual descriptions linked to actual pages or blog posts will appear. The modified title tag and links can only be seen in search results, not in the hacked site itself.

Victims of the pharma hack have reported decreased traffic to their sites and, in some cases, removal of their sites by Google from search result lists. Because Web site owners cannot readily see when they have been pharma hacked, the online reputation of a legitimate company or individual can be seriously damaged before the rogue code can be removed. Once discovered, the code can be taken out of the affected files, although the process can take considerable time and effort.

This was last updated in March 2013
Contributor(s): Stan Gibilisco
Posted by: Margaret Rouse

Related Terms

Definitions

  • Web application firewall (WAF)

    - A Web application firewall (WAF) is a firewall that monitors, filters or blocks the HTTP traffic to and from a Web application. (SearchSecurity.com)

  • shadow app

    - Shadow apps are software-as-a-service (SaaS) applications that are used on business networks but are not supplied by the IT department or even visible to them. Shadow apps are often collaborative ... (WhatIs.com)

  • TailsOS

    - TailsOS is a LiveDistro-based operating system that is configured to run from removable storage and to leave no information stored on the computer after the user’s session. A LiveDistro is a distr... (WhatIs.com)

Glossaries

  • Application security

    - Terms related to application security, including procedural definitions for preventing software vulnerabilities and words and phrases about secure code development.

  • Internet applications

    - This WhatIs.com glossary contains terms related to Internet applications, including definitions about Software as a Service (SaaS) delivery models and words and phrases about web sites, e-commerce ...

Ask a Question About pharma hackPowered by ITKnowledgeExchange.com

Get answers from your peers on your most technical challenges

Tech TalkComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.