T1080: Taint Shared Content
Adversaries may deliver payloads to remote systems by adding content to shared storage locations, such as network drives or internal code repositories. Content stored on network drives or in other shared locations may be tainted by adding malicious programs, scripts, or exploit code to otherwise valid files. Once a user opens the shared tainted content, the malicious portion can be executed to run the adversary's code on a remote system. Adversaries may use tainted shared content to move laterally.
A directory share pivot is a variation on this technique that uses several other techniques to propagate malware when users access a shared network directory. It uses Shortcut Modification of directory .LNK files that use Masquerading to look like the real directories, which are hidden through Hidden Files and Directories. The malicious .LNK-based directories have an embedded command that executes the hidden malware file in the directory and then opens the real intended directory so that the user's expected action still occurs. When used with frequently used network directories, the technique may result in frequent reinfections and broad access to systems and potentially to new and higher privileged accounts.
Adversaries may also compromise shared network directories through binary infections by appending or prepending its code to the healthy binary on the shared network directory. The malware may modify the original entry point (OEP) of the healthy binary to ensure that it is executed before the legitimate code. The infection could continue to spread via the newly infected file when it is executed by a remote system. These infections may target both binary and non-binary formats that end with extensions including, but not limited to, .EXE, .DLL, .SCR, .BAT, and/or .VBS.
Positive Technologies products that cover the technique
MaxPatrol SIEM knowledge base
mitre_attck_impact: PT-CR-1996: Creation_Of_Many_Identical_Files: A large number of files (over 200) with the same name was created in different directories in a short period of time. This may indirectly indicate cryptolocker activity. When encrypting files, cryptolockers create files with the same name that contain attackers' demands in each encrypted directory.
Detection
ID | DS0033 | Data source and component | Network Share: Network Share Access | Description | Monitor for unexpected and abnormal accesses to network shares, especially those also associated with file activity. |
---|
ID | DS0009 | Data source and component | Process: Process Creation | Description | Monitor processes that are executed from removable media for malicious or abnormal activity such as network connections due to Command and Control and possible network Discovery techniques. |
---|
ID | DS0022 | Data source and component | File: File Modification | Description | Monitor for files that write or overwrite many files to a network shared directory may be suspicious. |
---|
ID | DS0022 | Data source and component | File: File Creation | Description | Monitor for newly constructed files from files that write or overwrite many files to a network shared directory may be suspicious. |
---|
Mitigation
ID | M1038 | Name | Execution Prevention | Description | Identify potentially malicious software that may be used to taint content or may result from it and audit and/or block the unknown programs by using application control tools, like AppLocker, or Software Restriction Policies where appropriate. |
---|
ID | M1022 | Name | Restrict File and Directory Permissions | Description | Protect shared folders by minimizing users who have write access. |
---|
ID | M1049 | Name | Antivirus/Antimalware | Description | Anti-virus can be used to automatically quarantine suspicious files. |
---|
ID | M1050 | Name | Exploit Protection | Description | Use utilities that detect or mitigate common features used in exploitation, such as the Microsoft Enhanced Mitigation Experience Toolkit (EMET). |
---|