Post on 12-Jun-2015
description
transcript
بسم الله الرحمن بسم الله الرحمن الرحيمالرحيم
يرفع الله الذين امنوا منكم والذين أوتوا العلم درجات و الله بما تعملون
خبير
Reverse EngineeringReverse Engineering
Dr. Kamel Soliman
dr_sol95@yahoo.com
ContentsContents
Introduction What is Reverse Engineering (RE)? Why do we need Reverse Engineering? Scope and Tasks of Reverse Engineering Different Approaches RE tools Conclusions
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.“
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)
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?
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
What is Reverse What is Reverse Engineering ?Engineering ?
Waterfall (Typical) Model of software development
Requirement
analysis
design
Implementation
Testing and
Maintenance
What is Reverse What is Reverse Engineering ?Engineering ?
Forward Engineering
Requirements
Design
Source Code
Behavior
What is Reverse What is Reverse Engineering ?Engineering ?
Forward Engineering Reverse Engineering
Requirements
Design
Source Code
Behavior
What is Reverse What is Reverse Engineering ?Engineering ?
Abstraction System
Old system New System
Forward Engineering
Re-Implementation
Reverse Engineering
Abstraction
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
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)
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
Why do we need RE ?Why do we need RE ?
Benefits• Maintenance cost savings
• Quality improvements
• Competitive advantages
• Software reuse facilitation (simplification)
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)
Scope and Task of Reverse Engineering
program understanding
Problem/Application
Domain (field)
Program/Implemen.
domain
Mapping
(symmetry)
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.
Discovery of Abstraction (conclusion)
Discovery of abstraction in large system
• Maintenance purpose
• Evolution (gradual development) purpose
• Reengineering purpose
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
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
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
Different ApproachesDifferent Approaches
Abstraction System
Old system New System
Forward Engineering
Re-Implementation
Reverse Engineering
Abstraction
Reverse Engineering Tools
Analysis Tools
Browsers (SW inter & display files)
Object Server ( pc or sw controls
stores informations)
Task Oriented (glowing) Tools
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
Questions ?Questions ?
•Thank You•Thank You