Picos City Council at the top of Google: how fraud directs websites to gambling.

Bets I 03.05.24

By: Magno José

Share:
The website of the Picos City Council, in Piauí, appeared in search results for David Luiz's goals.
The website of the Picos City Council, in Piauí, appeared in search results for David Luiz's goals (Image: Reproduction/ Felipe Neto – X – ex-Twitter)

The website of the Picos City Council in Piauí, and those of other official bodies, are appearing as supposed "best answer" for various random Google searches. Clicking on the links redirects users to gambling websites, with no connection to the original search, according to a report by Tilt UOL.

The phenomenon was highlighted by Felipe Neto in a post on X (formerly Twitter). After that, several people reported having gone through the same situation.

The Picos City Council is not the only one affected by the problem. The betting advertisements use various official websites of city halls and universities to promote themselves on Google.

The intrusion is carried out through a method known as defacement: the scammer uses a vulnerability to infiltrate the pages and use them to their advantage, inserting JavaScript code.

“This attack, called 'page defacement,' is a form of cyber vandalism. A hacker alters the appearance of a website, replacing the homepage or other publicly visible pages with their own messages or images,” commented Miller Augusto, a cybersecurity specialist at the Ivy Group.

According to a survey by AHT Security, more than 5.000 infected websites have been identified in Brazil alone.

Why .gov websites?

Emílio Simoni, a cybersecurity specialist at AHT Security, explains that most of the altered pages are .gov because these sites take longer to update and are therefore more vulnerable.

"Hackers look for vulnerable WordPress and plugins, as well as other more generic vulnerabilities on websites, where they can inject HTML code that creates this redirect," he explains.

The goal is usually to profit from affiliate campaigns—when the victim is redirected to a betting site, the access URL contains a code to inform the platform who was responsible for referring the user and to pay a commission.

How is the attack carried out?

Criminals use a set of techniques to identify the user-agent (every HTTP request made to a web server includes a field called "User-Agent" in the header).

"After this identification, which is able to understand whether the page is being read by a search engine or accessed by a user, the content is dynamically adapted using the PHP, Python, or Node.js languages," said Miller Augusto.

For the end user, the biggest annoyance is accessing the site and being redirected to another. But it's important not to interact with the page to avoid the risk of falling victim to other scams, says Simoni.

Searching for Gabigol's goals
Search for Gabigol's goals (Image: Reproduction)

"The malicious code inserted is loaded from external servers, with updates at any time, so the attacker can redirect users to betting sites to distribute phishing attacks, malware, or steal data," commented Emílio Simoni.

Why does Google display a different search result than what the page shows?

Offering different content to users is a practice called "cloaking," which violates the guidelines of Google and other search engines.

However, in this case, Google sees the page differently than it is displayed to the user. To do this, the hackers insert HTML code that prevents Google from reading the page in common browsers like Chrome, Safari, or Mozilla.

This means that Google's bot can only check what was hosted on the real website.

Since the information is on a government website, Google ranks it and considers it more relevant.

Browsers are able to read this code and provide you with the actual visual content: the betting sites.

“It’s a webpage that adapts to your Google search, becoming a true chameleon of digital queries, gaining strategic positions in search engines. After accessing this page, it either transforms completely or redirects to other external content,” reveals Miller Augusto.

How to protect yourself?

The best way to protect websites from this type of attack is to keep software and components up to date, according to AHT Security. In addition, it's important to use security plugins and services that identify vulnerabilities and infected websites.

To remove a website from Google search results in case of an attack, the website owner can use Google Search Console, a free service for webmasters managed by Google. It's important to note that this feature is only available for emergencies – as is the case here, since a public agency's website is redirecting users to a betting site that may contain malware.

However, Google itself issues a warning that the removal will be temporary. In other words, the website owner needs to adopt technical measures in the area of ​​search engine optimization so that the page can no longer be crawled or indexed by Google.

What does Google say?

In response to UOL, Google stated that it does not comment on "actions taken against specific sites or URLs, but when we identify violations of our policies against hacked spam, we take appropriate measures, which may include manual action."

Google also reported that, overall, the company's anti-spam system "blocks 40 billion spam pages every day. These systems help keep search 99% spam-free."

The company also stated that when it detects that websites may have been hacked, it notifies the owners so that they can ensure the security of the page.

UOL also tried to contact the Picos City Council, which was mentioned by some users on social media regarding the Google searches, but has not received a response so far.

 

BRLot - Online Luck - 728 x 90 1BRLot - Online Luck - 728 x 90

Share: