목록전체 글 (12)
ENFJ_Blog
https://dreamhack.io/lecture/courses/98 Background:ptmalloc2ptmalloc2의 주요 객체와 관리 메커니즘을 설명합니다.dreamhack.io위 드림핵 강의를 참고 했는데 이 강의는 Ubuntu 18.04 64-bit(Glibc 2.27 버전)을 기준으로 한다.ptmalloc 이란?ptmalloc은 리눅스에 Memory Allocator이다. Memory Allocator는 운영체제 안에서 메모리를 효율적으로 관리하는 일은 한다. 모든 프로세서는 실행 하는 동안 메모리를 동적으로 할당하고, 해제하기를 빈번하게 한다. 그래서 운영체제 Memory Allocator는 이 과정을 효율적으로 하기 위해 특수한 알고리즘을 사용하여 빠르고, 낭비 없이 이루어 지도록..

https://dreamhack.io/lecture/courses/108 Logical Bug: Command Injection명령어를 실행해주는 함수를 잘못 사용하여 발생하는 Command Injection취약점에 대해 배워보겠습니다.dreamhack.ioCommand Injection 뜻 사용자의 입력을 시스템 명령어로 실행하게 하는 것 Command injection은 명령어를 실행하는 함수에 사용자가 임의의 인자를 전달할 수 있을 때예시앞서 우리가 쓴 system 함수를 사용하면 사용자의 입력을 소프트웨어로 전달할 수 있습니다. 예를 들어 임의의 IP에 Ping을 전달하고 싶으면, system( “ping [user-input]”)를, 임의의 파일을 읽고 싶다면, system( “cat [use..
https://dreamhack.io/lecture/courses/118 Logical Bug: Type Error타입을 잘못 사용하여 발생할 수 있는 버그를 학습합니다.dreamhack.ioType Error란?Type Error는 자료형 선언할 때 크기, 용도, 부호 여부를 고려하지 않고 사용할 때 발생하는 버그이다. 자료형-크기/범위/용도(signed) char1 바이트[−128, +127]정수, 문자unsigned char[0, 255](signed) short (int)2 바이트[−32,768, +32,767]정수unsigned short (int)[0, 65,535](signed) int4 바이트[−2,147,483,648, +2,147,483,647]정수unsigned int[0, 4,294..

chapter 1 : theorychapter 2 : wargame 1chapter 3 : wargame 3https://learn.dreamhack.io/114#1 로그인 | Dreamhack dreamhack.ioTheoryFormat String이란?Format String을 사용하는 함수에서 어떤 형식 또는 형태를 지정해주는 문자열이다.예)#include int main(){ char str[6] = "hello!"; printf("%s", str); return 0;}위와 같은 곳에서 %s 같은 것을 Format String 이라고 할 수 있음포맷 스트링 함수의 예시는 printf, scanf, fprintf 등 등과 같은 함수가 있다. Parameters Output%%%문자%d정수형 ..

[dreamhack] Out of Bounds인덱스 값이 정해진 범위를 벗어나는 행위Out of Bounds로 버그가 생기는 이유- 계산한 주소가 배열의 범위 안에 있는지 검사하지 않는다.- 배열의 참조되는 인덱스의 값을 임의로 설정할 수 있다.- 개발자가 인덱스의 값을 명시적으로 프로그래밍 하지 않는다. https://dreamhack.io/wargame/challenges/11 out_of_boundDescription 이 문제는 서버에서 작동하고 있는 서비스(out_of_bound)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾고 익스플로잇해 셸을 획득하세요. "flag" 파일을 읽어 워게임 사이dreamhack.ioC코드#include #include #include #include..
노션 링크