{"id":5979,"date":"2025-05-29T12:33:22","date_gmt":"2025-05-29T17:33:22","guid":{"rendered":"https:\/\/www.incredigeek.com\/home\/?p=5979"},"modified":"2025-05-29T12:42:41","modified_gmt":"2025-05-29T17:42:41","slug":"how-to-flash-unsigned-firmware-on-ubiquiti-airmax-radio","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/how-to-flash-unsigned-firmware-on-ubiquiti-airmax-radio\/","title":{"rendered":"How to flash unsigned firmware on a Ubiquiti Airmax Radio"},"content":{"rendered":"\n<p>Here are some notes on downgrading a Ubiquiti Airmax radio so it can run unsigned firmware.<\/p>\n\n\n\n<p>Disclaimer, the following steps are potentially dangerous.  Proceed with caution.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Ubiquiti introduced signed firmware around version 5.12.  After that, you couldn&#8217;t flash unsigned firmware if a device already had signed firmware.  You also couldn&#8217;t downgrade below 5.12.<\/p>\n\n\n\n<p>Ubiquiti uses the update utility to enforce only flashing signed firmware.  So what happens if you swap out the update utility with one from an unsigned firmware version?<\/p>\n\n\n\n<p>This is the hack we&#8217;ll explore.  <\/p>\n\n\n\n<p>Here is a quick overview.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Download firmware.<\/li>\n\n\n\n<li>Extract ubntbox out of the unsigned firmware.<\/li>\n\n\n\n<li>Move files (ubntbox, and unsigned firmware) to target radio.<\/li>\n\n\n\n<li>Modify <code>libevent<\/code> versions in <code>ubntbox<\/code> to match the current signed firmware. Should only be needed if firmware version number is different.<\/li>\n\n\n\n<li>Upgrade! &#8220;Downgrade&#8221;&#8230;<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Downloading firmware<\/h2>\n\n\n\n<p>You can download unsigned firmware from Ubiquiti. <a href=\"https:\/\/ui.com\/download\">https:\/\/ui.com\/download<\/a> <\/p>\n\n\n\n<p>Here is a link for the PowerBeam firmware. <a href=\"https:\/\/ui.com\/download\/software\/nbe-m5-400\">https:\/\/ui.com\/download\/software\/nbe-m5-400<\/a><\/p>\n\n\n\n<p>\u2139\ufe0fPro tip, you should be able to wget the firmware directly to a radio with <a href=\"https:\/\/dl.ubnt.com\/firmwares\/XW-fw\/v5.6.15\/XW.v5.6.15-sign.31612.170908.1440.bin\"><code>wget http:\/\/dl.ubnt.com\/firmwares\/XW-fw\/v5.6.15\/XW.v5.6.15-sign.31612.170908.1440.bin<\/code><\/a> <br>Note the http.  No https.  The wget version in older firmware has issues with SSL\/TLS.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Extract ubntbox from the Unsigned Firmware<\/h2>\n\n\n\n<p>For this step we need binwalk.  <\/p>\n\n\n\n<pre class=\"wp-block-code has-dark-gray-background-color has-background\"><code class=\"\">sudo apt install binwalk<\/code><\/pre>\n\n\n\n<p>Next, extract the firmware with binwalk.<\/p>\n\n\n\n<pre class=\"wp-block-code has-dark-gray-background-color has-background\"><code class=\"\">binwalk -e .\/XW.v5.6.3.bin<\/code><\/pre>\n\n\n\n<p>It will extract the firmware to a folder named <code>_XW.v5.6.3.28591.151130.1735.bin.extracted<\/code><\/p>\n\n\n\n<p>We want the <code>ubntbox<\/code> binary which is at the following location.<\/p>\n\n\n\n<pre class=\"wp-block-code has-dark-gray-background-color has-background\"><code class=\"\">_XW.v5.6.3.28591.151130.1735.bin.extracted\/squashfs-root\/bin\/ubntbox<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Move files (ubntbox, and unsigned firmware) to target radio<\/h2>\n\n\n\n<p>\u2139\ufe0fscp and sftp most likely will not work. To get around this, you can set up a local web server like apache to serve the files, move the files into the <code>\/var\/www\/html<\/code> directory and download to the radio with wget.  You may not be able to download executable files.  You can work around this by running <code>chmod 644 ubntbox<\/code>, download with wget, then <code>chmod +x ubntbox<\/code> to make it executable again.<\/p>\n\n\n\n<p>On our computer, install and start the apache webserver<\/p>\n\n\n\n<pre class=\"wp-block-code has-dark-gray-background-color has-background\"><code class=\"\">sudo apt install apache2\nsudo systemctl start apache2<\/code><\/pre>\n\n\n\n<p>Next, copy <code>ubntbox<\/code> and firmware files to <code>\/var\/www\/html\/<\/code>. Replace the firmware name if different.<\/p>\n\n\n\n<pre class=\"wp-block-code has-dark-gray-background-color has-background\"><code class=\"\">cp .\/ubntbox \/var\/www\/html\/\ncp .\/XW.v5.6.3.bin \/var\/www\/html\/<\/code><\/pre>\n\n\n\n<p>On the radio, <code>cd<\/code> to the <code>\/tmp<\/code> directory.  Download <code>ubntbox <\/code>and the firmware from your computer. Change the IP address to your webserver IP.<\/p>\n\n\n\n<pre class=\"wp-block-code has-dark-gray-background-color has-background\"><code class=\"\">wget http:\/\/192.168.1.2\/ubntbox\nwget http:\/\/192.168.1.2\/XW.v5.6.3.bin<\/code><\/pre>\n\n\n\n<p>Rename firmware to <code>fwupdate.bin<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code has-dark-gray-background-color has-background\"><code class=\"\">mv XW.v5.6.3.bin fwupdate.bin<\/code><\/pre>\n\n\n\n<p>Ensure ubntbox is executable.<\/p>\n\n\n\n<pre class=\"wp-block-code has-dark-gray-background-color has-background\"><code class=\"\"><code>chmod +x ubntbox<\/code><\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Upgrade &#8220;Downgrade&#8221; radio<\/h2>\n\n\n\n<p>We are ready to update the radio.  <\/p>\n\n\n\n<pre class=\"wp-block-code has-dark-gray-background-color has-background\"><code class=\"\">.\/ubntbox fwupdate.real -m<\/code><\/pre>\n\n\n\n<p>You may encounter the following error.<\/p>\n\n\n\n<pre class=\"wp-block-code has-dark-gray-background-color has-background\"><code class=\"\">.\/ubntbox: can't load library 'libevent_core-2.0.so.5'<\/code><\/pre>\n\n\n\n<p>Since ubntbox is a dynamically linked binary, we may need to change the libevent library references to match the libevent libraries on the system.  You can find the current libevent libraries with <code>find \/ | grep libevent<\/code><\/p>\n\n\n\n<p>Example output.<\/p>\n\n\n\n<pre class=\"wp-block-code has-dark-gray-background-color has-background\"><code class=\"\">XW.v5.6.15-sign.31612.170908.1440# find \/ | grep libevent\n\/lib\/libevent-2.1.so.6\n\/lib\/libevent-2.1.so.6.0.2\n\/lib\/libevent_core-2.1.so.6\n\/lib\/libevent_core-2.1.so.6.0.2\n\/lib\/libevent_extra-2.1.so.6\n\/lib\/libevent_extra-2.1.so.6.0.2\n\/lib\/libevent_openssl-2.1.so.6\n\/lib\/libevent_openssl-2.1.so.6.0.2<\/code><\/pre>\n\n\n\n<p>Replace all <code>libevent<\/code> references in <code>ubntbox<\/code> with the correct versions on the current firmware.<\/p>\n\n\n\n<p>You should now be able to downgrade to an unsigned firmware version.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>A few interesting notes.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\/sbin is a link to \/bin<\/li>\n\n\n\n<li>fwupdate is a simlink to fwupdate.real which is a link to ubntbox. \u00a0<\/li>\n\n\n\n<li>ubntbox is like Busybox<\/li>\n\n\n\n<li>To download files, you may need to use wget over non https.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here are some notes on downgrading a Ubiquiti Airmax radio so it can run unsigned firmware. Disclaimer, the following steps are potentially dangerous. Proceed with caution. Ubiquiti introduced signed firmware around version 5.12. After that, you couldn&#8217;t flash unsigned firmware &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/how-to-flash-unsigned-firmware-on-ubiquiti-airmax-radio\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[420,129,1144],"tags":[528,1732,364,421,131,132,974,363],"class_list":["post-5979","post","type-post","status-publish","format-standard","hentry","category-hacking","category-ubiquiti","category-ubiquiti-command-line","tag-airmax","tag-downgrade","tag-firmware","tag-hacking","tag-ubiquiti-2","tag-ubnt","tag-ui","tag-upgrade"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5979","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=5979"}],"version-history":[{"count":13,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5979\/revisions"}],"predecessor-version":[{"id":5999,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5979\/revisions\/5999"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=5979"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=5979"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=5979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}