diff --git a/CONFIG.md b/CONFIG.md new file mode 100644 index 0000000..ff18b0f --- /dev/null +++ b/CONFIG.md @@ -0,0 +1,42 @@ +## Configuration file description + +RevSuit will generate a profile template the first time it is run, and you can edit its contents to implement some customization requirements. +```yaml +version: 1.3 +addr: :10000 # Address of the HTTP service will listen +token: # Authentication Token, both the admin page and the client need to be authenticated by this Token +domain: # The domain name used by the platform +external_ip: # The external IP of the platform, you need to make sure that the target you want to test can access the platform through this IP +admin_path_prefix: "/revsuit" # The http path prefix for the admin page, the page will be located at: /admin_path_prefix/admin +database: revsuit.db # Database connection information, support using Sqlite3, MySQL, Postgres +# database: "mysql://root:password@tcp(127.0.0.1:3306)/revsuit?charset=utf8mb4&parseTime=True&loc=Local" +# database: "postgres://host=127.0.0.1 user=root password=password dbname=revsuit port=5432 sslmode=disable TimeZone=Asia/Shanghai" + +log_level: info # Output log levels, divided into: debug, info, warning, error, fatal + +ip_location_database: # IP database related configuration + database: "qqwry" # qqwry or geoip. + geo_license_key: "" # Mandatory field, if you choose to use GeoIP. + +http: # HTTP receive connection related configuration + ip_header: # Specify the source IP via the HTTP Header, which is usually required when there is a predecessor reverse proxy +dns: # DNS receive connection related configuration + enable: true + addr: :53 # Address of the DNS service will listen +rmi: # RMI receive connection related configuration + enable: true + addr: :1099 # Address of the RMI service will listen +mysql: # MySQL receive connection related configuration + enable: true + addr: :3306 # Address of the MySQL service will listen + version_string: 10.4.13-MariaDB-log # The version of the MySQL service in disguise +ftp: # FTP receive connection related configuration + enable: true + addr: :21 # Address of the FTP service will listen + pasv_port: 2020 # FTP passive mode port listening address +notice: + dingtalk: https://oapi.dingtalk.com/robot/send?access_token={token} # Webhook of DingTalk Bot + lark: https://open.feishu.cn/open-apis/bot/v2/hook/{token} # Webhook of Lark Bot + weixin: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={key} # Webhook of Weixin Bot + slack: https://hooks.slack.com/services/{id}/{token} # Webhook of Slack Bot +``` \ No newline at end of file diff --git a/CONFIG.zh-CN.md b/CONFIG.zh-CN.md new file mode 100644 index 0000000..b14fa39 --- /dev/null +++ b/CONFIG.zh-CN.md @@ -0,0 +1,42 @@ +## 配置文件说明 + +```yaml +version: 1.3 +addr: :10000 # HTTP 服务监听的地址 +token: # 鉴权Token,管理页面和客户端都需要通过该 Token 进行鉴权 +domain: # 反连平台绑定的域名 +external_ip: # 反连平台的外部IP,需要确保你想测试的目标能通过该 IP 访问到平台 +admin_path_prefix: "/revsuit" # 管理页面的 http path 前缀,管理页面将位于:/admin_path_prefix/admin +database: revsuit.db # 数据库连接信息 支持Sqlite3、MySQL、Postgres +# database: "mysql://root:password@tcp(127.0.0.1:3306)/revsuit?charset=utf8mb4&parseTime=True&loc=Local" +# database: "postgres://host=127.0.0.1 user=root password=password dbname=revsuit port=5432 sslmode=disable TimeZone=Asia/Shanghai" + +log_level: info # 输出日志的级别,分为:debug、info、warning、error、fatal + +ip_location_database: # IP 数据库相关配置 + database: "qqwry" # qqwry 或者 geoip. + geo_license_key: "" # 如果你使用 GeoIP 则该字段为必填 + +http: # HTTP 反连相关配置 + ip_header: # 通过 HTTP 请求头获取来源IP,通常在有前置反向代理时需要配置 +dns: # DNS 反连相关配置 + enable: true + addr: :53 # DNS 服务监听的地址 +rmi: # RMI 反连相关配置 + enable: true + addr: :1099 # RMI 服务监听的地址 +mysql: # MySQL 反连相关配置 + enable: true + addr: :3306 # MySQL 服务监听的地址 + version_string: 10.4.13-MariaDB-log # 伪装MySQL服务的版本 +ftp: # FTP 反连相关配置 + enable: true + addr: :21 # FTP 服务监听的地址 + pasv_port: 2020 # FTP被动模式端口监听的地址 +notice: + dingtalk: https://oapi.dingtalk.com/robot/send?access_token={token} # 钉钉机器人webhook地址 + lark: https://open.feishu.cn/open-apis/bot/v2/hook/{token} # 飞书机器人webhook地址 + weixin: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={key} # 企业微信机器人webhook地址 + slack: https://hooks.slack.com/services/{id}/{token} # slack机器人webhook地址 + +``` \ No newline at end of file diff --git a/README.md b/README.md index 33707ea..7fa47b2 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,15 @@ Powerful: ## Basic Usage -### Preparation +### Installation and Configuration Download the latest release firstly. For the time being, only the binary for amd64 architecture is available for download, if you need to use it in other architectures, you can compile it yourself. RevSuit will generate default configuration file on first run. Modify the configuration file according to your needs, -then re-run. +then re-run. A detailed description of the configuration file can be found at: [Configuration Notes](./CONFIG.md) + +### Run In order to confirm the IP location, it needs to use the IP location database. `QQwry` is used as the data source by default, you can also modify the configuration to use `GeoIP`. If the selected database is not available in the current diff --git a/README.zh-CN.md b/README.zh-CN.md index a230294..30038e1 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -21,13 +21,14 @@ RevSuit 是一款灵活并且强大的反连平台。目前支持 HTTP、DNS、R ## 基础使用 -### 安装 +### 安装及配置 在 Releases 里下载最新版本的 RevSuit。暂时只提供 amd64 架构下的二进制文件下载,如需要在其它架构下使用,可以自行编译。 -RevSuit 首次运行时将会生成配置文件模板,你需要编辑其中的内容然后重新运行。 +RevSuit首次运行将会在当前目录生成配置文件,您可以根据需要自定义其中的某些内容。配置文件的详细说明可见:[配置说明](./CONFIG.zh-CN.md) -为了确认连接 IP 的归属地,RevSuit 需要依赖 IP 归属地数据库。默认情况下使用纯真 IP 库,你也可以在配置文件中指定使用 GeoIP。如果当前目录下没有被选中的数据库文件,或者数据库文件更新的时间大于一周,RevSuit +### 运行 +为了确认连接 IP 的归属地,RevSuit 需要依赖 IP 归属地数据库。默认情况下使用纯真 IP 库,你也可以在配置文件中指定使用 GeoIP。如果当前目录下没有被选中的IP数据库文件,或者IP数据库文件更新的时间大于一周,RevSuit 将会自动下载最新版的数据库文件到本地。如果下载失败,连接记录的`IpArea`字段将始终为空。 ```bash @@ -110,28 +111,6 @@ dns: ## 高级功能 -### 数据库配置 - -#### mysql - -```yaml -database: "mysql://root:password@tcp(127.0.0.1:3306)/revsuit?charset=utf8mb4&parseTime=True&loc=Local" -``` - -#### PostgresSQL - -```yaml -database: "postgres://host=127.0.0.1 user=postgres password=postgres dbname=postgres port=5432 sslmode=disable TimeZone=Asia/Shanghai" -``` - -#### sqlite3 - -```yaml -database: revsuit.db -``` - - - ### 与扫描器适配 RevSuit 拆分自我的扫描器项目,因此它原生支持搭配扫描器使用。 @@ -239,4 +218,4 @@ payload,最后被扫描器发出的请求是:`['https://www.testvuln.com?url ## 开源许可协议 -@Apache License 2.0 +@Apache License 2.0 \ No newline at end of file