2010年5月6日
admin 295 views
Flash应用安全规范
来源:http://www.80sec.com/flash-security-polic.html
Author: jianxin [80sec]
EMail: jianxin#80sec.com
Site: http://www.80sec.com
Date: 2009-07-25
From: http://www.80sec.com/release/flash-security.txt
[ 目录 ]
0×00 前言
0×01 安全的服务端flash安全策略
0×02 安全的客户端flash安全规范
0×03 flash安全的checklist
0×00 前言
flash作为一款浏览器的第三方插件,是对浏览器功能的延伸,已经是web必不可少的元素。但是这种延伸必然带来不安全的因素,相比于安全性已经得到磨练的浏览器来说,flash绝对是客户端安全的一个软肋(包括在比较神秘的漏洞挖掘领域,也是这个观点),同样flash在页面展示时所含有的丰富功能,在某些情况下你甚至可以认为它等同于javascript,甚至更为危险。浏览器所贯彻的域安全策略被flash所打破,客户端所做的种种过滤也同样被 flash所打破(只要你还使用flash)。但是flash也已经感觉到了这个问题,并且时时在改进,在设计上也引入了一些比较好的安全机制,恰当的使用这些安全机制可以避免你的应用程序遭到攻击。80sec将从实际的一些经验总结出一些供参考的flash使用规范,规范将从服务端应用程序的安全设计和客户端的flash安全使用两个角度来说明这个问题。
阅读全文…
2010年5月4日
admin 388 views
http://www.exploit-db.com/papers/12490
##############################################################################
# [+]Title: [Eval() Vulnerability & Exploitation]
##############################################################################
# [+] About :
##############################################################################
# Written by : GlaDiaT0R
# Contact: the_gl4di4t0r[AT]hotmail[DOT]com or berrahal.ryadh[AT]gmail[DOT]com
# Team : Tunisian Power Team ( DarkGh0st.Net )
##############################################################################
# [+] Summary:
# [1]-Introduction
# [2]-Detection
# [3]-Vulnerable Source code
# [4]-Exploiting..
##############################################################################
[1]-Introduction
eval () is a PHP function that allows to interpret a given string as PHP code, because eval () is often used in Web applications,
although interpretation of the chain is widely liked manipulated, eval () serves most of the time to execute php code containing previously defined variable.
the problem is that if eval () executes a variable that you can modify the code contained by php eval () will execute as such.
Reminder: eval () allows execution of a given string as PHP code but not write (or if so desired) its content in this page or others, he is content to perform, and display the result.
We will even two different PHP source code using Eval (), the possibilities of PHP code injection and how how to use eval () can change the syntax of PHP code to execute.
阅读全文…
2010年4月13日
admin 469 views
利用dl函数突破disable_functions执行命令(剑心)
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
From:http://qiuren.blogbus.com
PHP是一款功能强大应用广泛的脚本语言,很大一部分网站都是使用PHP架构的。因为其提供了强大的文件操作功能和与系统交互的功能,所以大部分的服务器都对PHP做了严格的限制,包括使用open_basedir限制可以操作的目录以及使用disable_functions限制程序使用一些可以直接执行系统命令的函数如system,exec,passthru,shell_exec,proc_open等等。但是如果服务器没有对dl()函数做限制,一样可以利用dl()函数饶过这些限制。
dl()函数允许在php脚本里动态加载php模块,默认是加载extension_dir目录里的扩展,该选项是PHP_INI_SYSTEM范围可修改的,只能在php.ini或者apache主配置文件里修改。当然,你也可以通过enable_dl选项来关闭动态加载功能,而这个选项默认为On的,事实上也很少人注意到这个。dl()函数在设计时存在安全漏洞,可以用../这种目录遍历的方式指定加载任何一个目录里的so等扩展文件,extension_dir限制可以被随意饶过。所以我们可以上传自己的so文件,并且用dl函数加载这个so文件然后利用so文件里的函数执行其他操作,包括系统命令。
阅读全文…
来源:51cto.com
目前有很多方法进行双系统的安装,有些十分的繁琐。下面我们就看看有关在Windows 7下grub安装Fedora12(或Ubuntu 9.10)的一个聪明的办法,依然grub, 不需要boot.ini grldr.mbr
关于Windows 7与Fedora12(或Ubuntu )双系统,网上有很多贴子,仔细搜索,都是抄来抄去的。刻盘、U盘,不在本人叙述范围,WUBI安装不在简单,有点难度,本人也不考虑,我们依旧用grub来安装。
怎么用grub来引导Fedora12(或Ubuntu )呢?
方法A,一个高手会告诉你,用什么什么命令,一提到命令,我们这些菜鸟真的头大,还是刻盘来的简单(本人可不喜欢刻盘啊!)。 阅读全文…
2010年4月8日
admin 327 views
intval()使用不当导致安全漏洞的分析
author: xy7#80sec.com
from:http://www.80vul.com/pch/
一 描叙
intval函数有个特性:”直到遇上数字或正负符号才开始做转换,再遇到非数字或字符串结束时(\0)结束转换”,在某些应用程序里由于对intval函数这个特性认识不够,错误的使用导致绕过一些安全判断导致安全漏洞.
二 分析
PHP_FUNCTION(intval)
{
zval **num, **arg_base;
int base;
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &num) == FAILURE) {
WRONG_PARAM_COUNT;
}
base = 10;
break;
case 2:
if (zend_get_parameters_ex(2, &num, &arg_base) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(arg_base);
base = Z_LVAL_PP(arg_base);
break;
default:
WRONG_PARAM_COUNT;
}
RETVAL_ZVAL(*num, 1, 0);
convert_to_long_base(return_value, base);
}
阅读全文…
2010年4月5日
admin 1,880 views
来源packetstorm.com
Web Application Auditing and Exploitation
By ReZEN
Index Title
Index
What is a Web Application
Intro To PHP
Function Exploitation Overview
Exploitable Functions
Examples
Application Assisted Auditing
Credits
Gr33tz / Fuckz
What is a “WebApp”?
In software engineering, a web application—sometimes
called a webapp and much less frequently a
weblication—is an application that’s accessed with a web
browser over a network such as the Internet or an
intranet. Web applications are popular due to the
ubiquity of the browser as a client, sometimes called a
thin client. The ability to update and maintain web
applications without distributing and installing software
on potentially thousands of client computers is a key
reason for their popularity. Web applications are used to
implement webmail, online retail sales, online auctions,
wikis, discussion boards, weblogs, MMORPGs, and many
other functions.
What is a “WebApp”? (cont.)
阅读全文…
2010年4月3日
admin 536 views
浅谈Local File Disclosure漏洞的利用
本文首发黑防1003期,版权归作者和黑防所有,未经允许请勿转载。
hackerxwar [0x50sec]
文件泄露漏洞就是允许我们查看原本不能查看的有权限访问的任意文件文件,如php文件的源代码,保存数据库帐号和密码的连接文件,服务器的帐号信息文件、配置文件,等等。由此导致了严重的安全问题。比如知道了mysql数据库的帐号信息可以尝试登录mysql,或者phpmyadmin等,继而直接into outfile一个shell,或者登录后台;读源代码也使黑盒的测试变成了白盒,更加方便入侵者查找其他漏洞,降低了入侵的难度。
导致文件泄露漏洞的原因和常见利用方法
导致文件泄露漏洞的原因无非就是readfile()、file_get_contents()、fopen()、file()、fgets()、fgetc()
等等文件操作函数的参数检查不严格导致的,此外还有mysql有file_priv权限的load_file()函数等。文件操作函数参数可能是用户直接GPC输入的数据,也可能是数据库里保存的文件路径等。
关于lfd的利用其实就是读文件,常见的有:
如果后台登录密码写在配置文件里,直接读密码进后台
读mysql数据库连接文件,尝试登录mysql或phpmyadmin
对于mysql4.x的版本可以查看表名和数据库名等配合sql注射
读取/etc/passwd文件、数据库密码等等,配合社会工程学尝试登录ftp、网站后台等等
还有就是通过读php文件源代码来挖掘别的漏洞
但是有些情况下读文件也不是很顺利,这里就浅谈一下这些情况,就当抛砖引玉。
阅读全文…
2010年3月30日
admin 419 views
关于magic_quotes_sybase
author: ryat#wolvez.org
team:http://www.80vul.com
date:2009-04-14
一 描叙
magic_quotes_gpc为on时,php在注册变量时会调用addslashes()函数处理[既转义单引号、双引号、反斜线和nullbyte],但php.ini中还有另外一个选项影响着magic_quotes_gpc和addslashes()函数:当php.ini设置magic_quotes_sybase为on时会覆盖magic_quotes_gpc为on的处理,然而magic_quotes_sybase仅仅是转义了nullbyte和把’变成了”
二 分析
先来看下addslashes的php源码:
// string.c
PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_free TSRMLS_DC)
{
return php_addslashes_ex(str, length, new_length, should_free, 0 TSRMLS_CC);
}
阅读全文…
2010年3月30日
admin 420 views
当magic_quotes_gpc=off
author: ryat#www.wolvez.org
team:http://www.80vul.com
date:2009-04-10
一、综述
magic_quotes_gpc是php中的一个安全选项,在php manual中对此有如下描述:
When on, all ‘ (single-quote), ” (double quote), \ (backslash) and NULL characters are escaped with a backslash automatically. This is identical to what addslashes() does
虽然magic_quotes_gpc有助于提升程序的安全性并且在php中默认开启,但同时也带来了其他的一些问题,因此在php6中将去掉此选项。
二、当magic_quotes_gpc=off
考虑到部分服务器关闭了magic_quotes_gpc或者其他的一些原因[如影响功能等],很多程序在如magic_quotes_gpc=off下自己实现一个代码来模拟magic_quotes_gpc=on的情况. 如下面的一段代码:
阅读全文…
2010年3月30日
admin 490 views
安全模式下exec等函数安全隐患
author: 80vul-B
team:http://www.80vul.com
date:2009-05-27
updata:2009-6-19
—————–updata—————————————
昨天php5.2.10出来了,fix了PCH-006里提到的bug:
Fixed bug #45997 (safe_mode bypass with exec/system/passthru (windows only))
然而遗憾的是还有问题,看看php是咋fix这个的:
…
b = strrchr(cmd, PHP_DIR_SEPARATOR);
#ifdef PHP_WIN32
if (b && *b == ‘\\’ && b == cmd) {
// 注意标红的代码:p
php_error_docref(NULL TSRMLS_CC, E_WARNING, “Invalid absolute path.”);
goto err;
}
#endif
…
阅读全文…