๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
โœ’๏ธ Miscellaneous (Misc)/Dreamhack

[Dreamhack] Exercise: Welcome-Beginners ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด

by A Lim Han 2023. 11. 25.

๐Ÿšบ Exercise: Welcome-Beginners ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด

1.  ๋ฌธ์ œ ์„ค๋ช… ํ™•์ธ ํ›„ ์„œ๋ฒ„ ์ƒ์„ฑ

2.  ์ƒ์„ฑํ•œ ์„œ๋ฒ„๋กœ ์ ‘์†ํ•˜๊ธฐ ์ „, ๋ฌธ์ œ ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ ํ›„ ์˜คํ”ˆ

3.  ์‚ฌ์šฉ์ž๋กœ๋ถ€ํ„ฐ ์ž…๋ ฅ๋ฐ›์€ ๊ฐ’์ด "Dreamhack" ์ธ ๊ฒฝ์šฐ FLAG๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ๋ถ€๋ถ„ ๋ฐœ๊ฒฌ

char cmp_str[10] = "Dreamhack";
char inp_str[10];   
printf("Enter \"Dreamhack\" : ");
scanf("%9s", inp_str);

if(strcmp(cmp_str, inp_str) == 0){
ใ…คใ…คputs("Welcome Beginners!");
ใ…คใ…ค// print flag
ใ…คใ…คputs(flag);
}

4. Ubuntu ๊ฐ€์ƒํ™˜๊ฒฝ์—์„œ nc ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ์„œ๋ฒ„ ์ ‘์†  -->  "Dreamhack" ์„ ์ž…๋ ฅํ•˜๋ผ๋Š” ์•ˆ๋‚ด ์ถœ๋ ฅ

$ nc host3.dreamhack.games 11689

5.  ์ž…๋ ฅ๋ž€์— "Dreamhack" ์ž…๋ ฅ ํ›„ Enter ํด๋ฆญ  -->  FLAG ๋ฐœ๊ฒฌ

 

# ๋ฐœ๊ฒฌํ•œ FLAG
: DH{d6398f06b35117877a855ade8d2015fc3b142c3ca6686ce3198e372b9ef8a644}

6.  ๋ฐœ๊ฒฌํ•œ FLAG๋ฅผ FLAG ํ™•์ธ๋ž€์— ์ œ์ถœ  -->  ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์˜€์Œ์„ ํ™•์ธ