yeziruo

利欲驱人万火牛 江湖浪迹一沙鸥

Date: 1595334600

硬件设备信息

设备型号: HG8321R
硬件版本: 377.A
软件版本: V3R015C10S103

快速诊断

  • 使用Putty尝试Telnet连接光猫,若无法连接,请看完全流程。
  • 若连接成功,在终端(root/admin)输入如下命令:
WAP> su
SU_WAP> shell
WAP(Dopra Linux) # ?

若返回三个脚本或常用命令无法使用,则说明Shell是被阉割的,请跳到补全Shell部分。

开始

请全程将电脑连接到光猫上!

开启Telnet

确保拔掉光纤,电脑通过网线连接到光猫上!
打开压缩包中的ONT组播工具,按如下步骤操作:

  1. 点击刷新,选中连接光猫的网卡
  2. 选中维修使能,其他不变,点击启动
  3. 等到光信号灯不亮,LAN1、LAN2、网络E/G三个灯长亮,按下停止,关闭工具

之后请硬重启光猫,并连接光纤。

补全Shell

打开压缩包中的TFTPServer.exe,并打开一个Telnet连接,按如下步骤操作:

WAP> load pack by tftp svrip <your_dhcp_ip> remotefile allshell.bin

成功后输入reboot重启。

获取配置文件

打开一个Telnet连接,按如下步骤操作:

WAP> su
SU_WAP> shell
WAP(Dopra Linux) # cd /mnt/jffs2
WAP(Dopra Linux) # cp hw_ctree.xml hw_ctree2.xml
WAP(Dopra Linux) # vi aescrypt.sh && chmod +x aescrypt.sh
--------复制如下内容--------
#!/bin/sh
help()
{
cat << HELP
usage:
crypt option inputfile
options:
-d decode
-e encode
-h show this help message
This script is used to decode/encode Huawei HG8245A config file.
If the outputfile argument is not present, a "deocde"/"encode" sub name will be append                              
on the name of inputfile as outputfile.
Dai Yun 2014 02 11 Chongqing
HELP
exit 0
}
if [ -z "$1" ] ; then
help
fi
checkfile()
{
if [ -z "$1" ] ; then
echo "inputfile must be present"
exit 2
fi
if [ ! -f "$1" ] ; then
echo "inputfile:" $1 "is not exist"
exit 3
fi
}
decode()
{
checkfile $1
local inputfile=$1
if [ -n "$2" ] ; then
local outputfile=$2
else
local outputfile=${inputfile}.decode
fi
gzname=${outputfile}.gz
cp $inputfile $outputfile
aescrypt2 1 $outputfile tmp
mv $outputfile $gzname
gzip -d $gzname
exit 0
}
encode()
{
checkfile $1
local inputfile=$1
if [ -n "$2" ] ; then
outputfile=$2
else
outputfile=${inputfile}.encode
fi
gzname=${outputfile}.gz
cp $inputfile $outputfile
gzip $outputfile
aescrypt2 0 $gzname tmp
mv $gzname $outputfile
exit 0
}
case $1 in
  -h) help;;
  -d) decode $2 $3;exit 1;;
  -e) encode $2 $3;exit 1;;
  *) echo "option argument wrong";help;exit 1;;
esac
---------------------------
WAP(Dopra Linux) # ./aescrypt.sh –d hw_ctree2.xml hw_ctree_decode.xml
WAP(Dopra Linux) # tftp -p -l hw_ctree_decode.xml <your_dhcp_ip>

这样配置文件就被解密和上传到我们的电脑上了,在TFTP软件目录下可以找到,打开它,搜索如下内容:

<X_HW_WebUserInfoInstance InstanceID="1" UserName="

即可找到管理员账号与密码,我们可以登录看看。

解决 不在维护模式 的登录问题

打开上面的配置文件,找到普通用户一行,修改用户等级:

UserLevel="0"

在终端输入:

WAP(Dopra Linux) # tftp -g -r hw_ctree_decode.xml <your_dhcp_ip>
WAP(Dopra Linux) # ./aescrypt.sh –e hw_ctree_decode.xml hw_ctree.xml

重启即可。

改回原版华为界面

修改hw_boardinfo文件,替换如下:

0x0000001b 修改为 COMMON
0x00000031 修改为 CHOOSE_huawei

引用&工具下载

破解过程来自宽带猫
解密脚本来自:http://blog.sina.com.cn/s/blog_6d27791f0101cxcv.html
工具下载:HG8321R-tools.7z

暂无评论

正在回复ID为 ??? 的评论

© 2013-2022 yeziruo. All Rights Reserved. Start5 theme by yeziruo.

CC BY-NC-SA 3.0 CN