문제 설명
Description
입력한 셸코드를 실행하는 프로그램이 서비스로 등록되어 작동하고 있습니다.
main
함수가 아닌 다른 함수들은 execve, execveat 시스템 콜을 사용하지 못하도록 하며, 풀이와 관련이 없는 함수입니다.
flag 파일의 위치와 이름은 /home/shell_basic/flag_name_is_loooooong
입니다.
감 잡기 어려우신 분들은 아래 코드를 가지고 먼저 연습해보세요!
플래그 형식은 DH{...}
입니다. 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
$
난이도 투표 31
질문 60
First Blood!
최근 풀이자 4100
손님123
대표 업적 없음
BINIL
대표 업적 없음
제이앨런
대표 업적 없음
nqghuy
대표 업적 없음
chaeyeon330
대표 업적 없음
vicodih
대표 업적 없음
흐흐흐하하핳
대표 업적 없음
아앗
대표 업적 없음
Reden
대표 업적 없음
늙고병든컴공에게졸업을
대표 업적 없음
댓글 92