#include <stdio.h>
#include <string.h>
void ShowWelcomeMessage (void)
{
puts ("Welcome!");
}
int CheckPassword (void)
{
char aBuffer [32];
printf ("Password: ");
scanf ("%s", aBuffer);
return strcmp (aBuffer, "tltmxpaqhdkstlftmq");
}
int main (int argc, char * argv [])
{
CheckPassword () ? puts ("Access Denied.") : ShowWelcomeMessage ();
return 0;
}
바이너리를 만들고 gdb에 붙어서 분석을 진행한다.
main 함수에 브레이크 포인트를 걸고 어셈블리어를 본다.
0x1169가 존재한다.
PE base 주소 0x555555554000 이므로
0x555555555169
그럼 버퍼 크기가 32 이므로 A를 32개 입력하고 리틀엔디엔을 적용하여 iQUUUU를 붙이면 된다.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBiQUUUU 가 최종 페이로드
'digital forensics' 카테고리의 다른 글
[우암던전] 주통기 W-01, W-02, W-04, W-06을 점검하는 스크립트 (0) | 2024.12.10 |
---|---|
[우암 던전] 윈도우 서버 hydra로 해킹 후 RDP 연결하기 (0) | 2024.12.10 |
[우암던전] Privilege Escalation: Exploitation for Privilege Escalation (2) | 2024.10.17 |
[우암던전] john the ripper 사용법 (0) | 2024.09.20 |
[시스템 보안 실습] - MITRE ATT&CK 개요 (2) | 2024.09.05 |