본문 바로가기

[Exploit-Exercises | protostar] Stack 1 :: Basic Buffer Overflow Stack 1의 소스코드는 다음과 같습니다. 1234567891011121314151617181920212223#include #include #include #include int main(int argc, char **argv){ volatile int modified; char buffer[64]; if(argc == 1) { errx(1, "please specify an argument\n"); } modified = 0; strcpy(buffer, argv[1]); // Vurnerability!!! if(modified == 0x61626364) { printf("you have correctly got the variable to the right value\n"); } else { pri.. 더보기
[Exploit-Exercises | protostar] Stack 0 :: Basic Buffer Overflow Stack 0에 소스코드는 다음과 같습니다. 123456789101112131415161718#include #include #include int main(int argc, char **argv){ volatile int modified; char buffer[64]; modified = 0; gets(buffer); // Vulnerability!!! if(modified != 0) { printf("you have changed the 'modified' variable\n"); } else { printf("Try again?\n"); }}Colored by Color Scriptercs int형의 modified와 64 Bytes의 buffer라는 배열이 선언되어 있습니다.gets() 함수에서 .. 더보기
[SQL] MySQL 대소문자 구분 SummaryVARCHAR Type : 대소문자 구분 안함VARBINARY Type : 대소문자 구분 함BINARY() 함수 : 대소문자를 구별하여 WHERE 이하 절 연산 다음과 같이 VARCHAR Type의 id 필드를 갖는 테이블을 생성합니다. WHERE 이하 절에서 id='admin'과 같은 조건을 검색한 결과, 대소문자를 구별하지 않고 admin이 검색되는 것을 확인할 수 있습니다. WHERE 이하 절에서 BINARY() 함수를 사용하여 조건을 검색한 결과, 대소문자가 구별된 admin이 검색됩니다. 이번에는 VARBINARY Type의 id 필드를 갖는 테이블을 생성합니다. BINARY() 함수를 사용하지 않고도 대소문자가 구별된 admin을 검색할 수 있습니다. 더보기