본문 바로가기

전체 글67

[c] 구조체 관련 문제 풀이 codeup #1805 #include int main(){ int n = 0; //입체기동장치 수 int a[101],b[101]; // 식별번호와 가스보유량수 scanf("%d",&n); for(int i = 0; i 2023. 8. 27.
[system hacking] 어셈블리 복습 및 활용 어셈블리어 문법 구조 명령어 + 피연산자 구조 명령어 데이터 이동(Data Transfer) mov, lea 산술 연산(Arithmetic) inc, dec, add, sub 논리 연산(Logical) and, or, xor, not 비교(Comparison) cmp, test 분기(Branch) jmp, je, jg 스택(Stack) push, pop 프로시져(Procedure) call, ret, leave 시스템 콜(System call) syscall 피연산자 상수 레지스터 메모 변환 연습하기 1. example1.c # example1.asm .file"example1.c" #디버거에서 사용하는 원본소스 .section.rodata#.rodata = 읽기전용 데이터 변수 .LC0: .string.. 2023. 8. 6.
[C] 구조체 구조체 #include int main(void){ //[게임 출시] // 이름 : 나도게임 // 발매년도 : 2017년 // 가격 : 50원 // 제작사 : 나도회사 char *name = "나도회사"; int year = 2017; int price = 50; char * company = "나도회사"; //[또다른게임 출시] // 이름 : 너도게임 // 발매년도 : 2017년 // 가격 : 100원 // 제작사 : 너도회사 char *name = "너도회사"; int year = 2017; int price = 100; char * company = "너도회사"; return 0; } 구조체 활용과 typedef #include struct GameInfo{ char *name; int year; .. 2023. 7. 30.
[Reversing] IDA 설치 IDA(The Interactive Disassembler) 디스어셈블러로 디스어셈블 외 디버깅과 아키텍쳐 디컴파일 등 여러 기능을 제공함. 설치 사이트 :https://hex-rays.com/ida-free/ IDA Free IDA Free The free binary code analysis tool to kickstart your reverse engineering experience. hex-rays.com IDA 구성 Functions window IDA에서 분석한 프로그램의 함수 나열. ctrl+F로 원하는 함수 찾기. Graph overview 함수를 그래프화하여 사용자에게 보여줌. 함수의 흐름 파악. Output window 분석과정을 메시지로 출력. IDA의 분석 과정 파악. View 디.. 2023. 7. 23.