일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 코드엔진
- 리버싱
- CS/자료구조/Priority_Queue
- CS/자료구조/Queue
- Tree/RBTree/Deletion
- UTCTF
- reversing
- CS/자료구조/Linked_List
- Tree/AVL/Deletion
- forensic
- CS/자료구조/Stack
- CS/자료구조/Doubly_Linked_List
- Tree/Binary_Search_Tree
- Tree/AVL/Insertion
- Tree/RBTree/Insertion
- Tree/BST
- ctf
- Tree/AVL
- Tree/Binary_Tree
- CS/자료구조/Singly_Linked_List
- tree
- codeengn
- CS/자료구조/Circular_Linked_List
- Tree/Traversal
- Tree/RBTree
- CS/자료구조/Circular_Queue
- Today
- Total
목록전체 글 (109)
SuperVingo

구조는 rev-basic-0랑 같다. sub_140001000로 가면그냥 문자 하나하나 비교라서 차이는 없이 확인할 수 있었다.

그렇게 어렵지는 않았다. 들어가면 sub140001000에서 비교를 하는데, 들어가면 바로 플래그 문장이 있다.

값을 입력하면 {API_HOST}/api/user/{userid}로 접속하는데,userid 를 ../flag로 넣게되면/api/user/../flag -> /api/flag로 접속하게 된다.풀다보니 ../flag를 입력하면 undefined로 넘어가길래Burp suite로 직접 넣어줬다.

쿠키에서 username을 가져와서 admin인지 비교한다.쿠키 값을 admin으로 바꾸면 된다.
// Initialize GLUTglutInit(&argc, argv);glutInitWindowPosition(100, 100);glutInitWindowSize(64 * PIXEL, 32 * PIXEL);glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE);glutCreateWindow("Chip 8 Emulator - Screen"); // Event FunctionglutDisplayFunc(mainLoop);glutIdleFunc(mainLoop);glutKeyboardFunc(KeyboardDown);glutKeyboardUpFunc(KeyboardUp);glut에서 DisplayFunc로 설정하면 계속 그리는 것이라 생각했는데,IdleFunc에 추가하지 않으면..
Initializevoid Chip8::Initialize(){ // Random Initialize srand(time(NULL)); // Reset the status of chip8 pc = 0x200; opcode = 0; I = 0; sp = 0; // Copy Hex Sprite to Interpreter Area for (int i = 0; i Cycle Codevoid Chip8::ChipCycle(){ // Fetch opcode from [pc], 2bytes opcode = mem[pc] > 8] == (opcode & 0x00FF)) pc += 4; else pc += 2; break; } case 0x4000: // 0x4xkk - SNE Vx, kk { // Skip..

CHIP-8 Memory - 4KB0x000 ~ 0x1FF -> Interpreter, Reserved, Hex Font 0x200 ~ 0xFFF -> Programs, PC will start in 0x200 Hex Font는 0부터 F까지 3x5 크기의 문자를 저장해둔 것이다. CPU General Purpose Register V0 - V16// General Purpose Registersunsigned char V[16]; Index Register I// Index Registerunsigned short I;Program Counter// Program Counterunsigned short pc;unsigned short opcode; Stack// Stack and Stack Poin..
CPU는 1단계: fetch2단계: decode3단계: execute4단계: writeback순서로 진행이 된다. Fetch에서 명령어를 인출하고,Decode에서 어떤 명령어인지 해독하고,Execute로 실행하고,Writeback을 통해서 결과 등을 메모리에 저장하는 과정으로 진행이 되는데, Writeback은 제외하고Fetch - Decode - Execute 순서로 진행된다. CPU_Initialize();// Cycleswhile(true){ // Fetch // Decode & Execute}큰 흐름으로 잡아보면 다음과 같다.