Our company is moving to the AWS cloud recently, and AWS relies a lot on the SSM agent, it is also opensource. ( https://github.com/aws/amazon-ssm-agent )
From my understanding, this agent is not signed when you deploy it on your machine. Cloudwatch / runcommand depend on this utility on the host.
If an attacker compiles his own SSM agent, and ping back the AWS server as normal. It seems like he can fly under the radar and do evil stuff without triggering any alarms.
Attack scenario :
- Gain access to the box,
- kill the original agent,
- start my malicious agent,
- start my bitcoin mining script.
Are there any ways to protect the agent?