All Projects → google → Safebrowsing

google / Safebrowsing

Licence: apache-2.0
Safe Browsing API Go Client

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Safebrowsing

Cryptsky
A simple, fully python ransomware PoC
Stars: ✭ 304 (-13.64%)
Mutual labels:  malware
Laravel Query Logger
📝 A dev tool to log all queries for laravel application.
Stars: ✭ 316 (-10.23%)
Mutual labels:  query
Phpmussel
PHP-based anti-virus anti-trojan anti-malware solution.
Stars: ✭ 337 (-4.26%)
Mutual labels:  malware
Malsub
A Python RESTful API framework for online malware analysis and threat intelligence services.
Stars: ✭ 308 (-12.5%)
Mutual labels:  malware
Richkware
Framework for building Windows malware, written in C++
Stars: ✭ 315 (-10.51%)
Mutual labels:  malware
Fidl
A sane API for IDA Pro's decompiler. Useful for malware RE and vulnerability research
Stars: ✭ 319 (-9.37%)
Mutual labels:  malware
Phishing.database
Phishing Domains, urls websites and threats database. We use the PyFunceble testing tool to validate the status of all known Phishing domains and provide stats to reveal how many unique domains used for Phishing are still active.
Stars: ✭ 296 (-15.91%)
Mutual labels:  malware
Malware Sample Library
Malware sample library.
Stars: ✭ 345 (-1.99%)
Mutual labels:  malware
Ghost
👻 RAT (Remote Access Trojan) - Silent Botnet - Full Remote Command-Line Access - Download & Execute Programs - Spread Virus' & Malware
Stars: ✭ 312 (-11.36%)
Mutual labels:  malware
Malconfscan
Volatility plugin for extracts configuration data of known malware
Stars: ✭ 327 (-7.1%)
Mutual labels:  malware
Coldfire
Golang malware development framework
Stars: ✭ 309 (-12.22%)
Mutual labels:  malware
Reverse Engineering Tutorial
A FREE comprehensive reverse engineering tutorial covering x86, x64, 32-bit ARM & 64-bit ARM architectures.
Stars: ✭ 5,763 (+1537.22%)
Mutual labels:  malware
Android unpacker
A (hopefully) generic unpacker for packed Android apps.
Stars: ✭ 320 (-9.09%)
Mutual labels:  malware
Loukoum
A simple SQL Query Builder
Stars: ✭ 305 (-13.35%)
Mutual labels:  query
Urlextractor
Information gathering & website reconnaissance | https://phishstats.info/
Stars: ✭ 341 (-3.12%)
Mutual labels:  malware
Updated Carbanak Source With Plugins
https://twitter.com/itsreallynick/status/1120410950430089224
Stars: ✭ 303 (-13.92%)
Mutual labels:  malware
React Querybuilder
A QueryBuilder component for React
Stars: ✭ 315 (-10.51%)
Mutual labels:  query
Hijackthis
A free utility that finds malware, adware and other security threats
Stars: ✭ 349 (-0.85%)
Mutual labels:  malware
Gonnacry
A Linux Ransomware
Stars: ✭ 341 (-3.12%)
Mutual labels:  malware
Hosts
🔒 Consolidating and extending hosts files from several well-curated sources. Optionally pick extensions for porn, social media, and other categories.
Stars: ✭ 19,363 (+5400.85%)
Mutual labels:  malware

Build Status

Reference Implementation for the Usage of Google Safe Browsing APIs (v4)

The safebrowsing Go package can be used with the Google Safe Browsing APIs (v4) to access the Google Safe Browsing lists of unsafe web resources. Inside the cmd sub-directory, you can find two programs: sblookup and sbserver. The sbserver program creates a proxy local server to check URLs and a URL redirector to redirect users to a warning page for unsafe URLs. The sblookup program is a command line service that can also be used to check URLs.

This README.md is a quickstart guide on how to build, deploy, and use the safebrowsing Go package. It can be used out-of-the-box. The GoDoc and API documentation provide more details on fine tuning the parameters if desired.

Setup

To use the safebrowsing Go package you must obtain an API key from the Google Developer Console. For more information, see the Get Started section of the Google Safe Browsing APIs (v4) documentation.

How to Build

To download and install from the source, run the following command:

go get github.com/google/safebrowsing

The programs below execute from your $GOPATH/bin folder. Add that to your $PATH for convenience:

export PATH=$PATH:$GOPATH/bin

Proxy Server

The sbserver server binary runs a Safe Browsing API lookup proxy that allows users to check URLs via a simple JSON API.

  1. Once the Go environment is setup, run the following command with your API key:

    go get github.com/google/safebrowsing/cmd/sbserver
    sbserver -apikey $APIKEY
    

    With the default settings this will start a local server at 127.0.0.1:8080.

  2. The server also uses an URL redirector (listening on /r) to show an interstitial for anything marked unsafe.
    If the URL is safe, the client is automatically redirected to the target. Else, an interstitial warning page is shown as recommended by Safe Browsing.
    Try these URLs:

    127.0.0.1:8080/r?url=http://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/MALWARE/URL/
    127.0.0.1:8080/r?url=http://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/SOCIAL_ENGINEERING/URL/
    127.0.0.1:8080/r?url=http://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/UNWANTED_SOFTWARE/URL/
    127.0.0.1:8080/r?url=http://www.google.com/
    
  3. The server also has a lightweight implementation of the API v4 threatMatches endpoint.
    To use the local proxy server to check a URL, send a POST request to 127.0.0.1:8080/v4/threatMatches:find with the following JSON body:

    {
    	"threatInfo": {
    		"threatTypes":      ["UNWANTED_SOFTWARE", "MALWARE"],
    		"platformTypes":    ["ANY_PLATFORM"],
    		"threatEntryTypes": ["URL"],
    		"threatEntries": [
    			{"url": "google.com"},
    			{"url": "http://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/MALWARE/URL/"}
    		]
    	}
    }
    

    Refer to the Google Safe Browsing APIs (v4) for the format of the JSON request.

Command-Line Lookup

The sblookup command-line binary is another example of how the Go Safe Browsing library can be used to protect users from unsafe URLs. This command-line tool filters unsafe URLs piped via STDIN. Example usage:

$ go get github.com/google/safebrowsing/cmd/sblookup
$ echo "http://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/MALWARE/URL/" | sblookup -apikey=$APIKEY
  Unsafe URL found:  http://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/MALWARE/URL/ [{testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/MALWARE/URL/ {MALWARE ANY_PLATFORM URL}}]

Safe Browsing System Test

To perform an end-to-end test on the package with the Safe Browsing backend, run the following command:

go test github.com/google/safebrowsing -v -run TestSafeBrowser -apikey $APIKEY
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].