글
Programming 2011. 11. 5. 14:15윈도우에서 자동 실행되는 경로들
은근 가끔씩 필요한 정보
DiamondCS 에서 제공하는 Autostart Guard, Autostart Viewer 프로그램이 모니터링하는 Windows 자동 실행 위치의 리스트 입니다.
웜, 바이러스 등에 감염되었을 때 한번쯤 살펴봐야 할 곳들이죠.
Autostart Locations are listed in no particular order.
Registry Autostart Locations
- HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionRun
All values in this key are executed. - HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionRunOnce
All values in this key are executed, and then their autostart reference is deleted. - HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionRunServices
All values in this key are executed as services. - HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionRunServicesOnce
All values in this key are executed as services, and then their autostart reference is deleted. - HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun
All values in this key are executed. - HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRunOnce
All values in this key are executed, and then their autostart reference is deleted. - HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRunOnceSetup
Used only by Setup. Displays a progress dialog box as the keys are run one at a time. - HKEY_USERS.DefaultSoftwareMicrosoftWindowsCurrentVersionRun
Similar to the Run key from HKEY_CURRENT_USER. - HKEY_USERS.DefaultSoftwareMicrosoftWindowsCurrentVersionRunOnce
Similar to the RunOnce key from HKEY_CURRENT_USER. - HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionWinlogon
The "Shell" value is monitored. This value is executed after you log in. - HKEY_LOCAL_MACHINESoftwareMicrosoftActive SetupInstalled Components
All subkeys are monitored, with special attention paid to the "StubPath" value in each subkey. - HKEY_LOCAL_MACHINESystemCurrentControlSetServicesVxD
All subkeys are monitored, with special attention paid to the "StaticVXD" value in each subkey. - HKEY_CURRENT_USERControl PanelDesktop
The "SCRNSAVE.EXE" value is monitored. This value is launched when your screen saver activates. - HKEY_LOCAL_MACHINESystemCurrentControlSetControlSession Manager
The "BootExecute" value is monitored. Files listed here are Native Applications that are executed before Windows starts. - HKEY_CLASSES_ROOTvbsfileshellopencommand
Executed whenever a .VBS file (Visual Basic Script) is run. - HKEY_CLASSES_ROOTvbefileshellopencommand
Executed whenever a .VBE file (Encoded Visual Basic Script) is run. - HKEY_CLASSES_ROOTjsfileshellopencommand
Executed whenever a .JS file (Javascript) is run. - HKEY_CLASSES_ROOTjsefileshellopencommand
Executed whenever a .JSE file (Encoded Javascript) is run. - HKEY_CLASSES_ROOTwshfileshellopencommand
Executed whenever a .WSH file (Windows Scripting Host) is run. - HKEY_CLASSES_ROOTwsffileshellopencommand
Executed whenever a .WSF file (Windows Scripting File) is run. - HKEY_CLASSES_ROOTexefileshellopencommand
Executed whenever a .EXE file (Executable) is run. - HKEY_CLASSES_ROOTcomfileshellopencommand
Executed whenever a .COM file (Command) is run. - HKEY_CLASSES_ROOTatfileshellopencommand
Executed whenever a .BAT file (Batch Command) is run. - HKEY_CLASSES_ROOTscrfileshellopencommand
Executed whenever a .SCR file (Screen Saver) is run. - HKEY_CLASSES_ROOTpiffileshellopencommand
Executed whenever a .PIF file (Portable Interchange Format) is run. - HKEY_LOCAL_MACHINESystemCurrentControlSetServices
Services marked to startup automatically are executed before user login. - HKEY_LOCAL_MACHINESystemCurrentControlSetServicesWinsock2ParametersProtocol_CatalogCatalog_Entries
Layered Service Providers, executed before user login. - HKEY_LOCAL_MACHINESystemControlWOWcmdline
Executed when a 16-bit Windows executable is executed. - HKEY_LOCAL_MACHINESystemControlWOWwowcmdline
Executed when a 16-bit DOS application is executed. - HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionWinlogonUserinit
Executed when a user logs in. - HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionShellServiceObjectDelayLoad
Executed by explorer.exe as soon as it has loaded. - HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersionWindows un
Executed when the user logs in. - HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersionWindowsload
Executed when the user logs in. - HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer un
Subvalues are executed when Explorer initialises. - HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer un
Subvalues are executed when Explorer initialises.
Folder Autostart Locations
- windirStart MenuProgramsStartup
- UserStartup
- All UsersStartup
- windirsystemiosubsys
- windirsystemvmm32
- windirTasks
File Autostart Locations
- c:explorer.exe
- c:autoexec.bat
- c:config.sys
- windirwininit.ini
- windirwinstart.bat
- windirwin.ini - [windows] "load"
- windirwin.ini - [windows] "run"
- windirsystem.ini - [boot] "shell"
- windirsystem.ini - [boot] "scrnsave.exe"
- windirdosstart.bat
- windirsystemautoexec.nt
- windirsystemconfig.nt출처:Windows 자동 실행 위치
보통 Auto Start시키는 설정은 다음과 같습니다. 여기에서 예제 스파이웨어 파일명을 malware.exe로 가정해 보겠습니다.
1) win.ini 파일에서 다음과 같이 설치됩니다
[winodws]
load = malware.exe
run = malware.exe
2) system.ini 파일에서 다음과 같이 추가됩니다.
[boot]
Shell = explorer.exe malware.exe
3) Autoexec.bat 파일에서
%windir%system32% 디렉터리 밑에 malware.exe
4) Registry Shell Open
[HKEY_CLASS_ROOT/exefile/shell/open/command]
[HKEY_LOCAL_MACHINE/Software/Classes/exefile/shell/open/command]
"malware.exe %1 %*" 요런식으로 값이 들어가 있습니다.
5) Alternative Registry Keys
[HKEY_CLASSES_ROOT.exe] @="myexefile"]
[HKEY_LOCAL_MACHINE/Software/Classes/myexefile/shell/open/command@="malware.exe %1 %*"]
winstart.bat
6) Main 레지스트리에 등록되는 경우
[HKEY_LOCAL_MACHINE/SoftwareMicrosoft/Windows/CurrentVersion/RunServices]
[HKEY_LOCAL_MACHINE/SoftwareMicrosoft/Windows/CurrentVersion/RunServicesOnce]
[HKEY_LOCAL_MACHINE/SoftwareMicrosoft/Windows/CurrenVersion/Run]
6) wininit.ini 에 혹시 등록되어 있는 프로그램이 없는지 확인
'Programming' 카테고리의 다른 글
닷넷에서 xml 처리 (0) | 2011.11.14 |
---|---|
원격 인스톨 방법 (0) | 2011.11.05 |
터미널 세션 강제 종료 (0) | 2011.11.05 |
인코딩 타입 알아내기 (0) | 2011.10.04 |
64비트 포팅에 주의 사항 (0) | 2011.10.04 |
트랙백
댓글
글
Programming 2011. 11. 5. 14:06터미널 세션 강제 종료
사용방법은
tsdiscon 세션ID /server:서버명
ex) tsdiscon 1 /server:www01
인터넷에 찾아보면 자료 많음
'Programming' 카테고리의 다른 글
원격 인스톨 방법 (0) | 2011.11.05 |
---|---|
윈도우에서 자동 실행되는 경로들 (0) | 2011.11.05 |
인코딩 타입 알아내기 (0) | 2011.10.04 |
64비트 포팅에 주의 사항 (0) | 2011.10.04 |
아파치 웹브라우저에서 디렉토리 리스트 보이는 설정관련 (0) | 2011.09.18 |
트랙백
댓글
글
Programming 2011. 10. 4. 16:27인코딩 타입 알아내기
[그림출처:http://wiki.secondlife.com/wiki/Unicode_In_5_Minutes]
인코딩 타입이란 특정 캐릭터셋으로 만들어진 파일을 보여주는 방식입니다. 전세계 주요 언어문자를 하나의 바이너리 코드로 처리하기 위해서 유니코드(unicode)를 만들었지만 이 코드를 보여주는 인코딩 방식은 다양합니다.
많이 사용하는 인코딩 타입으로는 UTF-8, UTF-16, EUC-KR, ISO8859-1, MS949등이 있는데요, 텍스트 파일이 어떤 인코딩 타입으로 설정되어 있느냐에 따라 똑같은 유니코드 데이터도 제대로 보이기도 안보이기도 합니다. 그럼 이 파일이 어떤 인코딩타입으로 되어 있는지 알아내려면 어떻게 해야 할까요?
BOM이라는게 있습니다. BOM(Byte Order Mask)은 파일이 어떤 인코딩 타입임을 나타냅니다만 어떤 에디터는 이 BOM을 생략하기도 하기때문에 절대적이라고 볼 수는 없습니다.
그럼 자바로 쉽게 인코딩 타입을 확인할 수는 없을까? ICU를 이용하면 가능합니다.
ICU(International Component for Unicode)는 이와 관련된 라이브러리를 제공합니다. C와 Java를 지원하며 제가 확인한 것은 자바용인 ICU4J입니다.
1.Maven의 POM에 관련 설정을 추가합니다.
<dependency>2.유틸리티 함수를 하나 추가합니다. 저의 경우에는 FileUtil이라는 유틸클래스에 추가했습니다.
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>4.0.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
public static String readFileToString(File file) throws Exception {테스트해 보니 EUC-KR, UTF8인 경우에는 잘 동작합니다. 많이들 필요할것 같은데 의외로 자료가 없어서 찾는데 애를 좀 먹어서 정리해놓습니다.
try {
CharsetDetector detector = new CharsetDetector();
detector.setText(FileUtils.readFileToByteArray(file));
return FileUtils.readFileToString(file, detector.detect().getName());
} catch (IOException e) {
throw new Exception(e);
}
}
'Programming' 카테고리의 다른 글
윈도우에서 자동 실행되는 경로들 (0) | 2011.11.05 |
---|---|
터미널 세션 강제 종료 (0) | 2011.11.05 |
64비트 포팅에 주의 사항 (0) | 2011.10.04 |
아파치 웹브라우저에서 디렉토리 리스트 보이는 설정관련 (0) | 2011.09.18 |
IIS에 Ruby 사용 (0) | 2011.09.18 |
RECENT COMMENT