MacSync's iCloud Calendar trick is pretty cool. One MacSync downloader analyzed ...
Stephan Berger @malmoeb@infosec.exchange
MacSync's iCloud Calendar trick is pretty cool. One MacSync downloader analyzed by Securelist contains a URL such as: https://caldav.icloud[.]com/published/...
It retrieves a public .ics calendar, creates an anonymous pipe, launches zsh -s, sets the pipe as stdin, and feeds the calendar into it line by line. Most of the iCalendar content is obviously not valid shell syntax, so zsh simply produces errors as it works through it. Eventually, however, it reaches attacker-controlled shell commands embedded after the DESCRIPTION: field, and executes them.
Those commands then download the next stage, again from iCloud. So, effectively, a public iCloud Calendar is being used as a trusted-hosted shell-script carrier.
icloud[.]com is already listed by the Living Off Trusted Sites (LOTS) Project for malicious downloads and exfiltration, but not, as far as I can see, for this particular technique. Definitely something to watch for.