Malware

Alleged Iranian threat actors leak the code of their CodeRAT malware

The author of the remote access trojan (RAT) CodeRAT has leaked the source code of its malware on GitHub.

The development team behind the remote access trojan (RAT) CodeRAT has leaked the source code of its malware on GitHub after the

SafeBreach Labs researchers recently analyzed a new targeted attack aimed at Farsi-speaking code developers. The attackers used a Microsoft Word document that included a Microsoft Dynamic Data Exchange (DDE) exploit along with a previously undiscovered remote access trojan (RAT), tracked as CodeRAT by SafeBreach Labs researchers.

The interesting aspect of this investigation is that the researchers were able to identify the developer of CodeRAT who, after being confronted by us, opted to leak the source code of CodeRAT in his public GitHub account.

CodeRATCodeRAT

CodeRAT allows its operators to monitor the victim’s activity on social networks and on local machines by supporting 50 commands, including taking screenshots, copying clipboard, terminating processes, analyzing GPU usage, downloading/uploading/deleting files, monitoring running processes, and executing programs The malicious code can monitor webmail, Microsoft Office documents, databases, social networks, games, integrated development environments (IDEs) for Windows and Android, and pornographic sites. CodeRAT also monitors a large number of browser window titles, two of which are unique to Iranian victims, a popular Iranian e-commerce site and a web messenger in Farsi.

Experts believe that the malware is a surveillance software used by the Iranian government.

“This type of monitoring—specifically of pornographic sites, use of anonymous browsing tools, and social network activities—leads us to believe CodeRAT is an intelligence tool used by a threat actor tied to a government. It is commonly seen in attacks operated by the Islamic regime of Iran to monitor illegal/immoral activities of their citizens.” reads the analysis published by SafeBreach Labs.

The CodeRAT used versatile communication methods, it supports communication over Telegram groups using the bot API or through USB flash drive. The malicious code is also able to operate in stealth mode by avoiding to send back data. The malware doesn’t use a dedicated C2 server, instead it uploads data to an anonymous, public site.

CodeRAT limits its usage to 30 days to avoid detection, it will also use the HTTP Debugger website as a proxy to communicate with its C2 Telegram group. 

The researchers also found evidence that the attackers’ names may be Mohsen and Siavahsh, which are common Persian names.

“By sharing information specifically about our discovery of CodeRAT, our goal is to raise awareness about this new, unrecognized type of malware that leverages a relatively new technique of using an anonymous uploads site as a C2 server. We also hope to warn the developer community about the fact that they are particularly vulnerable to being targeted by this attack.” concludes the analysis.

The report also includes indicators of compromise (IOCs) and YARA rules.

Follow me on Twitter: @securityaffairs and Facebook

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

Pierluigi Paganini

(SecurityAffairs – hacking, malware)

[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

Ivanti fixed two EPMM flaws exploited in limited attacks

Ivanti addressed two Endpoint Manager Mobile (EPMM) software vulnerabilities that have been exploited in limited…

2 hours ago

Microsoft Patch Tuesday security updates for May 2025 fixed 5 actively exploited zero-days

Microsoft Patch Tuesday security updates for May 2025 addressed 75 security flaws across multiple products, including…

10 hours ago

Fortinet fixed actively exploited FortiVoice zero-day<gwmw style="display:none;"></gwmw><gwmw style="display:none;"></gwmw>

Fortinet fixed a critical remote code execution zero-day vulnerability actively exploited in attacks targeting FortiVoice…

13 hours ago

How Interlock Ransomware Affects the Defense Industrial Base Supply Chain

Interlock Ransomware 's attack on a defense contractor exposed global defense supply chain details, risking…

1 day ago

Marks and Spencer confirms data breach after April cyber attack

Marks and Spencer (M&S) confirms that threat actors stole customer data in the ransomware attack…

1 day ago

Moldovan Police arrested a 45-year-old foreign man participating in ransomware attacks on Dutch companies

A 45-year-old foreign man has been arrested in Moldova for allegedly participating in ransomware attacks…

1 day ago