Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/Recycle_bin_listing-files.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
* [Process Injection (pi module)](smb-protocol/command-execution/execute-remote-command/process-injection-pi-module.md)
* [Getting Shells 101](smb-protocol/command-execution/getting-shells-101.md)
* [Spidering Shares](smb-protocol/spidering-shares.md)
* [Recycle Bin](smb-protocol/recycle-bin.md)
* [Get and Put Files](smb-protocol/get-and-put-files.md)
* [Obtaining Credentials](smb-protocol/obtaining-credentials/README.md)
* [Dump SAM](smb-protocol/obtaining-credentials/dump-sam.md)
Expand Down
46 changes: 46 additions & 0 deletions smb-protocol/recycle-bin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
description: List and download files in the Recycle Bin
---

# Recycle Bin Module

{% hint style="warning" %}
This module requires administrator privileges.
{% endhint %}

This module lists deleted files in the Recycle Bin for every user. It shows the original location/filename of the deleted file as well as the date when it was deleted.

List files in the Recycle Bin on the remote target:

```bash
nxc smb 192.168.1.10 -u USER -p PASSWORD -M recyclebin
```

<figure><img src="../.gitbook/assets/Recycle_bin_listing-files.png" alt=""><figcaption><p>Listing Recycle Bin files</p></figcaption></figure>

List and download all files in the Recycle Bin on the remote target:

```bash
nxc smb 192.168.1.10 -u USER -p PASSWORD -M recyclebin -o DOWNLOAD=true
```

List and download only specific files using a filter on the original name (file name) value:

{% hint style="info" %}
The below command only downloads files that contain the word "pass" in their original filename.
{% endhint %}

```bash
nxc smb 192.168.1.10 -u USER -p PASSWORD -M recyclebin -o DOWNLOAD=true FILTER=pass
```

<figure><img src="../.gitbook/assets/Recycle_bin_filter-on-filename.png" alt=""><figcaption><p>Download files with names that contain the word "pass"</p></figcaption></figure>

## Module Options

```bash
DOWNLOAD Download the files in the Recycle Bin (default: False)
Example: -o DOWNLOAD=True
FILTER Filter what files you want to download (default: all) based on their original filename, supports regular expressions
Example: -o FILTER=pass
```