For the past four months the New York Times has been under attack by Chinese hackers, the newspaper says.

The hackers were able to "infiltrate its computer systems" and get passwords from reporters and other employees. The Times says it hired an outside firm to study the hacks and block them for good. It also says that no customer information was leaked by these attacks.

The Times thinks the motivation was an investigation into the relatives of China's prime minister, Wen Jiabao, and how their business dealings turned them into billionaires.

The hackers were tricky about hiding their tracks. They used a technique called "spearphishing" where they sent emails laced with malicious links. Once opened, malware was secretly downloaded onto the recipients computers. The email was routed through U.S. universities to disguise their origin. These were the same U.S. universities used to disguise Chinese hacker attacks on the U.S. military, the Times says.

Chinese officials deny that the government or military were involved in the attacks.

These type of super targeted attacks, where hackers work to break into a specific company, are particularly hard to defend against. The industry calls them "advanced persistent threats." But there are some U.S. security startups with technology that can thwart them including FireEye, which earlier this month landed a $50 million round of financing and a big name new CEO, Dave DeWalt.

Don't miss: The 15 Most Important Security Startups Of 2013