Hackers had attempted to bring down government websites on Tuesday - the day they urged Singaporeans to mount a protest against the Government's new website licensing rules.
The Infocomm Development Authority (IDA) disclosed this yesterday, after a page on the Istana website was hacked at 12.20am yesterday, an hour after a similar attack on a webpage of the Prime Minister's Office (PMO) site.
Yesterday's intrusions - the first since hackers threatened to hit out at Singapore's infrastructure last week - did not compromise the integrity of the sites in any way, said IDA assistant chief executive James Kang at a media conference.
But in the Tuesday attempt, many government websites - including transactional ones - encountered unusual "spikes" in traffic throughout the day as hackers sought to bring them down through "distributed denial of service attacks (DDoS)", said Mr Kang.
DDoS is a technique used to take down a site by overwhelming it with huge amounts of Internet traffic. But they were unsuccessful and the only mischief they managed was with the affected pages yesterday.
"Data was not compromised, the site was not down and users were not affected," said Mr Kang.
The hacker, or hackers, used a technique called "cross site scripting (XSS)" and exploited a vulnerability in the embedded Google search bar which helps users to search for items within the site.
The attacks were designed to make the webpages look like the hackers had gained access into the sites when they had merely overlaid images over the webpages.
"We detected the exploits within 15 minutes and disabled the search bars within the hour," added Mr Kang.
Separately, security software firm Trend Micro said its analysis showed the PMO site "remains intact, with visits unaffected".
The image on PMO's page carried the mocking headline: "It's great to be Singaporean today" next to the Anonymous hacker collective's trademark Guy Fawkes mask. Also on the page was the message: "ANONYMOUS SG WAS HERE BIATCH".
The hacked page on the Istana website had a picture of an old woman making an obscene sign.
The IDA confirmed that these were the images seen by users of the affected webpages. Their screengrabs have since been circulating online.
A patch was also being applied across government websites to secure them.
"The Singapore Government will continue to be on heightened vigilance," said Mr Kang, adding that it includes the checking and fixing of vulnerabilities. While this is in progress, access to government websites may experience intermittent problems, he added.
The CPF Board said last night its website and e-services are not available, from 9pm yesterday to 8am on Monday, as it is carrying out preventive maintenance to fortify them. Those who need urgent help can visit the service centres at Bishan, Jurong, Tampines and Woodlands during office hours.
The hackings came after Prime Minister Lee Hsien Loong issued a warning to hackers on Wednesday, saying the authorities will "spare no effort" to track down those who threaten to attack the country's computer networks and bring them to justice.
It was his first comment since a person, claiming to be from Anonymous, threatened in a YouTube video last Tuesday to hit out at Singapore's infrastructure to protest against new licensing rules for news websites.