[pwnable.xyz] misalignment
Wargame/pwnable.xyz
Try not using a debugger for this one.AttachmentAnalysisint __cdecl main(int argc, const char **argv, const char **envp){ __int64 s[20]; // [rsp+10h] [rbp-A0h] BYREF s[19] = __readfsqword(0x28u); setup(argc, argv, envp); memset(s, 0, 0x98uLL); *(__int64 *)((char *)&s[1] + 7) = 0xDEADBEEFLL; while ( (unsigned int)_isoc99_scanf("%ld %ld %ld", &s[4], &s[5], &s[6]) == 3 && s[6] = -7 ) { s[..
[pwnable.xyz] add
Wargame/pwnable.xyz
We did some subtraction, now let's do some addition.AttachmentAnalysis스택에서 임의의 위치에 임의의 8바이트 값을 넣을 수 있다.ExploitPIE가 비활성화되어 있기 때문에 main()의 return address에 win()의 주소를 넣고 return하면 플래그를 획득할 수 있다.while (1)을 탈출하기 위해서는 scanf()의 return value가 3이 아니어야 한다. 이것은 scanf()에 %ld로 받을 수 없는 문자를 입력하면 된다.
[pwnable.xyz] sub
Wargame/pwnable.xyz
Do you know basic math?AttachmentAnalysis _printf_chk(1LL, "1337 input: "); _isoc99_scanf("%u %u", &num1, &num2); if ( num1 num1과 num2를 입력받는다. 이 수들이 두 가지 조건을 만족하면 플래그를 획득할 수 있다.두 수 모두 4918보다 작거나 같아야 한다.두 수의 차가 4919여야 한다.Exploit수학적으로, 주어진 조건들이 성립하려면 최소 하나의 수는 음수여야 한다.mov edx, [rsp+18h+num2]cmp edx, 1336hjle short loc_8C5위의 어셈블리 코드는 num2를 1336과 비교하여, 작거나 같으면 loc_8c5로 점프하는 코드이다. 이때 점..
[pwnable.xyz] Welcome
Wargame/pwnable.xyz
Are you worthy to continue?AttachmentAnalysis mapped = malloc(0x40000uLL); *mapped = 1LL; _printf_chk(1LL, "Leak: %p\n", mapped);0x40000 크기의 메모리를 동적 할당하여 주소를 mapped에 저장한다. 이 메모리의 첫 바이트에 1을 넣고, 메모리의 주소를 출력해준다. _printf_chk(1LL, "Length of your message: "); size[0] = 0LL; _isoc99_scanf("%lu", size); message = (char *)malloc(size[0]); _printf_chk(1LL, "Enter your message: "); read(0, messag..
[pwnable.kr] input
Wargame/pwnable.kr
Mom? how can I pass my input to a computer program?ssh input2@pwnable.kr -p2222 (pw:guest)AttachmentStage 1: argv/* input.c */// argv if(argc != 100) return 0; if(strcmp(argv['A'],"\x00")) return 0; if(strcmp(argv['B'],"\x20\x0a\x0d")) return 0; printf("Stage 1 clear!\n");# ex.pyfrom pwn import *# stage 1argv = ["" for i in range(100)]argv[0] = "/home/input2/input"argv[0x41] = "\x00"..
h0meb0dy_
'분류 전체보기' 카테고리의 글 목록 (11 Page)