Rice made her remarks while being questioned by the US Senate foreign relations committee at her first confirmation hearing.
"We must remain united in insisting that Iran and North Korea abandon their nuclear weapons ambitions, and choose instead the path of peace," Rice said.
Under questioning, she could do no more than express hope that Washington's policies of relying on European mediation with Tehran and six-party talks with Pyongyang would bear fruit.
Rice reacted cautiously to reports that the North Koreans were ready to rejoin negotiations with China, Japan, Russia, South Korea and the US, which collapsed last year.
"We've heard nothing really from North Korea," the outgoing national security adviser said. "And I hope that they will actually act because we found that their words are not always completely reliable."
North Korea had been pressing for direct discussions with the Americans. But Rice told senators that the administration of President George Bush was committed to a multilateral approach.
"Iran cannot be a legitimate participant in the international system, international politics and pursue a nuclear weapon"
Condoleezza Rice, US secretary of state designate
"Our goal now has to be to make the six-party mechanism work for dealing with the North Korean nuclear programme and then hopefully for dealing with the broader problem of managing this dangerous regime," she said.
Rice said the US "still had room for a diplomatic solution" to the nuclear crisis.
She said the six-party talks enabled all of Pyongyang's neighbours to "work together on a serious security problem".
Strategy on Iran
Concerning Iran, which has been under US sanctions since 1979, Rice acknowledged that Washington had little leverage but was working with Britain, France and Germany to develop a strategy to hold Tehran accountable.
"I would take, as a first step, that if the Iranians do not show that they're going to live up to their international obligations that we refer them to the Security Council," she said, adding that "at some point that may be exactly where we need to go".
What Washington is saying is, "Iran has to be held to account for its international obligations", she added.
The US goal "is to have a regime in Iran that is responsive to concerns that we have about Iran's policies, which are 180 degrees to our own interest at this point", she said.
"That means the regime would have to deal with its nuclear weapons obligations, deal with the fact that there are al-Qaida leaders who have been there, deal with the fact that they're supporting Hizb Allah and terrorism and Palestinian rejectionists against the Middle East peace process," she said.
Concerning Tehran's nuclear aspirations, Rice said: "The world is sending a message to Iran that Iran cannot be a legitimate participant in the international system, international politics and pursue a nuclear weapon."