Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/p0dalirius/DumpSMBShare
A script to dump files and folders remotely from a Windows SMB share.
https://github.com/p0dalirius/DumpSMBShare
active-directory dump remote smb windows
Last synced: 21 days ago
JSON representation
A script to dump files and folders remotely from a Windows SMB share.
- Host: GitHub
- URL: https://github.com/p0dalirius/DumpSMBShare
- Owner: p0dalirius
- Created: 2022-02-17T09:01:56.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-06-26T09:56:43.000Z (6 months ago)
- Last Synced: 2024-11-12T13:11:38.628Z (30 days ago)
- Topics: active-directory, dump, remote, smb, windows
- Language: Python
- Homepage: https://podalirius.net/
- Size: 373 KB
- Stars: 211
- Watchers: 4
- Forks: 42
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-hacking-lists - p0dalirius/DumpSMBShare - A script to dump files and folders remotely from a Windows SMB share. (Python)
- StarryDivineSky - p0dalirius/DumpSMBShare
README
![](./.github/banner.png)
A script to dump files and folders remotely from a Windows SMB share.
## Features
- [x] Only list shares with `--list-shares`.
- [x] Select only files with given extensions (with `--extensions`) or all files.
- [x] Choose the local folder to dump to with `--dump-dir`.
- [x] Select base folder to search from in the share with `--base-dir`.## Usage
```
$ ./DumpSMBShare.py -h
DumpSMBShare v1.3 - by @podalirius_usage: Dump.py [-h] (-s SHARE | -l) [-e EXTENSIONS] [-D DUMP_DIR] [-f FILE] [-B BASE_DIR] [--debug] [-q] [-H LMHASH:NTHASH] [--no-pass] [-k] [-A hex key]
[--dc-ip ip address] [-I ip address] [-P [destination port]]
targetpositional arguments:
target [[domain/]username[:password]@]optional arguments:
-h, --help show this help message and exit
-s SHARE, --share SHARE
SMB Share to dump
-l, --list-shares Lists SMB shares on the remote machine.
-L, --list-files Lists all the files present in the SMB share.
-e EXTENSIONS, --extensions EXTENSIONS
Extensions
-D DUMP_DIR, --dump-dir DUMP_DIR
Dump directory
-f FILE, --file FILE SMB file to dump
-B BASE_DIR, --base-dir BASE_DIR
Directory to search in (Default: /)
--debug Turn on debug output. (Default: False)
-q, --quiet Turn DEBUG output ONauthentication:
-H LMHASH:NTHASH, --hashes LMHASH:NTHASH
NTLM hashes, format is LMHASH:NTHASH
--no-pass Don't ask for password (useful for -k)
-k, --kerberos Use Kerberos authentication. Grabs credentials from ccache file (KRB5CCNAME) based on target parameters. If valid credentials cannot
be found, it will use the ones specified in the command line
-A hex key, --aesKey hex key
AES key to use for Kerberos Authentication (128 or 256 bits)connection:
--dc-ip ip address IP Address of the domain controller. If omitted it will use the domain part (FQDN) specified in the target parameter
-I ip address, --target-ip ip address
IP Address of the target machine. If omitted it will use whatever was specified as target. This is useful when target is the NetBIOS
name and you cannot resolve it
-P [destination port], --port [destination port]
Destination port to connect to SMB Server
```## Example
+ Dump all files from the `SYSVOL` share:
```
./DumpSMBShare.py 'LAB.local/user2:[email protected]' --debug
```![](./.github/example_verbose.png)
![](./.github/example.png)
## Contributing
Pull requests are welcome. Feel free to open an issue if you want to add other features.