01.The basics technic of Shellcode Excuse the ads! We need some help to keep our site up. List Shellcode The basics of shellcode(ubuntu-16.04) C ASM M

Size: px
Start display at page:

Download "01.The basics technic of Shellcode Excuse the ads! We need some help to keep our site up. List Shellcode The basics of shellcode(ubuntu-16.04) C ASM M"

Transcription

1 01.The basics technic of Shellcode Excuse the ads! We need some help to keep our site up. List Shellcode The basics of shellcode(ubuntu-16.04) C ASM Machine code Assembly code Linux system call in assembly Save argument value in registers Assembly Code Example("Hello, world!") Build assembly code(32 bit) Build assembly code(64 bit) Change to Shellcode format Code Test Debugging Remove null byte Call instruction Register Related site Comments Shellcode Shellcode라고불리는이유는일반적으로명령 shell을실행하여공격자가해당시스템을제어하기때문이라고합니다. Shellcode는 Machine code로작성된작은크기의프로그램입니다. Shellcode는일반적으로어셈블리어로작성후기계어로변경합니다. 셀코드는세포에침투하는생물학적바이러스처럼실행중인프로그램에삽입된코드를뜻합니다. 셀코드는실제로실행가능한프로그램은아니므로셀코드를작성할때메모리상배치라든지메모리세그먼트등에신경쓰지않아도됩니다. The basics of shellcode(ubuntu-16.04) C ASM Machine code Shellcode 를개발하기전에다음과같은이해가필요합니다. 우리가사용중인많은프로그램들은 C 언어와같은고수준의언어를컴파일과정에의해 Assembly, Machine code 같은저수준언어로변경된파일입니다. C code 는해당시스템에맞는 Assembly code 로변환 변환된 Assembly code 를 Machine code 로표현이렇게 Machine code 는메모리에로드되어코드를실행하게됩니다. 즉, 공격자는취약성을이용하여 Shell 을획득하기위해서는주수준언어로개발된코드가필요합니다. Shellcode 는 Assembly, Machine code 같은저수준언어개발되어야합니다.

2 C ASM Machine code C code Assembly code Machine code Helloworld.c Helloworld.s Machine code #include<stdio.h> int main(){ printf("hello world! \n"); return 1; } <main>: : push %rbp : mov %rsp,%rbp 40052a: mov $0x4005c4,%edi 40052f: callq <puts@plt> : mov $0x1,%eax : pop %rbp 40053a: retq : : e a: bf c f: e8 cc fe ff ff : b : 5d 40053a: c3 Assembly code Shellcode 를개발하기위해아래와같은기본적인 Assembly 명령어에대한지식이필요합니다. 이외에도다양한 Instructions 이존재합니다. Intel syntax Instructions Meaning mov destination, source 목표피연산자에소스피연산자를복사합니다. PUSH value stack 에 Value 값을저장합니다. POP register stack 상위의값을레지스터에저장합니다. CALL function_name(address) 리턴을위해 CALL 명령어의다음명령주소를스택에저장한후함수의위치로점프를합니다. ret 스택으로부터리턴주소를팝하고그곳으로점프하여함수에서리턴합니다. inc destination 목표피연산자를 1 증가시킵니다. dec destination 목표피연산자를 1 감소시킵니다. add destination, value 목표피연산자에 value 값을더합니다. sub destination, value 목표피연산자에 value 값을뺍니다. or destination, value 비트 or 논리연산을한다. 최종결과는목표피연산자에저장됩니다. and destination, value 비트 and 논리연산을한다. 최종결과는목표피연산자에저장됩니다. xor destination, value 비트 xor 논리연산을한다. 최종결과는목표피연산자에저장됩니다. lea destination, source 목표피연산자에소스피연산자의유효주소를로드합니다. Assembly code 에서시스템함수를호출하기위해 "int 0x80", "syscall" 명령어를사용할수있습니다. "int" 명령어의피연산자값으로 0x80 을전달하게되면 EAX 에저장된시스템함수를호출합니다. "syscall" 명령어를호출하면 RAX 에저장된시스템함수를호출합니다. INT 0x80 & SYSCALL Instructions Meaning Architecture INT <Operand 1> Call to interrupt x86, x86_64 SYSCALL SYStem call x86_64

3 X86 Assembly/Interfacing with Linux x86 instruction listings Linux system call in assembly Shellcode 를개발하기위해 Assembly code 에서사용가능한 system 함수들이필요합니다. C 에서는편의성과호환성을위해표준라이브러리가제공됩니다. 표준라이브러리가다양한아키텍처에맞는시스템콜을알기때문에여러시스템에서컴파일이가능합니다. 어셈블리언어는어느특정프로세서아키텍처용이라고정해져있습니다. 호환성있는표준라이브러리가없으며, 커널시스템콜을직접호출할수있습니다. 다음과같이해당파일에서사용가능한 System 함수들을확인할수있습니다. System call 정보는운영체제, 프로세서의아키텍처마다다릅니다. 해당파일에사용한가능한리눅스시스템함수의이름과시스템콜번호가나열돼있습니다. 어셈블리로시스템함수을호출할때는시스템콜번호를이용합니다. 아래와같이동일한 Ubuntu 시스템도 32bit, 64bit 에서사용되는시스템함수의콜번호가다릅니다. unistd_32.h lazenca0x0@ubuntu:~/$ cat /usr/include/x86_64-linux-gnu/asm/unistd_32.h #ifndef _ASM_X86_UNISTD_32_H #define _ASM_X86_UNISTD_32_H 1 #define NR_restart_syscall 0 #define NR_exit 1 #define NR_fork 2 #define NR_read 3 #define NR_write 4 #define NR_open 5 #define NR_close 6 #define NR_waitpid 7 #define NR_creat 8 #define NR_link 9 #define NR_unlink 10 #define NR_execve 11 #define NR_chdir 12 #define NR_time 13 #define NR_mknod 14 #define NR_chmod 15 #define NR_lchown 16 #define NR_break 17 #define NR_oldstat 18 #define NR_lseek 19 #define NR_getpid 20...

4 unistd_64.h cat /usr/include/x86_64-linux-gnu/asm/unistd_64.h #ifndef _ASM_X86_UNISTD_64_H #define _ASM_X86_UNISTD_64_H 1 #define NR_read 0 #define NR_write 1 #define NR_open 2 #define NR_close 3 #define NR_stat 4 #define NR_fstat 5 #define NR_lstat 6 #define NR_poll 7 #define NR_lseek 8 #define NR_mmap 9 #define NR_mprotect 10 #define NR_munmap 11 #define NR_brk 12 #define NR_rt_sigaction 13 #define NR_rt_sigprocmask 14 #define NR_rt_sigreturn 15 #define NR_ioctl 16 #define NR_pread64 17 #define NR_pwrite64 18 #define NR_readv 19 #define NR_writev Ubuntu bit : /usr/include/x86_64-linux-gnu/asm/unistd_32.h 64bit : /usr/include/x86_64-linux-gnu/asm/unistd_64.h Save argument value in registers 앞에서확인한시스템함수의인자값은다음과같이사용할수있습니다. System call 번호는 EAX, RAX 에저장합니다. System 함수의인자값은아래표를참고하여전달하면됩니다. Kernel 의경우기본적으로 cdecl 함수호출규약을사용하지만, 동작의유연성을위해 "System V ABI" Calling Convention 도사용가능합니다. Shellcode 를작성하는경우 "System V ABI" Calling Convention 을사용합니다. Argument - Register(32bit) Register(64bit) System call EAX RAX Argument 1 EBX RDI Argument 2 ECX RSI Argument 3 EDX RDX Argument 4 ESI R10 Argument 5 EDI R8 Argument 6 EBP R9

5 Calling conventions Assembly Code Example("Hello, world!") Build assembly code(32 bit) 다음어셈블리코드를보면앞부분에메모리세그먼트가선언돼있습니다. 데이터세그먼트에 "Hello, world!" 문자열과개행문자 (0x0a) 가있습니다. 텍스트세그먼트에실제어셈블리명령이있습니다. ELF 바이너리를생성하려면링커에게어셈블리명령이어디서부터시작하는지알려주는 global _start 줄이필요합니다. ASM32.asm section.data ; msg db "Hello, world!",0x0a, 0x0d ;, section.text ; global _start ; ELF _start: ; SYSCALL: write(1,msg,14) mov eax, 4 ; '4' eax. mov ebx, 1 ; '1' ebx. mov ecx, msg ; ecx. mov edx, 14 ; '14' edx. int 0x80 ;. ; SYSCALL: exit(0) mov eax, 1 ; exit '1' eax. mov ebx, 0 ; '0' ebx. int 0x80 ;. -f elf 인자를 nasm 어셈블리를사용해 helloworld.asm 을어셈블해서 ELF 바이너리로링크할수있는목적 (object) 파일로만들것입니다. 링커프로그램 ld 는이어셈블된목적파일에서실행가능한 a.out 바이너리를만들어냅니다. Build nasm -f elf ASM32.asm ld -m elf_i386 -o hello ASM32.o./hello Hello, world! file./hello./hello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, not stripped Install nasm sudo apt-get install nasm Build assembly code(64 bit)

6 ASM64.asm section.data ; msg db "hello, world!",0x0a, 0x0d ;, section.text ; global _start ; ELF _start: ; SYSCALL: write(1,msg,14) mov rax, 1 ; '1' rax. mov rdi, 1 ; '1' rdi. mov rsi, msg ; rsi. mov rdx, 14 ; '14' rdx. syscall ;. ; SYSCALL: exit(0) mov rax, 60 ; exit '60' eax. mov rdi, 0 ; '0' ebx. syscall ;. Build nasm -f elf64 ASM64.asm ld -o hello64 ASM64.o./hello64 hello, world! file./hello64./hello64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped Change to Shellcode format Code 앞에서개발한프로그램은혼자서동작되지않으며링킹과정도필요하지때문에 Shellcode 가아닙니다. 다음과같이앞에서개발한코드를독자적으로동작가능하게변경할수있습니다. 텍스트, 데이터세그먼트를사용하지않습니다. 함수의호출은 call 명령어를사용하여 "helloworld" 함수를호출합니다. Write 시스템함수에의해출력될문자열은해당명령어뒤에작성합니다. 여기서문제가발생합니다. Write 시스템함수에 2 번째인자로출력할메시지가저장된주소를전달해야합니다. Assembly Code 에서는데이터세그먼트를사용하지않기때문에 mov 명령어를이용해값을전달할수없습니다. 해당문제는 call, ret 명령어를사용해해당문제를해결할수있습니다. call 명령어에의해함수가호출될때 call 명령어다음명령어의주소 ( 리턴주소 ) 를스택에저장 (push) 합니다. 함수의사용이끝난후에 ret 명령어를이용해스택에저장된주소 ( 리턴주소 ) 를 eip 레지스터에저장합니다. 이러한구조에의해 RET 명령어가실행되기전에스택에저장된리턴주소를변경하면프로그램의실행흐름을변경할수있습니다. 즉, call 명령어뒤에출력할메시지를저장하면 pop 명령어를이용해 ecx 레지스터에주소값을전달할수있습니다. 메모리세그먼트를사용하지않고완전히위치독립적인방법으로코드를생성했습니다.

7 ASM32.s BITS 32 ; nasm 32 call helloworld db "Hello, world!", 0x0a, 0x0d ; ; mark_below call. helloworld: ; ssize_t write(int fd, const void *buf, size_t count); pop ecx ; exc. mov eax, 4 ;. mov ebx, 1 ; STDOUT mov edx, 15 ; int 0x80 ; : write(1,string, 14) ; void _exit(int status); mov eax,1 ;exit mov ebx,0 ;Status = 0 int 0x80 ; : exit(0) 다음과같이 nasm 으로빌드하면 "Hello, world!" 메시지를출력하는 shellocode 가생성됩니다. Build & Disassemble nasm ASM32.s ndisasm -b32 ASM E80F call dword 0x dec eax C gs insb C insb F outsd A 2C20 sub al,0x C 776F ja 0x7d E 726C jc 0x7c A and [fs:edx],ecx D59B80400 or eax,0x4b add [eax],al A BB mov ebx,0x F BA0F mov edx,0xf CD80 int 0x B mov eax,0x B BB mov ebx,0x CD80 int 0x80 hexdump -C ASM e8 0f c 6c 6f 2c f 72 6c...Hello, worl a 0d 59 b bb ba d!..y f cd 80 b bb cd Test 생성된 shellcode 를테스트하기위해 python 을이용해 shellcode 내용을변환합니다.

8 Convert output format of shellcode python Python (default, Nov , 18:23:56) [GCC ] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> f = open('asm32','r') >>> data = f.read() >>> data '\xe8\x0f\x00\x00\x00hello, world! \n\ry\xb8\x04\x00\x00\x00\xbb\x01\x00\x00\x00\xba\x0f\x00\x00\x00\xcd\x80\xb8\x01\x00\x00\x00\xbb\x00\x00\x00\x0 0\xcd\x80' >>> 다음과같은코드를이용하여생성한 shellcode 를테스트할수있습니다. shellcode 에생성한 shellcode 를저장합니다. strlen() 함수에의해 shellcode 에저장된문자열의길이를출력합니다. strcpy() 함수에의해 shellcode 의내용이 code 영역으로복사됩니다. code 변수의형태를함수형태로형변화하여 "void (*function)()" 변수에저장합니다. function() 함수를호출하면 data 영역에저장된 shellcode 가실행됩니다. shellcode.c #include<stdio.h> #include<string.h> unsigned char shellcode [] = "\xe8\x0f\x00\x00\x00hello, world! \n\ry\xb8\x04\x00\x00\x00\xbb\x01\x00\x00\x00\xba\x0f\x00\x00\x00\xcd\x80\xb8\x01\x00\x00\x00\xbb\x00\x00\x00\x0 0\xcd\x80"; unsigned char code[]; void main(){ int len = strlen(shellcode); printf("shellcode len : %d\n",len); strcpy(code,shellcode); (*(void(*)()) code)(); } 빌드후실행하면다음과같이에러를확인할수있습니다. Build & Run gcc -o shellcode -fno-stack-protector -z execstack --no-pie -m32 shellcode.c test.c:5:15: warning: array 'code' assumed to have one element unsigned char code[]; ^./shellcode Shellcode len : 2 Segmentation fault (core dumped) 우분투 64bit 환경에서 32bit 프로그램을컴파일하기위해아래와관련라이브러리를설치해야합니다. Ubuntu 64 bit sudo apt-get install libx32gcc-5-dev libc6-dev-i386 Debugging 디버깅을통해에러의원인을확인해보겠습니다. strcpy() 함수가호출되는부분에 breakpoint 를설정하고실행합니다. strcpy() 함수가호출되기전이기때문에 code 변수영역 (0x804a074) 에는아무런값이저장되어있지않습니다. shellcode 변수영역에는앞에서작성한값이정상적으로저장되어있습니다.

9 debugging

10 gdb -q./shellcode Reading symbols from./shellcode...(no debugging symbols found)...done. gdb-peda$ disassemble main Dump of assembler code for function main: 0x b <+0>: lea ecx,[esp+0x4] 0x f <+4>: and esp,0xfffffff0 0x <+7>: push DWORD PTR [ecx-0x4] 0x <+10>: push ebp 0x <+11>: mov ebp,esp 0x <+13>: push ecx 0x <+14>: sub esp,0x14 0x c <+17>: sub esp,0xc 0x f <+20>: push 0x804a040 0x <+25>: call 0x x <+30>: add esp,0x10 0x c <+33>: mov DWORD PTR [ebp-0xc],eax 0x f <+36>: sub esp,0x8 0x <+39>: push DWORD PTR [ebp-0xc] 0x <+42>: push 0x x a <+47>: call 0x x f <+52>: add esp,0x10 0x080484a2 <+55>: sub esp,0x8 0x080484a5 <+58>: push 0x804a040 0x080484aa <+63>: push 0x804a074 0x080484af <+68>: call 0x x080484b4 <+73>: add esp,0x10 0x080484b7 <+76>: mov DWORD PTR [ebp-0x10],0x804a074 0x080484be <+83>: mov eax,dword PTR [ebp-0x10] 0x080484c1 <+86>: call eax 0x080484c3 <+88>: nop 0x080484c4 <+89>: mov ecx,dword PTR [ebp-0x4] 0x080484c7 <+92>: leave 0x080484c8 <+93>: lea esp,[ecx-0x4] 0x080484cb <+96>: ret End of assembler dump. gdb-peda$ b *0x080484af Breakpoint 1 at 0x80484af gdb-peda$ r Starting program: /home/lazenca0x0/asm/shell Shellcode len : 2 Breakpoint 1, 0x080484af in main () gdb-peda$ x/64bx 0x804a074 0x804a074 <code>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x804a07c: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x804a084: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x804a08c: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x804a094: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x804a09c: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x804a0a4: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x804a0ac: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 gdb-peda$ gdb-peda$ x/64bx 0x804a040 0x804a040 <shellcode>: 0xe8 0x0f 0x00 0x00 0x00 0x48 0x65 0x6c 0x804a048 <shellcode+8>: 0x6c 0x6f 0x2c 0x20 0x77 0x6f 0x72 0x6c 0x804a050 <shellcode+16>: 0x64 0x21 0x0a 0x0d 0x59 0xb8 0x04 0x00 0x804a058 <shellcode+24>: 0x00 0x00 0xbb 0x01 0x00 0x00 0x00 0xba 0x804a060 <shellcode+32>: 0x0f 0x00 0x00 0x00 0xcd 0x80 0xb8 0x01 0x804a068 <shellcode+40>: 0x00 0x00 0x00 0xbb 0x00 0x00 0x00 0x00 0x804a070 <shellcode+48>: 0xcd 0x80 0x00 0x00 0xe8 0x0f 0x00 0x00 0x804a078: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 gdb-peda$

11 그렇다면 shellcode가정상적으로실행되지않는이유는무엇일까? 그이유는 shellcode에포함되어있는 null byte(0x00) 때문입니다. 문자열을다루는함수들은전달된문자열에 null byte(0x00) 값을발견하면문자열의끝이라고판단합니다. strlen() 함수도 shellcode의길이가 2 라고출력하며, strcpy() 함수또한 null byte(0x00) 이전까지의값을 code영역에복사합니다. 즉, shellcode의내용이 code 영역에복사되지않아발생한문제입니다. 해당문제를해결하기위해 shellcode에포함된 null byte를제거해야합니다. Error point gdb-peda$ ni 0x080484b4 in main () gdb-peda$ x/32bx 0x804a074 0x804a074 <code>: 0xe8 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x804a07c: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x804a084: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x804a08c: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 gdb-peda$ Remove null byte 다음코드를통해제거해야할 null byte 를확인할수있습니다. 0xE80F : call dword 0x14 0xB : mov eax, 4 0xBB : mov ebx, 1 0xBA0F : mov edx, 15 0xB : mov eax,1 0xBB : mov ebx,0 Null byte ndisasm -b32 ASM E80F call dword 0x dec eax C gs insb C insb F outsd A 2C20 sub al,0x C 776F ja 0x7d E 726C jc 0x7c A and [fs:edx],ecx D59B80400 or eax,0x4b add [eax],al A BB mov ebx,0x F BA0F mov edx,0xf CD80 int 0x B mov eax,0x B BB mov ebx,0x CD80 int 0x80 Call instruction call 명령어에첫번째널바이트가존재합니다. call 명령어의피연산자에서사용가능한값의크기는 dword(32bits) 입니다. "0x14" 와같이작은값이사용될경우남은부분에 null byte 가포함되게됩니다. 다음과같이코드를작성함으로써해결할수있습니다. jmp 명령어를사용해 helloworld 함수를지나 last 함수로이동합니다. last 함수에서는 helloworld 함수를호출하고, 출력할메시지를저장합니다.

12 ASM32-2.s BITS 32 ; nasm 32 jmp short last ;. helloworld: ; ssize_t write(int fd, const void *buf, size_t count); pop ecx ; exc. mov eax, 4 ;. mov ebx, 1 ; STDOUT mov edx, 15 ; int 0x80 ; : write(1,string, 14) ; void _exit(int status); mov eax,1 ;exit mov ebx,0 ;Status = 0 int 0x80 ; : exit(0) last: call helloworld ;. db "Hello, world!", 0x0a, 0x0d ; 다음과같이동일한 call 명령어를사용했음에도해당코드에서 null byte가제거된이유는음수때문입니다. jmp short 명령어에의해 0x20 byte로이동합니다. jmp 명령어의피연산에서사용가능한값의크기는 dword(32bits) 입니다. jmp short 명령어의피연산자에서사용가능한값의크기는 -128 ~ 127 입니다. call 명령어는 helloworld 함수를호출하기위해 -0x22(0x2-0x24) 로이동해야합니다. 여기서 -0x22를표현하기위해 2의보수로값 (0xFFFFFFDD) 을표현하게됩니다. 즉, 'jmp short', 'call 음수 ' 명령어로인해 null byte가제거되는것입니다. ndisasm -b32 ASM32-2 nasm ASM32-2.s ndisasm -b32 ASM EB1E jmp short 0x pop ecx B mov eax,0x BB mov ebx,0x D BA0F mov edx,0xf CD80 int 0x B mov eax,0x BB mov ebx,0x E CD80 int 0x E8DDFFFFFF call dword 0x dec eax C gs insb C insb F outsd A 2C20 sub al,0x C 776F ja 0x9d E 726C jc 0x9c A and [fs:edx],ecx D db 0x0d Register call 명령어다음으로 null byte 가포함되어있는명령어는 Register 에값을저장하는부분입니다. Register 의크기를이해하면 null byte 가포함된이유를알수있습니다. 64 bit, 32bit, 16 bit 레지스터에표현가능한값보다작은값을저장하게되면나머지공간은 null byte 로채워지게됩니다.

13 Register 64 bit 32 bit 16 bit 8 bit RAX RBX RCX RDX RSP RBP RSI RDI EAX EBX ECX EDX ESP EBP ESI EDI AX BX CX DX SP BP SI DI AH/AL BH/BL CH/CL DH/DL L : 하위바이트 (Low byte),h : 상위바이트 (High byte) A null byte generated according to the size of the register Assessmbly code Machine code mov eax,0x4 B mov ax,0x4 66 B mov al,0x4 B0 04 shellcode 에서 64 bit, 32 비트레지스터영역을사용하기전에레지스터의모든영역을 0 으로변경하는것이좋습니다. shellcode 는 shellcode 가실행되기이전의레지스터의값들을그대로사용하기때문입니다. 다음과같은경우가있을수있습니다. write 시스템콜의경우인자값을전달받기위해 ebx, ecx, edx 레지스터를사용합니다. 해당사항을고려하지않고 null byte 를제거하기위해 bl, cl, dl 레지스터에값을저장하면안됩니다. 그이유는아래예제와같이 shellcode 가실행되기전에해당레지스터에어떠한값이저장되어있을수있기때문입니다. 하위레지스터에값을저장한다고해서앞에 3 바이트가 null byte 로변경되는것이아닙니다. Problem when register value is not initialized Code EBX shellcode 호출이전 - 0xdeaddead shellcode mov bl,0x4 0xdeadde04 레지스터값의초기화하기위한방법은다양하며, 그중다음과같은방법이제일효율적입니다. sub 명령어를이용한초기화 sub 명령어를이용해자기자신의레지스터의값을뺍니다. sub 명령어는쉘코드앞부분에서사용하면잘동작합니다. sub 명령어는연산결과에따라 OF, SF, ZF, AF, PF, CF flag의값이설정됩니다. 이로인해코드가예상과다르게동작할수있습니다. xor 명령어를이용해초기화 xor 명령은전달된 2개의피연산자값을배타적논리합 (exclusive OR) 을수행합니다. 배타적논리합 (exclusive OR) 은어떤값이든자신의값을연산하면 0이됩니다. OF, CF flag의값이지워지며, SF, ZF, PF flag는결과에따라결정됩니다. AF flag는정의되지않습니다. xor 명령어가 sub 명령어보다 flag에영향을덜주기때문에 xor을이용해레지스터값을초기화하는것이효율적입니다. Initialize register value Assessmbly code sub eax, eax xor eax,eax Machine code 29 C0 31 C0 앞에서설명한내용을바탕으로다음과같이코드를작성할수있습니다.

14 RemoveNullbyte.s BITS 32 ; nasm 32 jmp short last ;. helloworld: ; ssize_t write(int fd, const void *buf, size_t count); pop ecx ; exc. xor eax,eax ; eax 0. mov al, 4 ;. xor ebx,ebx ; ebx 0. mov bl, 1 ; STDOUT xor edx,edx ; edx 0. mov dl, 15 ; int 0x80 ; : write(1,string, 14) ; void _exit(int status); mov al,1 ;exit xor ebx,ebx ;Status = 0 int 0x80 ; : exit(0) last: call helloworld ;. db "Hello, world!", 0x0a, 0x0d ; 다음과같이 Null byte 가제거되었습니다. Removed Null byte nasm RemoveNullbyte.s ndisasm RemoveNullbyte EB15 jmp short 0x pop cx C0 xor ax,ax B004 mov al,0x DB xor bx,bx B301 mov bl,0x B 31D2 xor dx,dx D B20F mov dl,0xf F CD80 int 0x B001 mov al,0x DB xor bx,bx CD80 int 0x E8E6FF call word 0x A FF db 0xff B FF4865 dec word [bx+si+0x65] E 6C insb F 6C insb F outsw C20 sub al,0x F ja 0x C jc 0x A and [fs:bp+si],cx A 0D db 0x0d 앞에서작성한코드를아래코드를이용해테스트할수있습니다.

15 shellcode2.c #include<stdio.h> #include<string.h> unsigned char shellcode [] = "\xeb\x15\x59\x31\xc0\xb0\x04\x31\xdb\xb3\x01\x31\xd2\xb2\x0f\xcd\x80\xb0\x01\x31\xdb\xcd\x80\xe8\xe6\xff\xff\xf fhello, world!\n\r"; unsigned char code[] = ""; void main() { int len = strlen(shellcode); printf("shellcode len : %d\n",len); strcpy(code,shellcode); (*(void(*)()) code)(); } 다음과같이빌드후실행하면 "Hello, world!" 문자열이출력됩니다. Build & Run gcc -o shellcode2 -fno-stack-protector -z execstack --no-pie -m32 shellcode2.c./shellcode2 Shellcode len : 43 Hello, world! Related site Book : Comments

02.Create a shellcode that executes "/bin/sh" Excuse the ads! We need some help to keep our site up. List Create a shellcode that executes "/bin/sh" C

02.Create a shellcode that executes /bin/sh Excuse the ads! We need some help to keep our site up. List Create a shellcode that executes /bin/sh C 02.Create a shellcode that executes "/bin/sh" Excuse the ads! We need some help to keep our site up. List Create a shellcode that executes "/bin/sh" C language Assembly code Change permissions(seteuid())

More information

Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3

Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3 Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3 Example 3.1 Files 3.2 Source code 3.3 Exploit flow

More information

Deok9_Exploit Technique

Deok9_Exploit Technique Exploit Technique CodeEngn Co-Administrator!!! and Team Sur3x5F Member Nick : Deok9 E-mail : DDeok9@gmail.com HomePage : http://deok9.sur3x5f.org Twitter :@DDeok9 > 1. Shell Code 2. Security

More information

hlogin2

hlogin2 0x02. Stack Corruption off-limit Kernel Stack libc Heap BSS Data Code off-limit Kernel Kernel : OS Stack libc Heap BSS Data Code Stack : libc : Heap : BSS, Data : bss Code : off-limit Kernel Kernel : OS

More information

Reusing Dynamic Linker For Exploitation Author : Date : 2012 / 05 / 13 Contact : Facebook : fb.me/kwonpwn

Reusing Dynamic Linker For Exploitation Author :  Date : 2012 / 05 / 13 Contact : Facebook : fb.me/kwonpwn Reusing Dynamic Linker For Exploitation Author : pwn3r @ B10S @WiseGuyz Date : 2012 / 05 / 13 Contact : austinkwon2@gmail.com Facebook : fb.me/kwonpwn3r Abstract 대부분의 Unix 에선공유라이브러리를메모리에로드하고프로그램과 link

More information

01.ROP(Return Oriented Programming)-x86 Excuse the ads! We need some help to keep our site up. List Return Oriented Programming(ROP) -x86 Gadgets - PO

01.ROP(Return Oriented Programming)-x86 Excuse the ads! We need some help to keep our site up. List Return Oriented Programming(ROP) -x86 Gadgets - PO 01.ROP(Return Oriented Programming)-x86 Excuse the ads! We need some help to keep our site up. List Return Oriented Programming(ROP) -x86 Gadgets - POP; POP; POP; RET PLT & GOT Debug Proof of concept Example

More information

INTRO Basic architecture of modern computers Basic and most used assembly instructions on x86 Installing an assembly compiler and RE tools Practice co

INTRO Basic architecture of modern computers Basic and most used assembly instructions on x86 Installing an assembly compiler and RE tools Practice co Basic reverse engineering on x86 This is for those who want to learn about basic reverse engineering on x86 (Feel free to use this, email me if you need a keynote version.) v0.1 SeungJin Beist Lee beist@grayhash.com

More information

No Slide Title

No Slide Title Copyright, 2017 Multimedia Lab., UOS 시스템프로그래밍 (Assembly Code and Calling Convention) Seong Jong Choi chois@uos.ac.kr Multimedia Lab. Dept. of Electrical and Computer Eng. University of Seoul Seoul, Korea

More information

PowerPoint Template

PowerPoint Template BoF 원정대서비스 목차 환경구성 http://www.hackerschool.org/hs_boards/zboard.php?id=hs_notice&no=1170881885 전용게시판 http://www.hackerschool.org/hs_boards/zboard.php?id=bof_fellowship Putty War game 2 LOB 란? 해커스쿨에서제공하는

More information

강의10

강의10 Computer Programming gdb and awk 12 th Lecture 김현철컴퓨터공학부서울대학교 순서 C Compiler and Linker 보충 Static vs Shared Libraries ( 계속 ) gdb awk Q&A Shared vs Static Libraries ( 계속 ) Advantage of Using Libraries Reduced

More information

Microsoft Word - FunctionCall

Microsoft Word - FunctionCall Function all Mechanism /* Simple Program */ #define get_int() IN KEYOARD #define put_int(val) LD A val \ OUT MONITOR int add_two(int a, int b) { int tmp; tmp = a+b; return tmp; } local auto variable stack

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-Segment Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 6-Digit 7-Segment LED controller 16비트로구성된 2개의레지스터에의해제어 SEG_Sel_Reg(Segment

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-Segment Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 6-Digit 7-Segment LED Controller 16비트로구성된 2개의레지스터에의해제어 SEG_Sel_Reg(Segment

More information

Microsoft Word - building the win32 shellcode 01.doc

Microsoft Word - building the win32 shellcode 01.doc Win32 Attack 1. Local Shellcode 작성방법 By 달고나 (Dalgona@wowhacker.org) Email: zinwon@gmail.com Abstract 이글은 MS Windows 환경에서 shellcode 를작성하는방법에대해서설명하고있다. Win32 는 *nix 환경과는사뭇다른 API 호출방식을사용하기때문에조금복잡하게둘러서 shellcode

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-SEGMENT DEVICE CONTROL - DEVICE DRIVER Jo, Heeseung 디바이스드라이버구현 : 7-SEGMENT HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 디바이스드라이버구현 : 7-SEGMENT 6-Digit 7-Segment LED

More information

08.BROP(Blind Return Oriented Programming) Excuse the ads! We need some help to keep our site up. List BROP(Blind Return Oriented Programming) BROP st

08.BROP(Blind Return Oriented Programming) Excuse the ads! We need some help to keep our site up. List BROP(Blind Return Oriented Programming) BROP st 08.BROP(Blind Return Oriented Programming) Excuse the ads! We need some help to keep our site up. List BROP(Blind Return Oriented Programming) BROP struct Find BROP Proof of concept Example code Test server

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 1. data-addressing mode CHAPTER 6 Addressing Modes 2. use of data-address mode to form assembly language statements 3. op of program memory address mode 4. use of program memory address mode to form assembly

More information

Microsoft Word - Reverse Engineering Code with IDA Pro-2-1.doc

Microsoft Word - Reverse Engineering Code with IDA Pro-2-1.doc Reverse Engineering Code with IDA Pro By Dan Kaminsky, Justin Ferguson, Jason Larsen, Luis Miras, Walter Pearce 정리 : vangelis(securityproof@gmail.com) 이글은 Reverse Engineering Code with IDA Pro(2008년출판

More information

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx #include int main(void) { int num; printf( Please enter an integer "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 을 작성하면서 C 프로그램의

More information

2015 CodeGate 풀이보고서 김성우 1. systemshock strcat(cmd, argv[1]); 에서스택버퍼오버플로우가발생합니다

2015 CodeGate 풀이보고서 김성우   1. systemshock strcat(cmd, argv[1]); 에서스택버퍼오버플로우가발생합니다 2015 CodeGate 풀이보고서 김성우 rkwk0112@gmail.com http://cd80.tistory.com 1. systemshock strcat(cmd, argv[1]); 에서스택버퍼오버플로우가발생합니다 argv[1] 의주소는스택에있으므로 cmd부터버퍼를오버플로우시켜 argv[1] 이저장된주소까지접근이가능하면 strlen(argv[1]); 시

More information

Microsoft PowerPoint - a10.ppt [호환 모드]

Microsoft PowerPoint - a10.ppt [호환 모드] Structure Chapter 10: Structures t and Macros Structure 관련된변수들의그룹으로이루어진자료구조 template, pattern field structure를구성하는변수 (cf) C언어의 struct 프로그램의 structure 접근 entire structure 또는 individual fields Structure는

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Web server porting 2 Jo, Heeseung Web 을이용한 LED 제어 Web 을이용한 LED 제어프로그램 web 에서데이터를전송받아타겟보드의 LED 를조작하는프로그램을작성하기위해다음과같은소스파일을생성 2 Web 을이용한 LED 제어 LED 제어프로그램작성 8bitled.html 파일을작성 root@ubuntu:/working/web# vi

More information

임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과

임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 System call table and linkage v Ref. http://www.ibm.com/developerworks/linux/library/l-system-calls/ - 2 - Young-Jin Kim SYSCALL_DEFINE 함수

More information

Microsoft PowerPoint - a2.ppt [호환 모드]

Microsoft PowerPoint - a2.ppt [호환 모드] 마이크로컴퓨터의기본구조 2 장 x86 프로세서구조 ALU: 산술논리연산제어장치 (CU): 실행순서제어클럭 : 구성요소들의동작동기화 CPU + memory + I/O + bus 어셈블리언어 2 클럭 (Clock) CPU 와 Bus 동작은클럭에동기되어동작을한다. 메모리읽기사이클과대기상태 1 클럭사이클동안간단한동작을수행한다. 기계어명령어수행에적어도 1 클럭사이클이필요함

More information

Microsoft PowerPoint - a6.ppt [호환 모드]

Microsoft PowerPoint - a6.ppt [호환 모드] 이장의내용 6 장조건부처리 부울과비교명령어 조건부점프 조건부루프명령어 조건부구조 컴퓨터정보통신 어셈블리언어 2 6.2 부울과비교명령어 부울명령어 Instructions ti 동작 AND dst, src OR dst, src XOR dst, src NOT dst dst dst AND src dst dst OR src dst dst XOR src dst NOT

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 KeyPad Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 에는 16 개의 Tack Switch 를사용하여 4 행 4 열의 Keypad 가장착 4x4 Keypad 2 KeyPad 를제어하기위하여 FPGA 내부에 KeyPad controller 가구현 KeyPad controller 16bit 로구성된

More information

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F >

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F > 10주차 문자 LCD 의인터페이스회로및구동함수 Next-Generation Networks Lab. 5. 16x2 CLCD 모듈 (HY-1602H-803) 그림 11-18 19 핀설명표 11-11 번호 분류 핀이름 레벨 (V) 기능 1 V SS or GND 0 GND 전원 2 V Power DD or V CC +5 CLCD 구동전원 3 V 0 - CLCD 명암조절

More information

Level 4 ( hell_fire -> evil_wizard ) ~]$ cat evil_wizard.c /* The Lord of the BOF : The Fellowship of the BOF - evil_wizard

Level 4 ( hell_fire -> evil_wizard ) ~]$ cat evil_wizard.c /* The Lord of the BOF : The Fellowship of the BOF - evil_wizard Level 4 ( hell_fire -> evil_wizard ) [hell_fire@fedora_1stfloor ~]$ cat evil_wizard.c /* The Lord of the BOF : The Fellowship of the BOF - evil_wizard - Local BOF on Fedora Core 3 - hint : GOT overwriting

More information

0x <main+41>: lea eax,[ebp-264] 0x f <main+47>: push eax 0x080484a0 <main+48>: call 0x804835c <strcpy> 0x080484a5 <main+53>: add esp,0x1

0x <main+41>: lea eax,[ebp-264] 0x f <main+47>: push eax 0x080484a0 <main+48>: call 0x804835c <strcpy> 0x080484a5 <main+53>: add esp,0x1 FTZ LEVEL11 #include #include int main( int argc, char *argv[] ) { char str[256]; setreuid( 3092, 3092 ); strcpy( str, argv[1] ); printf( str ); gdb 를이용해분석해보면 [level11@ftz level11]$

More information

Microsoft PowerPoint - a8a.ppt [호환 모드]

Microsoft PowerPoint - a8a.ppt [호환 모드] 이장의내용 8 장고급프로시저 스택프레임 재귀 (Recursion) Invoke, Addr, Proc, Proto 디렉티브 다중모듈프로그램작성 2 8.2 스택프레임 Stack Frame ( 또는 activation record) procedure 의다음사항을저장한 영역 urn address passed parameter ( 스택매개변수 ) saved register

More information

Microsoft PowerPoint - a5a.ppt [호환 모드]

Microsoft PowerPoint - a5a.ppt [호환 모드] 5 장프로시저 (1) 책의라이브러리사용 5 장전반부 : 책의링크라이브러리 외부링크라이브러리개요 라이브러리프로시저호출 라이브러리링크 라이브러리프로시저 예제 연세대학교컴퓨터정보통신어셈블리언어 2 저자제공링크라이브러리 라이브러리파일 어셈블된프로시저를포함하고있는 OBJ 파일들을모아놓은파일 ( 확장자.LIB) 각 OBJ file 에는하나이상의 procedure 가들어있음

More information

Microsoft PowerPoint - chap10-함수의활용.pptx

Microsoft PowerPoint - chap10-함수의활용.pptx #include int main(void) { int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 중 값에 의한 전달 방법과

More information

IDA 5.x Manual 07.02.hwp

IDA 5.x Manual 07.02.hwp IDA 5.x Manual - Manual 01 - 영리를 목적으로 한 곳에서 배포금지 Last Update 2007. 02 이강석 / certlab@gmail.com 어셈블리어 개발자 그룹 :: 어셈러브 http://www.asmlove.co.kr - 1 - IDA Pro 는 Disassembler 프로그램입니다. 기계어로 되어있는 실행파일을 어셈블리언어

More information

버퍼오버플로우-왕기초편 10. 메모리를 Hex dump 뜨기 앞서우리는버퍼오버플로우로인해리턴어드레스 (return address) 가변조될수있음을알았습니다. 이제곧리턴어드레스를원하는값으로변경하는실습을해볼것인데요, 그전에앞서, 메모리에저장된값들을살펴보는방법에대해배워보겠습

버퍼오버플로우-왕기초편 10. 메모리를 Hex dump 뜨기 앞서우리는버퍼오버플로우로인해리턴어드레스 (return address) 가변조될수있음을알았습니다. 이제곧리턴어드레스를원하는값으로변경하는실습을해볼것인데요, 그전에앞서, 메모리에저장된값들을살펴보는방법에대해배워보겠습 앞서우리는버퍼오버플로우로인해리턴어드레스 (return address) 가변조될수있음을알았습니다. 이제곧리턴어드레스를원하는값으로변경하는실습을해볼것인데요, 그전에앞서, 메모리에저장된값들을살펴보는방법에대해배워보겠습니다. 여러분모두 Windows 에서 hex editor(hex dump, hex viewer) 라는것을사용해보셨을겁니다. 바로바이너리파일을 16 진수

More information

Microsoft PowerPoint - chap06-2pointer.ppt

Microsoft PowerPoint - chap06-2pointer.ppt 2010-1 학기프로그래밍입문 (1) chapter 06-2 참고자료 포인터 박종혁 Tel: 970-6702 Email: jhpark1@snut.ac.kr 한빛미디어 출처 : 뇌를자극하는 C프로그래밍, 한빛미디어 -1- 포인터의정의와사용 변수를선언하는것은메모리에기억공간을할당하는것이며할당된이후에는변수명으로그기억공간을사용한다. 할당된기억공간을사용하는방법에는변수명외에메모리의실제주소값을사용하는것이다.

More information

금오공대 컴퓨터공학전공 강의자료

금오공대 컴퓨터공학전공 강의자료 C 프로그래밍프로젝트 Chap 14. 포인터와함수에대한이해 2013.10.09. 오병우 컴퓨터공학과 14-1 함수의인자로배열전달 기본적인인자의전달방식 값의복사에의한전달 val 10 a 10 11 Department of Computer Engineering 2 14-1 함수의인자로배열전달 배열의함수인자전달방식 배열이름 ( 배열주소, 포인터 ) 에의한전달 #include

More information

Microsoft Word - ExecutionStack

Microsoft Word - ExecutionStack Lecture 15: LM code from high level language /* Simple Program */ external int get_int(); external void put_int(); int sum; clear_sum() { sum=0; int step=2; main() { register int i; static int count; clear_sum();

More information

슬라이드 1

슬라이드 1 / 유닉스시스템개요 / 파일 / 프로세스 01 File Descriptor file file descriptor file type unix 에서의파일은단지바이트들의나열임 operating system 은파일에어떤포맷도부과하지않음 파일의내용은바이트단위로주소를줄수있음 file descriptor 는 0 이나양수임 file 은 open 이나 creat 로 file

More information

CKKeyPro 적용가이드

CKKeyPro 적용가이드 3.20 사이버테러악성코드분석보고서 라온시큐어보안기술연구팀 작성일 : 2013. 03 페이지 : 1/15 Introduction 2013년 3월 20일오후, MBC, KBS, YTN, 농협, 신한은행, 제주은행전산망장애가동시에발생하였다. 피해기관들의호스트약 500여대에오류메시지가화면에나타났으며악성코드에감염된호스트는사용할수없는상태가되었다. 현재까지정확한침투경로가밝혀지지않고있다.

More information

vi 사용법

vi 사용법 유닉스프로그래밍및실습 gdb 사용법 fprintf 이용 단순디버깅 확인하고자하는코드부분에 fprintf(stderr, ) 를이용하여그지점까지도달했는지여부와관심있는변수의값을확인 여러유형의단순한문제를확인할수있음 그러나자세히살펴보기위해서는디버깅툴필요 int main(void) { int count; long large_no; double real_no; init_vars();

More information

MPLAB C18 C

MPLAB C18 C MPLAB C18 C MPLAB C18 MPLAB C18 C MPLAB C18 C #define START, c:\mcc18 errorlevel{0 1} char isascii(char ch); list[list_optioin,list_option] OK, Cancel , MPLAB IDE User s Guide MPLAB C18 C

More information

Microsoft Word - Static analysis of Shellcode.doc

Microsoft Word - Static analysis of Shellcode.doc Static analysis of Shellcode By By Maarten Van Horenbeeck 2008.09.03 2008.09.03 본문서에서는악성코드에서사용하는난독화되어있는쉘코드 를분석하는방법에대한 Maarten Van Horenbeeck 의글을번역 한것이다. Hacking Group OVERTIME OVERTIME force

More information

06Àå

06Àå Chapter 5 Chapter 6 Chapter 7 chapter 6 Part 1 6.1 Part 2 Part 3 145 146 Chapter 5 Chapter 6 Chapter 7 Part 1 Part 2 Part 3 147 148 Chapter 5 Chapter 6 Chapter 7 Part 1 Part 2 Part 3 149 150 Chapter 5

More information

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt 변수와상수 1 변수란무엇인가? 변수 : 정보 (data) 를저장하는컴퓨터내의특정위치 ( 임시저장공간 ) 메모리, register 메모리주소 101 번지 102 번지 변수의크기에따라 주로 byte 단위 메모리 2 기본적인변수형및변수의크기 변수의크기 해당컴퓨터에서는항상일정 컴퓨터마다다를수있음 short

More information

Microsoft PowerPoint - 15-MARS

Microsoft PowerPoint - 15-MARS MARS 소개및실행 어셈블리프로그램실행예 순천향대학교컴퓨터공학과이상정 1 MARS 소개및실행 순천향대학교컴퓨터공학과 2 MARS 소개 MARS MIPS Assembler and Runtime Simulator MIPS 어셈블리언어를위한소프트웨어시뮬레이터 미주리대학 (Missouri State Univ.) 의 Ken Vollmar 등이자바로개발한교육용시뮬레이터

More information

6주차.key

6주차.key 6, Process concept A program in execution Program code PCB (process control block) Program counter, registers, etc. Stack Heap Data section => global variable Process in memory Process state New Running

More information

SRC PLUS 제어기 MANUAL

SRC PLUS 제어기 MANUAL ,,,, DE FIN E I N T R E A L L O C E N D SU B E N D S U B M O TIO

More information

[ 마이크로프로세서 1] 2 주차 3 차시. 포인터와구조체 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Functi

[ 마이크로프로세서 1] 2 주차 3 차시. 포인터와구조체 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Functi 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Function) 1. 함수의개념 입력에대해적절한출력을발생시켜주는것 내가 ( 프로그래머 ) 작성한명령문을연산, 처리, 실행해주는부분 ( 모듈 ) 자체적으로실행되지않으며,

More information

윤석언 - Buffer Overflow - 윤석언 제12회세미나 수원대학교보안동아리 FLAG

윤석언 - Buffer Overflow - 윤석언 제12회세미나 수원대학교보안동아리 FLAG - Buffer Overflow - 윤석언 SlaxCore@gmailcom 제12회세미나 수원대학교보안동아리 FLAG http://flagsuwonackr - 1 - < BOF(Buffer OverFlow) > - Stack 기반 - Heap 기반 # 기초 : Stack 기반의 BOF 스택 : 기본적으로 2개의 operation(push, pop) 과 1 개의변수(top)

More information

목차 포인터의개요 배열과포인터 포인터의구조 실무응용예제 C 2

목차 포인터의개요 배열과포인터 포인터의구조 실무응용예제 C 2 제 8 장. 포인터 목차 포인터의개요 배열과포인터 포인터의구조 실무응용예제 C 2 포인터의개요 포인터란? 주소를변수로다루기위한주소변수 메모리의기억공간을변수로써사용하는것 포인터변수란데이터변수가저장되는주소의값을 변수로취급하기위한변수 C 3 포인터의개요 포인터변수및초기화 * 변수데이터의데이터형과같은데이터형을포인터 변수의데이터형으로선언 일반변수와포인터변수를구별하기위해

More information

Microsoft PowerPoint - chap01-C언어개요.pptx

Microsoft PowerPoint - chap01-C언어개요.pptx #include int main(void) { int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 프로그래밍의 기본 개념을

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 System Software Experiment 1 Lecture 5 - Array Spring 2019 Hwansoo Han (hhan@skku.edu) Advanced Research on Compilers and Systems, ARCS LAB Sungkyunkwan University http://arcs.skku.edu/ 1 배열 (Array) 동일한타입의데이터가여러개저장되어있는저장장소

More information

hlogin7

hlogin7 0x07. Return Oriented Programming ROP? , (DEP, ASLR). ROP (Return Oriented Programming) (excutable memory) rop. plt, got got overwrite RTL RTL Chain DEP, ASLR gadget Basic knowledge plt, got call function

More information

Microsoft Word - 1. ARM Assembly 실습_xp2.doc

Microsoft Word - 1. ARM Assembly 실습_xp2.doc ARM asm 의구조 ARM Assembly 실습 1. 기본골격 AREA armex,code, READONLY ;Mark first instruction to execute start MOV r0, #10 MOV r1,#3 ADD r0, r0, r1 ; r0 = r0 + r1 stop NOP NOP B stop ; Mark end of file 위의 asm의구조를이해하고실행해보세요.

More information

untitled

untitled 시스템소프트웨어 : 운영체제, 컴파일러, 어셈블러, 링커, 로더, 프로그래밍도구등 소프트웨어 응용소프트웨어 : 워드프로세서, 스프레드쉬트, 그래픽프로그램, 미디어재생기등 1 n ( x + x +... + ) 1 2 x n 00001111 10111111 01000101 11111000 00001111 10111111 01001101 11111000

More information

Microsoft PowerPoint - ch07 - 포인터 pm0415

Microsoft PowerPoint - ch07 - 포인터 pm0415 2015-1 프로그래밍언어 7. 포인터 (Pointer), 동적메모리할당 2015 년 4 월 4 일 교수김영탁 영남대학교공과대학정보통신공학과 (Tel : +82-53-810-2497; Fax : +82-53-810-4742 http://antl.yu.ac.kr/; E-mail : ytkim@yu.ac.kr) Outline 포인터 (pointer) 란? 간접참조연산자

More information

슬라이드 1

슬라이드 1 -Part3- 제 4 장동적메모리할당과가변인 자 학습목차 4.1 동적메모리할당 4.1 동적메모리할당 4.1 동적메모리할당 배울내용 1 프로세스의메모리공간 2 동적메모리할당의필요성 4.1 동적메모리할당 (1/6) 프로세스의메모리구조 코드영역 : 프로그램실행코드, 함수들이저장되는영역 스택영역 : 매개변수, 지역변수, 중괄호 ( 블록 ) 내부에정의된변수들이저장되는영역

More information

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D> 리눅스 오류처리하기 2007. 11. 28 안효창 라이브러리함수의오류번호얻기 errno 변수기능오류번호를저장한다. 기본형 extern int errno; 헤더파일 라이브러리함수호출에실패했을때함수예 정수값을반환하는함수 -1 반환 open 함수 포인터를반환하는함수 NULL 반환 fopen 함수 2 유닉스 / 리눅스 라이브러리함수의오류번호얻기 19-1

More information

Return-to-libc

Return-to-libc Return-to-libc Mini (skyclad0x7b7@gmail.com) 2015-08-22 - INDEX - 1. 개요... - 2-1-1. 서문... - 2-1-2. RTL 공격이란... - 2 - 보호기법... - 3 - Libc 란?... - 4-2. RTL 공격... - 4-2-1. 취약한코드... - 4-2-2. 분석... - 5-2-3.

More information

학습목차 2.1 다차원배열이란 차원배열의주소와값의참조

학습목차 2.1 다차원배열이란 차원배열의주소와값의참조 - Part2- 제 2 장다차원배열이란무엇인가 학습목차 2.1 다차원배열이란 2. 2 2 차원배열의주소와값의참조 2.1 다차원배열이란 2.1 다차원배열이란 (1/14) 다차원배열 : 2 차원이상의배열을의미 1 차원배열과다차원배열의비교 1 차원배열 int array [12] 행 2 차원배열 int array [4][3] 행 열 3 차원배열 int array [2][2][3]

More information

<4D F736F F F696E74202D20BBB7BBB7C7D15F FBEDFB0A3B1B3C0B05FC1A638C0CFC2F72E BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20BBB7BBB7C7D15F FBEDFB0A3B1B3C0B05FC1A638C0CFC2F72E BC8A3C8AF20B8F0B5E55D> 뻔뻔한 AVR 프로그래밍 The Last(8 th ) Lecture 유명환 ( yoo@netplug.co.kr) INDEX 1 I 2 C 통신이야기 2 ATmega128 TWI(I 2 C) 구조분석 4 ATmega128 TWI(I 2 C) 실습 : AT24C16 1 I 2 C 통신이야기 I 2 C Inter IC Bus 어떤 IC들간에도공통적으로통할수있는 ex)

More information

A Hierarchical Approach to Interactive Motion Editing for Human-like Figures

A Hierarchical Approach to Interactive Motion Editing for Human-like Figures 단일연결리스트 (Singly Linked List) 신찬수 연결리스트 (linked list)? tail 서울부산수원용인 null item next 구조체복습 struct name_card { char name[20]; int date; } struct name_card a; // 구조체변수 a 선언 a.name 또는 a.date // 구조체 a의멤버접근 struct

More information

금오공대 컴퓨터공학전공 강의자료

금오공대 컴퓨터공학전공 강의자료 C 프로그래밍프로젝트 Chap 13. 포인터와배열! 함께이해하기 2013.10.02. 오병우 컴퓨터공학과 13-1 포인터와배열의관계 Programming in C, 정재은저, 사이텍미디어. 9 장참조 ( 교재의 13-1 은읽지말것 ) 배열이름의정체 배열이름은 Compile 시의 Symbol 로서첫번째요소의주소값을나타낸다. Symbol 로서컴파일시에만유효함 실행시에는메모리에잡히지않음

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Chapter 10 포인터 01 포인터의기본 02 인자전달방법 03 포인터와배열 04 포인터와문자열 변수의주소를저장하는포인터에대해알아본다. 함수의인자를값과주소로전달하는방법을알아본다. 포인터와배열의관계를알아본다. 포인터와문자열의관계를알아본다. 1.1 포인터선언 포인터선언방법 자료형 * 변수명 ; int * ptr; * 연산자가하나이면 1 차원포인터 1 차원포인터는일반변수의주소를값으로가짐

More information

chap 5: Trees

chap 5: Trees 5. Threaded Binary Tree 기본개념 n 개의노드를갖는이진트리에는 2n 개의링크가존재 2n 개의링크중에 n + 1 개의링크값은 null Null 링크를다른노드에대한포인터로대체 Threads Thread 의이용 ptr left_child = NULL 일경우, ptr left_child 를 ptr 의 inorder predecessor 를가리키도록변경

More information

1. 안드로이드개발환경설정 안드로이드개발을위해선툴체인을비롯한다양한소프트웨어패키지가필요합니다 툴체인 (Cross-Compiler) 설치 안드로이드 2.2 프로요부터는소스에기본툴체인이 prebuilt 라는이름으로포함되어있지만, 리눅스 나부트로더 (U-boot)

1. 안드로이드개발환경설정 안드로이드개발을위해선툴체인을비롯한다양한소프트웨어패키지가필요합니다 툴체인 (Cross-Compiler) 설치 안드로이드 2.2 프로요부터는소스에기본툴체인이 prebuilt 라는이름으로포함되어있지만, 리눅스 나부트로더 (U-boot) 1. 안드로이드개발환경설정 안드로이드개발을위해선툴체인을비롯한다양한소프트웨어패키지가필요합니다. 1.1. 툴체인 (Cross-Compiler) 설치 안드로이드 2.2 프로요부터는소스에기본툴체인이 prebuilt 라는이름으로포함되어있지만, 리눅스 나부트로더 (U-boot) 만별도로필요한경우도있어툴체인설치및설정에대해알아봅니다. 1.1.1. 툴체인설치 다음링크에서다운받을수있습니다.

More information

Chapter #01 Subject

Chapter #01  Subject Device Driver March 24, 2004 Kim, ki-hyeon 목차 1. 인터럽트처리복습 1. 인터럽트복습 입력검출방법 인터럽트방식, 폴링 (polling) 방식 인터럽트서비스등록함수 ( 커널에등록 ) int request_irq(unsigned int irq, void(*handler)(int,void*,struct pt_regs*), unsigned

More information

커알못의 커널 탐방기 이 세상의 모든 커알못을 위해서

커알못의 커널 탐방기 이 세상의 모든 커알못을 위해서 커알못의 커널 탐방기 2015.12 이 세상의 모든 커알못을 위해서 개정 이력 버전/릴리스 0.1 작성일자 2015년 11월 30일 개요 최초 작성 0.2 2015년 12월 1일 보고서 구성 순서 변경 0.3 2015년 12월 3일 오탈자 수정 및 글자 교정 1.0 2015년 12월 7일 내용 추가 1.1 2015년 12월 10일 POC 코드 삽입 및 코드

More information

untitled

untitled Step Motor Device Driver Embedded System Lab. II Step Motor Step Motor Step Motor source Embedded System Lab. II 2 open loop, : : Pulse, 1 Pulse,, -, 1 +5%, step Step Motor (2),, Embedded System Lab. II

More information

Microsoft Word - FreeBSD Shellcode 만들기.docx

Microsoft Word - FreeBSD Shellcode 만들기.docx FreeBSD Shellcode 만들기 작성자 : graylynx (graylynx at gmail.com) 작성일 : 2007년 6월 21일 ( 마지막수정일 : 2007년 6월 21일 ) http://powerhacker.net 이문서는쉘코드를만드는데필요한모든내용을포함하고있지는않습니다. 이문서를읽어보시기전에간단한어셈블리명령어와 C 언어문법, 쉘코드에대한기초적인내용을미리습득하신다면더욱더쉽게이해할수있을겁니다

More information

C 프로그래밍 언어 입문 C 프로그래밍 언어 입문 김명호저 숭실대학교 출판국 머리말..... C, C++, Java, Fortran, Python, Ruby,.. C. C 1972. 40 C.. C. 1999 C99. C99. C. C. C., kmh ssu.ac.kr.. ,. 2013 12 Contents 1장 프로그래밍 시작 1.1 C 10 1.2 12

More information

OCW_C언어 기초

OCW_C언어 기초 초보프로그래머를위한 C 언어기초 4 장 : 연산자 2012 년 이은주 학습목표 수식의개념과연산자및피연산자에대한학습 C 의알아보기 연산자의우선순위와결합방향에대하여알아보기 2 목차 연산자의기본개념 수식 연산자와피연산자 산술연산자 / 증감연산자 관계연산자 / 논리연산자 비트연산자 / 대입연산자연산자의우선순위와결합방향 조건연산자 / 형변환연산자 연산자의우선순위 연산자의결합방향

More information

11장 포인터

11장 포인터 누구나즐기는 C 언어콘서트 제 9 장포인터 이번장에서학습할내용 포인터이란? 변수의주소 포인터의선언 간접참조연산자 포인터연산 포인터와배열 포인터와함수 이번장에서는포인터의기초적인지식을학습한다. 포인터란? 포인터 (pointer): 주소를가지고있는변수 메모리의구조 변수는메모리에저장된다. 메모리는바이트단위로액세스된다. 첫번째바이트의주소는 0, 두번째바이트는 1, 변수와메모리

More information

A Dynamic Grid Services Deployment Mechanism for On-Demand Resource Provisioning

A Dynamic Grid Services Deployment Mechanism for On-Demand Resource Provisioning C Programming Practice (II) Contents 배열 문자와문자열 구조체 포인터와메모리관리 구조체 2/17 배열 (Array) (1/2) 배열 동일한자료형을가지고있으며같은이름으로참조되는변수들의집합 배열의크기는반드시상수이어야한다. type var_name[size]; 예 ) int myarray[5] 배열의원소는원소의번호를 0 부터시작하는색인을사용

More information

목 차 1. 개요 취약점분석추진배경 취약점요약 취약점정보 취약점대상시스템목록 분석 공격기법및기본개념 시나리오 공격코드

목 차 1. 개요 취약점분석추진배경 취약점요약 취약점정보 취약점대상시스템목록 분석 공격기법및기본개념 시나리오 공격코드 취약점분석보고서 [Aviosoft Digital TV Player Professional 1.x Stack Buffer Overflow] 2012-08-08 RedAlert Team 강동우 목 차 1. 개요... 1 1.1. 취약점분석추진배경... 1 1.2. 취약점요약... 1 1.3. 취약점정보... 1 1.4. 취약점대상시스템목록... 1 2. 분석...

More information

PA for SWE2007

PA for SWE2007 Programming Assignment #0: Making own "my_string.h" SWE2007: Software Experiment II (Fall 2016) Due: 21st Sep. (Wed), 11:59 PM 1. Introduction 이번과제에선, 앞으로있을다른과제들을수행하기위한필요할함수들을구현한다. 그대상은, 문자열조작 / 검사 / 변환함수들을담은

More information

BMP 파일 처리

BMP 파일 처리 BMP 파일처리 김성영교수 금오공과대학교 컴퓨터공학과 학습내용 영상반전프로그램제작 2 Inverting images out = 255 - in 3 /* 이프로그램은 8bit gray-scale 영상을입력으로사용하여반전한후동일포맷의영상으로저장한다. */ #include #include #define WIDTHBYTES(bytes)

More information

Microsoft PowerPoint - hy2-12.pptx

Microsoft PowerPoint - hy2-12.pptx 2.4 명령어세트 (instruction set) 명령어세트 CPU 가지원하는기계어명령어들의집합 명령어연산의종류 데이터전송 : 레지스터 / 메모리간에데이터이동 산술연산 : 덧셈, 뺄셈, 곱셈및나눗셈 논리연산 : 비트들간의 AND, OR, NOT 및 XOR 연산 입출력 (I/O) : CPU( 레지스터 ) 와외부장치들간의데이터이동 프로그램제어 : 분기, 서브루틴호출

More information

Microsoft PowerPoint - chap03-변수와데이터형.pptx

Microsoft PowerPoint - chap03-변수와데이터형.pptx #include int main(void) { int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num %d\n", num); return 0; } 1 학습목표 의 개념에 대해 알아본다.

More information

Linux Binary Hardening with Glibc Hyeonho Seo

Linux Binary Hardening with Glibc Hyeonho Seo Linux Binary Hardening with Glibc Hyeonho Seo About Me 서현호(Hyeonho Seo) KDMHS 재학 중인 파릇한(?) 고등학 생 게임/팀플 빼고는 우분투만 사용 관심 분야는 상당히 잡식성 POSIX System Hacking Linux Kernel Programming Network Protocol C, Modern

More information

Microsoft PowerPoint - chap06-1Array.ppt

Microsoft PowerPoint - chap06-1Array.ppt 2010-1 학기프로그래밍입문 (1) chapter 06-1 참고자료 배열 박종혁 Tel: 970-6702 Email: jhpark1@snut.ac.kr 한빛미디어 출처 : 뇌를자극하는 C프로그래밍, 한빛미디어 -1- 배열의선언과사용 같은형태의자료형이많이필요할때배열을사용하면효과적이다. 배열의선언 배열의사용 배열과반복문 배열의초기화 유연성있게배열다루기 한빛미디어

More information

Microsoft PowerPoint - chap13-입출력라이브러리.pptx

Microsoft PowerPoint - chap13-입출력라이브러리.pptx #include int main(void) int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; 1 학습목표 스트림의 기본 개념을 알아보고,

More information

JVM 메모리구조

JVM 메모리구조 조명이정도면괜찮조! 주제 JVM 메모리구조 설미라자료조사, 자료작성, PPT 작성, 보고서작성. 발표. 조장. 최지성자료조사, 자료작성, PPT 작성, 보고서작성. 발표. 조원 이용열자료조사, 자료작성, PPT 작성, 보고서작성. 이윤경 자료조사, 자료작성, PPT작성, 보고서작성. 이수은 자료조사, 자료작성, PPT작성, 보고서작성. 발표일 2013. 05.

More information

기술문서 LD_PRELOAD 와공유라이브러리를사용한 libc 함수후킹 정지훈

기술문서 LD_PRELOAD 와공유라이브러리를사용한 libc 함수후킹 정지훈 기술문서 LD_PRELOAD 와공유라이브러리를사용한 libc 함수후킹 정지훈 binoopang@is119.jnu.ac.kr Abstract libc에서제공하는 API를후킹해본다. 물론이방법을사용하면다른라이브러리에서제공하는 API들도후킹할수있다. 여기서제시하는방법은리눅스후킹에서가장기본적인방법이될것이기때문에후킹의워밍업이라고생각하고읽어보자 :D Content 1.

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 DEVELOPMENT ENVIRONMENT 2 MAKE Jo, Heeseung MAKE Definition make is utility to maintain groups of programs Object If some file is modified, make detects it and update files related with modified one 2

More information

Chapter 4. LISTS

Chapter 4. LISTS C 언어에서리스트구현 리스트의생성 struct node { int data; struct node *link; ; struct node *ptr = NULL; ptr = (struct node *) malloc(sizeof(struct node)); Self-referential structure NULL: defined in stdio.h(k&r C) or

More information

Microsoft PowerPoint - IOControl [호환 모드]

Microsoft PowerPoint - IOControl [호환 모드] 목차 Input/Output Control I/O Control Mechanism mmap function munmap function RAM Area Access LED Control 4 digits 7 Segment Control Text LCD Control 1 2 I/O Control Mechanism (1) I/O Control Mechanism (2)

More information

Microsoft Word - readme.doc

Microsoft Word - readme.doc ========================================================= 제 1 회광주과기원정보통신공학과 SW 경진대회 (Hacking 경진대회 ) 대회시작 : 2002 년 8 월 8 일 ( 목 ) 오후 9:00 ( 한국시간, GMT+9:00) 대회종료 : 2002 년 8 월 10 일 ( 토 ) 오후 9:00 ( 한국시간, GMT+9:00)

More information

Microsoft PowerPoint - 03_(C_Programming)_(Korean)_Pointers

Microsoft PowerPoint - 03_(C_Programming)_(Korean)_Pointers C Programming 포인터 (Pointers) Seo, Doo-Ok Clickseo.com clickseo@gmail.com 목 차 포인터의이해 다양한포인터 2 포인터의이해 포인터의이해 포인터변수선언및초기화 포인터연산 다양한포인터 3 주소연산자 ( & ) 포인터의이해 (1/4) 변수와배열원소에만적용한다. 산술식이나상수에는주소연산자를사용할수없다. 레지스터변수또한주소연산자를사용할수없다.

More information

Execute_Shellcode_on_the_MacOSX.txt - 메모장

Execute_Shellcode_on_the_MacOSX.txt - 메모장 ####################################################################### Execute Shellcode on the MacOSX 1ndr4 "indra.kr". " x40". "gmail.com" http://indra.linuxstudy.pe.kr 2005. 08. 19. ########################################################################

More information

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf("hihi\n"); } warning: conflicting types for functiona

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf(hihi\n); } warning: conflicting types for functiona 이름 : 학번 : A. True or False: 각각항목마다 True 인지 False 인지적으세요. 1. (Python:) randint 함수를사용하려면, random 모듈을 import 해야한다. 2. (Python:) '' (single quote) 는한글자를표현할때, (double quote) 는문자열을표현할때사용한다. B. 다음에러를수정하는방법을적으세요.

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Development Environment 2 Jo, Heeseung make make Definition make is utility to maintain groups of programs Object If some file is modified, make detects it and update files related with modified one It

More information

BOF Foundation.doc

BOF Foundation.doc 해커지망자들이알아야할 Buffer Overflow Attack 의기초 What every applicant for the hacker should know about the foundation of buffer overflow attacks By 달고나 (Dalgona@wowhacker.org) Email: zinwon@gmail.com 2005 년 9월 5일

More information

Deok9_PE Structure

Deok9_PE Structure PE Structure CodeEngn Co-Administrator!!! and Team Sur3x5F Member Nick : Deok9 E-mail : DDeok9@gmail.com HomePage : http://deok9.sur3x5f.org Twitter :@DDeok9 1. PE > 1) PE? 2) PE 3) PE Utility

More information

목차 1. 소개... 3 가. BOF란?... 3 나. 윈도우 BOF 개발환경및사용툴 Shellcode 작성하기... 4 가. cmd 쉘 ) 소스코드작성 ) 디스어셈블리 ) 어셈블리코드편집 간단

목차 1. 소개... 3 가. BOF란?... 3 나. 윈도우 BOF 개발환경및사용툴 Shellcode 작성하기... 4 가. cmd 쉘 ) 소스코드작성 ) 디스어셈블리 ) 어셈블리코드편집 간단 기술문서 `09. 11. 02. 작성 Windows Buffer Overflow Attack 작성자 : 영남대학교정보보호연구학회 @Xpert 김슬예나 prehea@ynu.ac.kr 1 목차 1. 소개... 3 가. BOF란?... 3 나. 윈도우 BOF... 3 2. 개발환경및사용툴... 3 3. Shellcode 작성하기... 4 가. cmd 쉘... 4

More information

Microsoft PowerPoint - es-arduino-lecture-03

Microsoft PowerPoint - es-arduino-lecture-03 임베디드시스템개론 : Arduino 활용 Lecture #3: Button Input & FND Control 2012. 3. 25 by 김영주 강의목차 디지털입력 Button switch 입력 Button Debounce 7-Segment FND : 직접제어 7-Segment FND : IC 제어 2 디지털입력 : Switch 입력 (1) 실습목표 아두이노디지털입력처리실습

More information

Microsoft PowerPoint - chap04-연산자.pptx

Microsoft PowerPoint - chap04-연산자.pptx int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); } 1 학습목표 수식의 개념과 연산자, 피연산자에 대해서 알아본다. C의 를 알아본다. 연산자의 우선 순위와 결합 방향에

More information

리눅스 취약점대응방안권고 / KISA 취약점점검팀 영향받는플랫폼 OS, FAQ 추가 개요 미국보안회사 에의해 시스템의 라이브러리 의특정함수에서임의코드를실행할수있는취약점이공개 해당취약점은 CVE 지정, 도메인네임을

리눅스 취약점대응방안권고 / KISA 취약점점검팀 영향받는플랫폼 OS, FAQ 추가 개요 미국보안회사 에의해 시스템의 라이브러리 의특정함수에서임의코드를실행할수있는취약점이공개 해당취약점은 CVE 지정, 도메인네임을 리눅스 취약점대응방안권고 15. 01. 29 / KISA 취약점점검팀 15. 01. 30 영향받는플랫폼 OS, FAQ 추가 개요 미국보안회사 에의해 시스템의 라이브러리 의특정함수에서임의코드를실행할수있는취약점이공개 해당취약점은 CVE-2015-0235 지정, 도메인네임을 IP로변환하는기능이포함된서비스 ( 메일, 웹등 ) 들은해당취약점에영향을받을수있음 취약점상세분석

More information

0x00 Contents 0x About Nickster 0x Analaysis 0x Exploit

0x00 Contents 0x About Nickster 0x Analaysis 0x Exploit Defcon CTF 17 th Nickster Report StolenByte(Son Choong-Ho) http://stolenbyte.egloos.com thscndgh_4@hotmail.com WOWHACKER 2009. 08. 09 0x00 Contents 0x01 ------------- About Nickster 0x02 -------------

More information

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074>

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074> Chap #2 펌웨어작성을위한 C 언어 I http://www.smartdisplay.co.kr 강의계획 Chap1. 강의계획및디지털논리이론 Chap2. 펌웨어작성을위한 C 언어 I Chap3. 펌웨어작성을위한 C 언어 II Chap4. AT89S52 메모리구조 Chap5. SD-52 보드구성과코드메모리프로그래밍방법 Chap6. 어드레스디코딩 ( 매핑 ) 과어셈블리어코딩방법

More information