Highly trained commandos have carried out "terrorist" attacks against the aircraft carrier USS Kitty Hawk, U.S. Navy nuclear submarines and weapons storage sites, and even Air Force One, the president's airplane, over the last 2 1/2 years.

The intruders also took hostages, including an admiral kidnaped in Naples and 40 customers corraled in an ice cream store on a base in Japan.

These were mock attacks by U.S. commandos, part of a secret Navy unit known as the "Red Cell Team" established to test vulnerabilities of the service's far-flung bases.

Navy officials said they moved quickly to correct the security deficiencies uncovered by the commando teams. A spokesman said the unit's work is considered valuable by Navy leaders and was "certainly a factor" in an extensive reorganization of security ordered in June 1986 by then-Navy Secretary John F. Lehman Jr.

The Army and the Department of Energy (DOE) have units similar to the "Red Cell Team" dedicated to running vulnerability exercises, according to government officials. The Army team concentrates on testing security at nuclear weapons sites in Europe; the DOE team does the same here.

Congressional hearings last year disclosed, for example, that DOE's mock terrorists successfully made off with "significant quantities" of weapons-grade plutonium from the Savannah River plant in South Carolina and carried out "the successful theft of a plutonium bomb part" from the Pantex Corp. nuclear warhead assembly plant in Texas. The plant was shut and new security systems were installed before it was reopened.

Cmdr. Kendell M. Pease, a Navy spokesman, said he could not discuss details of the "Red Cell" units activities because they are classified. "It would be inappropriate for us to discuss any activities concerning counterterrorism," he said.

The team has come into public view, however, because of a civil lawsuit alleging some of its members were overzealous in an exercise last year when it infiltrated the Seal Beach Naval Weapons Station in California. A civilian security officer at the base is suing the government in federal court, claiming a team camera crew recorded him being stripped and beaten while acting as a "hostage" during the exercise.

Sources familiar with the Red Cell Team, known formally as the Naval Security Coordination Team, noted that "rules of engagement" are discussed with base commanders and security personnel before each exercise. Thus, for example, officials who are potential hostages are on notice they are targets. But they do not know when or how an attack might come.

The sources gave this account of some of the team's exercises:Norfolk: In 1985, the team first infiltrated the base and placed mock explosives on the roof of a command center where more than a dozen admirals work. Weeks later, the team returned, captured the base commanding officer's home and took hostages, and carried out mock attacks on planes and docked ships. New London, Conn.: A short time after the Norfolk exercise, the team found that security had not improved much at the Navy's nuclear submarine base close to the shipyard where peace activists with hammers had attacked a Trident ballistic missile submarine three years earlier. Red Cell team members got into the base and walked unchallenged aboard a nuclear attack submarine in daylight. Point Mugu, Calif.: This naval air station, home of the service's Pacific missile test center, is also where Air Force One lands when President Reagan vacations at his ranch. In an August 1985 exercise there, Air Force One was ruled ahead of time to be off limits.

However, the team was able to evade Navy security and park a truckload of 500-pound dummy bombs just outside the buffer zone around the president's plane. It was close enough that a detonation might have damaged the plane. Spokesmen for the Secret Service, Navy and Air Force, which guard the plane, declined to comment. Naples, Italy: In October 1985, the team kidnaped an admiral and his wife by forcing their car off the road after he had given a speech at a Navy club. The admiral was released and kidnaped again the next morning. Subic Bay, Philippines: A month later, the team missed capturing a Marine colonel. But the next day it used a native boat to ram the carrier Kitty Hawk as it steamed into the harbor at noon. Japan: During a month-long exercise at three bases early last year, the team captured a local ice cream store and used its hostages to test a base hospital's mass-casualty capabilities. In another incident, the unit hired a high-speed boat and outraced the harbor patrol to throw a dummy satchel charge on a nuclear submarine at the pier. Puerto Rico: Late last year, the team rented a plane to attack a Marine supply ship. But alert defenders "shot down" the intruders with a missile. Guam: Earlier this year, the team ran hostage-taking exercises on the Pacific island and also attacked its weapons storage site.

The team is now on a trip surveying security at other overseas bases, sources said.

The rules for running the team's exercises were tightened after the Seal Beach incident, Navy sources said, and the team's actions there are under investigation.

Several team members also are under investigation in a Navy probe of how their former unit, Seal Team Six -- the Navy's secret hostage rescue team -- has spent millions of dollars the past six years.

One former Seal Team Six member has been indicted in that investigation and two intelligence specialists assigned to the unit have pleaded guilty to stealing thousands of dollars in government funds.

Sources said the "Red Cell Team" was set up in 1984 in the office of An admiral was 'kidnaped' twice in two days.

the Navy's vice chief of staff for operations. At the time, the Navy was concerned about the increased risk from terrorist attacks shown by the suicide bombing of the Marine headquarters in Beirut in October 1983, which killed 241 servicemen.

Since then, the team's size has increased, sources said, and it now numbers about 30 officers and enlisted men. Teams of private contractors are hired to videotape the exercises and write up "lessons learned" reports to help bases tighten security.

Part of the reason the unit's existence was classified from the start, sources said, was because it is easier to fund so-called "black" programs.

Some Navy leaders feel the team's activities should be declassified, sources said, so lessons can be distributed more freely to Navy personnel worldwide.

As part of its strengthened security measures, the Navy has deployed units of two specially trained Marine security battalions in recent months to bases that were targets of "Red Cell Team" exercises.

One source familiar with the team's work questioned whether the Navy's reorganized security effort was a "Band-Aid approach." A longer-range solution, he said, would include setting up a career security branch in the Navy, as the Army and Air Force have done.