OpenWRT remote code execution via MITM due to bug in package manager

栏目: IT技术 · 发布时间: 4年前

[OpenWrt-Devel] Security Advisory 2020-01-31-1 - Opkg susceptible to MITM (CVE-2020-7982)

Jo-Philipp Wich jo at mein.io

Fri Jan 31 13:54:07 PST 2020
DESCRIPTION

A bug in the package list parse logic of OpenWrt's opkg fork caused the
package manager to ignore SHA-256 checksums embedded in the signed repository
index, effectively bypassing integrity checking of downloaded .ipk artifacts.

The bug has been introduced with commit <a href="https://git.openwrt.org/54cc7e3">https://git.openwrt.org/54cc7e3</a> which
failed to advance the proper string pointer when skipping the leading white-
space portition of the checksum string, causing the subsequent hex decoding
loop to return early with a zero length checksum.

Due to the fact that opkg on OpenWrt runs as root and has write access to the
entire filesystem, arbitrary code could be injected by the means of forged
.ipk packages with malicious payload.

CVE-2020-7982 has been assigned to this issue.


REQUIREMENTS

In order to exploit this vulnerability, a malicious actor needs to pose as
MITM, serving a valid and signed package index - e.g. one obtained from
downloads.openwrt.org - and one or more forged .ipk packages having the same
size as specified in the repository index while an `opkg install` command
is invoked on the victim system.


MITIGATIONS

To fix this issue, upgrade to the latest OpenWrt version. The fix is contained
in the following and later OpenWrt releases:

  * OpenWrt master: 2020-01-29 reboot-12146-gc69c20c667
  * OpenWrt 19.07:  2019-01-29 v19.07.1-1-g4668ae3bed
  * OpenWrt 18.06:  2019-01-29 v18.06.7-1-g6bfde67581

The fixed opkg package will carry the version 2020-01-25.


Alternatively, to update the opkg package itself without upgrading the entire
firmware, the following commands may be used once all repositories have been
updated:

   cd /tmp
   opkg update
   opkg download opkg
   zcat ./opkg-lists/openwrt_base | grep -A10 "Package: opkg" | grep SHA256sum
   sha256sum ./opkg_2020-01-25-c09fe209-1_*.ipk

Compare both checksums and, if matching, proceed with installing the package:

   opkg install ./opkg_2020-01-25-c09fe209-1_*.ipk


AFFECTED VERSIONS

To our knowledge, OpenWrt versions 18.06.0 to 18.06.6 and 19.07.0 as well as
LEDE 17.01.0 to 17.01.7 are affected. The fixed packages are integrated in
the OpenWrt 18.06.7, OpenWrt 19.07.1 and subsequent releases.

Older versions of OpenWrt (e.g. OpenWrt 15.05 and LEDE 17.01) are end of life
and not supported any more.


CREDITS

The issue was discovered by Guido Vranken for ForAllSecure, Inc.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <<a href="http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200131/1629c8c7/attachment.sig">http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200131/1629c8c7/attachment.sig</a>>
More information about the openwrt-devel mailing list

以上所述就是小编给大家介绍的《OpenWRT remote code execution via MITM due to bug in package manager》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

测出转化率:营销优化的科学与艺术

测出转化率:营销优化的科学与艺术

【美】高尔德(Goward,C.) / 谭磊、唐捷译 / 电子工业出版社 / 2014-10-1 / 68.00元

本书作者通过已成功实现大幅提升转化率的案例,展示了大量以营销为核心的电子商务网站的测试设计方法及转化优化方案。书中作者强调了测试及优化思维的重要性,并就实现方法做了详细讲解。 通过本书,读者将学到如何能够在网站遇到发展和收入瓶颈时,测试出存在的问题并找到解决方案;如何可以深入地了解客户需求,并以此为基础优化网站,使其达到提升转化率的目的;如何提升网站的竞争优势,把在线营销渠道变成高效的转化通......一起来看看 《测出转化率:营销优化的科学与艺术》 这本书的介绍吧!

html转js在线工具
html转js在线工具

html转js在线工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具