• Nu S-Au Găsit Rezultate

Reverse engineering:

N/A
N/A
Protected

Academic year: 2022

Share "Reverse engineering: "

Copied!
66
0
0

Text complet

(1)

Cursul 4 – 8 Martie 2021 [email protected]

(2)

Din Cursurile trecute…

Diagrame UML - Exemple

C4 Model

Forward & Reverse Engineering

(3)

Diagrame

Diagrame UML

Diagrame Use Case

Diagrame de Clase

(4)
(5)
(6)
(7)

Diagrama de secvenţă curprinde secvenţa acţiunilor care au loc în sistem, invocarea

metodelor fiecărui obiect ca şi ordinea în timp în care aceste invocări au loc

O diagramă de secvenţă este bidimensională

Pe axa verticală se prezintă viaţa obiectului

linia vieţii obiectelor (grafic: linie punctată)

perioada de activare în care un obiect preia controlul execuţiei (grafic: dreptunghi pe linia vieţii)

Pe axa orizontală se arată secvenţa creării sau

(8)
(9)
(10)

Pune accentul pe organizarea structurală a obiectelor care participă la interacţiune

Ilustrează mai bine ramificări complexe, iteraţii şi comportament concurent

Poate conţine:

Obiecte, clase, actori

Legături între acestea

Mesaje

(11)
(12)
(13)

Diagrame de stări, diagrame de activități

Elemente de bază

Eveniment

Acțiune

Activitate

(14)

Conține:

Stări

Tranziții

(15)

Stare compusă cu substări secvențial active:

(16)

Stare compusă cu substări paralel active:

(17)

Folosită pentru a modela dinamica unui proces sau a unei operații

Evidențiază controlul execuției de la o activitate la alta

Se atașează:

Unei clase (modelează un caz de utilizare)

Unui pachet

(18)
(19)
(20)

Modelează mediul hardware în care va funcționa proiectul

Exemplu: pentru a descrie un site web o diagramă de deployment va conține componentele hardware

server-ul web,

server-ul de aplicații,

server-ul de baze de date

Componentele software de pe fiecare din acestea

Aplicația web

Baza de date

Modul în care acestea sunt conectate:

JDBC, REST, RMI

(21)
(22)

Pachetul:

Este un container logic pentru elemente între care se stabilesc legături

Definește un spațiu de nume

Toate elementele UML pot fi grupate în pachete (cel mai des pachetele sunt folosite pentru a grupa clase)

Un pachet poate conține subpachete => se creează o structură arborescentă (similară cu organizarea

fișierele/directoarelor)

(23)

Relații:

dependență <<access>> = import privat

dependență <<import>> = import public

Ambele relații permit folosirea elementelor

aflate în pachetul destinație de către elementele aflate în pachetul sursă fără a fi necesară

calificarea numelor elementelor din pachetul destinație (similar directivei import din java)

(24)

Elementele din Types sunt importate în ShoppingCart și apoi sunt importate mai departe de către WebShop

Elementele din Auxiliary pot fi accesate însă doar din ShoppingCart și nu pot fi referite folosind nume necalificate din WebShop

(25)

Împart sisteme mari în subsisteme mai mici și mai ușor de gestionat

Permit dezvoltare paralelă iterativă

Definirea unor interfețe clare între pachete

promovează refolosirea codului (ex. pachet care oferă funcții grafice, pachet care oferă

posibilitatea conectării la BD, etc...)

(26)

Diagramele să nu fie nici prea complicate, dar nici prea simple: scopul este comunicarea

eficientă

Dați nume sugestive elementelor componente

Aranjați elementele astfel încât liniile să nu se intersecteze

Încercați să nu arătați prea multe tipuri de relații odată (evitați diagramele foarte complicate)

Dacă este nevoie, realizați mai multe diagrame de același tip

(27)

Context, Containers, Components and Code

Provides different levels of abstraction, each of which is relevant to a different audience

Avoid ambiguity in your diagrams by including a

(28)

Shows the software system you are

building

How it fits into the world in terms of the people who use it and the other software

systems it interacts with

Colours - Systems

already exist (the grey boxes) and those to be built (blue)

(29)

Zooms into the software system, and shows the

containers (applications, data stores, microservices, etc.)

(30)

Zooms into an individual container to show the components inside it

(31)

Zoom into an individual component to show how that component is implemented

(32)

https://tobiashochguertel.github.io/c4- draw.io/

https://structurizr.com/express

https://www.infoq.com/articles/C4- architecture-model

https://c4model.com/

(33)
(34)

A traditional process of moving from high-level abstractions and logical to the implementation- independent designs to the physical

implementation of a system

FE follows a sequence of going from requirements through designing its implementation

(35)

Reverse engineering (RE) is the process of discovering the technological principles of a

device, object or system through analysis of its structure, function and operation

To try to make a new device or program that does the same thing without copying anything from the original

Reverse engineering has its origins in the

analysis of hardware for commercial or military

(36)

Interoperability

Lost documentation

Product analysis

Security auditing

Removal of copy protection, circumvention of access restrictions

Creation of unlicensed/unapproved duplicates

Academic/learning purposes

Curiosity

Competitive technical intelligence (understand what your competitor is actually doing versus what they say they are doing)

Learning: Learn from others mistakes

(37)

RE1: Reverse engineering of mechanical devices

RE2: Reverse engineering of integrated circuits/smart cards

RE3: Reverse engineering for military applications

RE4: Reverse engineering of software

(38)
(39)
(40)

Rapid prototyping

FullCure materials

(41)
(42)
(43)

RE is an invasive and destructive form of analyzing a smart card

The attacker grinds away layer by layer of the smart card and takes pictures with an electron microscope

Engineers employ sensors to detect and prevent this attack

(44)
(45)
(46)

Satellite TV

Security card

Phone card

Ticket card

Bank card

(47)

Reverse engineering is often used by militaries in

order to copy other nations' technologies, devices or information that have been obtained by regular

troops in the fields or by intelligence operations

It was often used during the Second World War and the Cold War

Well-known examples from WWII and later include:

rocket, missile, bombers, China has reversed many

(48)

US – B-29 URSS – Tupolev Tu-4

(49)

Chinese J-20, Black Eagle US F-22, Russian Sukhoi T-50

(50)

US -AIM-9 Sidewinder Soviet - Vympel K-13

(51)
(52)
(53)

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

In practice, two main types of RE emerge:

Source code is available (but it is poorly documented)

There is no source code available for the software

Black box testing in software engineering has a

(54)
(55)
(56)

public class Test {

private int n;

private int m;

public static void main(String args[])

{

for(int i=1;i<10;i++)

System.out.println("Test");

} }

(57)

Link: http://www.steike.com/code/java-reverse- engineering/

jad.exe NumeFisier.class => NumeFisier.jad

(58)
(59)
(60)

File -> Import Sources...

(61)
(62)

Forward engineering:

◦ Diagrame de clasă -> .java files (ArgoUML)

◦ .java files -> .class files (NetBeans)

Reverse engineering:

◦ .class files -> .java files (JAD Decompiler)

◦ .java files -> Diagrame de Clasă (ArgoUML)

(63)

Diagrame UML:

Interacțiuni

Comportamentale

Structură

C4 Model: context, container, component, code

(64)

1) Până unde trebuie să modelați un proiect la care lucrați? (un proiect cu 4-5 persoane)

2) Cu ce ar trebui începută modelarea unui proiect?

3) E etic ca o firmă (mare) să facă RE pe un produs de la concurență?

4) De ce nu trebuie încurajat RE? Care sunt efectele RE?

(65)

Ovidiu Gheorghieş, Curs 5 IP

www.uml.org

Reverse Engineering and Design Discovery: A Taxonomy, Chikofsky, E.J. and Cross, J.,

January, 1990

(66)

DJ Java Decompiler 3.10.10.93:

http://www.softpedia.com/progDownload/DJ-Java-Decompiler- Download-13481.html

Open Office: http://ro.wikipedia.org/wiki/OpenOffice.org

UML Reverse Engineering for Existing Java, C# , and Visual Basic .NET Code: http://www.altova.com/umodel/uml-reverse-engineering.html

Reverse Engineering:

http://en.wikipedia.org/wiki/Reverse_engineering

PROTO 3000 3D Engineering Solutions:

http://www.proto3000.com/services.aspx

HAR2009: http://www.degate.org/HAR2009/

Degate: http://www.degate.org/screenshots/

Inteligent: http://www.intelligentrd.com/

Smartphones RE: http://www.cytraxsolutions.com/2011/

01/smartphones-security-and-reverse.html

Referințe

DOCUMENTE SIMILARE

• Hazard sources identification ⇒ elimination (Some specific faults prevented or removed.).. • Traditional QA (but with

 Software maintenance in software engineering is the modification of a software product after delivery to correct faults, to improve performance or other7. attributes

Coverage and Usage Testing Based on FSMs and Markov Chains.. • Finite-State

 Reverse engineering is the process of analyzing a subject system to create representations of the system at a higher level of abstraction.  In practice, two main types of

 perioada de activare în care un obiect preia controlul execuţiei (grafic: dreptunghi pe linia vieţii). ◦ Pe axa orizontală se arată secvenţa creării sau

De menționat este că acest proiect este referențiat în toate proiectele din aceasta soluție care folosesc DependencyInjection, fiecare proiect având o clasă numita Assembler pentru

The objective in this master’s thesis is to study and represent wide selection of applications from literature, where evolutionary computing methods (evolutionary algorithms, EA)

Atunci când folosim un eveniment în acest mod trebuie să fim atenţi deoarece dacă firul B verifică evenimentul în mod repetat până când devine setat,