1. Practical State Recovery Attacks against Legacy RNG Implementations 2018 Attacks CCS SideChannels
    Shaanan N. Cohney, Matthew D. Green, and Nadia Heninger
    [View PDF on duhkattack.com]
    [Show BibTex Citation]

    @inproceedings{Cohney:2018:PSR:3243734.3243756,
    author = {Cohney, Shaanan N. and Green, Matthew D. and Heninger, Nadia},
    title = {Practical State Recovery Attacks Against Legacy RNG Implementations},
    booktitle = {Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security},
    series = {CCS '18},
    year = {2018},
    isbn = {978-1-4503-5693-0},
    location = {Toronto, Canada},
    pages = {265--280},
    numpages = {16},
    url = {http://doi.acm.org/10.1145/3243734.3243756},
    doi = {10.1145/3243734.3243756},
    acmid = {3243756},
    publisher = {ACM},
    address = {New York, NY, USA},
    keywords = {PRG, PRNGs, RNGs, reverse engineering},
    }

The ANSI X9.17/X9.31 pseudorandom number generator design was first standardized in 1985, with variants incorporated into numerous cryptographic standards over the next three decades. The design uses timestamps together with a statically keyed block cipher to produce pseudo-random output. It has been known since 1998 that the key must remain secret in order for the output to be secure. However, neither the FIPS 140-2 standardization process nor NIST’s later descriptions of the algorithm specified any process for key generation. We performed a systematic study of publicly available FIPS 140- 2 certifications for hundreds of products that implemented the ANSI X9.31 random number generator, and found twelve whose certification documents use of static, hard-coded keys in source code, leaving the implementation vulnerable to an attacker who can learn this key from the source code or binary. In order to demonstrate the practicality of such an attack, we develop a full passive decryption attack against FortiGate VPN gateway products using FortiOS v4 that recovers the private key in seconds. We measure the prevalence of this vulnerability on the visible Internet using active scans, and demonstrate state recovery and full private key recovery in the wild. Our work highlights the extent to which the validation and certification process has failed to provide even modest security guarantees.

  1.