# Exploiting MikroTik RouterOS Hardware with CVE-2023-30799

DevFeed: [Exploiting MikroTik RouterOS Hardware with CVE-2023-30799](<https://devfeed.tech/articles/exploiting-mikrotik-routeros-hardware-with-cve-2023-30799-91536.md>)

Original publisher: [Read original article](<https://www.vulncheck.com/blog/mikrotik-foisted-revisited>)

Author: Jacob Baines

Published: 2023-07-25T00:00:00Z

Content type: news

Language: en

Sources: [VulnCheck](<https://devfeed.tech/sources/vulncheck.md>)

Topics: [MikroTik](<https://devfeed.tech/topics/mikrotik.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [2019](<https://devfeed.tech/tags/2019.md>), [2021](<https://devfeed.tech/tags/2021.md>), [2022](<https://devfeed.tech/tags/2022.md>), [2023](<https://devfeed.tech/tags/2023.md>), [3](<https://devfeed.tech/tags/3.md>), [account](<https://devfeed.tech/tags/account.md>), [added](<https://devfeed.tech/tags/added.md>), [admin](<https://devfeed.tech/tags/admin.md>), [administration](<https://devfeed.tech/tags/administration.md>), [administrator](<https://devfeed.tech/tags/administrator.md>), [cve](<https://devfeed.tech/tags/cve.md>), [exploit](<https://devfeed.tech/tags/exploit.md>), [hardware](<https://devfeed.tech/tags/hardware.md>), [mikrotik](<https://devfeed.tech/tags/mikrotik.md>), [root](<https://devfeed.tech/tags/root.md>), [routeros](<https://devfeed.tech/tags/routeros.md>), [shell](<https://devfeed.tech/tags/shell.md>), [vulncheck](<https://devfeed.tech/tags/vulncheck.md>), [with](<https://devfeed.tech/tags/with.md>)

## AI overview

CVE-2023-30799 turns authenticated RouterOS admin access into super-admin privileges and an arbitrary function call, enabling root access. VulnCheck adapted Margin Research's FOISted exploit from x86 virtual machines to MIPSBE hardware: it uploads a malicious shared object through the authenticated web interface, then uses a short ROP chain to call dlopen and open a reverse shell. The excerpt says the earlier exploit depended on FTP and a bind shell, which limited practical use; the revised approach avoids both. RouterOS Long-term versions through 6.49.8 were vulnerable, while the issue had been fixed earlier in stable 6.49.7. Detection is described as difficult because web and Winbox traffic uses custom encryption and root access can evade the UI. Recommended defenses include removing or restricting internet-facing administrative interfaces, disabling web and Winbox access, using SSH keys without passwords, and upgrading to 6.49.8 or current 7.x stable.

## Source excerpt

VulnCheck develops an exploit that gets a root shell on MikroTik RouterOS.