Malware

Threat actors are using the Tox P2P messenger as C2 server

Threat actors are using the Tox peer-to-peer instant messaging service as a command-and-control server, Uptycs researchers reported.

Tox is a peer-to-peer serverless instant messaging services that uses NaCl for encryption and decryption.

Uptycs researchers reported that threat actors have started using the Tox peer-to-peer instant messaging service as a command-and-control server. Tox has been used in the last months by threat actors as a communication channel between ransomware gangs and their victims.

The researchers recently discovered an ELF sample that acts as a bot and can run scripts on the victim machine using the Tox protocol.

The binary is written in C and has only statically linked the c-toxcore library. 

The shell_script variable analyzed by the experts kills certain programs that are known to infect linux servers and deletes the crontab, which is often used by malicious code to maintain persistence. A function called start_routine1 opens a file with a random filename in /var/tmp/ and dumps the contents of shell_script in there and later executes it.

Experts reported that the dropped shell script contains commands to kill processes associated with cryptominer.

The pthread_create in the main function also called the rstart_routine2 function which sends the output of every command over UDP to the Tox recipient. The function could execute multiple commands on the machine, including nproc, whoami, and machine-id.

The main function also includes a set of functions to set up the P2P instant messaging service on the victim’s machine, such as tox_new, tox_self_set_name, and tox_self_set_status_message.

“While the discussed sample does not do anything explicitly malicious, we feel that it might be a component of a coinminer campaign. We are observing it for the first time where Tox protocol is used to run scripts onto the machine.” concludes the report. “We have seen attackers using Tox as a communication mechanism in the past, like in HelloXD ransomware, where the attacker used Tox and onion-based messengers. Therefore, it becomes important to monitor the network components involved in the attack chains.

Follow me on Twitter: @securityaffairs and Facebook

[adrotate banner=”9″][adrotate banner=”12″]

Pierluigi Paganini

(SecurityAffairs – hacking, bot)

[adrotate banner=”5″]

[adrotate banner=”13″]

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

China-linked UnsolicitedBooker APT used new backdoor MarsSnake in recent attacks

China-linked UnsolicitedBooker used a new backdoor, MarsSnake, to target an international organization in Saudi Arabia.…

37 minutes ago

UK’s Legal Aid Agency discloses a data breach following April cyber attack

The UK’s Legal Aid Agency suffered a cyberattack in April and has now confirmed that…

4 hours ago

Sarcoma Ransomware Unveiled: Anatomy of a Double Extortion Gang

Cybersecurity Observatory of the Unipegaso's malware lab published a detailed analysis of the Sarcoma ransomware.…

6 hours ago

Mozilla fixed zero-days recently demonstrated at Pwn2Own Berlin 2025

Mozilla addressed two critical Firefox vulnerabilities that could be potentially exploited to access sensitive data…

19 hours ago

Japan passed a law allowing preemptive offensive cyber actions<gwmw style="display:none;"></gwmw>

Japan passed a law allowing preemptive offensive cyber actions, shifting from its pacifist stance to…

1 day ago