reverse(1)

28
م ي ح ر ل ا ن م ح ر ل ه ا ل ل م ا س ب م ي ح ر ل ا ن م ح ر ل ه ا ل ل م ا س ب وا ن م ا ن ي ه الذ ل ل ع ا ف ر ي !وا ت و$ ا ن ي م والذ ك ن م ما ب ه ل ل و ا! ات م درج عل ل ا ر ي3 ب ج ون6 ل م ع! ت

description

reverse(1)

Transcript of reverse(1)

Page 1: reverse(1)

بسم الله الرحمن بسم الله الرحمن الرحيمالرحيم

يرفع الله الذين امنوا منكم والذين أوتوا العلم درجات و الله بما تعملون

خبير

Page 2: reverse(1)

Reverse EngineeringReverse Engineering

Dr. Kamel Soliman

[email protected]

Page 3: reverse(1)

ContentsContents

Introduction What is Reverse Engineering (RE)? Why do we need Reverse Engineering? Scope and Tasks of Reverse Engineering Different Approaches RE tools Conclusions

Page 4: reverse(1)

IntroductionIntroduction

"Reverse engineering is the process of "Reverse engineering is the process of analyzing a subject system to create analyzing a subject system to create representations of the system at a higher representations of the system at a higher level of abstraction.“ level of abstraction.“

Page 5: reverse(1)

IntroductionIntroduction

Reverse Engineering is an ArtReverse Engineering is an Art Reverse Engineering is a ScienceReverse Engineering is a Science Reverse Engineering is Fun!Reverse Engineering is Fun! Principal: How does that work? Challenge.Principal: How does that work? Challenge. Remove the black magic, find bugs (defaults), crack Remove the black magic, find bugs (defaults), crack

(break) protection schemes [only unjust (not (break) protection schemes [only unjust (not proposed) ones of course]proposed) ones of course]

Get Closer to your machine…Get Closer to your machine… Very Complex but Rewarding (Puzzles Very Complex but Rewarding (Puzzles

(demonstrate)(demonstrate)

Page 6: reverse(1)

What is Reverse What is Reverse Engineering ?Engineering ?

You have an unexpected case:• You finished one course project using Java• Your program runs OK• But, by accident (suddenly), you delete the java

file• How to hand (continue) in your project?

Page 7: reverse(1)

What is Reverse What is Reverse Engineering ?Engineering ?

You have an unexpected case:• You finished one course project using Java• Your program runs OK• But, by accident (suddenly), you delete the java

file• How to hand (continue) in your

project?

Reverse Engineering

Page 8: reverse(1)

What is Reverse What is Reverse Engineering ?Engineering ?

Waterfall (Typical) Model of software development

Requirement

analysis

design

Implementation

Testing and

Maintenance

Page 9: reverse(1)

What is Reverse What is Reverse Engineering ?Engineering ?

Forward Engineering

Requirements

Design

Source Code

Behavior

Page 10: reverse(1)

What is Reverse What is Reverse Engineering ?Engineering ?

Forward Engineering Reverse Engineering

Requirements

Design

Source Code

Behavior

Page 11: reverse(1)

What is Reverse What is Reverse Engineering ?Engineering ?

Abstraction System

Old system New System

Forward Engineering

Re-Implementation

Reverse Engineering

Abstraction

Page 12: reverse(1)

What is Reverse What is Reverse Engineering?Engineering?

RE encompasses (includes) any activity that is done to determine how a product works, to learn the ideas and technology that were used in developing that product.

RE can be done at many levels

RE generally belongs to Software Software MaintenanceMaintenance

Page 13: reverse(1)

The Early Days of REThe Early Days of RE

Law of Software Revolution (cycle) (Lehman, 1980)

Fundamental strategies for program comprehension Fundamental strategies for program comprehension (understanding) (Brooks, 1983)(understanding) (Brooks, 1983)

Classifying of Reverse Engineering (Chik of sky Classifying of Reverse Engineering (Chik of sky &Cross, 1990)&Cross, 1990)

WCRE (Working Conference on R.E., 1990)WCRE (Working Conference on R.E., 1990) IWPC (International Workshop on Program IWPC (International Workshop on Program

Comprehension)Comprehension)

Page 14: reverse(1)

Why do we need RE ?Why do we need RE ?

Recovery of lost information• providing proper system documentation

Assisting with maintenance• identification of side effects and anomalies

(deflection) Migration to another Hw/Sw platform Facilitating (simplifying) software reuse

Page 15: reverse(1)

Why do we need RE ?Why do we need RE ?

Benefits• Maintenance cost savings

• Quality improvements

• Competitive advantages

• Software reuse facilitation (simplification)

Page 16: reverse(1)

Difficulties of Reverse Difficulties of Reverse EngineeringEngineering

Gap between problem

/solution domain (field) Gap between concrete

(real) and abstract Gap between coherency/disintegration Gap between hierarchical (gradual)

/associational (grouped)

Page 17: reverse(1)

Scope and Task of Reverse Engineering

program understanding

Problem/Application

Domain (field)

Program/Implemen.

domain

Mapping

(symmetry)

Page 18: reverse(1)

Scope and Task of Reverse Engineering

Re-documentation and/or document generation Recovery of design approach and design

details at any level of abstraction Identifying reusable (used again) components

and components that need restructuring (rearrangement)

Recovering (protecting) business rules Understanding high-level system description.

Page 19: reverse(1)

Discovery of Abstraction (conclusion)

Discovery of abstraction in large system

• Maintenance purpose

• Evolution (gradual development) purpose

• Reengineering purpose

Page 20: reverse(1)

Levels of abstractions

Application• Application concepts, business rule, policies (bases)

Function• Logical and functional specification, non-functional

requirement

Structure• Data and control flow, dependency graphs

• Structure and subsystem charts (plans)

• Architectures (art of building)

Implementation• Symbol tables, source text

Page 21: reverse(1)

Different ApproachesDifferent Approaches

Restructuring • Transformation from one representation to Transformation from one representation to

another at the same level,another at the same level,

Requirements

Design

Source code

Behavior

Page 22: reverse(1)

Different ApproachesDifferent Approaches

Reverse Engineering• Design Recovery

– reproduce all the info for understanding the system

• Re-documentation– provide different views of the system

Re-Engineering• first phase --understanding the system• second phase--forward (advanced) engineering

Page 23: reverse(1)

Different ApproachesDifferent Approaches

Abstraction System

Old system New System

Forward Engineering

Re-Implementation

Reverse Engineering

Abstraction

Page 24: reverse(1)

Reverse Engineering Tools

Analysis Tools

Browsers (SW inter & display files)

Object Server ( pc or sw controls

stores informations)

Task Oriented (glowing) Tools

Page 25: reverse(1)

ConclusionsConclusions

Reverse Engineering is a new research area Reverse Engineering is a new research area among (with) software maintenanceamong (with) software maintenance

RE includes activities of understanding the RE includes activities of understanding the system and recovery information from systemsystem and recovery information from system

Program understanding is the most important Program understanding is the most important subset of Reverse Engineeringsubset of Reverse Engineering

Discovery of abstraction is key issueDiscovery of abstraction is key issue

Page 26: reverse(1)

Questions ?Questions ?

Page 27: reverse(1)

•Thank You•Thank You

Page 28: reverse(1)