Defense Secretary Ash Carter revealed on Thursday that the Department of Defense suffered a cybersecurity breach after Russian hackers infiltrated an unclassified defense computer network earlier this year.

In remarks at Stanford University, Carter said the DOD was able to identify the intruders within 24 hours and kicked them out, but added,"I still worry about what we don't know because this was only one attack."

A Pentagon official told Fox News that the Russian hacking of the Department of Defense was “totally separate” from recent hacks at the White House and State Department earlier this month and in March, respectively.

The revelation comes as a new Pentagon cybersecurity strategy, laid out for the first time publicly, will allow the U. S. military to use cyberwarfare as an option in conflicts with enemies.

The 33-page strategy says the Defense Department "should be able to use cyber operations to disrupt an adversary's command and control networks, military-related critical infrastructure and weapons capabilities."

Carter, who was sworn in last February, said one way the department is responding is to be more transparent about cybersecurity.

"I think it will be useful to us for the world to know that, first of all, we're going to protect ourselves, we're going to defend ourselves," he told reporters traveling with him to California. He added that the new strategy is "more clear and more specific about everything, including (U.S.) offense."

Cyberattacks against U.S. government and industry have grown increasingly more severe and sophisticated. The new strategy says, "During heightened tensions or outright hostilities, DOD must be able to provide the president with a wide range of options for managing conflict escalation."

It adds that, as part of those options, the military must have cyber capabilities that can "achieve key security objectives with precision, and to minimize loss of life and destruction of property."

The announcements come on the heels of President Obama's decision earlier this month to authorize financial sanctions against malicious overseas hackers or companies that use cyberespionage to steal U.S. trade secrets. Those companies could include state-owned corporations in Russia, China or other countries that have long been named as cyber-adversaries.

The Associated Press contributed to this report