Miscellaneous File Transfer Methods
File Transfer with Netcat and Ncat
Target Machine
If the compromised machine is using Ncat, we'll need to specify --recv-only
to close the connection once the file transfer is finished.
Attack machine
By utilizing Ncat on our attacking host, we can opt for --send-only
rather than -q
. The --send-only
flag, when used in both connect and listen modes, prompts Ncat to terminate once its input is exhausted. Typically, Ncat would continue running until the network connection is closed, as the remote side may transmit additional data. However, with --send-only
, there is no need to anticipate further incoming information.
Attack Host - Sending File as Input to Netcat
Target - Connect to Netcat to Receive the File
Target - Connecting to Netcat Using /dev/tcp to Receive the File
PowerShell Session File Transfer
To create a PowerShell Remoting session on a remote computer, we will need administrative access, be a member of the Remote Management Users
group, or have explicit permissions for PowerShell Remoting in the session configuration.
From DC01 - Confirm WinRM port TCP 5985 is Open on DATABASE01.
Create a PowerShell Remoting Session to DATABASE01
Copy samplefile.txt from our Localhost to the DATABASE01 Session
Copy DATABASE.txt from DATABASE01 Session to our Localhost
RDP
Mounting a Linux Folder Using rdesktop
Mounting a Linux Folder Using xfreerdp
Windows
Last updated