코드엔진워게임
-
Dreamhack - [CodeEngn] Malware L08wargame/Dreamhack 2024. 8. 24. 21:09
[LEVEL 1 - [CodeEngn] Malware L08 - reversing, misc] 문제 파일을 다운로드 받으면 이전 문제들처럼 pdf가 하나 들어있다. 앞서 풀었던 문제들보다 주어진 악성코드의 flow가 조금 더 복잡해 보인다. 위에서부터 쭉 보다가 중간쯤에서 위와 같이 수상해 보이는 함수를 발견했다. 위와 같이 msdn에 ShellExecuteExA()에 대한 친절한 설명이 나와있다. 따라서 앞서 하이라이트 표시한 부분이 문제 설명에 나와있던 "다른 악성코드를 실행하여 추가 감염을 일으키는 함수의 주소"임을 알 수 있다.PE 파일이 익숙한 사람들에게는 당연한 것이겠지만, 정답은 Ex) 00401000과 같은 형태임을 유의해야 한다. 플래그를 획득했다!
-
Dreamhack - [CodeEngn] Malware L07wargame/Dreamhack 2024. 8. 18. 19:49
[LEVEL 1 - [CodeEngn] Malware L07 - reversing, misc] 이 문제도 문제 파일을 다운로드 받으면 pdf 하나가 들어있다. 악성코드의 Flow 일부가 주어지는데, 이전 L06번 문제와 거의 같아 보인다. 문제 설명에 나와있는 것처럼 이 악성코드는 위와 같이 특정 사이트에 접속을 시도하고 있다. 접속이 안될 경우 몇초 단위로 재접속을 하는데, 몇ms 단위로 재접속을 하는지 구해야 한다.pdf 아래 부분을 확대하면 위처럼 96000h ms 만큼 Sleep(쉬었다가) 이후 재접속을 하는 것으로 보인다.96000h의 h는 16진수를 의미하므로 이를 10진수로 바꾸면 614400이다. 즉, 614400 ms 단위로 재접속을 한다. 플래그를 획득했다!
-
Dreamhack - [CodeEngn] Malware L06wargame/Dreamhack 2024. 8. 18. 19:39
[LEVEL 1 - [CodeEngn] Malware L06 - reversing, misc] 문제 파일을 다운로드 받으면 pdf 하나가 들어있다. 위와 같이 악성코드의 전체 Flow가 그래프로 주어진 pdf이다. 시작 부분을 보면 CreateMutexA()가 가장 눈에 띈다. 구글링하면 msdn에 아래와 같이 친절하게 설명이 나온다.매개변수 중 lpMutexAttributes는 SECURITY_ATTRIBUTES 구조체에 대한 포인터이다. 이 매개변수가 NULL이면 자식 프로세스에서 핸들을 상속할 수 없다.bInitialOwner은 이 값이 TRUE 이고 호출자가 뮤텍스를 만든 경우 호출 스레드는 뮤텍스 개체의 초기 소유권을 얻는다. 그렇지 않으면 호출 스레드는 뮤텍스의 소유권을 얻지 못..