In this day and age of interconnected cloud services and distributed content delivery networks (CDNs), it is important for both CDN service providers and security professionals alike to recognize and understand the risks that these systems can introduce within an modern enterprise. For organizations within both public and private sectors that leverage CDN platforms to dynamically deliver web content, it is important that the content is also routinely monitored. Otherwise, malicious third-party content can be loaded into a target organization’s website without their knowledge, delivering untold risks to unwitting visitors. ## Afghan Government “Watering Hole” [The ThreatConnect Intelligence Research Team (TCIRT) recently observed a targeted cross-site scripting](http://www.threatconnect.com/why_threat_connect/threatconnect_intelligence_research_team) (XSS) “drive-by” attack that leveraged a single content delivery network resource to distribute a malicious Java applet via nearly all of the major official Government of Afghanistan websites. The compromised CDN resource in question is a JavaScript file hosted at [http:]//cdn.afghanistan[.]af/scripts/gop-script.js The domain cdn.afghanistan[.]af is a legitimate CDN site used by the Afghan Ministry of Communications and IT (MCIT) to host web content that is displayed and used on many official gov.af websites. ----- The javascript URL ([http:]//cdn.afghanistan[.]af/scripts/gop-script.js) is called from numerous official Afghan Government websites, including the following: [http:]//canberra.afghanistan[.]af/en (Afghan Embassy in Canberra, Australia) [http:]//herat.gov[.]af/fa (Herat Province Regional Government) [http:]//mfa.gov[.]af/en (Ministry of Foreign Affairs) [http:]//moci.gov[.]af/en (Ministry of Commerce and Industries) [http:]//moe.gov[.]af/en (Ministry of Education) [http:]//mof.gov[.]af/en (Ministry of Finance) [http:]//moj.gov[.]af/fa (Ministry of Justice) [http:]//mowa.gov[.]af/fa (Ministry of Women’s Affairs) [http:]//oaacoms.gov[.]af/fa (Office of Administrative Affairs and Council of Ministers) It is likely that this javascript URL itself is normally legitimate, but the attackers obtained access to the file and prepended the following malicious JavaScript functions to the beginning of the script: _document.write("