Come 'on guys...I am not even in the military nor american....google is yr friend...
"..
The Army Public Affairs regulation states: Ground or aerial photographs, sketches, or graphic representations of classified military equipment or installations designated as restricted areas is punishable by law (18 USC 795). Reproducing, publishing, or selling this type of material is also punishable by law unless the photograph, sketch, or graphic representation indicates it has been reviewed and cleared for release by proper authority. The proper authority is generally the Public Affairs office.
If a guard or military police officer thinks you have photographed something classified or sensitive in nature, your film or digital card may be confiscated to check for inadvertent classified exposures. Items are classified if the general knowledge of them or how they work could cause harm to the United States in the hands of someone who wants to harm the nation or its citizens. Also, never shoot photographs through a fence or take photos of the guards or their buildings.
When in doubt, contact the Public Affairs Office. Access to military installations is usually granted, but all members of your group over the age of 16 must have a form of photo identification with them."
https://www.law.cornell.edu/uscode/text/18/795
"...
a)
Whenever, in the interests of national defense, the President defines certain vital military and naval installations or equipment as requiring protection against the general dissemination of information relative thereto, it shall be unlawful to make any photograph, sketch, picture, drawing, map, or graphical representation of such vital military and naval installations or equipment without first obtaining permission of the commanding officer of the military or naval post, camp, or station, or naval vessels, military and naval aircraft, and any separate military or naval command concerned, or higher authority, and promptly submitting the product obtained to such commanding officer or higher authority for censorship or such other action as he may deem necessary.
(b)
Whoever violates this section shall be fined under this title or imprisoned not more than one year, or both.
(June 25, 1948, ch. 645,
62 Stat. 737;
Pub. L. 103–322, title XXXIII, § 330016(1)(H), Sept. 13, 1994,
108 Stat. 2147.)