Upload
howard-wood
View
232
Download
7
Embed Size (px)
Citation preview
CONTENT
• Motive & Dream
• System Architecture
• Software Architecture #1(Check CLR Type)
• Software Architecture #2(Project Browser)
• Software Architecture #3(Shown on Diagram)
• Software Architecture #4(Parsing the IL of a Method
Body)
• PLAN
• Demo, Q&A
SYSTEM ARCHITECTURE
.NET FrameworkReflection Names-
paces
• Aga.Controls• WinFormsUI.Docking
Reflection Engine
Head Setting
Method Analysis
Body Analy-sis Handler
• Branch• Call• Condition• Exception• Hook• Resolve• Switch
EXE/DLL Header Test
Individual Class Analy-
sis
Read Assem-bly
FetchMethod
Project Browser Class Diagram
MSIL Viewer Code Viewer
Window UI
Docking Configuration
Project Browser Setting
XML
Project Manager
Menu&Toolbar
Plug-in
Manager
Status
Window
Window XP
C#
Info Viewer
SOFTWARE ARCHITECTURE #1.1 - Open a File
Assemblies (*.dll)Executables (*.exe)
Select Type
Valid CLR TypeCreate The Tree And ClassesProject Browser
Next Step
Click!
SOFTWARE ARCHITECTURE #1.2 - Valid CLR Type
Finish
NumberOfSections
TimeDateStamp
PointerToSymbolTable
NumberOfSymbols
SizeOfOptionalHeader
Characteristics
@ 0x3CHeader
Start
HeaderSignatureCLI Header Test
Machine ReadUInt32()
ReadUInt16()
TRUE
SOFTWARE ARCHITECTURE #2.1 - Project Browser
Using Reflec-tion
EXE DLL
View
Con-troller
Model
TreeView
MSILView Code-View
Class Di-agram
Info View
SOFTWARE ARCHITECTURE #3.1 - Individual Class Analysis
TypeItem
ConstructorInfo
MethodInfo
PropertyInfo
FieldInfo
EventInfo
System.Reflection
Prameter-Info
getGenericsForType
ASSOCIATIONS LIST
Constructors
Field
Property
Method
Event
SOFTWARE ARCHITECTURE #3.2 - Get New Location
DefaultItemLoca-tionPoint(25,25)
Selectionrectangle
Selection. IntersectsWith(Reserved)
Selection.Right +DLocation.Y , DLoca-tion.X
Moverectangle
IntersectsWithReturn true
Step1
Reservedrectangle
Step2
Step3
Example
SOFTWARE ARCHITECTURE #4.1 - Ask for the IL Code
• Method Body
• Array of bytes
• MSIL Code
OperandTpye(17 Case)
InlineBrTargetInlineFieldInlineMethodInlineSigInlineTokInlineTypeInlinelInlinel8InlineNodeInlineRInlineStringInlineSwitchInlineVarShortInlineBrTargetShortInlinelShortInlineRShortInlineVar
Reflection
ReturnTypeReflectedTypeFullName
OpCode
SingleByteOpCodeMultiByteOpCode
SOFTWARE ARCHITECTURE #4.3 – Set Method Head
IsPublic
ReturnType
Name
GetParame-
ters
LocalVari-
abels
Reflection
General Code
Public, Private
Int, float, String
Main, Program
Byte, double
String str, Int i
SOFTWARE ARCHITECTURE #4.4 – MSIL Decompil
Single Byte Instructions(0~ 255)Multi Byte Instructions(0~ 30)
0
1a
b
c 2
Local Variable Init
MSIL StructureSingle Byte Instructions(0~ 255)Multi Byte Instructions(0~ 30)
Undefined Method De-fineParam
DefineLo-cal
Block Condi-tionalBlock
Assignment New Jump Call Return
Add Subtract Multiply Divide DivideUnsigned
Remain-der
Equality NotEqualTo
GreaterThan LessThan GreaterThanOrEqualTo
LessThanOrEqualTo
Not False True QuotedString
Logica-lAnd
LogicalOr if Branch While DoWhile ForNext
Break
Con-tinue
TryCatch TryFinally Rethrow
PLAN
1 3 5 7 9 11
13
15
17
19
21
23 25 2
729 31
9 월 프로젝트 구상 및 선정 작업
10월
Reflection Library 분석 및 Test
User Control 및 Tree 구조 구현
11월
PPT 작성 및 발표연습
MSIL Viewer 구현 Code Viewer 틀 구현 및 CASE Test 발표연습
12월
Code Viewer 및 전반적인 Debug 작업 , Diagram 기능 구현 UI Update
1 월 UI Update 발표연습
수 희 파 이 팅 합 격 하 자