본문 바로가기

Security118

[Hack the Packet 2012] L1 보호되어 있는 글 입니다. 2022. 5. 10.
[Digital Forensic] 네트워크 포렌식 툴 네트워크 포렌식 툴 네트워크 포렌식이란? 네트워크 기반으로 생겨난 데이터 분석 기법으로, 네트워크를 통해 전송되는 데이터, 패스워드 등 데이터 트래픽을 분석하거나 접근 에러 로그, 네트워크 환경 등을 조사하여 수사 단서를 찾아내는 분야이다. 네트워크 포렌식 툴로는 CapTipper, Network Miner, Wireshark, Xplico 등이 존재한다. CapTipper CapTipper는 Python 기반의 악성 트래픽 분석 도구이다. 트래픽 내에서 파일을 추출하고 흐름을 분석할 수 있다. 이외에도, 로그 명령으로 페이지 탐색 모니터링이 가능하며, --report 옵션을 통해 분석 보고서 생성 기능을 제공한다. 가상 서버를 통한 시뮬레이션 기능을 지원해서, 분석하고자하는 pcap 파일을 로드하면 로.. 2022. 5. 10.
[어셈블리어 분석 실습] example 5 example5.asm의 코드는 아래와 같다. # example5.asm .file"example5.c" .section.rodata .LC0: .string"number %d \n" .LC1: .string"%d * %d = %d \n" .text .globlmain .typemain, @function main: .LFB0: .cfi_startproc pushq%rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq%rsp, %rbp .cfi_def_cfa_register 6 subq$16, %rsp movl$0, -8(%rbp) jmp.L2 .L3: movl-8(%rbp), %eax movl%eax, %esi movl$.LC0, %edi movl$0, %eax c.. 2022. 5. 8.
[어셈블리어 분석 실습] example 4 example4.asm의 코드는 아래와 같다. # example4.asm .file"example4.c" .section.rodata .LC0: .string"result : %d\n" .text .globlfunction .typefunction, @function function: .LFB0: .cfi_startproc pushq%rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq%rsp, %rbp .cfi_def_cfa_register 6 subq$16, %rsp movl%edi, -4(%rbp) movl%esi, -8(%rbp) movl-4(%rbp), %eax imull-8(%rbp), %eax movl%eax, %esi movl$.LC0, %edi mov.. 2022. 5. 8.
[어셈블리어 분석 실습] example 3 example3.asm의 코드는 아래와 같다. # example3.asm .file"example3.c" .section.rodata .LC0: .string"a is 10" .LC1: .string"b is 10" .LC2: .string"b is 20" .LC3: .string"a=b" .LC4: .string"a!=b" .text .globlmain .typemain, @function main: .LFB0: .cfi_startproc pushq%rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq%rsp, %rbp .cfi_def_cfa_register 6 subq$16, %rsp movl$10, -8(%rbp) movl$20, -4(%rbp) cmpl$10,.. 2022. 5. 8.
[어셈블리어 분석 실습] example 2 example2.asm의 코드는 아래와 같다. # example2.asm .file"example2.c" .section.rodata .LC0: .string"result : %d \n" .text .globlmain .typemain, @function main: .LFB0: .cfi_startproc pushq%rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq%rsp, %rbp .cfi_def_cfa_register 6 subq$16, %rsp movl$10, -12(%rbp) movl$20, -8(%rbp) movl-8(%rbp), %eax movl-12(%rbp), %edx addl%edx, %eax movl%eax, -4(%rbp) movl-8(%rbp).. 2022. 5. 8.
[어셈블리어 분석 실습] example 1 example1.asm의 코드는 아래와 같다. # example1.asm .file"example1.c" .section.rodata .LC0: .string"Hello world" .text .globlmain .typemain, @function main: .LFB0: .cfi_startproc pushq%rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq%rsp, %rbp .cfi_def_cfa_register 6 movl$.LC0, %edi movl$0, %eax callprintf movl$0, %eax popq%rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE0: .sizemain, .-main .ident"GCC: (Ubun.. 2022. 5. 8.
[어셈블리어 분석 실습] 기본 내용 이번 실습에서 어셈블리어는 AT&T 문법을 바탕으로 되어 있다. 기본적인 내용은 아래와 같으니 참고하자. .file "example1.c" # 디버거에서 사용하는 원본 파일 이름을 가리킴 (Intel 문법이 아니기 때문에 오른쪽 값을 왼쪽으로 넣음!!) .section .rodata # ./rodatd 섹션 정의, 이 섹션은 읽기 전용 데이터 변수 .text # text section. 코드들을장한 섹션/프로그램 코드 실행할 때 사용 .globl main # 전 코드에 걸쳐 접근 가능한 함수 .type main, @function # main 함수 정의. 이것을 해야만 global main 코드 얻을 수 있음 main: # main:~ret까지가 실제 코드 .LFB0: # 함수의 시작을 의미하는 'loc.. 2022. 5. 8.
[pwnable.kr] Toddler's Bottle - cmd2 이번에는 cmd1 문제를 이어 cmd2 문제를 풀어보았다. 대충 system command shell을 샀는데 필터 때문에 갖고 놀지 못한다는 것 같다. 이번에도 필터링 관련한 문제인 것 같다. 문제에 적혀있는 명령어로 접속해준다. 접속 완료했다. 파일 리스트는 이 정도 있다는 것을 확인한 뒤 cat으로 cmd2.c 내용을 살펴보았다. 먼저 main 함수를 살펴보았다. int main(int argc, char* argv[], char** envp){ delete_env(); putenv("PATH=/no_command_execution_until_you_become_a_hacker"); if(filter(argv[1])) return 0; printf("%s\n", argv[1]); system( ar.. 2022. 5. 7.