sevagas/swap_digger
关于
swap_digger 用于在后渗透或取证过程中自动分析 Linux swap。它可以自动提取 swap,并搜索 Linux 用户凭据、网页表单凭据、网页表单中的电子邮件、HTTP 基本认证信息、Wi-Fi SSID 和密钥等。
安全与隐私实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
swap_digger
swap_digger is a bash script used to automate Linux swap analysis for post-exploitation or forensics purpose. It automates swap extraction and searches for Linux user credentials, Web form credentials, Web form emails, HTTP basic authentication, WiFi SSID and keys, etc.

Download and run the tool
On your machine
Use the following commands to download and run the script on your machine:
git clone https://github.com/sevagas/swap_digger.git
cd swap_digger
chmod +x swap_digger.sh
sudo ./swap_digger.sh -vx

On a mounted hard drive
To use swap_digger on a mounted hard drive, do the following:
First, download the script using the following commands:
git clone https://github.com/sevagas/swap_digger.git
cd swap_digger
chmod +x swap_digger.sh
Then, find the target swap file/partition with:
sudo ./swap_digger.sh -S
Finally, analyze the target by running:
sudo ./swap_digger.sh -vx -r path/to/mounted/target/root/fs -s path/to/target/swap/device
On a third party machine
Use the following commands to download and run the script on a third party machine (useful for pentests and CTFs):
wget https://raw.githubusercontent.com/sevagas/swap_digger/master/swap_digger.sh
chmod +x swap_digger.sh
sudo ./swap_digger.sh -vx -c
Note: Use the -c option to automatically remove the directory created by swap_digger (/tmp/swap_dig).
Simple run
If you only need to recover clear text Linux user passwords, simply run:
sudo ./swap_digger.sh
Available options
All options:
./swap_digger.sh [ OPTIONS ]
Options :
-x, --extended Run Extended tests on the target swap to retrieve other interesting data
(web passwords, emails, wifi creds, most accessed urls, etc)
-g, --guessing Try to guess potential passwords based on observations and stats
Warning: This option is not reliable, it may dig more passwords as well as hundreds false positives.
-h, --help Display this help.
-v, --verbose Verbose mode.
-l, --log Log all outputs in a log file (protected inside the generated working directory).
-c, --clean Automatically erase the generated working directory at end of script (will also remove log file)
-r PATH, --root-path=PATH Location of the target file-system root (default value is /)
Change this value for forensic analysis when target is a mounted file system.
This option has to be used along the -s option to indicate path to swap device.
-s PATH, --swap-path=PATH Location of swap device or swap dump to analyse
Use this option for forensic/remote analysis of a swap dump or a mounted external swap partition.
This option should be used with the -r option where at least /<root-path>/etc/shadow exists.
-S, --swap-search Search for all available swap devices (use for forensics).
Relevant resources
Blog posts about swap digging:
Contact
Feel free to message me on my Twitter account @EmericNasi
License and credits
The GNU General Public License version 3
Copyright 2017-2021 Emeric “Sio” Nasi (blog)
探索相关项目
加载中…