# T1091 - Replication Through Removable Media
## [Description from ATT&CK](https://attack.mitre.org/techniques/T1091)
<blockquote>Adversaries may move onto systems, possibly those on disconnected or air-gapped networks, by copying malware to removable media and taking advantage of Autorun features when the media is inserted into a system and executes. In the case of Lateral Movement, this may occur through modification of executable files stored on removable media or by copying malware and renaming it to look like a legitimate file to trick users into executing it on a separate system. In the case of Initial Access, this may occur through manual manipulation of the media, modification of systems used to initially format the media, or modification to the media's firmware itself.</blockquote>

## Atomic Tests

- [Atomic Test #1 - USB Malware Spread Simulation](#atomic-test-1---usb-malware-spread-simulation)


<br/>

## Atomic Test #1 - USB Malware Spread Simulation
Simulates an adversary copying malware to all connected removable drives.

**Supported Platforms:** Windows


**auto_generated_guid:** d44b7297-622c-4be8-ad88-ec40d7563c75






#### Attack Commands: Run with `powershell`! 


```powershell
$RemovableDrives=@()
$RemovableDrives = Get-WmiObject -Class Win32_LogicalDisk -filter "drivetype=2" | select-object -expandproperty DeviceID
ForEach ($Drive in $RemovableDrives)
{
write-host "Removable Drive Found:" $Drive
New-Item -Path $Drive/T1091Test1.txt -ItemType "file" -Force -Value "T1091 Test 1 has created this file to simulate malware spread to removable drives."
}
```

#### Cleanup Commands:
```powershell
$RemovableDrives = Get-WmiObject -Class Win32_LogicalDisk -filter "drivetype=2" | select-object -expandproperty DeviceID
ForEach ($Drive in $RemovableDrives)
{
Remove-Item -Path $Drive\T1091Test1.txt -Force -ErrorAction Ignore
}
```





<br/>
