Giter VIP home page Giter VIP logo

badssl.com's Introduction

Visit badssl.com for a list of test subdomains, including:

Server Setup

Stock Ubuntu VM, DNS A records for badssl.com. and *.badssl.com. pointing to the VM.

Testing and development

  1. Follow the instructions to install Docker.

  2. Clone into the badssl repo by running git clone https://github.com/chromium/badssl.com && cd badssl.com.

  3. In order to access the various badssl subdomains locally you will need to add them to your system hosts file. Run make list-hosts and copy and paste the output into /etc/hosts.

  4. Start Docker by running make serve.

  5. You can now navigate to badssl.test in your browser, and you should see a certificate error.

  6. The badssl root certificate is at certs/sets/test/gen/crt/ca-root.crt. In order to get the rest of the badssl subdomains working, you will need to add this to your machine's list of trusted certificates.

    • On macOS, drag certs/sets/test/gen/crt/ca-root.crt into the login section of the program Keychain Access. A BadSSL Root Certificate Authority entry should appear in the list. Double-click on this entry and select "Always Trust" from the drop-down menu next to "Secure Sockets Layer (SSL)." Close the window to save your changes.

      If you are already familiar with this process, you can instead run this command:

      security add-trusted-cert -r trustRoot -p ssl \
        -k "$HOME/Library/Keychains/login.keychain" certs/sets/test/gen/crt/ca-root.crt
  7. In order to preserve the client and root certificates even after running make clean, run:

cd certs/sets/test
mkdir -p pregen/crt pregen/key
cp gen/crt/ca-root.crt pregen/crt/ca-root.crt
cp gen/crt/client.crt pregen/crt/client.crt
cp gen/crt/client-ca-root.crt pregen/crt/client-ca-root.crt
cp gen/key/ca-root.key pregen/key/ca-root.key
cp gen/key/client.key pregen/key/client.key
cp gen/key/client-ca-root.key pregen/key/client-ca-root.key

Acknowledgments

badssl.com is hosted on Google Cloud infrastructure and co-maintained by:

Several public badssl.com certificates required special issuance processes. Most certificates were graciously issued for free, thanks to help from:

Various subdomains and test pages are also implemented by external contributors.

Disclaimer

badssl.com is meant for manual testing of security UI in web clients.

Most subdomains are likely to have stable functionality, but anything could change without notice. If you would like a documented guarantee for a particular use case, please file an issue. (Alternatively, you could make a fork and host your own copy.)

badssl.com is not an official Google product. It is offered "AS-IS" and without any warranties.

badssl.com's People

Contributors

alesandroortiz avatar april avatar bifurcation avatar chandra158 avatar christhompson avatar emilstahl avatar ericlaw1979 avatar estark37 avatar firefart avatar g-andrade avatar google-admin avatar greggles avatar lgarron avatar lilyanatia avatar madnight avatar metromoxie avatar ngyikp avatar nickburris avatar nicktimko avatar prefixtitle avatar priyanshu9899 avatar rsolomakhin avatar rugk avatar sashaperigo avatar sleevi avatar xhmikosr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

badssl.com's Issues

help.badssl.com

Change the generic subdomain fallback to redirect to help.badssl.com.

cert-generator.sh fails with an opaque error if certs are already generated.

In particular, if you run cert-generator.sh on a fresh clone, it will print:

Generating BadSSL Certificate Signing Request

Signing BadSSL Default Certificate
Signature ok
subject=/C=US/ST=California/L=San Francisco/O=BadSSL/CN=*.badssl.com
Getting CA Private Key
Error opening CA Private Key ../self-signed/badssl-intermediate.key
139949868869280:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('../self-signed/badssl-intermediate.key','r')
139949868869280:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
unable to load CA Private Key

@marumari, would you mind handling this? A simple solution would be to check if self-signed/ contains any certs, and exit an error message.
A nicer solution might be to ask and offer to overwrite the old certs.

Corrupted certs

Either:

  • Correctly signed certs that have formatting errors.
  • Certs that are corrupted before/after signing.

Support TLSv1 on DH (and other?) tests

Most sites that enable DHE, do so to get Forward Secrecy on older clients that don't support ECDHE. By only negotiating TLSv1.2 and TLSv1.1 on the DH2048/1024/512 pages, none of the legacy systems/browsers can even connect to the page. Appreciate this may not be the primary use case for this project/site but it would be very useful to be able to confirm DH2048 support on things like OS X before 10.9, Chrome before 22, Firefox before 23 and lots and lots of mobile devices.

rsa512.badssl.com

While we're at it (see #18 for rsa1024). This could be useful for testing old/specialized clients.
(But it would probably need a very permissive set of cipher suites for that.)

Host a robots.txt file so browsershots.org can be used

Wanted to use browsershots.org to hit the dh2048.badssl.com page and see which (if any) browsers had problems with 2048bit parameters. I get an error on their site about not being able to access badssl.com/robots.txt.

Their FAQ (http://browsershots.org/faq#) states:

Blocked by robots.txt
Browsershots respects the robots.txt standard. If you want, you can explicitly allow Browsershots by adding a section like this to the robots.txt file on your server:
User-agent: Browsershots
Disallow:
Some pages on browsershots.org are also protected, mainly to keep screenshot result pages out of search engines.

Update setup instructions

They're outdated and incomplete.

Perhaps we should also put them under make install or something similar.

Migrate mixed-content-test.appspot.com to badssl.com?

Either to its own subdomain, or as a common folder for all subdomains.

Right now I'm leaning towards keeping the two separate, but it's worth considering whether to consolidate both browser security test sites I've made.

sslv3.badssl.com

This requires a separate IP address that doesn't use SNI (or at least defaults to SSLv3 with this particular domain).

export.badssl.com

"Export-grade" ciphersuites (idea from @noncombatant).

(There's probably a slightly more self-descriptive subdomain we could use for this, though.)

Everything bad in one place

i.e. SHA-1, RC4, mixed content

In Chrome, this would be useful to see the maximum number of warnings/messages.

ocsp.badssl.com

A subdomain serving valid OCSP.

Other OCSP ideas:

  • Serve invalid OCSP
  • Serve no OCSP but use must-staple.

Don't answer the phone on unknown subdomains

Right now, they all redirect to badssl.com. Perhaps we should stop this, in order to avoid people relying on this behaviour.
(We can always add redirect.badssl.com if it's needed. redirect.badssl.com/<directive> is also easy implement.)

rsa1024.badssl.com (1024-bit RSA Key)

CAs are not supposed to sign these, so it's unlikely we could get a real one for badssl.com.
But we can certainly make a self-signed one for testing.

SHA-1 site lacks sufficient detail

The SHA-1 site should probably say SHA-1 2015 and use a SHA-1 certificate that expires in 2015, especially when the SHA-1 2016 and SHA-1 2017 sites go live.

Oddly enough, the official sha1-2016.badssl.com does not generate any certificate warnings in Chrome, but the one that uses my self-signed root does generate a warning. I feel like my behavior is the correct before, and the one that we should be demonstrating, and that the official site is incorrect. I'm not sure why the official sha1-2016.badssl.com doesn't generate a warning in chrome, though.

Is it because its key is pinned or something?

Generate subdomain HTML from templates

I still insist that the output is static, though. That way, everything can be served, rendered, and debugged more safely.

In addition, it has been very useful for testing that each page is a single resource (with scripts and styles inlined in the page).

tlsv1.badssl.com

I tried this earlier, and couldn't get the downgrade to work.

Allow a set of new certificates to be generated for a given custom CA.

Unfortunately, I can't share the server private key on GitHub, because it's being used for tests that should probably not be MitM-able. And it will become more difficult to obtain publicly signed SHA-1 certs in the near future.

However, it might be useful to use OpenSSL to generate:

  • a custom CA
  • a server key
  • a CSR for *.badssl.com (or maybe localhost?)
  • certs used by badssl signed by the CA

... and then provide a way to run that locally for development. (Strawman for getting the same cert behaviour as public certs, even though it would make me uncomfortable: throw away the CA key after signing certs, import the CA key into the trust store, modify etc/hosts to point the desired test domain to localhost.)

https://github.com/edvinanet/tls-o-matic does something similar, so their code might be useful to look at.

HSTS site could be more useful

hsts.badssl.com doesn't really do anything. It would be great if it had the following behavior:

Then:

Right now, the site is simply setting Strict-Transport-Security and displaying a green background. That really doesn't say much, because it'll generate a green background on everything from IE6 to the latest Chrome.

Additional bad configurations

Certificate Issues

  • SHA-1 expiring in 2017 (#16)
  • OCSP / CT? (#17)
    • Maybe must-staple without stapling?
  • weak-rsa.badssl.com (idea from @noncombatant) (#18)
  • 10000-sans.badssl.com (giant certificates with many subject alt names)
  • missing-intermediary.badssl.com or incomplete-chain.badssl.com (idea from @noncombatant)
  • hostname-mismatch.badssl.com or wrong.host.badssl.com (idea from @saschaf)
    • Perhaps make wrong-host.badssl.com work instead, to avoid confusion about which ones are hyphenated?

Cipher Suites / Protocol

Headers

  • HSTS
    • preloaded-hsts.badssl.com
  • HPKP (#15)

Content

  • Mixed Content
  • Mixed Scripts (#33)
  • mixed-____.badssl.com? (image, audio, video, XHR, Flash, etc.)
  • Migrate mixed-content-test.appspot.com? (#32)

Misc

  • oe.badssl.com (opportunistic encryption; idea from @noncombatant) (#25)
  • http.badssl.com (redirect to HTTP)

non-prime and small subgroup DH

most (all?) clients will accept very bad DH parameters, such as (31-bit subgroup):

-----BEGIN DH PARAMETERS-----
MIICCgKCAQEA////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
///////////////////////////wAAAAHQKCAQEAu6kFl4Jni6wu89MOPQwhFQdz
k4SsloDJnHPB7SBXRjZHIkqVjTCGqO/PA4LqerBfXtgnh33YVaefTtYLQGC0bLqi
19PeEv3n8PaTB+RqMisy54p6mhBQZ2VxkiPKphpljueg1VPTN6GN7f/P2TCFXCE3
VRS3roLvvQ4CikZMyO8xVK58mU5YHv7u8A4b/rilq4m+Hr5upS5zvlKIU1iqi47d
0oyrrY9X9AVT2KtmHUdIhwMKPMWpgGGG/si/jrzPI2jAcuVDGRYx8D1btqhzFWQZ
CvJdDaVVA6JSw0XCp3zq71uzuU4vrLBRskZ/vFVw1FHmUSyR4JcDsu+YLzoT+A==
-----END DH PARAMETERS-----

or (not prime):

-----BEGIN DH PARAMETERS-----
MIIBBwKCAQBed4vGnUmyHOfbuX0tMqo0gVsdd30AOBYfqQppFv3UycvnmSdu1Q95
C/gGHCoK2L+DqRHf4OxuiPz/JpqAJtoBVAbqqf1XOALWliZIo3hJGZxrTUuZPawa
iEmzENZRFFG3IJyQ5/9g9+O2McQfYH6NaAuV8+SA7erVyx0sDjitmgW6fAxeFTVQ
oEeZiYKoyCfLhPFdT5fl4ug7MtXnNEpPjSBovMD5Xs/ZlJ3FDfsV69Swoz7dS+UK
JlCrv7Obf+tlJCMhFJf3A2GNP+RzIJddSn2JbBaTMECgpwgBuKmqkKL6LiDzNML/
rvO1LFfU+tV4bbn+RBiu+OCC2m2ZTgvHAgEF
-----END DH PARAMETERS-----

CSP Violation Tests

I haven't thought about this much, but there are probably some useful things.

At the very least, something like default-src: https://* with mixed content.

Tests

End-to-end is probably fine (e.g. a local Python script to make sure that badssl.com is giving expected errors/headers/cipher suites/certs).

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.