HOME   ·Î±×ÀΠ  ȸ¿ø°¡ÀÔ
    
ȸ¿ø°¡ÀÔ
ºñ¹Ð¹øÈ£ ã±â ÀÚµ¿·Î±ä
ÀÌÀü°Ô½ÃÆÇ
   free_board
   °Ç°­°Ô½ÃÆÇ
   ¿À¶óŬDB
   Linux
   HTML/javascript
   Áú¹®°ú ´ä
È£¼­±â
   À̹ÌÁö°Ô½ÃÆÇ  
   °Ç°­°Ô½ÃÆÇ  
   À½¾ÇÀÚ·á  
   ¼ºÁØÀÌ °Ô½ÃÆÇ  
 Hit : 5353
 À̸§ : È£¼®  (220.¢½.198.142)
 ³¯Â¥ : 2007-06-18 21:28:53
 Á¦¸ñ : À¥¿¡¼­ ½Ã½ºÅÛÆÄÀÏ °ü¸®Çϱâ good
½© > ½ºÅ©¸³Æ® > suid > ¼ÂÀ¯¾ÆÀ̵ð

µµ¸ÞÀÎÀ» °ü¸®ÇÏ´Â FTP °èÁ¤ÀÌ myname À̶ó°í ÇÏ°í,±× °èÁ¤ ±Ç
Submitted by woonuk on È­, 2006/01/03 - 10:28pm.
µµ¸ÞÀÎÀ» °ü¸®ÇÏ´Â FTP °èÁ¤ÀÌ myname À̶ó°í ÇÏ°í,
±× °èÁ¤ ±ÇÇÑÀ¸·Î ¿øÇÏ´Â ÀÛ¾÷À» ÇÒ¼öÀÖ´Â ½©½ºÅ©¸³Æ®¸¦ mywork.sh ¶ó°í ¸¸µé°í,
ÀÌ°ÍÀ» °¨½Î´Â wrapper.c ¸¦ Çϳª ÀÛ¼ºÇÕ´Ï´Ù.

#define REAL_PATH "/home/user/bin/mywork.sh"
main(ac, av)
char **av;
{
execv(REAL_PATH, av);
}

gcc -o mywork wrapper.c
chown myname mywork.sh
chmod 4711 mywork

±×·±´ÙÀ½ php ¿¡¼­ exec(), system() µîÀ¸·Î È£ÃâÇÏ¸é µË´Ï´Ù.

½©½ºÅ©¸³Æ® ½ÇÇà½Ã¿¡ EUID°¡ »ç¶óÁö´Â ¹®Á¦ ¶§¹®¿¡ #!/bin/sh -p ÀÌ·¸°Ô -p ¿É¼ÇÀ» Ãß°¡ÇØ ÁÖ¾î¾ß ÇÏ´õ±º¿ä.

man bash Çغ¸¸é ¾Æ·¡ ³»¿ëÀÌ ÀÖ½À´Ï´Ù.
Àοë:If the shell is started with the effective user (group) id not equal to the real user (group) id, and the -p option is not supplied, no startup files are read, shell functions are not inherited from the environment, the SHELLOPTS variable, if it appears in the environment, is ignored, and the effective user id is set to the real user id. If the -p option is supplied at invocation, the startup behavior is the same, but the effective user id is not reset.
È£¼® Áß¿ä ------------> #!/bin/sh -p ÀÌ·¸°Ô -p ¿É¼ÇÀ» Ãß°¡ÇØ ÁÖ¾î¾ß ÇÏ´õ±º¿ä. 07-07-26 14:43
211.¢½.74.31
°Ô½Ã¹° 121°Ç
¹øÈ£ ºÐ·ù Á¦¸ñ
À̸§
³¯Â¥ ÀÐÀ½
¡æ ÀÏ¹Ý   À¥¿¡¼­ ½Ã½ºÅÛÆÄÀÏ °ü¸®Çϱâ good (1) È£¼® 07-06-18 5354
23 ÀÏ¹Ý   °í¼º´É ftp Ŭ¶óÀ̾ðÆ® sftp, http µî Áö¿ø È£¼® 06-03-17 5353
24 ÀÏ¹Ý   SYN_RECV È£¼® 06-03-23 5339
57 ÀÏ¹Ý   raid ±¸ÃàÇϱâ È£¼® 07-07-03 5159
40 ÀÏ¹Ý   iptables ·Î °£´ÜÇÑ ¹æÈ­º®À» ±¸ÃàÇÏÀÚ (1) È£¼® 06-09-16 5108
63 ÀÏ¹Ý   ¡Ú¡Ú¡Ú¡Ú¡Ú ¾ÆÆÄÄ¡ ÅèÄÏÀÇ ¿¬µ¿ (2) È£¼® 08-01-22 5097
77 ÀÏ¹Ý   iptraf =>IP Æ®·¡ÇÈ, ÀÎÅÍÆäÀ̽º Åë°è, LAN station ¸ð´ÏÅ͵î È£¼® 08-11-10 5092
92 ÀÏ¹Ý   MRTG ¼³Ä¡ ¼Ö¶ó¸®½º È£¼® 09-04-12 5068
25 ÀÏ¹Ý   Rootkit Hunter´Â À¯´Ð½º ¹× ¸®´ª½º ±â¹ÝÀÇ ¿î¿µÃ¼Á¦¿¡ ·çƮŶÀ̳ª ¹éµµ¾îµîÀÇ ¼³Ä¡¿©¡¦ È£¼® 06-03-23 5059
36 ÀÏ¹Ý   [º¸¾È] rkhunter ·Î ·çƮŶÀ» È®ÀÎÇÑ´Ù. È£¼® 06-06-13 5023
31 ÀÏ¹Ý   [º¸¾È] º¸¾ÈÀýÂ÷¼­ ( ±âÃʺ¸¾È ) (1) È£¼® 06-04-19 5012
14 ÀÏ¹Ý      sar ÀÌ¿ëÇÏ¿© ½Ã½ºÅÛ ¸ð´ÏÅ͸µÇϱâ (1) È£¼® 07-10-09 5004
82 ÀÏ¹Ý   ¾ÆÆÄÄ¡ https ssl ·Î ¼³Ä¡Çϱâ È£¼® 09-01-14 5002
7 ÀÏ¹Ý   ¾ÆÆÄÄ¡ + ¸®´ª½º + ÅèÄÏ ¼³Ä¡ È£¼® 05-07-04 4999
64 ÀÏ¹Ý   ¸®´ª½º¿¡¼­ ¾ÆÆÄÄ¡ + ÀÚ¹Ù + ÅèÄÏ ¿¬µ¿Çϱâ (1) È£¼® 07-12-31 4998
óÀ½ÀÌÀü  [1] [2] [3] 4 [5] [6] [7] [8] [9]  ´ÙÀ½¸Ç³¡
 
Copyright © zenos.pe.kr. All rights reserved.