js驗證,然后直接POST改密碼,所以只需要找到POST包,然后重新發送就能更改用戶密碼,不需要知道原始密碼是什么。
Request Headers
Host: 192.168.1.1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded Content-Length: 82 Origin: http://192.168.1.1 Connection: keep-alive Referer: http://192.168.1.1/userpasswd.htm Upgrade-Insecure-Requests: 1 Pragma: no-cache Cache-Control: no-cache
Request Body
a=set&x=InternetGatewayDevice.X_CU_Function.Web.AdminPassword&AdminPassword=123456
a=set&x=InternetGatewayDevice.X_CU_Function.Web.UserPassword&UserPassword=123456
這兩個分別是更改管理員和用戶的密碼的請求,123456改成自己想改的密碼。至於怎么發送POST包,可以用fiddler,也可以firefox。我的操作是先自己更改user的密碼,然后抓到改密碼的POST包,然后在firefox里Edit and Resend,然后把請求體相應參數改一下。
【2021.02.14更新】
發現一篇文章,這種方法也可以,還簡單
http://www.yishimei.cn/network/873.html
我們直接在瀏覽器地址欄里輸入:http://192.168.1.1/backupsettings.conf,按下回車鍵后,將會把這個配置文件下載下來,這個配置文件就是光貓的配置文件,里面包含了管理員密碼,我們下載完畢后,直接用記事本的方式將其打開,然后在里面搜索AdminPassword,找到后,位於<AdminPassword>和</AdminPassword>之間的部分就是管理員密碼了,一般為CUAdmin+八位數字,比如CUAdmin12345678。