Botnets have become a major threat to computer, communication and control networks in civil infrastructures and online social networks (OSNs). This project proposes to develop scalable techniques to detect botnets and their malicious activity by analyzing their specific social communication contexts. We will analyze DNS traffic because DNS is used as a means for bots to flexibly contact their C&C servers. This analysis is expected to reveal interesting properties of the botnet communication channels and enable fast detection of botnets. Second, we propose to analyze online social networks (e.g., Facebook, Twitter) to detect coordinated malicious activities. We will design new information-theoretic, graph-theoretic, and machine learning based approaches to recognize coordinated malicious online user profiles, communication, and relationships. We will detect botnet related C&C channels hosted in OSN sites, malicious spamming activities in OSNs, and suspicious user accounts. Broad Impact: The developed tools will help detect malicious network activity, improving network security. The planned collaboration with QTEL will lead to more secure networks in Qatar. Students will be trained in critical skills leading to the development of human capital in Qatar. Integration of research into curriculum will lead to improving education quality. We expect to transfer technology to industry, widely disseminate developed knowledge, and contribute to the networking industry in Qatar.