Defense Secretary Caspar W. Weinberger said yesterday that the Soviets tried to steal a secret camera used in spy satellites but Customs Service agents thwarted the attempt.

However, U.S. sources, who asked not to be identified, said the device mentioned by Weinberger was at least 12 years old and has no current military application.

In a speech to the American League for Exports and Assistance, Weinberger mentioned that the device was intercepted by Customs agents at the Los Angeles airport before it left the country, and the incident was typical of the Soviets' use of legal and illegal methods "to raid our technological base."

Said Weinberger: "They tried to steal a multispectral scanner, which is indispensable to military air and satellite reconnaissance."

The multispectral scanner in question is one the Soviet Union purchased last spring from the Land Resources Management Co. of Anaheim, Calif. The device was placed on a private plane at Los Angeles airport and was consigned for shipment to Mexico City, where it was to be shipped to the Soviet Union.

Customs agents boarded the plane, seized the device and substituted sandbags for the instrument.

It was all part of a six-month-old operation called Exodus by the Customs Service to stop the illegal export of high technology to the Soviet Union. Though Weinberger declined to give details about Exodus in his speech, Customs has put out news releases describing it and even mentioning the seizure of the multispectral scanner in Los Angeles.

Multispectral scanners are cameras that use large mirrors to gather light in the visible and infrared portions of the spectrum to re-create geological maps of the earth; they help geologists find minerals and agriculturists spot crop diseases.

The device sold to the Soviets by Land Resources had optics that could resolve images on the ground down to about half a kilometer in size if flown in orbit on a satellite.

Unclassified scanners currently flown by the U.S. space agency resolve details on the earth 10 to 100 times better than the device sold to the Soviet Union, seized by Customs and publicized yesterday by Weinberger.

"We sold a multispectral scanner to the Chinese during the Carter administration that was better than the one the Russians wanted," said one source who asked not to be identified. "I don't understand what all the fuss is about."