전체 글

IT and Information Security
SECURITY/System

[시스템보안] 11주차_ Shellcode(2)

1 Shellcode (1) Helloworld2.c - 2의 보수를 이용한 접근법 - 역 방향으로 Call 명령어를 수행하여 Call 명령어에 null byte가 존재하지 않도록 함 - nasm을 이용해서 helloworld2.s을 어셈블(assemble), Hexdump로 쉘코드 생성 - call 명령어의 널바이트 제거됨 - mov 명령어의 널바이트는 여전히 제거되지 않음 BITS 32 ; Tell nasm this is 32-bit code. jmp short one ; Jump down to a call at the end. two: ; ssize_t write(int fd, const void *buf, size_t count); pop ecx ; Pop the return address (st..

SECURITY/System

[시스템보안] 10주차_ Shellcode

1 shellcode (1) 정의 - 프로세서 맞춤형 기계어 명령어들의 집합 - 메모리 안에서 실행됨 - 어셈블리 언어를 사용해 생성됨 - 생성절차 : C 프로그램 > 어셈블리 프로그램 > 쉘코드 (2-1) Helloworld.asm 실습 - 소스코드 section .data ; Data Segment msg dd "Hello, World!", 0x0a ; String and newline character section .text ;Text segment global _start ;Default entry point for ELF linking _start: ; _start label ;SYSCALL: write(1, msg, 14) mov eax, 4 ; Put 4 into eax, since wri..

SECURITY/System

[시스템보안] 10주차_ Bufferoverflow2

1 연습문제 1-3 buf_of.c 프로그램을 gdb를 사용해서 실행하고 아래의 항에 답하시오 (0) 소스코드 #include #include #include int doCopy(char *str) { int tmp=0; char token=0x00; int flag=0; char buf1[4]; char buf2[4]; strcpy(buf2, str); return 1; } int main(int argc, char *argv[]) { if(doCopy(argv[1])) puts("1111\n"); else puts("0000\n"); } (1) 변수 token, flag, tmp의 스택상의 주소를 작성하시오. b 14 r print &token print &flag print &tmp (2) 배열 b..

BLOCKCHAIN/BlockChain

ECAC Dapp 개발(1)

1 개발환경 세팅 (1) Node 설치 (2) Truffle 설치 (3) Ganache-cli 설치 (4) Google Chrome, Metamask 설치 (5) VS Code, Solidity 확장자 설치 * 참고자료 https://zz1-hyunn.tistory.com/116?category=919566

SECURITY/System

[시스템보안] 6주차_BufferOverflow

1 overflow_example.c (1) 소스코드 #include #include int main(int argc, char *argv[]) { int value = 5; char buffer_one[8], buffer_two[8]; strcpy(buffer_one, "one"); strcpy(buffer_two, "two"); printf("[BEFORE] buffer_two is at %p and contains \'%s\'\n", buffer_two,buffer_two); printf("[BEFORE] buffer_one is at %p and contains \'%s\'\n", buffer_one,buffer_one); printf("[BEFORE] value is at %p and is %d..

yuujoeng
알감자는 공부중