Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tripwire/padcheck
TLS CBC Padding Oracle Checker
https://github.com/tripwire/padcheck
Last synced: about 1 month ago
JSON representation
TLS CBC Padding Oracle Checker
- Host: GitHub
- URL: https://github.com/tripwire/padcheck
- Owner: Tripwire
- License: bsd-2-clause
- Created: 2019-03-22T21:58:03.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-25T12:33:27.000Z (almost 3 years ago)
- Last Synced: 2024-06-20T16:49:37.802Z (6 months ago)
- Language: Go
- Size: 20.5 KB
- Stars: 52
- Watchers: 12
- Forks: 15
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Padcheck: A TLS CBC Padding Oracle Scanner
This tool tests how a server responds to various CBC padding errors.
The tool makes a series of connections where the TLS record containing an HTTP request is malformed. Servers should respond uniformly to all malformed records. If the server responds differently to certain types of errors, an attacker may be able to construct a padding oracle for use in an adaptive chosen ciphertext attack.
There are currently five malformed record test cases:
1. Invalid MAC with Valid Padding (0-length pad)
2. Missing MAC with Incomplete Padding (255-length pad)
3. Valid MAC with Inconsistent Padding (SSLv3 style padding)
4. Missing MAC with Valid Padding (Entire record is padding)
5. Invalid MAC with Valid Padding (0-length record)## Background
This tool was created to help identify lingering TLS CBC padding oracles. The research was [originally presented at Black Hat Asia](https://www.blackhat.com/asia-19/briefings/schedule/index.html#zombie-poodle-goldendoodle-and-how-tlsv-can-save-us-all-13741) in March 2019. The [slides](http://i.blackhat.com/asia-19/Fri-March-29/bh-asia-Young-Zombie-Poodle-Goldendoodle-and-How-TLSv13-Can-Save-Us-All.pdf) are available for review.
For further reading on the topic, refer to the following links:
* [TLS CBC Padding Oracles in 2019](https://www.tripwire.com/state-of-security/vert/tls-cbc-padding-oracles/)
* [What is Zombie POODLE?](https://www.tripwire.com/state-of-security/vert/zombie-poodle/)
* [What is GOLDENDOODLE?](https://www.tripwire.com/state-of-security/vert/goldendoodle-attack/)
* [Scanning for Padding Oracles](https://web-in-security.blogspot.com/2019/03/scanning-for-padding-oracles.html)Disclosures related to modern TLS CBC padding oracles are being [tracked on GitHub](https://github.com/RUB-NDS/TLS-Padding-Oracles). This also includes oracles identified by [TLS-Scanner](https://github.com/RUB-NDS/TLS-Scanner)
## Usage
| | | |
| ------------ | ------ | -------------------------------------------------------------------------------------- |
| -h | | Show help |
| -hosts | string | Filename containing hosts to query |
| -iterations | int | Number of iterations required to confirm oracle (default 3) |
| -keylog | string | Path to a file NSS key log export (needed to decrypt pcap files) (default "/dev/null") |
| -v | int | Specify verboseness level (default: 1, max: 5) (default 1) |
| -workerCount | int | Desired number of workers for testing lists (default 32) |The basic usage is to run ```padcheck hostname```
A list of hosts can also be read from a file ```padcheck -hosts hostnames.txt```Vulnerable hosts are indicated in the tool output with a line similar to:
*Hostname (ip:443)* is VULNERABLE with a *Observable MAC Validity (Zombie POODLE)* oracle when using cipher *0xc027* with TLS *0x0303*. The fingerprint is *6867b5*
The fingerprint produced by this tool is a hash of the server responses. These values are subject to change with changes to the tool or with environmental variation which may influence the error message text. The fingerprint value should therefore be primarily used for correlating similar vulnerabilities within a specific environment.
## Obtaining padcheck
The easiest way to get started with padcheck is by downloading the latest [Linux binary release](https://github.com/Tripwire/padcheck/releases)Users can alternatively build it locally for cross-platform or development testing.
## Building on Linux
1) [Install Go](https://golang.org/doc/install) - Distro packages (e.g. sudo apt install golang-go) are fine.
2) Run `./build.sh`Upon success, `./padcheck` will be available as a portable/standalone executable.
## Building on Docker
Building with Docker is easier and cross-platform.
Run `docker build . -t padcheck` to build the patched Go toolchain and the `padcheck` tool in a container.
Run with: `docker run --rm -it padcheck [args]`
If you want to use a hosts file or keylog file, you will need to mount them in the container:
```sh
docker run --rm -it \
-v /path/to/hosts:/tmp/hosts \
-v /path/to/keylog:/tmp/keylog \
padcheck -hosts /tmp/hosts -keylog /tmp/keylog
```## Credits
The original idea for this padding check tool was a very simple tool for checking for POODLE issues in TLS servers, by Adam Langley (`agl` AT `imperialviolet` DOT `org`). See:
- https://www.imperialviolet.org/2014/12/08/poodleagain.html
- https://www.imperialviolet.org/binary/poodle-tls-go.patch
- https://www.imperialviolet.org/binary/scanpadding.go## Additional Resources
More information about scanning for TLS CBC padding oracles on the Internet can be found in this repo: https://github.com/RUB-NDS/TLS-Padding-Oracles
## License
Original tool copyright 2014 Adam Langley, released under a BSD license.
Copyright 2019 Tripwire, Inc. All rights reserved.
Released under a [BSD 2-Clause License](./LICENSE).