FlawedAmmyy
- Type
- RAT
- Capabilities
- ReconnaissanceExfiltrationPost exploitationDefense evasion
- Delivery
- Phishing
- Platforms
- Windows
FlawedAmmyy is a Windows remote access trojan first observed in early 2016 and derived from leaked source code of the legitimate Ammyy Admin remote-administration tool. It provides remote desktop control, file-system management, proxy support, and audio chat, enabling attackers to interact with compromised systems and maintain remote access. It gathers and transmits host information, including the operating system, current user and domain, computer name, privilege level, installed antivirus product, and smart-card presence. It also communicates with command-and-control infrastructure to retrieve additional malware components and has used SEAL encryption during its initial command-and-control handshake.
FlawedAmmyy is closely associated with the financially motivated TA505 threat group, which used it extensively from spring 2018. Distribution has included phishing emails carrying malicious Office documents or HTML attachments linking to macro-enabled Word and Excel files. Document macros execute an installation chain that retrieves a FlawedAmmyy loader or the AndroMut downloader, which subsequently delivers the RAT. Amadey and the Necurs botnet have also installed FlawedAmmyy on compromised machines. FlawedAmmyy loaders have employed custom packing, obfuscation, and in-memory payload reconstruction to hinder detection and analysis.
Documented campaigns targeted recipients in South Korea and financial institutions in Singapore, the United Arab Emirates, and the United States. Necurs deployments selectively installed the RAT on systems meeting attacker-defined targeting criteria. FlawedAmmyy has also been used during intrusions preceding Clop ransomware deployment, alongside tools such as Cobalt Strike; it serves as a remote-access component rather than performing ransomware encryption itself.
Associated threat actors
3 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
(Citation: Proofpoint TA505 Mar 2018)(Citation: Trend Micro TA505 June 2019)(Citation: Proofpoint TA505 October 2019)
Finding Grace as a payload is interesting, as it is known to be almost exclusively used by TA505, which further strengthens previous claims of a connection between Silence Group and TA505 made by Group-IB, which was based on source code comparison with FlawedAmmyy.
Techniques & procedures
49 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
3 techniques
Initial Access
TA505 seems to have distributed its malware only through phishing email campaigns... The only infection vector currently known to be used by the TA505 intrusion set is phishing emails including a malicious attachment or link.
The HTM or HTML attachments contained links to the download of an Office file. Depending on the specific case, the delivered Word or Excel file used macros to execute a Msiexec command that would download and execute either the FlawedAmmyy loader or AndroMut.
Other samples also included ... a URL included in the email that supposedly downloads the file needed to download the malware.
Execution
7 techniques
Execution
[FlawedAmmyy](https://attack.mitre.org/software/S0381) leverages WMI to enumerate anti-virus on the victim.(Citation: Proofpoint TA505 Mar 2018)
[FlawedAmmyy](https://attack.mitre.org/software/S0381) has used PowerShell to execute commands.(Citation: Korean FSI TA505 2020)
[FlawedAmmyy](https://attack.mitre.org/software/S0381) has used `cmd` to execute commands on a compromised host.(Citation: Korean FSI TA505 2020)
문서 파일에 삽입된 매크로 코드는 VBA와 XLM 형태가 확인되었다. | 문서 파일에 삽입된 매크로를 통해 원격제어 악성코드 다운로더 실행... 문서 파일에 삽입된 매크로 코드는 VBA와 XLM 형태가 확인되었다.
This JavaScript in turn downloads Quant Loader, which, in this case, fetched the FlawedAmmyy RAT as the final payload.
This intrusion set relies exclusively over that period on social engineering to run its payload contained in malicious attachments linked to emails sent... The victim is then encouraged to download, open and enable VBA macros of an Office document.
Ce mode opératoire s’appuie exclusivement durant cette période sur de l’ingénierie sociale pour faire exécuter ses charges contenues dans des pièces jointes malveillantes... La victime est alors incitée à télécharger, ouvrir et activer les macros VBA d’un document Office. | Le but de ces documents était souvent d’exécuter via des macros des commandes msiexec sur la machine de la victime pour télécharger et exécuter un code malveillant.
Persistence
4 techniques
Persistence
Across the content, malware repeatedly 'adds Registry Run keys', 'creates Registry entries', 'modifies the Windows Registry', or 'overwrites registry keys' to maintain persistence.
"Emails contained an attachment ...doc ... which used macros to download the FlawedAmmyy malware directly."
[FlawedAmmyy](https://attack.mitre.org/software/S0381) has established persistence via the `HKCU\SOFTWARE\microsoft\windows\currentversion\run` registry key.(Citation: Korean FSI TA505 2020)
an .ISO file with an embedded .LNK file
Privilege Escalation
2 techniques
Privilege Escalation
[FlawedAmmyy](https://attack.mitre.org/software/S0381) has established persistence via the `HKCU\SOFTWARE\microsoft\windows\currentversion\run` registry key.(Citation: Korean FSI TA505 2020)
an .ISO file with an embedded .LNK file
Stealth
8 techniques
Stealth
Second stage executables may also be encrypted, requiring the analyst to gather an understanding of how this code is manipulated.
Malware authors commonly utilize packers (Roccia, 2017) as a method of concealing functionality and characteristics of their malicious code, making an analyst's job more difficult.
"messages were sent from addresses spoofing the recipient’s own domain with subjects such as 'Receipt No 1234567'... and matching attachments 'Receipt 1234567.zip'."
[FlawedAmmyy](https://attack.mitre.org/software/S0381) can execute batch scripts to delete files.(Citation: Korean FSI TA505 2020)
runmemxor : Download XOR encrypted .DLL and decrypt and run
[FlawedAmmyy](https://attack.mitre.org/software/S0381) has been installed via `msiexec.exe`.(Citation: Korean FSI TA505 2020)
[FlawedAmmyy](https://attack.mitre.org/software/S0381) has used `rundll32` for execution.(Citation: Korean FSI TA505 2020)
2019년 3월에는 실행된 환경의 작업 그룹명을 확인하는 루틴이 추가되었다... WORKGROUP이 존재하는 기업 사용자를 대상으로만 추가 악성코드 다운로드 행위가 발현되도록 루틴이 변경되었다.
Defense Impairment
3 techniques
Defense Impairment
Across the content, malware repeatedly 'adds Registry Run keys', 'creates Registry entries', 'modifies the Windows Registry', or 'overwrites registry keys' to maintain persistence.
The intrusion set signs its malware by using legitimate but malicious security certificates. They often take over names of existing businesses.
des certificats sont utilisés pour signer le code malveillant Clop afin de lui donner une apparence légitime.
Credential Access
2 techniques
Credential Access
[FlawedAmmyy](https://attack.mitre.org/software/S0381) can collect mouse events.(Citation: Korean FSI TA505 2020)
[FlawedAmmyy](https://attack.mitre.org/software/S0381) can collect keyboard events.(Citation: Korean FSI TA505 2020)
Discovery
10 techniques
Discovery
[FlawedAmmyy](https://attack.mitre.org/software/S0381) enumerates the current user during the initial infection.(Citation: Proofpoint TA505 Mar 2018)(Citation: Korean FSI TA505 2020)
avname Antivirus product name obtained via WMI query Windows Defender
[FlawedAmmyy](https://attack.mitre.org/software/S0381) enumerates the privilege level of the victim during the initial infection.(Citation: Proofpoint TA505 Mar 2018)(Citation: Korean FSI TA505 2020)
[FlawedAmmyy](https://attack.mitre.org/software/S0381) can collect the victim's operating system and computer name during the initial infection.(Citation: Proofpoint TA505 Mar 2018)
The Necurs modules check if the machines have files that contain any of the following strings that exist under “%APPDATA%” such as: WALLET.DAT BITCOIN-QT ELECTRUM
[FlawedAmmyy](https://attack.mitre.org/software/S0381) will attempt to detect if a usable smart card is current inserted into a card reader.(Citation: Proofpoint TA505 Mar 2018)
The modules execute “net user” and “net domain” to see if a machine is connected to a network with more than 100 users.
2019년 3월에는 실행된 환경의 작업 그룹명을 확인하는 루틴이 추가되었다... WORKGROUP이 존재하는 기업 사용자를 대상으로만 추가 악성코드 다운로드 행위가 발현되도록 루틴이 변경되었다.
Examples include 'Action RAT can use WMI to gather AV products installed on an infected host,' 'FlawedAmmyy leverages WMI to enumerate anti-virus on the victim,' and 'TA2541 has used WMI to query targeted systems for security products.'
[FlawedAmmyy](https://attack.mitre.org/software/S0381) will attempt to detect anti-virus products during the initial infection.(Citation: Proofpoint TA505 Mar 2018)
Lateral Movement
2 techniques
Lateral Movement
Ahnlab et le CERT gouvernemental sud-coréen rapportent l’usage de la porte dérobée FlawedAmmyy (parfois renommée wsus.exe) et de l’outil d’attaque Cobalt Strike lors de cette phase.
the attacker specified the URL to be a “file://” network share instead of the typical http:// link. As a result, the system downloads and executes a JavaScript file over the SMB protocol
Collection
5 techniques
Collection
[FlawedAmmyy](https://attack.mitre.org/software/S0381) has collected information and files from a compromised machine.(Citation: Korean FSI TA505 2020)
[FlawedAmmyy](https://attack.mitre.org/software/S0381) can collect mouse events.(Citation: Korean FSI TA505 2020)
[FlawedAmmyy](https://attack.mitre.org/software/S0381) can collect keyboard events.(Citation: Korean FSI TA505 2020)
[FlawedAmmyy](https://attack.mitre.org/software/S0381) can capture screenshots.(Citation: Korean FSI TA505 2020)
[FlawedAmmyy](https://attack.mitre.org/software/S0381) can collect clipboard data.(Citation: Korean FSI TA505 2020)
Command and Control
8 techniques
Command and Control
[FlawedAmmyy](https://attack.mitre.org/software/S0381) may obfuscate portions of the initial C2 handshake.(Citation: Proofpoint TA505 Mar 2018)
FlawedAmmyy / FlawedGrace remote access trojan (RAT) collects information and attempts to communicate with the Command and Control (C2) server.
[FlawedAmmyy](https://attack.mitre.org/software/S0381) has used HTTP for C2.(Citation: Proofpoint TA505 Mar 2018)
[FlawedAmmyy](https://attack.mitre.org/software/S0381) can transfer files from C2.(Citation: Korean FSI TA505 2020)
In April, we observed that it pushed the remote access trojan FlawedAmmyy onto its bots.
this is likely done so the malicious file can bypass some firewall rules, since the communication uses Internet Explorer
The content is a catalog of malware and threat groups that encrypt command-and-control communications using algorithms such as DES, AES, RC4, XOR, Blowfish, RSA, Camellia, RC2, RC6, and custom ciphers.
[FlawedAmmyy](https://attack.mitre.org/software/S0381) has used SEAL encryption during the initial C2 handshake.(Citation: Proofpoint TA505 Mar 2018)
Exfiltration
1 technique
Exfiltration
[FlawedAmmyy](https://attack.mitre.org/software/S0381) has sent data collected from a compromised host to its C2 servers.(Citation: Korean FSI TA505 2020)
Observables
87 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
67 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.