LEVEL 1
shell_basic
Views 2300
Solvers 743
2022.01.20. 12:44
- Description
- Discussion
Description
Description
입력한 셸코드를 실행하는 프로그램입니다.
main
함수가 아닌 다른 함수들은 execve, execveat 시스템 콜을 사용하지 못하도록 하며, 풀이와 관련이 없는 함수입니다.
flag 위치와 이름은 /home/shell_basic/flag_name_is_loooooong
입니다.
감 잡기 어려우신 분들은 아래 코드를 가지고 먼저 연습해보세요!
플래그의 형식은 DH{…} 입니다.
참고
$ cat write.asm
section .text
global _start
_start:
;/* write(fd=1, buf='hello', n=48) */
;/* push 'hello\x00' */
mov rax, 0x0a6f6c6c6568
push rax
mov rsi, rsp
push 1
pop rdi
push 0x6
pop rdx
;/* call write() */
push 1
pop rax
syscall
$ nasm -f elf64 write.asm
$ objcopy --dump-section .text=write.bin write.o
$ xxd write.bin
00000000: 48b8 6865 6c6c 6f0a 0000 5048 89e6 6a01 H.hello...PH..j.
00000010: 5f6a 065a 6a01 580f 05 _j.Zj.X..
$ cat write.bin | ./shell_basic
shellcode: hello
[1] 1592460 done cat write.bin |
1592461 segmentation fault ./shell_basic
$
kileak
No representative
Rank | Nickname | Recent comment | Voted | Writeup | Solved |
---|---|---|---|---|---|
#1 |
kileak
No representative
| 7 months ago | |||
#2 |
Sechack
워게임 고인물
| 7 months ago | |||
#3 |
c0wb3ll
워게임: 20
| 7 months ago | |||
#4 |
Fnhid
강의 수강: 10
| GG | Read | 7 months ago | |
#5 |
파르
워게임: 1
| 7 months ago | |||
#6 |
Brwook
강의 수강: 10
| 7 months ago | |||
#7 |
조르거이
강의 수강: 50
| ㄳ | Read | 7 months ago | |
#8 |
바나나달걀구이
No representative
| 7 months ago | |||
#9 |
blueRose
강의 수강: 10
| 7 months ago | |||
#10 |
realsung
Open Beta Top 10
| ㅎ | Read | 7 months ago |
Comments
Overall Rank #281 · 19 days ago
처음부터 너무 어려워요 ㅠㅠ
Overall Rank #1445 · 19 days ago
아니 너무 어렵쟈녀 ㅠㅜ 말이 돼 이게?
Overall Rank #4492 · 26 days ago
이거 사이트가 안들어가지는데 원래 그런건가요?
Overall Rank #2 · 2 months ago
역시 언제 봐도 재밌어 항상
Overall Rank #2277 · 2 months ago
쉽지 않네 이 친구....
Overall Rank #1328 · 2 months ago
사이트 들어가니까 연결이 안되는데 이건 어떻게 해야 할까요...
Overall Rank #1256 · 2 months ago
pwntools를 처음 사용해봐서 진짜 어렵게 풀었네요...
Overall Rank #8 · 3 months ago
gg
Overall Rank #2506 · 3 months ago
어렵다~~~
Overall Rank #750 · 3 months ago
힘드네요..