API2Channel: Automated C2 Feasibility Assessment of Cloud-Based and Public Legitimate Services
Public APIs of cloud-based and public legitimate services (CPLS) can be abused to establish covert command-and-control (C2) channels. Existing studies mainly construct C2 implementations for selected services or analyze observed abuse, but lack an automated method for assessing communication feasibility before abuse is observed. The central challenge is that individual API functions, such as reading and writing data, may not compose into a complete bidirectional channel. We present API2Channel, a system that assesses C2 communication feasibility from public API specifications and official documentation. It analyzes resource relationships and API operations to determine whether a controller and an agent can exchange tasks and results. For services predicted feasible, it generates communication code and tests it through simulated API interactions and execution-guided repair. We evaluate 24 CPLS. API2Channel achieves 91.67% accuracy, compared with 66.67% and 83.33% for two large language model (LLM) baselines. API2Channel generated implementations for all 14 services it classified as feasible. In real-service tests, 12 implementations passed the core functional tests and platform controls blocked the other two. These results show how structured API analysis, automated construction, and execution-based validation can assess potential C2 abuse and test the resulting predictions on real services.
Authors
- Weifeng Yuan
- Feng Dong
- Haoyu Wang
- Hongqi Chen
- Chen Jun
Institutions
- Huazhong University of Science and Technology (CN)
Publication Details
- Journal
- Research Square
- Published
- 2026-11-27
- DOI
- https://doi.org/10.21203/rs.3.rs-11710567/v1
- Primary Topic
- Advanced Malware Detection Techniques
- Type
- preprint