Skip to content

Dev, Hack & Debug

Geeky articles and documents like Data Leakages, Cyber Espionage, Security Breaches and Exploits

  • Front page
  • Development
  • Hacking
  • Debugging
  • Contact

[카테고리:] Flaw

ROCA: Vulnerable RSA generation (CVE-2017-15361)

Posted on 2017-10-17 by admin

Caution

이 글은 CVE-2017-15361에 대한 CRoCS wiki(Center for Research on Cryptography and Security)글을 일부 한글로 옮긴 것입니다. (원본보기, ROCA: Vulnerable RSA Generation (CVE-2017-15361)) 전체 내용을 다루지 않았으며, 일부 내용만 번역했으므로 중요한 내용의 누락이 있을 수 있습니다. 보다 자세한 내용은 해당 원본 페이지를 확인하시기 바랍니다.

 

CVE-2017-15361

이 취약점에 대하여 아주 잘 설명하는 페이지(취약점 발표자)가 있어 해당 내용을 일부 옮겨본다.

 

About ROCA (CRoCS Wiki)

A newly discovered vulnerability in generation of RSA keys used by a software library adopted in cryptographic smartcards, security tokens and other secure hardware chips manufactured by Infineon Technologies AG allows for a practical factorization attack, in which the attacker computes the private part of an RSA key. The attack is feasible for commonly used key lengths, including 1024 and 2048 bits, and affects chips manufactured as early as 2012, that are now commonplace. Assess your keys now with the provided offline and online detection tools and contact your vendor if you are affected. Major vendors including Microsoft, Google, HP, Lenovo, Fujitsu already released the software updates and guidelines for a mitigation. Full details including the factorization method will be released in 2 weeks at the ACM CCS conference as ‘The Return of Coppersmith’s Attack: Practical Factorization of Widely Used RSA Moduli’ (ROCA) research paper.
출처 : https://crocs.fi.muni.cz/public/papers/rsa_ccs17

  • 암호화를 지원하는 스마트카드, 보안토큰, Infineon Technologies AG가 생산한 보안하드웨어칩에 내장된 소프트웨어 라이브러리의 RSA 키 생성에 취약점이 새로이 발견되었다.
  • Practical factorization attack이라하는 이 취약점은, 공격자가 RSA키 중 개인키를 계산해낼 수 있게 만든다.
  • 이 공격은 흔히 사용하는 1024나 2048비트의 키 길이인 경우 가능하며, 2012년 초에 생산된 칩이 영향을 받는다.
  • 영향이 있는지는 온오프라인 툴을 사용하고, 제조사에 연락해보기를 바란다.
  • Microsoft, Google, HP, Lenovo, Fujitsu는 이미 소프트웨어 업데이트와 가이드라인을 제공하고 있다.
  • 자세한 내용은 ACM CCS 컨퍼런스에서 ‘The Return of Coppersmith’s Attack: Practical Factorization of Widely Used RSA Moduli’ (ROCA)로 발표될 예정이다.

RSA키 생성을 지원하는 기능의 Infineon Technologies사의 칩이, 내장한 라이브러리의 구현상의 문제가 있어 계산이 불가능해야 할 개인키가 공개키 만으로도 계산할 수 있게된다는 것이다. 앞서 공개된 KRACK과 마찬가지로 일부 제조사들은 이미 패치를 제공하고 있다고하니 그리고 취약점 점검 도구를 함께 배포하고 있으니 확인해볼만 하겠다.

 

What to do?

취약점에 대해 어떻게 대응해야 하는가에 대한 문제는, Q&A 섹션의 내용을 참고하면 되겠다.

Q: RSA 알고리즘이 다 취약한 것인가?
A: 아니다. RSA 소수(primes)가 완전히 임의의 숫자들로 생성이 된다면, 이 공격은 적용할 수 없다. 예를들어, OpenSSL 라이브러리는 영향을 받지 않는다.

Q: 내 키에 영향이 없는지 어떻게 확인할 수 있나?
A: 제공하는 탐지 툴중 하나를 실행해보다. 거짓양성 결과나 거짓음성 결과가 나오지 않을 것이다.

Q: 이 취약점을 어떻게 대응해야 하는가?
A: 제조사에게 도움을 요청하고, 패치가 있을경우 적용하라.

Q: 마이크로소프트, 구글 등의 제조사들이 최근 (10월 10일) Trusted Platform Module(TPM)에 대한 보안권고를 내놓았다. 이 취약점이랑 관계가 있는 것인가?
A: 그렇다.

Q: 해당 칩에서 만들어진 ECC 키들도 취약한가?
A: 아니다. 취약한 라이브러리의 ECC 키 생성에서는 취약점을 찾지 못했다.

Q: The Coppersmith’s 공격은 이미 스마트카드의 암호화 키를 인수분해하는데 쓰였다. 그것과 같은 취약점인가?
A: 아니다. 이건 다른것이다. 2013년에 Daniel J. Bernstein, Yun-An Chang, Chen-Mou Cheng, Li-Ping Chou, Nadia Heninger, Tanja Lange, Nicko van Someren 이 대만 시민 카드의 제조상의 결함으로 인한 일부카드에 존재하는 난수생성기(random number generator)의 취약점을 공격하는 방법을 만들었다. https://smartfacts.cr.yp.to/smartfacts-20130916.pdf. 이 것은 새로운 취약점으로, 취약한 라이브러리를 포함한 모든 칩에 영향이 있다.

Q: FIDO U2F 인증 토큰도 영향이 있을까?
A: 아니다. U2F 명세에서는 오직 ECC기반의 인증만을 허용한다.

 

Reference

  • ROCA: Vulnerable RSA generation (CVE-2017-15361)
    https://crocs.fi.muni.cz/public/papers/rsa_ccs17
  • Security Newsletter, Week #42, 2017 중 Malware/Exploit/Vulnerability 참고
Posted in Flaw, SecurityTagged VulnerabilityLeave a comment

WPA2 Key Reinstallation Attack (KRACK)

Posted on 2017-10-16 - 2017-10-17 by admin

Caution

이 글은 WPA2 취약점으로 알려진 KRACK(Key Reinstallation Attack)에 관한 글 입니다. 정확한 모든 내용을 담고있지 않습니다.

 

KRACK

Key Reinstallation AttaCK

KRACK

Mathy Vanhoef(@vanhoefm)가 KRACK이라 명명한 WPA2 취약점을 공개하는 것으로 보인다. 프로토콜 알고리즘에서 사용하는 Nonce값을 재사용하도록 강제하면서 발생할 수 있는 취약점이라고 한다. Kenn White에 따르면, WPA2의 프로토콜 레벨에서의 취약점이라고 하는데, 이 공격을 통해 WIFI decrypt, connection hijacking, content injection이 가능하다.

KRACKATTACKs.com 페이지가 열리면서 자세한 내용이 함께 공개되었다. 소개영상 및 Paper 등도 함께 올라와 있으니 자세한 내용이 필요하다면 가서 확인해보는 것이 좋겠다.

Mathy Vanhoef가 업로드한 KRACK 동영상을 보자.

 

Introduction

오늘 공개된 krackattacks.com 홈페이지에 올라온 내용중 Introduction을 살펴보면

We discovered serious weaknesses in WPA2, a protocol that secures all modern protected Wi-Fi networks. An attacker within range of a victim can exploit these weaknesses using key reinstallation attacks (KRACKs). Concretely, attackers can use this novel attack technique to read information that was previously assumed to be safely encrypted. This can be abused to steal sensitive information such as credit card numbers, passwords, chat messages, emails, photos, and so on. The attack works against all modern protected Wi-Fi networks. Depending on the network configuration, it is also possible to inject and manipulate data. …(후략)
출처 : https://www.krackattacks.com/

  • The attack works against all modern protected Wi-Fi networks. Depending on the network configuration, it is also possible to inject and manipulate data.
  • 이 취약점은 모든 보호된 WIFI 네트워크들에 대해 동작한다. 네트워크 구성이 어떤지에따라 인젝션을 하거나 데이터를 조작할 수 있다.
  • The weaknesses are in the Wi-Fi standard itself, and not in individual products or implementations. Therefore, any correct implementation of WPA2 is likely affected. To prevent the attack, users must update affected products as soon as security updates become available.
  • 이 취약점은 WIFI 표준 그 자체에 존재하는 것으로, 구현상의 문제나 개별 제품의 문제가 아니다. 그러한 이유로, WPA2를 구현한 것은 영향을 받는다고 볼 수 있다. 공격을 막기 위해서는 영향받는 제품의 업데이트가 나오는대로 반영해야한다.
  • Note that if your device supports Wi-Fi, it is most likely affected. During our initial research, we discovered ourselves that Android, Linux, Apple, Windows, OpenBSD, MediaTek, Linksys, and others, are all affected by some variant of the attacks.
  • 만약 여러분의 장치가 WIFI를 지원하면, 영향이 있다고 봐야한다. 초기 연구동안, 안드로이드, 리눅스, 애플, 윈도우, OpenBSD, MediaTek, Linksys, 그외 제품들이 공격에 영향이 있음을 확인했다.

 

CVEs

KRACK 페이지 공개와 함께 CVE 번호 및 정보도 업데이트 되었다.

  • CVE-2017-13077: Reinstallation of the pairwise encryption key (PTK-TK) in the 4-way handshake.
  • CVE-2017-13078: Reinstallation of the group key (GTK) in the 4-way handshake.
  • CVE-2017-13079: Reinstallation of the integrity group key (IGTK) in the 4-way handshake.
  • CVE-2017-13080: Reinstallation of the group key (GTK) in the group key handshake.
  • CVE-2017-13081: Reinstallation of the integrity group key (IGTK) in the group key handshake.
  • CVE-2017-13082: Accepting a retransmitted Fast BSS Transition (FT) Reassociation Request and reinstalling the pairwise encryption key (PTK-TK) while processing it.
  • CVE-2017-13084: Reinstallation of the STK key in the PeerKey handshake.
  • CVE-2017-13086: reinstallation of the Tunneled Direct-Link Setup (TDLS) PeerKey (TPK) key in the TDLS handshake.
  • CVE-2017-13087: reinstallation of the group key (GTK) when processing a Wireless Network Management (WNM) Sleep Mode Response frame.
  • CVE-2017-13088: reinstallation of the integrity group key (IGTK) when processing a Wireless Network Management (WNM) Sleep Mode Response frame.

 

 🙄 아래 내용은 취약점 공개전 작성된 것입니다. 

ChrisK91이나 Kenn White의 글에 따르면, 지난 8월에 이미 CVE번호는 이미 만들어져서 부여된 것으로 보인다. 하지만, CVE조회시 Candidate 상태이며 아직 자세한 정보는 업데이트 되지 않았다. 취약점 발견 후 벤더들에 알리고 조치하기까지 엠바고 기간을 보낸뒤 공개하는 듯.

So it seems that a flaw in the RNG of WPA2 has been discovered. As I understand, the issue has been reported to vendors in August, but public disclosure will be in a few hours. According to some guys on Twitter, well should pay attention to CVE-2017-13077, 13078, 13079, 13080, 13081, 13082, 13084, 13086, 13087, 13088
출처 : Reddit/r/Sysadmin comment by ChrisK91

혹 CVE 정보가 업데이트되면 아래에서 볼 수 있겠다.

  • CVE-2017-13077, Candidate, 20170822 Assigned, http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-13077
  • CVE-2017-13078, Candidate, 20170822 Assigned, http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-13078
  • CVE-2017-13079, Candidate, 20170822 Assigned, http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-13079
  • CVE-2017-13080, Candidate, 20170822 Assigned, http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-13080
  • CVE-2017-13081, Candidate, 20170822 Assigned, http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-13081
  • CVE-2017-13082, Candidate, 20170822 Assigned, http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-13082
  • CVE-2017-13084, Candidate, 20170822 Assigned, http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-13084
  • CVE-2017-13086, Candidate, 20170822 Assigned, http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-13086
  • CVE-2017-13087, Candidate, 20170822 Assigned, http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-13087
  • CVE-2017-13088, Candidate, 20170822 Assigned, http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-13088

 

What to do?

KRACK 홈페이지에 Q&A를 참조하면 되겠다. 간단히 내용을 옮겨본다.

WPA3가 필요한가?

  • 그럴 필욘없다. 구현이 이전버전과 호환되도록Backwards-compatible 패치가 가능하다. 패치된 클라이언트가 패치안된 AP와 통신할 수도 있고, 반대로도 된다는 의미다. 업데이트가 제공될 때 즉시 반영하면 되겠다.

WIFI 비밀번호를 바꿔야할까?

  • 비밀번호를 바꾸는 것이 이 공격을 막아주지 않는다. 모든 장치들이 업데이트 되었는지를 확실히 하고, 여러분 라우터 펌웨어 업데이트를 해라. 업데이트를 한 뒤에는 선택적으로 비밀번호를 변경해도 되겠다.

WPA2를 AES로만 사용하는데 취약할까?

  • 취약하다. 공격이 WPA1과 WPA2모두에 대해 동작한다. 개인personal/기업Enterprise 모두 그렇다. 어떤 암호종류를 사용해도(WPA-TKIP, AES-CCMP, GCMP) 그렇다. 모두 업데이트해야한다.

내 장비도 취약한가?

  • 아마도. WIFI를 사용하는 장비라면 취약할 것이다. 제조사에 확인하시라.

패치가 나올때까지 임시로 WEP를 사용해도 될까?

  • 안된다. WPA2를 계속 사용하시길.

 

 

 🙄 아래 내용은 취약점 공개전 작성된 것입니다. 

대응을 어떻게 해야하는가에 대한 답이 명확하게 나온 것은 없으나(모르나), 다음 내용을 참고하는것도 괜찮겠다. Alex의 WPA2: Broken with KRACK. What now?중 Keep Calm.

KRACK으로 인해 WPA2 프로토콜의 안전성이 문제가 되는것은 사실이지만, HTTPS와 같이 별도의 레이어에서 개별적인 암호화 통신을 하는등의 다른 보안장치들이 마련되어 있기 때문에 당장에 인터넷을 못쓴다거나 모든 인프라나 데이터가 위험에 처한것은 아니란 것이다. 하지만, 그렇다해서 다른 모든것이 100% 안전하다고도 할 수 없다. 필요한 안전조치가 있다면 이번 기회에 미뤄뒀던 조치들을 취하는 쪽으로 선택해야 할 것이다.

Kenn White의 트윗에 따르면, 지난 8월에 CVE가 만들어졌고 벤더들에게 알려져서 최근까지 제조사들이 AP제품의 펌웨어 업데이트 등에 버그패치를 포함하여 제공해온 것으로 보인다.

Friendly FYI on disclosure: CVEs were assigned in August and (high-level) CERT warning was circulating ~7 wks ago. Some patches already out.

이미 충분히 고지된 내용이며 엠바고를 지키는 기간이 있었을 뿐, 오늘나온 제로데이는 아니라는 것.

 

Reference

취약점을 공개한 Mathy Vanhoef 및 관련자료

  • KRACKATTACKS.com
  • @Mathy Vanhoef
  • MathyVanhoef.com
  • Key Reinstallation Attacks: Forcing Nonce Reuse in WPA2, Mathy Vanhoef, Frank Piessens, 2017 (Online)
  • Predicting, Decrypting, and Abusing WPA2/802.11 Group Keys, Mathy Vanhoef, Frank Piessens, 2016 (Online, Online(Usenix), PDF)
  • Securely Implementing Network Protocols: Detecting and Preventing Logical Flaws, Mathy Vanhoef, Black Hat Webcast, 2017 (Online)

취약점에 대해 언급한 Kenn White 및 그외

  • @Kenn White
  • Kenn White가 언급한 nonce조작에 대한 문서
    Nonce-Disrespecting Adversaries: Practical Forgery Attacks on GCM in TLS, 2016 (Online)

 

Related News

  • MacRumors, Apple Says ‘KRACK’ Wi-Fi Vulnerabilities Are Already Patched in iOS, macOS, watchOS, and tvOS Betas
  • TechAU : WPA2 protocol broken ? Internet, we have a problem.
  • The Register : WPA2 security in trouble as Belgian boffins tease key reinstallation bug
  • arsTechnica : Severe flaw in WPA2 protocol leaves Wi-Fi traffic open to eavesdropping
  • Gizmodo : Wi-Fi’s Most Popular Encryption May Have Been Cracked

 

Posted in Flaw, SecurityTagged KRACK, Protocol Flaw, Wireless SecurityLeave a comment

Search

Recent Posts

  • Exploit PoC for CVE-2023-20887 VMWare Aria Operations for Networks
  • Security Newsletters, 2021 May 2nd, Scripps Health 랜섬웨어 공격 外
  • Security Newsletters, 2018 Apr 3rd, 미 국방부 버그 바운티 대상 확장 外
  • Security Newsletters, 2018 Mar 31st, Microsoft Meltdown 긴급 패치 外
  • Security Newsletters, 2018 Mar 30th, MyFitnessPal 1억 5천만 계정 침해 外
  • Security Newsletters, 2018 Mar 29th, Kaspersky KLara 오픈소스 공개 外
  • Security Newsletters, 2018 Mar 28th, SSH서버 노리는 GoScanSSH 外

Categories

  • Diet (7)
  • Exploit (1)
  • Flaw (2)
  • Hacking (1)
  • Health (11)
  • Intermittent Fasting (1)
  • Meditation (2)
  • Mentality (5)
  • Nootropic (3)
  • Security (157)
  • Security News (155)

Archives

  • 2023년 6월 (1)
  • 2021년 5월 (1)
  • 2018년 4월 (1)
  • 2018년 3월 (24)
  • 2018년 2월 (24)
  • 2018년 1월 (30)
  • 2017년 12월 (31)
  • 2017년 11월 (30)
  • 2017년 10월 (26)
  • 2017년 9월 (4)

Meta

  • 로그인
  • 엔트리 피드
  • 댓글 피드
  • WordPress.org
Proudly powered by WordPress | Theme: micro, developed by DevriX.