HTTP middleware for Go that facilitates some quick security wins.

Secure GoDoc Test

Secure is an HTTP middleware for Go that facilitates some quick security wins. It's a standard net/http Handler, and can be used with many frameworks or directly with Go's net/http package.

Usage

// main.go
package main

import (
    "net/http"

    "github.com/unrolled/secure" // or "gopkg.in/unrolled/secure.v1"
)

var myHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    w.Write([]byte("hello world"))
})

func main() {
    secureMiddleware := secure.New(secure.Options{
        AllowedHosts:          []string{"example\\.com", ".*\\.example\\.com"},
        AllowedHostsAreRegex:  true,
        HostsProxyHeaders:     []string{"X-Forwarded-Host"},
        SSLRedirect:           true,
        SSLHost:               "ssl.example.com",
        SSLProxyHeaders:       map[string]string{"X-Forwarded-Proto": "https"},
        STSSeconds:            31536000,
        STSIncludeSubdomains:  true,
        STSPreload:            true,
        FrameDeny:             true,
        ContentTypeNosniff:    true,
        BrowserXssFilter:      true,
        ContentSecurityPolicy: "script-src $NONCE",
    })

    app := secureMiddleware.Handler(myHandler)
    http.ListenAndServe("127.0.0.1:3000", app)
}

Be sure to include the Secure middleware as close to the top (beginning) as possible (but after logging and recovery). It's best to do the allowed hosts and SSL check before anything else.

The above example will only allow requests with a host name of 'example.com', or 'ssl.example.com'. Also if the request is not HTTPS, it will be redirected to HTTPS with the host name of 'ssl.example.com'. Once those requirements are satisfied, it will add the following headers:

Strict-Transport-Security: 31536000; includeSubdomains; preload
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Security-Policy: script-src 'nonce-a2ZobGFoZg=='

Set the IsDevelopment option to true when developing!

When IsDevelopment is true, the AllowedHosts, SSLRedirect, STS header, and HPKP header will not be in effect. This allows you to work in development/test mode and not have any annoying redirects to HTTPS (ie. development can happen on HTTP), or block localhost has a bad host.

Available options

Secure comes with a variety of configuration options (Note: these are not the default option values. See the defaults below.):

// ...
s := secure.New(secure.Options{
    AllowedHosts: []string{"ssl.example.com"}, // AllowedHosts is a list of fully qualified domain names that are allowed. Default is empty list, which allows any and all host names.
    AllowedHostsAreRegex: false,  // AllowedHostsAreRegex determines, if the provided AllowedHosts slice contains valid regular expressions. Default is false.
    HostsProxyHeaders: []string{"X-Forwarded-Hosts"}, // HostsProxyHeaders is a set of header keys that may hold a proxied hostname value for the request.
    SSLRedirect: true, // If SSLRedirect is set to true, then only allow HTTPS requests. Default is false.
    SSLTemporaryRedirect: false, // If SSLTemporaryRedirect is true, the a 302 will be used while redirecting. Default is false (301).
    SSLHost: "ssl.example.com", // SSLHost is the host name that is used to redirect HTTP requests to HTTPS. Default is "", which indicates to use the same host.
    SSLHostFunc: nil, // SSLHostFunc is a function pointer, the return value of the function is the host name that has same functionality as `SSHost`. Default is nil. If SSLHostFunc is nil, the `SSLHost` option will be used.
    SSLProxyHeaders: map[string]string{"X-Forwarded-Proto": "https"}, // SSLProxyHeaders is set of header keys with associated values that would indicate a valid HTTPS request. Useful when using Nginx: `map[string]string{"X-Forwarded-Proto": "https"}`. Default is blank map.
    STSSeconds: 31536000, // STSSeconds is the max-age of the Strict-Transport-Security header. Default is 0, which would NOT include the header.
    STSIncludeSubdomains: true, // If STSIncludeSubdomains is set to true, the `includeSubdomains` will be appended to the Strict-Transport-Security header. Default is false.
    STSPreload: true, // If STSPreload is set to true, the `preload` flag will be appended to the Strict-Transport-Security header. Default is false.
    ForceSTSHeader: false, // STS header is only included when the connection is HTTPS. If you want to force it to always be added, set to true. `IsDevelopment` still overrides this. Default is false.
    FrameDeny: true, // If FrameDeny is set to true, adds the X-Frame-Options header with the value of `DENY`. Default is false.
    CustomFrameOptionsValue: "SAMEORIGIN", // CustomFrameOptionsValue allows the X-Frame-Options header value to be set with a custom value. This overrides the FrameDeny option. Default is "".
    ContentTypeNosniff: true, // If ContentTypeNosniff is true, adds the X-Content-Type-Options header with the value `nosniff`. Default is false.
    BrowserXssFilter: true, // If BrowserXssFilter is true, adds the X-XSS-Protection header with the value `1; mode=block`. Default is false.
    CustomBrowserXssValue: "1; report=https://example.com/xss-report", // CustomBrowserXssValue allows the X-XSS-Protection header value to be set with a custom value. This overrides the BrowserXssFilter option. Default is "".
    ContentSecurityPolicy: "default-src 'self'", // ContentSecurityPolicy allows the Content-Security-Policy header value to be set with a custom value. Default is "". Passing a template string will replace `$NONCE` with a dynamic nonce value of 16 bytes for each request which can be later retrieved using the Nonce function.
    PublicKey: `pin-sha256="base64+primary=="; pin-sha256="base64+backup=="; max-age=5184000; includeSubdomains; report-uri="https://www.example.com/hpkp-report"`, // Deprecated: This feature is no longer recommended. PublicKey implements HPKP to prevent MITM attacks with forged certificates. Default is "".
    ReferrerPolicy: "same-origin", // ReferrerPolicy allows the Referrer-Policy header with the value to be set with a custom value. Default is "".
    FeaturePolicy: "vibrate 'none';", // FeaturePolicy allows the Feature-Policy header with the value to be set with a custom value. Default is "".
    ExpectCTHeader: `enforce, max-age=30, report-uri="https://www.example.com/ct-report"`,

    IsDevelopment: true, // This will cause the AllowedHosts, SSLRedirect, and STSSeconds/STSIncludeSubdomains options to be ignored during development. When deploying to production, be sure to set this to false.
})
// ...

Default options

These are the preset options for Secure:

s := secure.New()

// Is the same as the default configuration options:

l := secure.New(secure.Options{
    AllowedHosts: []string,
    AllowedHostsAreRegex: false,
    HostsProxyHeaders: []string,
    SSLRedirect: false,
    SSLTemporaryRedirect: false,
    SSLHost: "",
    SSLProxyHeaders: map[string]string{},
    STSSeconds: 0,
    STSIncludeSubdomains: false,
    STSPreload: false,
    ForceSTSHeader: false,
    FrameDeny: false,
    CustomFrameOptionsValue: "",
    ContentTypeNosniff: false,
    BrowserXssFilter: false,
    ContentSecurityPolicy: "",
    PublicKey: "",
    ReferrerPolicy: "",
    FeaturePolicy: "",
    ExpectCTHeader: "",
    IsDevelopment: false,
})

Also note the default bad host handler returns an error:

http.Error(w, "Bad Host", http.StatusInternalServerError)

Call secure.SetBadHostHandler to change the bad host handler.

Redirecting HTTP to HTTPS

If you want to redirect all HTTP requests to HTTPS, you can use the following example.

// main.go
package main

import (
    "log"
    "net/http"

    "github.com/unrolled/secure" // or "gopkg.in/unrolled/secure.v1"
)

var myHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    w.Write([]byte("hello world"))
})

func main() {
    secureMiddleware := secure.New(secure.Options{
        SSLRedirect: true,
        SSLHost:     "localhost:8443", // This is optional in production. The default behavior is to just redirect the request to the HTTPS protocol. Example: http://github.com/some_page would be redirected to https://github.com/some_page.
    })

    app := secureMiddleware.Handler(myHandler)

    // HTTP
    go func() {
        log.Fatal(http.ListenAndServe(":8080", app))
    }()

    // HTTPS
    // To generate a development cert and key, run the following from your *nix terminal:
    // go run $GOROOT/src/crypto/tls/generate_cert.go --host="localhost"
    log.Fatal(http.ListenAndServeTLS(":8443", "cert.pem", "key.pem", app))
}

Strict Transport Security

The STS header will only be sent on verified HTTPS connections (and when IsDevelopment is false). Be sure to set the SSLProxyHeaders option if your application is behind a proxy to ensure the proper behavior. If you need the STS header for all HTTP and HTTPS requests (which you shouldn't), you can use the ForceSTSHeader option. Note that if IsDevelopment is true, it will still disable this header even when ForceSTSHeader is set to true.

  • The preload flag is required for domain inclusion in Chrome's preload list.

Content Security Policy

If you need dynamic support for CSP while using Websockets, check out this other middleware awakenetworks/csp.

Integration examples

chi

// main.go
package main

import (
    "net/http"

    "github.com/pressly/chi"
    "github.com/unrolled/secure" // or "gopkg.in/unrolled/secure.v1"
)

func main() {
    secureMiddleware := secure.New(secure.Options{
        FrameDeny: true,
    })

    r := chi.NewRouter()
    r.Use(secureMiddleware.Handler)

    r.Get("/", func(w http.ResponseWriter, r *http.Request) {
        w.Write([]byte("X-Frame-Options header is now `DENY`."))
    })

    http.ListenAndServe("127.0.0.1:3000", r)
}

Echo

// main.go
package main

import (
    "net/http"

    "github.com/labstack/echo"
    "github.com/unrolled/secure" // or "gopkg.in/unrolled/secure.v1"
)

func main() {
    secureMiddleware := secure.New(secure.Options{
        FrameDeny: true,
    })

    e := echo.New()
    e.GET("/", func(c echo.Context) error {
        return c.String(http.StatusOK, "X-Frame-Options header is now `DENY`.")
    })

    e.Use(echo.WrapMiddleware(secureMiddleware.Handler))
    e.Logger.Fatal(e.Start("127.0.0.1:3000"))
}

Gin

// main.go
package main

import (
    "github.com/gin-gonic/gin"
    "github.com/unrolled/secure" // or "gopkg.in/unrolled/secure.v1"
)

func main() {
    secureMiddleware := secure.New(secure.Options{
        FrameDeny: true,
    })
    secureFunc := func() gin.HandlerFunc {
        return func(c *gin.Context) {
            err := secureMiddleware.Process(c.Writer, c.Request)

            // If there was an error, do not continue.
            if err != nil {
                c.Abort()
                return
            }

            // Avoid header rewrite if response is a redirection.
            if status := c.Writer.Status(); status > 300 && status < 399 {
                c.Abort()
            }
        }
    }()

    router := gin.Default()
    router.Use(secureFunc)

    router.GET("/", func(c *gin.Context) {
        c.String(200, "X-Frame-Options header is now `DENY`.")
    })

    router.Run("127.0.0.1:3000")
}

Goji

// main.go
package main

import (
    "net/http"

    "github.com/unrolled/secure" // or "gopkg.in/unrolled/secure.v1"
    "github.com/zenazn/goji"
    "github.com/zenazn/goji/web"
)

func main() {
    secureMiddleware := secure.New(secure.Options{
        FrameDeny: true,
    })

    goji.Get("/", func(c web.C, w http.ResponseWriter, req *http.Request) {
        w.Write([]byte("X-Frame-Options header is now `DENY`."))
    })
    goji.Use(secureMiddleware.Handler)
    goji.Serve() // Defaults to ":8000".
}

Iris

//main.go
package main

import (
    "github.com/kataras/iris/v12"
    "github.com/unrolled/secure" // or "gopkg.in/unrolled/secure.v1"
)

func main() {
    app := iris.New()

    secureMiddleware := secure.New(secure.Options{
        FrameDeny: true,
    })

    app.Use(iris.FromStd(secureMiddleware.HandlerFuncWithNext))
    // Identical to:
    // app.Use(func(ctx iris.Context) {
    //     err := secureMiddleware.Process(ctx.ResponseWriter(), ctx.Request())
    //
    //     // If there was an error, do not continue.
    //     if err != nil {
    //         return
    //     }
    //
    //     ctx.Next()
    // })

    app.Get("/home", func(ctx iris.Context) {
        ctx.Writef("X-Frame-Options header is now `%s`.", "DENY")
    })

    app.Listen(":8080")
}

Mux

//main.go
package main

import (
    "log"
    "net/http"

    "github.com/gorilla/mux"
    "github.com/unrolled/secure" // or "gopkg.in/unrolled/secure.v1"
)

func main() {
    secureMiddleware := secure.New(secure.Options{
        FrameDeny: true,
    })

    r := mux.NewRouter()
    r.Use(secureMiddleware.Handler)
    http.Handle("/", r)
    log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", 8080), nil))
}

Negroni

Note this implementation has a special helper function called HandlerFuncWithNext.

// main.go
package main

import (
    "net/http"

    "github.com/urfave/negroni"
    "github.com/unrolled/secure" // or "gopkg.in/unrolled/secure.v1"
)

func main() {
    mux := http.NewServeMux()
    mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
        w.Write([]byte("X-Frame-Options header is now `DENY`."))
    })

    secureMiddleware := secure.New(secure.Options{
        FrameDeny: true,
    })

    n := negroni.Classic()
    n.Use(negroni.HandlerFunc(secureMiddleware.HandlerFuncWithNext))
    n.UseHandler(mux)

    n.Run("127.0.0.1:3000")
}
Comments
  • Add linters.

    Add linters.

    • add gometalinter
    • fix golint issues
    • add a Makefile
    • update Travis configuration
    • add vendor to gitignore.

    The build will fail until the PR #32 is merged.

  • HSTS Warnings

    HSTS Warnings

    Forcing HTTPS on all subdomains for 10 years is a dangerous to show on the first example. There should probably be some kind of warning about HSTS - that once you add them and user's browsers accept them, they can't be removed. If this Go server is handling all subdomains, then it'll probably be fine, but many people will have CNAMEs pointing elsewhere for various hosted services, etc.

  • Gin accessing CSP nonce

    Gin accessing CSP nonce

    Hello, I am trying to access the generated NONCE using Gin:

    nonce := secure.CSPNonce(c.Request.Context())
    

    This always returns an empty string, even tho the nonce appears on the request headers, digging the code I see the nonce beeing added to the request context (I am using the example on the README), but I cant seem to get it properly, here is a more complete example:

    
    func Home(c *gin.Context) {
    	c.HTML(http.StatusOK, "home.html", gin.H{
    		"nonce":   secure.CSPNonce(c.Request.Context()),
    	})
    }
    
    func secureFunc(config *app.Config) gin.HandlerFunc {
    	// Create secure middleware
    	secureMiddleware := secure.New(secure.Options{
    		FrameDeny:            true,
    		BrowserXssFilter:     true,
    		ReferrerPolicy:       "no-referrer",
    		ContentTypeNosniff:   true,
    		AllowedHostsAreRegex: false,
    		SSLRedirect:          !config.DebugMode,
    		SSLTemporaryRedirect: false,
    		STSSeconds:           31536000,
    		ContentSecurityPolicy: fmt.Sprintf(
    			"script-src %s",
    			"'self' $NONCE",
    		),
    		IsDevelopment: config.DebugMode,
    	})
    
    	return func(c *gin.Context) {
    		if err := secureMiddleware.Process(c.Writer, c.Request); err != nil {
    			c.AbortWithError(http.StatusInternalServerError, err)
    			return
    		}
    
    		// Avoid header rewrite if response is a redirection
    		if status := c.Writer.Status(); status > 300 && status < 399 {
    			c.Abort()
    		}
    	}
    }
    

    Clearly the nonceEnabled should be true (https://github.com/unrolled/secure/blob/v1/secure.go#L248) but the value is not there, I am missing something?

    Any ideas?

    Thanks

  • Add a Content Security Policy builder

    Add a Content Security Policy builder

    Content Security policies can be a long and complex string. Is it worth creating a simple function/struct/builder to make constructing these easier, and in a less error prone way? Something like:

    secure.Options{
      ContentSecurityPolicy: secure.ContentSecurityPolicy{
        DefaultSrc: ["self"],
        ScriptSrc: ["self", "www.google-analytics.com"]
      }
    }
    
  • force ssl only if X-Forwarded-Proto exists and its not https?

    force ssl only if X-Forwarded-Proto exists and its not https?

    hi

    we have health check on server which check the server for uptime, but with forced https, it causes issue. anyway to allow ignore redirect if either X-Forwarded-Proto is empty or not set or AllowedHosts is not in the list?

  • Can't get $NONCE to work properly

    Can't get $NONCE to work properly

    I'm currently trying to implement the new (and awesome) dynamic CSP nonce feature to work, but I think I'm doing something wrong.

    I created a secure.Options struct with the following params: secureMiddlewareOptions := secure.Options{ ContentSecurityPolicy: "script-src $NONCE", }

    I then add the created middleware to my main negroni route: secureMiddleware := secure.New(secureMiddlewareOptions) n.Use(negroni.HandlerFunc(secureMiddleware.HandlerFuncWithNext))

    The Content-Security-Policy header is added correctly, and the $NONCE is replaced. But instead of replacing it with a random CSP "string" nothing is added. The result looks like this: Content-Security-Policy:script-src 'nonce-'.

    Did I overlook something? Thanks for your help.

  • SSLRedirect not working if only TLS is served

    SSLRedirect not working if only TLS is served

    Hello there i have a problem with SSLRedirect, the problem is that i only serve a TLS instance with http.ListenAndServeTLS(":8443", "cert.pem", "key.pem", n) and no plain istance.

    Visiting localhost:8443 it doesn't redirect me to https://localhost:8443 And in console i get 2017/10/18 17:27:13 http: TLS handshake error from [::1]:39118: tls: first record does not look like a TLS handshake

    There is another solution instead of starting a plain instance?

  • Seeking information about redirecting HTTP to HTTPS

    Seeking information about redirecting HTTP to HTTPS

    Hi, I used your redirecting example and I am interested in knowing if it is SAFE to add more headers to secureMiddlewareof your example or not? I am very new to security in Go. The thing is that your approach shows that we create one secureMiddlewareand pass it to ListenAndServego routine as well as ListenAndServeTLS.

    What if, I do the same thing but add more header to that secureMiddleware? Is this a possibility that hackers somehow get to understand that we are redirected from http to https and therefore we can get into the http version of the server (because I am passing the main gorilla router to ListenAndServe). Does something like this happen?

    And what about future links we visit on the site after first redirection? ListenAndServe was used only once when we typed url without https (I am on development right now). I still want to confirm as I am not sure.

    Below is my current main function for your reference:

    func main() {
    
    	// HTTPS certificate files
    	certPath := "server.pem"
    	keyPath := "server.key"
    
    	// secure middleware
    	secureMiddleware := secure.New(secure.Options{
    		AllowedHosts:         []string{"localhost"},
    		HostsProxyHeaders:    []string{"X-Forwarded-Host"},
    		SSLRedirect:          true,
    		SSLHost:              "localhost:443",
    		SSLProxyHeaders:      map[string]string{"X-Forwarded-Proto": "https"},
    		STSSeconds:           63072000,
    		STSIncludeSubdomains: true,
    		STSPreload:           true,
    		ForceSTSHeader:       false,
    		FrameDeny:            true,
    		ContentTypeNosniff:   true,
    		BrowserXssFilter:     true,
    		// I need to change it as Content-Security-Policy: default-src 'self' *.trusted.com if I want to load images from S3 bucket (See - https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)
    		// ContentSecurityPolicy: "default-src 'self'",
    		PublicKey:      `pin-sha256="base64+primary=="; pin-sha256="base64+backup=="; max-age=5184000; includeSubdomains; report-uri="https://www.example.com/hpkp-report"`,
    		ReferrerPolicy: "same-origin",
    		// IsDevelopment:         true,
    	})
    
    	// Setting up logging files in append mode
    	common.SetupLogging()
    	common.Log.Info("On line 35 certPath and keyPath")
    
    	// Setting up mongodb
    	mongodb, err := datastore.NewDatastore(datastore.MONGODB, "localhost:27017")
    	if err != nil {
    		common.Log.Warn(err.Error())
    	}
    	defer mongodb.Close()
    
    	// Passing mongodb to environment variable
    	env := common.Env{DB: mongodb}
    	common.Log.Info("On line 44")
    
    	// Router and routes
    	r := mux.NewRouter()
    	r.Handle("/", handlers.Handler{E: &env, H: handlers.Index}).Methods("GET")
    
    	// Middleware and server
    	commonMiddleware := handlers.RecoveryHandler(handlers.PrintRecoveryStack(true))(gh.CombinedLoggingHandler(common.TrafficLog, secureMiddleware.Handler(r)))
    	common.Log.Info("On line 49")
    
    	sTLS := &http.Server{
    		Addr:           ":443",
    		Handler:        commonMiddleware,
    		ReadTimeout:    10 * time.Second,
    		WriteTimeout:   10 * time.Second,
    		MaxHeaderBytes: 1 << 20,
    	}
    
    	common.Log.Info("Serving...")
    
    	go func() {
    		log.Fatal(http.ListenAndServe(":80", commonMiddleware))
    	}()
    
    	log.Fatal(sTLS.ListenAndServeTLS(certPath, keyPath))
    }
    

    Or, should we have one secureMiddleware and one redirectMiddleware; the redirectMiddleware will be exactly like the one in your HTTP to HTTPS redirection example in readme. And, pass this redirectMiddleware to ListenAndServe with the main router (in my case r).

    Please clarify. And, if we can use same secureMiddleware then I would prefer we add comments stating something like "// you can have more headers here" in the secureMiddleware of redirection example.

  • Allow a custom context key

    Allow a custom context key

    This PR:

    • Allows for a custom context key to be set

    This allows each instance of secure to manage its own headers, and work independently of any others.

    Allows chaining secure instances, so that options only have to be set for each link in the chain, instead of for the final result.

    Fixes #64

  • AllowedHost check wildcard for subdomains

    AllowedHost check wildcard for subdomains

    In my opinion, the if clause for the host check should rather be implemented with a regular expression, since e.g. wildcards are often used to allow subdomains.

    What's your point of view on this issue? Should I open a pull request?

  • ModifyResponse feature to be able to use secure with http.ReverseProxy

    ModifyResponse feature to be able to use secure with http.ReverseProxy

    When unrolled/secure middleware is used with go ReverseProxy if the backend response contains security headers, headers will be duplicated.

    This PR allow to process only the request and to not write headers into the ResponseWriter to avoid duplicated headers. And secure response headers will be write directly in the response with ModifyResponseHeaders

    Like it is explained here duplicated headers will produce issues.

    Like you can see in reverseproxy.go

    func copyHeader(dst, src http.Header) {
    	for k, vv := range src {
    		for _, v := range vv {
    			dst.Add(k, v)
    		}
    	}
    }
    
    func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
    ...
          if p.ModifyResponse != nil {
    		if err := p.ModifyResponse(res); err != nil {
    			p.logf("http: proxy error: %v", err)
    			rw.WriteHeader(http.StatusBadGateway)
    			return
    		}
    	}
    
    	copyHeader(rw.Header(), res.Header)
    ...
    }
    

    If rw.Header() contains secure headers and res.Header contains the same secure headers. There will be duplication

    With this PR it's allow users to not write secure headers in rw.Header() but directly write headers in res.Header and avoid duplication

    Related to https://github.com/containous/traefik/issues/2618

Web-Security-Academy - Web Security Academy, developed in GO

Web-Security-Academy - Web Security Academy, developed in GO

Feb 23, 2022
androidqf (Android Quick Forensics) helps quickly gathering forensic evidence from Android devices, in order to identify potential traces of compromise.

androidqf androidqf (Android Quick Forensics) is a portable tool to simplify the acquisition of relevant forensic data from Android devices. It is the

Dec 28, 2022
๐Ÿ—บ Allows quick generation of basic network plans based on nmap and scan6 output.

NPlan Transforms nmap XML into intermediate JSON and generates a basic network plan in the DrawIO XML format. Installation Just run go install github.

Mar 10, 2022
Dec 28, 2022
Gryffin is a large scale web security scanning platform.

Gryffin (beta) Gryffin is a large scale web security scanning platform. It is not yet another scanner. It was written to solve two specific problems w

Dec 27, 2022
set of web security test cases and a toolkit to construct new ones

Webseclab Webseclab contains a sample set of web security test cases and a toolkit to construct new ones. It can be used for testing security scanners

Jan 7, 2023
PHP security vulnerabilities checker

Local PHP Security Checker The Local PHP Security Checker is a command line tool that checks if your PHP application depends on PHP packages with know

Jan 3, 2023
Tracee: Linux Runtime Security and Forensics using eBPF
Tracee: Linux Runtime Security and Forensics using eBPF

Tracee is a Runtime Security and forensics tool for Linux. It is using Linux eBPF technology to trace your system and applications at runtime, and analyze collected events to detect suspicious behavioral patterns.

Jan 5, 2023
Sqreen's Application Security Management for the Go language
Sqreen's Application Security Management for the Go language

Sqreen's Application Security Management for Go After performance monitoring (APM), error and log monitoring itโ€™s time to add a security component int

Dec 27, 2022
A scalable overlay networking tool with a focus on performance, simplicity and security

What is Nebula? Nebula is a scalable overlay networking tool with a focus on performance, simplicity and security. It lets you seamlessly connect comp

Dec 29, 2022
How to systematically secure anything: a repository about security engineering
How to systematically secure anything: a repository about security engineering

How to Secure Anything Security engineering is the discipline of building secure systems. Its lessons are not just applicable to computer security. In

Jan 5, 2023
Convenience of containers, security of virtual machines

Convenience of containers, security of virtual machines With firebuild, you can build and deploy secure VMs directly from Dockerfiles and Docker image

Dec 28, 2022
MQTTๅฎ‰ๅ…จๆต‹่ฏ•ๅทฅๅ…ท (MQTT Security Tools)
MQTTๅฎ‰ๅ…จๆต‹่ฏ•ๅทฅๅ…ท (MQTT Security Tools)

โ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ• โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•”โ•โ–ˆ

Dec 21, 2022
gosec - Golang Security Checker
 gosec - Golang Security Checker

Inspects source code for security problems by scanning the Go AST.

Jan 2, 2023
GoPhish by default tips your hand to defenders and security solutions. T

GoPhish by default tips your hand to defenders and security solutions. The container here strips those indicators and makes other changes to hopefully evade detection during operations.

Jan 4, 2023
Go binary that finds .EXEs and .DLLs on the system that don't have security controls enabled

Go Hunt Weak PEs Go binary that finds .EXEs and .DLLs on the system that don't have security controls enabled (ASLR, DEP, CFG etc). Usage $ ./go-hunt-

Oct 28, 2021
One Time Passwords (OTPs) are an mechanism to improve security over passwords alone.

otp: One Time Password utilities Go / Golang Why One Time Passwords? One Time Passwords (OTPs) are an mechanism to improve security over passwords alo

Jan 7, 2023
a collection of security projects

security projects A collection of security projects that I worked on from UC Berkeley's security course (cs 161) taught by Nick Weaver. Project 1 (Exp

Nov 8, 2021
firedrill is a malware simulation harness for evaluating your security controls
firedrill is a malware simulation harness for evaluating your security controls

firedrill ?? Malware simulation harness. Build native binaries for Windows, Linux and Mac simulating malicious behaviours. Test the effectiveness of y

Dec 22, 2022