cumakurt/Jesur
GitHub: cumakurt/Jesur
专业级 SMB 共享扫描与敏感文件检测工具,支持 Pass-the-Hash 认证和多格式报告生成。
Stars: 7 | Forks: 3
# JESUR - 增强型 SMB 共享扫描器
<<<<<<< HEAD
**版本**: 2.0.0
**开发者**: Cuma KURT
**GitHub**: https://github.com/cumakurt/Jesur
**LinkedIn**: https://www.linkedin.com/in/cuma-kurt-34414917/
=======
JESUR 是一款功能全面的 Python 应用程序,旨在跨网络扫描 SMB 共享、分析访问权限、检测敏感文件并生成详细报告。专为渗透测试人员和安全专业人员打造。
## 功能特性
### 核心能力
- **自动 SMB 共享发现** - 扫描整个网络或特定 IP 范围
- **多种认证方式** - 匿名、用户名/密码、NTLM Hash
- **真正的并行扫描** - 具有可配置线程数的多线程扫描
- **敏感内容检测** - 针对凭据、令牌和机密信息的高级模式匹配
- **专业报告** - 带有图表和统计数据的交互式 HTML 报告
- **多种导出格式** - HTML、JSON、CSV 导出
- **配置文件支持** - 企业级配置管理
- **实时进度** - 带有 ETA(预计到达时间)计算的实时进度跟踪
### 高级功能
- **文件内容分析** - 支持 PDF、DOCX、XLSX、文本等多种格式
- **智能过滤** - 按扩展名、大小、文件名模式过滤
- **速率限制** - 控制扫描速度以避免网络过载
- **IP 排除列表** - 跳过特定 IP 或网络
- **共享过滤** - 包含/排除特定共享
- **地理位置扫描** - 按国家/地区代码扫描 IP 范围
- **超时保护** - 单主机超时防止挂起
- **优雅关机** - 通过 Ctrl+C 安全中断
## 📋 目录
- [安装](#installation)
- [方式 1:Docker 安装](#option-1-docker-installation-recommended)
- [方式 2:传统安装](#option-2-traditional-installation)
- [📖 详细安装指南](INSTALL.md)
- [快速入门](#quick-start)
- [配置文件](#configuration-file)
- [用法示例](#usage-examples)
- [Docker 使用示例](#docker-usage-examples)
- [命令行选项](#command-line-options)
- [敏感文件检测](#sensitive-file-detection)
- [敏感内容检测](#sensitive-content-detection)
- [输出格式](#output-formats)
- [性能调优](#performance-tuning)
- [安全说明](#security-notes)
- [故障排除](#troubleshooting)
- [贡献](#contributing)
- [许可证](#license)
## 🔧 安装
### 前置条件
- Python 3.7 或更高版本
- 到目标 SMB 共享的网络访问权限
- Docker(可选,用于容器化部署)
### 方式 1:Docker 安装(推荐)
Docker 提供了一个隔离的环境,其中预装了所有依赖项。
#### Docker 快速入门
**⚠️ 重要:必须使用卷挂载!**
Docker 容器是临时的。**你必须使用卷挂载 (`-v`)** 将报告和下载的文件保存到你的主机上,否则当容器停止时它们将丢失。
```
# Clone the repository
git clone https://github.com/cumakurt/Jesur.git
cd Jesur
# Build the Docker image
docker build -t jesur:latest .
# Create output directories on YOUR machine (not in container)
mkdir -p out_download reports
# Run a scan with volume mounts
# The -v flags map container directories to YOUR local directories
docker run --rm --network host \
-v $(pwd)/out_download:/app/out_download \
-v $(pwd)/reports:/app/reports \
jesur:latest 192.168.1.0/24 -u username -p password
# After scan, check YOUR local directories:
ls -la out_download/ # Downloaded sensitive files are HERE
ls -la reports/ # HTML, JSON, CSV reports are HERE
```
**卷挂载的作用:**
- `-v $(pwd)/out_download:/app/out_download` → 将下载的文件保存到**你机器上**的 `./out_download/`
- `-v $(pwd)/reports:/app/reports` → 将报告保存到**你机器上**的 `./reports/`
- 如果没有 `-v` 标志,文件将保留在容器内部,并在容器停止时被**删除**!
#### Docker Compose(更易于管理)
```
# Using docker-compose.yml
docker-compose run --rm jesur 192.168.1.0/24 -u username -p password
# Or modify docker-compose.yml and run:
docker-compose up
```
#### Docker 示例
**⚠️ 记住:始终使用 `-v`(卷挂载)将文件保存到你的主机!**
**单 IP 扫描:**
```
# Create directory on YOUR machine first
mkdir -p out_download
# Run scan - files saved to YOUR ./out_download directory
docker run --rm --network host \
-v $(pwd)/out_download:/app/out_download \
jesur:latest 192.168.1.1 -u admin -p password123
# Verify files are on YOUR machine (not in container)
ls -la out_download/
```
**使用配置文件进行网络扫描:**
```
# Copy and edit config file on YOUR machine
cp jesur.conf.example jesur.conf
nano jesur.conf
# Create output directories on YOUR machine
mkdir -p out_download reports
# Run with mounted config and output directories
docker run --rm --network host \
-v $(pwd)/jesur.conf:/app/jesur.conf:ro \
-v $(pwd)/out_download:/app/out_download \
-v $(pwd)/reports:/app/reports \
jesur:latest
# All files are saved to YOUR local directories
ls -la out_download/ reports/
```
**使用自定义输出目录扫描(绝对路径):**
```
# Use absolute paths for custom locations on YOUR machine
docker run --rm --network host \
-v /home/user/my_scans/out_download:/app/out_download \
-v /home/user/my_scans/reports:/app/reports \
jesur:latest 10.0.0.0/24 -u user -p pass --output-name custom_scan
# Files saved to /home/user/my_scans/ on YOUR machine
ls -la /home/user/my_scans/out_download/
ls -la /home/user/my_scans/reports/
```
**Windows 示例:**
```
# Windows - use forward slashes or escaped backslashes
docker run --rm --network host \
-v C:/Users/YourName/scans/out_download:/app/out_download \
-v C:/Users/YourName/scans/reports:/app/reports \
jesur:latest 192.168.1.0/24 -u user -p pass
# Files saved to C:\Users\YourName\scans\ on YOUR Windows machine
```
**❌ 错误 - 文件将丢失:**
```
# DON'T DO THIS - No volume mounts!
docker run --rm --network host \
jesur:latest 192.168.1.0/24 -u user -p pass
# All reports and downloads stay inside container and are DELETED when container stops!
```
**仅列出共享:**
```
docker run --rm --network host \
jesur:latest 192.168.1.0/24 -u guest -p "" --list-shares
```
**带速率限制的详细模式:**
```
docker run --rm --network host \
-v $(pwd)/out_download:/app/out_download \
jesur:latest 192.168.1.0/24 -u user -p pass \
--verbose --rate-limit 10 --threads 20
```
**使用 Docker Compose 运行自定义命令:**
```
# Edit docker-compose.yml
services:
jesur:
# ... existing config ...
command: ["python3", "Jesur.py", "192.168.1.0/24", "-u", "user", "-p", "pass", "--verbose"]
```
然后运行:
```
docker-compose up
```
#### Docker 卷挂载
**⚠️ 关键:卷挂载是将文件保存到主机所必需的!**
卷挂载 (`-v`) 将容器目录映射到**你的计算机**上的目录。如果没有它们,容器停止时所有文件都会丢失。
**必需的卷挂载:**
- **`/app/out_download`** → 映射到用于存放下载的敏感文件的本地目录
-v $(pwd)/out_download:/app/out_download
# 保存在容器 /app/out_download 中的文件会出现在你的 ./out_download/ 中
- **`/app/reports`** → 映射到用于存放生成的报告(HTML、JSON、CSV)的本地目录
-v $(pwd)/reports:/app/reports
# 保存在容器 /app/reports 中的报告会出现在你的 ./reports/ 中
**可选的卷挂载:**
- **`/app/jesur.conf`** → 配置文件(建议只读)
-v $(pwd)/jesur.conf:/app/jesur.conf:ro
# :ro = 只读,防止容器修改你的配置文件
- **`/app/networks.txt`** → 如果使用 `--file` 选项时的网络列表文件
-v $(pwd)/networks.txt:/app/networks.txt:ro
**包含所有挂载的完整示例:**
```
# 1. Create directories on YOUR machine
mkdir -p out_download reports
# 2. Run with all volume mounts
docker run --rm --network host \
-v $(pwd)/out_download:/app/out_download \
-v $(pwd)/reports:/app/reports \
-v $(pwd)/jesur.conf:/app/jesur.conf:ro \
jesur:latest 192.168.1.0/24 -u user -p pass
# 3. Verify files are on YOUR machine
ls -la out_download/ # Downloaded files HERE
ls -la reports/ # Reports HERE
```
**理解卷挂载语法:**
```
-v HOST_PATH:CONTAINER_PATH
-v $(pwd)/out_download:/app/out_download
^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
Your machine Inside container
```
**验证卷挂载是否生效:**
```
# Run a test scan
docker run --rm --network host \
-v $(pwd)/out_download:/app/out_download \
jesur:latest 127.0.0.1 -u guest -p "" --list-shares
# Check if directory exists on YOUR machine
ls -la out_download/
# If empty, that's normal for list-shares. Try a real scan to see files appear.
```
#### Docker 网络模式
**主机网络(SMB 推荐):**
```
docker run --rm --network host ...
```
- 直接访问 SMB 端口 (445, 139)
- 无需端口映射
- 性能最佳
**桥接网络(替代方案):**
```
docker run --rm -p 445:445 -p 139:139 ...
```
- 需要端口映射
- 可能存在连接问题
### 方式 2:传统安装
#### 安装依赖
```
# Clone the repository
git clone https://github.com/cumakurt/Jesur.git
cd Jesur
# Install requirements
pip install -r requirements.txt
```
#### 必需的库
```
pysmb==1.2.10
jinja2==3.1.3
ipaddress==1.0.23
python-docx==0.8.11
openpyxl==3.1.2
pdfplumber==0.10.3
python-magic==0.4.27
requests==2.31.0
```
**注意:** 在 Linux 上,你可能需要安装 `libmagic` 系统库:
```
# Debian/Ubuntu
sudo apt-get install libmagic1
# CentOS/RHEL
sudo yum install file-devel
# macOS
brew install libmagic
```
## 快速入门
### 基本网络扫描
```
# Scan a single network
python3 Jesur.py 192.168.1.0/24
# Scan from file
python3 Jesur.py -f networks.txt
# Scan with authentication
python3 Jesur.py 192.168.1.0/24 -u administrator -p Password123 -d DOMAIN
```
### 使用配置文件
```
# Edit jesur.conf with your settings
# Then run without parameters (uses config defaults)
python3 Jesur.py
# Or override config with command line
python3 Jesur.py --config custom.conf 192.168.1.0/24 --threads 50
```
## ⚙️ 配置文件
JESUR 支持配置文件 (`jesur.conf`) 用于企业级部署。所有参数既可以在配置文件中设置,也可以通过命令行覆盖。
### 配置示例 (`jesur.conf`)
```
[scan]
network=192.168.1.0/24
threads=20
rate_limit=0
host_timeout=180
[auth]
username=guest
password=
domain=WORKGROUP
[filters]
include_ext=
exclude_ext=.log,.tmp
min_size=0
max_size=50485760
max_read_bytes=1048576
exclude_shares=IPC$,ADMIN$,C$
include_admin_shares=false
[output]
output_json=true
output_csv=false
output_name=jesur
quiet=false
verbose=false
```
### 配置部分
- **`[scan]`** - 扫描参数(网络、线程、超时)
- **`[auth]`** - 认证凭据
- **`[filters]`** - 文件和共享过滤选项
- **`[output]`** - 输出格式和命名
## 💻 使用示例
### Docker 使用示例
**基本 Docker 扫描:**
```
# Build image once
docker build -t jesur:latest .
# Run scan
docker run --rm --network host \
-v $(pwd)/out_download:/app/out_download \
jesur:latest 192.168.1.0/24 -u username -p password
```
**带所有选项的 Docker 扫描:**
```
docker run --rm --network host \
-v $(pwd)/jesur.conf:/app/jesur.conf:ro \
-v $(pwd)/out_download:/app/out_download \
-v $(pwd)/reports:/app/reports \
jesur:latest 192.168.1.0/24 \
-u admin -p password123 \
--threads 30 \
--rate-limit 20 \
--verbose \
--output-json \
--output-csv
```
**Docker Compose 工作流:**
```
# 1. Create output directories on YOUR machine FIRST
mkdir -p out_download reports
# 2. Edit docker-compose.yml if needed (volumes already configured)
nano docker-compose.yml
# 3. Run scan - volumes automatically mount to YOUR current directory
docker-compose run --rm jesur 192.168.1.0/24 -u user -p pass
# 4. View results on YOUR machine (not in container)
ls -la out_download/ # Downloaded files HERE on YOUR machine
ls -la reports/ # Reports HERE on YOUR machine
```
**理解 docker-compose.yml 卷:**
```
volumes:
# These map container directories to YOUR local directories
- ./out_download:/app/out_download # Container → YOUR ./out_download/
- ./reports:/app/reports # Container → YOUR ./reports/
```
**Docker 交互模式(调试):**
```
# Run container interactively
docker run -it --rm --network host \
-v $(pwd)/out_download:/app/out_download \
jesur:latest /bin/bash
# Inside container, run manually
python3 Jesur.py 192.168.1.0/24 -u user -p pass --verbose
```
### 基本扫描
```
# Single network scan
python3 Jesur.py 192.168.1.0/24
# Multiple networks from file
python3 Jesur.py -f targets.txt
# Country-based scanning
python3 Jesur.py --geo tr_TR # Turkey
python3 Jesur.py --geo us_US # United States
python3 Jesur.py --geo-list # List all countries
```
### 认证方式
```
# Domain user with password
python3 Jesur.py 192.168.1.0/24 -u admin -p Password123 -d COMPANY
# Guest access (default)
python3 Jesur.py 192.168.1.0/24
# NTLM hash authentication (Pass-the-Hash)
# Format: LMHASH:NTHASH (both must be 32 hex characters)
python3 Jesur.py 192.168.1.0/24 -u administrator \
--hashes aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0
# Hash authentication with domain
python3 Jesur.py 192.168.1.0/24 -u administrator -d DOMAIN \
--hashes aad3b435b51404eeaad3b435b51404ee:dd1709faebc6745c7be95fa7d452a01b
# Hash authentication (single IP)
python3 Jesur.py 192.168.1.1 -u user --hashes LMHASH:NTHASH
```
**Hash 认证说明:**
- LM 和 NT hash 必须以 `LMHASH:NTHASH` 格式提供
- 每个 hash 必须正好是 32 个十六进制字符
- 如果只有 NT hash 可用,请使用空的 LM hash:`aad3b435b51404eeaad3b435b51404ee:NTHASH`
- 建议在域环境中使用域参数 (`-d`)
- 同时支持 NTLMv1 和 NTLMv2 协议
### 高级过滤
```
# Include only specific extensions
python3 Jesur.py 192.168.1.0/24 --include-ext txt,ini,config,xml
# Exclude binary files
python3 Jesur.py 192.168.1.0/24 --exclude-ext exe,dll,bin,iso
# File size filtering (1KB - 5MB)
python3 Jesur.py 192.168.1.0/24 --min-size 1024 --max-size 5242880
# Filename pattern matching (regex)
python3 Jesur.py 192.168.1.0/24 --filename-pattern ".*password.*|.*secret.*"
# Exclude specific shares
python3 Jesur.py 192.168.1.0/24 --exclude-shares "PRINT$,FAX$"
# Include admin shares (default: excluded)
python3 Jesur.py 192.168.1.0/24 --include-admin-shares
```
### 性能调优
```
# High-speed scanning (50 threads)
python3 Jesur.py 192.168.1.0/24 --threads 50
# Rate-limited scanning (5 IPs/second)
python3 Jesur.py 192.168.1.0/24 --rate-limit 5
# Custom host timeout (300 seconds)
python3 Jesur.py 192.168.1.0/24 --host-timeout 300
# Limit file read size (512KB max)
python3 Jesur.py 192.168.1.0/24 --max-read-bytes 524288
```
### 导出选项
```
# JSON export
python3 Jesur.py 192.168.1.0/24 --output-json
# CSV export
python3 Jesur.py 192.168.1.0/24 --output-csv
# Both formats with custom name
python3 Jesur.py 192.168.1.0/24 --output-json --output-csv --output-name pentest_2024
# Quiet mode (minimal output)
python3 Jesur.py 192.168.1.0/24 --quiet --output-json
# Verbose mode (detailed logs)
python3 Jesur.py 192.168.1.0/24 --verbose
```
### 真实场景
```
# SCENARIO 1: Quick discovery (share listing only)
python3 Jesur.py 192.168.0.0/16 --list-shares --threads 50 --quiet
# SCENARIO 2: Credential hunting (config files only)
python3 Jesur.py 192.168.1.0/24 --include-ext ini,conf,config,xml,yaml,json --verbose
# SCENARIO 3: Stealth scanning (slow and quiet)
python3 Jesur.py 10.0.0.0/8 --rate-limit 2 --threads 5 --quiet
# SCENARIO 4: Large network scan
python3 Jesur.py -f corporate_networks.txt --threads 50 \
--exclude-file exclude_list.txt --output-json
# SCENARIO 5: Country-wide scan
python3 Jesur.py --geo tr_TR --threads 100 --quiet \
--output-json --output-csv
```
## 📖 命令行选项
### 目标指定
| 选项 | 描述 | 示例 |
|--------|-------------|---------|
| `network` | CIDR 格式的网络 | `192.168.1.0/24` |
| `-f, --file` | 包含网络的文件 | `-f targets.txt` |
| `--geo` | 国家/地区代码 | `--geo tr_TR` |
| `--geo-list` | 列出国家/地区代码 | `--geo-list` |
### 认证
| 选项 | 描述 | 默认值 |
|--------|-------------|---------|
| `-u, --username` | 用户名 | `guest` |
| `-p, --password` | 密码 | (空) |
| `--hashes` | NTLM hash,格式为 `LMHASH:NTHASH`(均为 32 个十六进制字符) | None |
| `-d, --domain` | 域名 | `WORKGROUP` |
**认证优先级:**
- 如果提供了 `--hashes`,则使用 hash 认证(忽略密码)
- 如果提供了 `-p` 但没有 `--hashes`,则使用密码认证
- 如果两者都未提供,则尝试匿名/访客访问
### 扫描选项
| 选项 | 描述 | 默认值 |
|--------|-------------|---------|
| `--share` | 扫描特定共享 | 全部 |
| `--list-shares` | 仅列出共享 | False |
| `--threads` | 线程数 | 自动 (10-100) |
| `--rate-limit` | 每秒 IP 数 | 0 (无限制) |
| `--host-timeout` | 单主机超时(秒) | 180 |
### 过滤选项
| 选项 | 描述 | 默认值 |
|--------|-------------|---------|
| `--include-ext` | 包含的扩展名 | 全部 |
| `--exclude-ext` | 排除的扩展名 | 无 |
| `--min-size` | 最小文件大小(字节) | 0 |
| `--max-size` | 最大文件大小(字节) | 10MB |
| `--max-read-bytes` | 最大读取字节数 | 1MB |
| `--filename-pattern` | 正则表达式模式 | 无 |
| `--exclude-shares` | 排除的共享 | 无 |
| `--include-admin-shares` | 包含管理共享 | False |
| `--exclude-file` | IP 排除文件 | 无 |
### 输出选项
| 选项 | 描述 | 默认值 |
|--------|-------------|---------|
| `--output-json` | 导出为 JSON | False |
| `--output-csv` | 导出为 CSV | False |
| `--output-name` | 输出文件名 | `jesur` |
| `--quiet, -q` | 静默模式 | False |
| `--verbose, -v` | 详细模式 | False |
| `--no-stats` | 隐藏统计信息 | False |
| `--config` | 配置文件路径 | `jesur.conf` |
## 🔍 敏感文件检测
JESUR 自动检测并下载以下敏感文件类型:
### 密码管理器
- **KeePass**: 数据库 (`.kdbx`, `.kdb`), 密钥文件 (`.key`)
- **1Password**: 导入文件 (`.1pif`), 保险库 (`.opvault`)
- **LastPass**: 导出文件 (`lastpass.csv`, `lastpass_export.csv`)
- **Bitwarden**: 数据文件 (`data.json`, `bitwarden.json`)
- **Dashlane**: 数据库 (`dashlane.db`)
- **RoboForm**: 数据文件 (`RoboForm.dat`)
- **浏览器密码**: Chrome/Edge (`Login Data`, `Web Data`), Firefox (`key4.db`, `logins.json`)
### 远程连接工具
- **PuTTY**: 私钥 (`.ppk`)
- **远程桌面**: 设置 (`.rdp`, `.rdg`, `.rdm`)
- **Remmina**: 连接文件 (`.remmina`), 首选项 (`remmina.pref`)
- **SecureCRT**: 配置 (`SecureCRT.ini`, `Global.ini`)
- **RoyalTS**: 连接包 (`.rtsz`, `.rtsx`)
- **SuperPuTTY**: 会话 (`SuperPuTTY.xml`, `sessions.xml`)
- **Terminals**: 配置 (`terminals.config`, `terminals.xml`)
- **Remote Desktop Manager**: 配置 (`RemoteDesktopManager.xml`)
### 连接管理器
- **mRemoteNG**: 配置 (`confCons.xml`)
- **WinSCP**: 配置 (`WinSCP.ini`)
- **FileZilla**: 设置 (`FileZilla.xml`, `filezilla.xml`)
-MobaXterm**: 配置 (`MobaXterm.ini`)
### SSH 配置
- SSH 私钥 (`id_rsa`, `id_dsa`, `id_ecdsa`, `id_ed25519`)
- SSH 配置文件 (`config`, `known_hosts`, `authorized_keys`)
### 证书与安全
- SSL/TLS 证书 (`.crt`, `.pem`, `.cer`)
- PKCS#12 (`.pfx`, `.p12`)
- Java KeyStore (`.jks`, `.keystore`)
- OpenVPN 配置 (`.ovpn`)
- VNC 配置 (`.vnc`)
- 系统文件 (`passwd`, `shadow`, `.htpasswd`)
### 云凭据
- **AWS**: 凭据 (`.aws/credentials`, `.aws/config`, `credentials.csv`)
- **Azure**: 配置文件 (`azureProfile.json`), 凭据 (`azureCredentials.json`)
- **GCP**: 服务账号 (`service-account.json`), 配置 (`.gcp/`)
- **Terraform**: 状态文件 (`.tfstate`), 变量 (`.tfvars`)
- **HashiCorp Vault**: 配置 (`vault.hcl`), 令牌 (`.vault-token`)
### CI/CD 与开发
- **Jenkins**: 凭据 (`credentials.xml`), 配置 (`config.xml`)
- **GitLab**: CI 配置 (`.gitlab-ci.yml`), 密钥 (`gitlab-secrets.json`)
- **GitHub**: 工作流 (`.github/workflows/`), 令牌 (`GITHUB_TOKEN`)
- **Docker**: 配置 (`config.json`), Compose (`docker-compose.yml`)
- **Kubernetes**: 配置 (`kubeconfig`), 密钥 (`*.yaml`)
- **Ansible**: Vault 文件 (`secrets.yml`, `vault_pass`)
### 环境与配置文件
- 环境变量 (`.env`, `.env.local`, `.env.production`)
- 配置文件 (`config.ini`, `config.json`, `settings.json`)
- 应用程序属性 (`application.properties`, `application.yml`)
- NPM 配置 (`.npmrc`)
- PIP 配置 (`pip.conf`, `.pypirc`)
### 数据库与备份文件
- SQL 转储 (`.sql`, `.dump`)
- 数据库文件 (`.db`, `.sqlite`, `.sqlite3`, `.mdb`)
- 备份文件 (`.bak`, `.backup`, `.old`, `.orig`)
### Git 凭据
- Git 凭据 (`.git-credentials`)
- Git 配置 (`.gitconfig`)
### Windows 凭据
- 凭据管理器 (`Credentials.xml`)
### CyberArk
- Vault 配置 (`vault.ini`, `cyberark.config`)
### 会话与令牌文件
- 会话文件 (`.session`, `session.dat`)
- 令牌文件 (`.token`, `.api_key`)
## 🔎 敏感内容检测
JESUR 扫描文件内容以查找:
- **凭据** - 用户名、密码、API 密钥
- **令牌** - 认证令牌、会话 ID
- **数据库连接** - 连接字符串、凭据
- **云凭据** - AWS、Azure、GCP 密钥
- **电子邮件信息** - SMTP 凭据、电子邮件地址
- **财务数据** - 信用卡、支付信息
- **内部 IP** - 私有网络地址
- **安全关键词** - 与安全相关的模式
- **Exploit Payload** - 渗透测试工具
## 📊 输出格式
### HTML 报告
会生成两份综合 HTML 报告:
1. **文件报告** (`jesur_files_YYYYMMDD_HHMMSS.html`)
- 所有已扫描的文件
- 文件元数据(大小、日期)
- 带搜索功能的交互式表格
- 可视化统计卡片
- 图表和图形
2. **敏感报告** (`jesur_sensitive_YYYYMMDD_HHMMSS.html`)
- 检测到的敏感内容
- 文件下载链接
- 内容预览和复制
- 类别分类
- 交互式可视化
### JSON 导出
```
python3 Jesur.py 192.168.1.0/24 --output-json
```
生成:
- `jesur_files_YYYYMMDD_HHMMSS.json` - 文件列表
- `jesur_sensitive_YYYYMMDD_HHMMSS.json` - 敏感发现
- `jesur_stats_YYYYMMDD_HHMMSS.json` - 扫描统计
### CSV 导出
```
python3 Jesur.py 192.168.1.0/24 --output-csv
```
生成:
- `jesur_files_YYYYMMDD_HHMMSS.csv` - 文件列表
- `jesur_sensitive_YYYYMMDD_HHMMSS.csv` - 敏感发现
### 下载的文件
敏感文件会自动下载到:
```
out_download/[IP_ADDRESS]/[filename]
```
## ⚡ 性能调优
### 线程配置
```
# Small network (< 10 hosts)
--threads 10
# Medium network (10-50 hosts)
--threads 20-30
# Large network (> 50 hosts)
--threads 50-100
```
### 速率限制
```
# Slow scan (2 IPs/second)
--rate-limit 2
# Medium scan (10 IPs/second)
--rate-limit 10
# Fast scan (unlimited)
--rate-limit 0
```
### 内存管理
- 文件缓存:最多 1000 个条目
- 共享缓存:最多 500 个条目
- 最大内存:500MB
- 单文件限制:10MB
## 🛡️ 安全说明
⚠️ **重要**:此工具仅设计用于授权的渗透测试。
- ⚠️ 未经授权的网络扫描可能是非法的
- ⚠️ 仅在你拥有或明确获得测试许可的网络上使用
- ⚠️ 敏感文件会被自动下载
- ⚠️ 所有操作都会被记录和报告
- ⚠️ 使用 Ctrl+C 进行安全关机
## 🐛 故障排除
### 常见问题
**连接超时**
```
# Increase host timeout
python3 Jesur.py 192.168.1.0/24 --host-timeout 300
# Docker version
docker run --rm --network host \
jesur:latest 192.168.1.0/24 -u user -p pass --host-timeout 300
```
**内存问题**
```
# Reduce max read bytes
python3 Jesur.py 192.168.1.0/24 --max-read-bytes 512000
# Docker version
docker run --rm --network host \
jesur:latest 192.168.1.0/24 -u user -p pass --max-read-bytes 512000
```
**扫描缓慢**
```
# Increase thread count
python3 Jesur.py 192.168.1.0/24 --threads 50
# Docker version
docker run --rm --network host \
jesur:latest 192.168.1.0/24 -u user -p pass --threads 50
```
**认证失败**
```
# Use verbose mode for details
python3 Jesur.py 192.168.1.0/24 -u user -p pass --verbose
# Hash authentication troubleshooting
python3 Jesur.py 192.168.1.0/24 -u user -d DOMAIN \
--hashes LMHASH:NTHASH --verbose
# Docker version
docker run --rm --network host \
jesur:latest 192.168.1.0/24 -u user -p pass --verbose
# Docker with hash authentication
docker run --rm --network host \
jesur:latest 192.168.1.0/24 -u user -d DOMAIN \
--hashes LMHASH:NTHASH --verbose
```
**Docker 网络问题**
```
# If SMB connections fail, ensure host network mode
docker run --rm --network host ...
# Check if ports are accessible from container
docker run --rm --network host \
jesur:latest --help
# Test connectivity
docker run --rm --network host \
jesur:latest 192.168.1.1 -u guest -p "" --list-shares
```
**Docker 权限问题**
```
# Ensure output directories are writable
mkdir -p out_download reports
chmod 777 out_download reports
# Or run with specific user
docker run --rm --network host \
-u $(id -u):$(id -g) \
-v $(pwd)/out_download:/app/out_download \
jesur:latest 192.168.1.0/24 -u user -p pass
```
## 📝 网络文件格式
创建一个文件 (`networks.txt`),每行一个网络:
```
# Comments start with #
192.168.1.0/24
10.0.0.0/24
172.16.1.1 # Single IP (auto-converted to /32)
192.168.2.100/32 # Explicit CIDR
```
## 🤝 贡献
欢迎贡献!请:
1. Fork 本仓库
2. 创建一个功能分支
3. 进行你的更改
4. 提交 pull request
对于重大更改,请先开启一个 issue。
## 📄 许可证
本项目采用 GNU General Public License v3.0 许可 - 详见 [LICENSE](LICENSE) 文件。
## 🙏 致谢
- 为渗透测试人员和安全专业人员打造
- 源于对全面 SMB 共享分析的需求
- 感谢所有贡献者和测试人员
## 🔗 链接
- **GitHub**: https://github.com/cumakurt/Jesur
**为渗透测试人员用 ❤️ 打造**
标签:AES-256, CIFS, Docker, HTTP工具, NTLM认证, Pass-the-Hash, Python安全工具, SMB扫描器, 云存储安全, 凭据探测, 安全助手, 安全监控, 安全防御评估, 敏感文件检测, 数据防泄露, 文件共享安全, 权限分析, 漏洞评估, 网络安全, 网络扫描, 请求拦截, 逆向工具, 隐私保护