The project is based on Go and Vue to build a management system for sensitive information detection. For the full introduction, please refer to articles and videos. For now, all the scans are only targeted to the public environments, not local environments.
For the usage of GShark, please refer to the wiki.
- Support multi-platforms, including GitLab, GitHub, Searchcode, Postman
- Flexible menu and API permission setting
- Flexible rules and filter rules
- Utilize gobuster to brute force subdomain
- Easily used management system
- Support for docker deployment
git clone https://github.com/madneal/gshark
cd gshark
docker-compose build && docker-compose up
- Nginx
- MySQL(version above 8.0)
It's suggested to deploy the Front-End project by nginx. Place the dist
folder under /var/www/html
, modify the nginx.conf
(/etc/nginx/nginx.conf for linux) to reverse proxy the backend service. For the detailed deployment videos, refer to bilibili or youtube. For the deployment in windows, refer to here.
Modify the nginx.conf
:
// config the user accoring to your need
user www www;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
location / {
autoindex on;
root html;
index index.html index.htm;
}
location /api/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:8888;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
include servers/*;
}
The deployment work is straightforward. Find the corresponding version zip file from releases.
Unzip and copy the files inside dist
to /var/www/html
folder of Nginx.
unzip gshark*.zip
Start the Nginx and the Front-End is deployed successfully.
For the incremental deployment, sql.md should be executed for the corresponding database operations.
For the first time, you need to rename config-temp.yaml
to config.yaml
.
go build && ./gshark
or
go run main.go
For the scan service, it's necessary to config the corresponding rules. For example, Github or Gitlab rules.
git clone https://github.com/madneal/gshark.git
cd server
go mod tidy
mv config-temp.yaml config.yaml
go build
./gshark
or
go run main.go
cd ../web
npm install
npm run serve
To execute the scan task for GitHub, you need to add a GitHub token for crawl information in GitHub. You can generate a token in tokens. Most access scopes are enough. For the GitLab search, remember to add a token too.
Obtain the postman.sid
cookie:
For the Github or Gitlab rule, the rule will be matched by the syntax in the corresponding platforms. Directly, you config what you search at GitHub. You can download the rule import template CSV file, then batch import rules.
Filter is only addressed to GitHub search now. There are three classes of filters, including extension
, keyword
, sec_keyword
. For extension
and keyword
, they can used for blacklist or whitelist.
For more information, you can refer to this video.
You are supposed to rename config-temp.yaml
to config.yaml
and config the database information and other information according to your environment.
- 2021-11-12 发布文章《GShark:多平台的敏感信息监测工具》
修复
- 修复数据库初始化的问题
- 修复 Postman 搜索结果格式
- 前端组件安全升级
修复
- 组件版本的安全升级
- 修复 golang User-Agent 被 Postman 禁用的问题
- 修复前端缺少 postman 规则选项问题
新增
- 增加 Docker 版本 MySql 的数据持久化
- GitHub client 可以忽略 TLS 错误
新增
- 增加 postman 中 request 搜索
更新
- 修改 docker 数据库默认密码
- 增加初始化任务
更新
- go-github 组件升级
- GitHub 扫描支持系统代理
新增
- 发布 Docker 版本,通过 Docket 快速启动
- 增加 Docker 启动说明,更新 Docker 版本使用视频
修复
- 修复任务管理菜单初始化问题