After some trial runs, the Department of Defense is now regularly sending teams of Special Forces troops (and other Special Operations types like SEALs and Delta Force) to perform espionage missions in foreign countries. The U.S. Army Special Forces are uniquely qualified for this kind of work, as they regularly study foreign cultures, know foreign languages, and have often already traveled to these countries on Special Forces business. While the CIA was shrinking it's force of field agents before 911, the Special Forces maintained their skills and numbers. The CIA has long hired retired Special Forces troops (or anyone who got out before retirement) as field agents. After September 11, 2001, the CIA put that recruitment effort into high gear, especially for Special Forces troopers who knew Arabic or languages used in Afghanistan. But many of these men returned to work for SOCOM instead.
In the past, the CIA has sometimes used Special Forces troops to help out with espionage efforts, so the SOCOM operators are not unfamiliar with this kind of work. Initially, the Special Forces were operating, as they have in the past, outside control of the local American embassy. This caused some problems with the State Department, when the presence of the Special Forces was discovered. The Special Forces, apparently, kept their presence secret from everyone. But now, the SOCOM agents operate like the CIA and FBI ones, with the knowledge of the local American ambassador, and usually out of the embassy.
There have been some complaints, from politicians and pundits, about the SOCOM espionage efforts. But these criticisms are misplaced, for SOCOM operators have long done this sort of thing, and are regularly trained for it. With the increase in counter-terrorism work, it's only natural that SOCOM is putting more effort into intelligence work. The official title of these operators are Military Liaison Element (MLE), and the number out there is, of course, a secret.