Rac­coon At­tack: Fin­ding and Ex­ploit­ing Most-Si­gni­fi­cant-Bit-Ora­cles in TLS-DH(E)

Ro­bert Mer­get, Mar­cus Brink­mann, Nim­rod Avi­ram, Juraj So­mo­rovs­ky, Jo­han­nes Mitt­mann, Jörg Schwenk

30th USE­NIX Se­cu­ri­ty Sym­po­si­um, Au­gust 11–13, 2021, Van­cou­ver, B.C., Ca­na­da


Ab­stract

Dif­fie-Hell­man key ex­chan­ge (DHKE) is a wi­de­ly ad­op­ted me­thod for ex­chan­ging cryp­to­gra­phic key ma­te­ri­al in re­al-world pro­to­cols like TLS-DH(E). Past at­tacks on TLS-DH(E) fo­cu­sed on weak pa­ra­me­ter choices or mis­sing pa­ra­me­ter va­li­da­ti­on. The con­fi­den­tia­li­ty of the com­pu­ted DH share, the pre­mas­ter secret, was never ques­tio­ned; DHKE is used as a ge­ne­ric me­thod to avoid the se­cu­ri­ty pit­falls of TLS-RSA. We show that due to a subt­le issue in the key de­ri­va­ti­on of all TLS-DH(E) ci­pher sui­tes in ver­si­ons up to TLS 1.2,the pre­mas­ter secret of a TLS-DH(E) ses­si­on may, under cer­tain cir­cum­stan­ces, be lea­ked to an ad­versa­ry. Our main re­sult is a novel si­de-chan­nel at­tack, named Rac­coon at­tack,which ex­ploits a ti­ming vul­nerabi­li­ty in TLS-DH(E), lea­king the most si­gni­fi­cant bits of the shared Dif­fie-Hell­man secret.​The root cause for this side chan­nel is that the TLS stan­dard en­cou­ra­ges non-con­stant-ti­me pro­ces­sing of the DH secret. If the ser­ver reu­ses ephe­me­ral keys, this side chan­nel may allow an at­ta­cker to re­co­ver the pre­mas­ter secret by sol­ving an in­stan­ce of the Hi­d­den Num­ber Pro­blem. The Rac­coon at­tack takes ad­van­ta­ge of un­com­mon DH mo­du­lus sizes, which de­pend on the pro­per­ties of the used hash func­tions. We de­scri­be a fully fe­a­si­ble re­mo­te at­tack against an other­wi­se-se­cu­re TLS con­fi­gu­ra­ti­on: OpenSSL with a 1032-bit DH mo­du­lus. For­t­u­n­a­te­ly, such mo­du­li are not com­mon­ly used on the In­ter­net. Fur­ther­mo­re, with our lar­ge-sca­le scans we have iden­ti­fied im­ple­men­ta­ti­on-le­vel is­su­es in pro­duc­tion-gra­de TLS im­ple­men­ta­ti­ons that allow for exe­cu­ting the same at­tack by di­rect­ly ob­ser­ving the con­tents of ser­ver re­s­pon­ses, wi­thout re­sorting to ti­ming me­a­su­re­ments.

[PDF]

Tags: Dif­fie-Hell­man, hi­d­den num­ber pro­blem, hnp, msb, TLS