GithubHelp home page GithubHelp logo

slark-yuxj / gshark Goto Github PK

View Code? Open in Web Editor NEW

This project forked from madneal/gshark

0.0 1.0 0.0 244.69 MB

Scan for sensitive information easily and effectively.

License: Apache License 2.0

JavaScript 8.59% Go 50.93% HTML 0.08% Smarty 3.45% Vue 30.60% Dockerfile 0.05% SCSS 6.30%

gshark's Introduction

ZH | EN

GgShark logo

GShark

Scan for sensitive information easily and effectively.

GShark Go Report Card Release

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 wiki.

Features

  • 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

Quick start

GShark

Deployment

Requirements

  • Nginx
  • MySQL(version above 8.0)

It's suggested to deploy the frontend 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.

Nginx

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.

Incremental Deployment

For the incremental deployment, sql.md should be executed for the corresponding database operations.

Server service

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.

Development

Server

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

Web

cd ../web

npm install

npm run serve

Usage

Add Token

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.

iR2TMt.md.png

Rule Configuration

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.

image

Filter Configuration

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.

Configuration

You are supposed to rename config-temp.yaml to config.yaml and config the database information and other information according to your environment.

GitLab Base Url

image

FAQ

  1. Default username and password to login

gshark/gshark

  1. Database initial failed

make sure the version of MySQL is over 5.6. And remove the database before initialing the second time.

  1. go get ./... connection error

It's suggested to enable GOPROXY(refer this article for golang upgrade):

go env -w GOPROXY=https://goproxy.cn,direct
go env -w GO111MODULE=on
  1. When deploying the web to nginx, the page was empty

try to clear the LocalStorage

Resources

Articles

Videos

License

Apache License 2.0

404StarLink 2.0 - Galaxy

GShark 是 404Team 星链计划2.0中的一环,如果对 GShark 有任何疑问又或是想要找小伙伴交流,可以参考星链计划的加群方式。

gshark's People

Contributors

madneal avatar dependabot[bot] avatar 0xzmz avatar hackneal avatar slark-yuxj avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.