0% found this document useful (0 votes)
8 views83 pages

MBA_esnhack

The document discusses mixed arithmetic-Boolean expressions (MBA), which combine arithmetic operations with Boolean expressions. It outlines the objectives of MBA, including function obfuscation and constant hiding, and provides complex examples of such expressions. The document also touches on anti-tamper techniques related to these expressions.

Uploaded by

rtloweb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views83 pages

MBA_esnhack

The document discusses mixed arithmetic-Boolean expressions (MBA), which combine arithmetic operations with Boolean expressions. It outlines the objectives of MBA, including function obfuscation and constant hiding, and provides complex examples of such expressions. The document also touches on anti-tamper techniques related to these expressions.

Uploaded by

rtloweb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 83

Obfuscation : expressions mixtes

arithmético-booléennes (MBA)

Alexandre “0poss” Brenner Ñ 0poss.github.io


A propos

Alexandre “0poss” Brenner

• Fan de rétro-ingénierie et de logique


• Evangéliste NixOS, Gentoo & Emacs

Shamless plug : 0poss.github.io/Rapport1.pdf

1
Au menu

“MBA”, was ist das ?

Expressions linéaires

Expressions polynomiales

Exemple overkill

Attaques

Conclusion

2
“MBA”, was ist das ?
Expressions mixtes arithmético-booléennes (MBA)

• Mélange d’opérations arithmétiques (+, −, ×, ...) avec des


expressions booléennes (∧, ∨, ¬, ⊕, ...)

3
Expressions mixtes arithmético-booléennes (MBA)

• Mélange d’opérations arithmétiques (+, −, ×, ...) avec des


expressions booléennes (∧, ∨, ¬, ⊕, ...)

x + (y ⊕ z)

3
Expressions mixtes arithmético-booléennes (MBA)

• Mélange d’opérations arithmétiques (+, −, ×, ...) avec des


expressions booléennes (∧, ∨, ¬, ⊕, ...)

x + (y ⊕ z)

5 × (x ⊕ y )2 − 3 × (¬x ∧ y )

3
Expressions mixtes arithmético-booléennes (MBA)

• Mélange d’opérations arithmétiques (+, −, ×, ...) avec des


expressions booléennes (∧, ∨, ¬, ⊕, ...)

x + (y ⊕ z)

5 × (x ⊕ y )2 − 3 × (¬x ∧ y )
• Monstre de Frankenstein
• Croisement entre deux mondes
• Pas de règle de réduction simple

3
Expressions mixtes arithmético-booléennes (MBA)

• Objectifs :

4
Expressions mixtes arithmético-booléennes (MBA)

• Objectifs :
• Obfuscation de fonctions :

4
Expressions mixtes arithmético-booléennes (MBA)

• Objectifs :
• Obfuscation de fonctions :

x + y = 2 × (x ∧ y ) − (¬x ⊕ y ) − 1

4
Expressions mixtes arithmético-booléennes (MBA)

• Objectifs :
• Obfuscation de fonctions :

x + y = 2 × (x ∧ y ) − (¬x ⊕ y ) − 1

• Dissimulation de constantes :

4
Expressions mixtes arithmético-booléennes (MBA)

• Objectifs :
• Obfuscation de fonctions :

x + y = 2 × (x ∧ y ) − (¬x ⊕ y ) − 1

• Dissimulation de constantes : 'ESN’HACK '

4
Expressions mixtes arithmético-booléennes (MBA)

• Objectifs :
• Obfuscation de fonctions :

x + y = 2 × (x ∧ y ) − (¬x ⊕ y ) − 1

• Dissimulation de constantes : 'ESN’HACK '=


121403544221068433 + (7666712018297851300 + (12911658816994541568 + 5423371770071613440 × ¬(a ⊕ b) +
7553537285300420608 × ¬(¬a ∨ b) + 5423371770071613440 × (a ∨ b) + 5423371770071613440 × (¬a ∨ ¬b) +
7553537285300420608 × (¬a ∨ b)) × (13023493913971338385 + 1088535238210896644 × ¬(a ⊕ b) +
5423173283112440644 × ¬(¬a ∨ b) + 1088535238210896644 × (a ∨ b) + 1088535238210896644 × (¬a ∨ ¬b) +
5423173283112440644 × (¬a ∨ b)) + 12644207112491633356 × ¬(a ⊕ b) + 16780032669580679052 × ¬(¬a ∨
b) + 12644207112491633356 × (a ∨ b) + 12644207112491633356 × (¬a ∨ ¬b) + 16780032669580679052 × (¬a ∨
b)) × (12308927618052259840 + 1250411442545360896 × (12911658816994541568 + 5423371770071613440 ×
¬(a ⊕ b) + 7553537285300420608 × ¬(¬a ∨ b) + 5423371770071613440 × (a ∨ b) + 5423371770071613440 ×
(¬a ∨ ¬b) + 7553537285300420608 × (¬a ∨ b)) × (13023493913971338385 + 1088535238210896644 × ¬(a ⊕
b) + 5423173283112440644 × ¬(¬a ∨ b) + 1088535238210896644 × (a ∨ b) + 1088535238210896644 × (¬a ∨
¬b) + 5423173283112440644 × (¬a ∨ b)) + 15038082913197359104 × ¬(a ⊕ b) + 6275814991828353024 ×
¬(¬a ∨ b) + 15038082913197359104 × (a ∨ b) + 15038082913197359104 × (¬a ∨ ¬b) + 6275814991828353024 ×
(¬a ∨ b)) + 4115925354337667259 × (12911658816994541568 + 5423371770071613440 × ¬(a ⊕ b) +
7553537285300420608 × ¬(¬a ∨ b) + 5423371770071613440 × (a ∨ b) + 5423371770071613440 × (¬a ∨ ¬b) +
7553537285300420608 × (¬a ∨ b)) × (13023493913971338385 + 1088535238210896644 × ¬(a ⊕ b) +
5423173283112440644 × ¬(¬a ∨ b) + 1088535238210896644 × (a ∨ b) + 1088535238210896644 × (¬a ∨ ¬b) +
5423173283112440644 × (¬a ∨ b)) + 552504112576348932 × ¬(a ⊕ b) + 14780961750334198596 × ¬(¬a ∨
b) + 552504112576348932 × (a ∨ b) + 552504112576348932 × (¬a ∨ ¬b) + 14780961750334198596 × (¬a ∨ b)

4
Expressions mixtes arithmético-booléennes (MBA)

• Objectifs :
• Obfuscation de fonctions :

x + y = 2 × (x ∧ y ) − (¬x ⊕ y ) − 1

• Dissimulation de constantes : 'ESN’HACK '=


121403544221068433 + (7666712018297851300 + (12911658816994541568 + 5423371770071613440 × ¬(a ⊕ b) +
7553537285300420608 × ¬(¬a ∨ b) + 5423371770071613440 × (a ∨ b) + 5423371770071613440 × (¬a ∨ ¬b) +
7553537285300420608 × (¬a ∨ b)) × (13023493913971338385 + 1088535238210896644 × ¬(a ⊕ b) +
5423173283112440644 × ¬(¬a ∨ b) + 1088535238210896644 × (a ∨ b) + 1088535238210896644 × (¬a ∨ ¬b) +
5423173283112440644 × (¬a ∨ b)) + 12644207112491633356 × ¬(a ⊕ b) + 16780032669580679052 × ¬(¬a ∨
b) + 12644207112491633356 × (a ∨ b) + 12644207112491633356 × (¬a ∨ ¬b) + 16780032669580679052 × (¬a ∨
b)) × (12308927618052259840 + 1250411442545360896 × (12911658816994541568 + 5423371770071613440 ×
¬(a ⊕ b) + 7553537285300420608 × ¬(¬a ∨ b) + 5423371770071613440 × (a ∨ b) + 5423371770071613440 ×
(¬a ∨ ¬b) + 7553537285300420608 × (¬a ∨ b)) × (13023493913971338385 + 1088535238210896644 × ¬(a ⊕
b) + 5423173283112440644 × ¬(¬a ∨ b) + 1088535238210896644 × (a ∨ b) + 1088535238210896644 × (¬a ∨
¬b) + 5423173283112440644 × (¬a ∨ b)) + 15038082913197359104 × ¬(a ⊕ b) + 6275814991828353024 ×
¬(¬a ∨ b) + 15038082913197359104 × (a ∨ b) + 15038082913197359104 × (¬a ∨ ¬b) + 6275814991828353024 ×
(¬a ∨ b)) + 4115925354337667259 × (12911658816994541568 + 5423371770071613440 × ¬(a ⊕ b) +
7553537285300420608 × ¬(¬a ∨ b) + 5423371770071613440 × (a ∨ b) + 5423371770071613440 × (¬a ∨ ¬b) +
7553537285300420608 × (¬a ∨ b)) × (13023493913971338385 + 1088535238210896644 × ¬(a ⊕ b) +
5423173283112440644 × ¬(¬a ∨ b) + 1088535238210896644 × (a ∨ b) + 1088535238210896644 × (¬a ∨ ¬b) +
5423173283112440644 × (¬a ∨ b)) + 552504112576348932 × ¬(a ⊕ b) + 14780961750334198596 × ¬(¬a ∨
b) + 552504112576348932 × (a ∨ b) + 552504112576348932 × (¬a ∨ ¬b) + 14780961750334198596 × (¬a ∨ b)

• Anti-tamper

4
Expressions mixtes arithmético-booléennes (MBA)

• Objectifs :
• Obfuscation de fonctions :

x + y = 2 × (x ∧ y ) − (¬x ⊕ y ) − 1

• Dissimulation de constantes : 'ESN’HACK '=


121403544221068433 + (7666712018297851300 + (12911658816994541568 + 5423371770071613440 × ¬(a ⊕ b) +
7553537285300420608 × ¬(¬a ∨ b) + 5423371770071613440 × (a ∨ b) + 5423371770071613440 × (¬a ∨ ¬b) +
7553537285300420608 × (¬a ∨ b)) × (13023493913971338385 + 1088535238210896644 × ¬(a ⊕ b) +
5423173283112440644 × ¬(¬a ∨ b) + 1088535238210896644 × (a ∨ b) + 1088535238210896644 × (¬a ∨ ¬b) +
5423173283112440644 × (¬a ∨ b)) + 12644207112491633356 × ¬(a ⊕ b) + 16780032669580679052 × ¬(¬a ∨
b) + 12644207112491633356 × (a ∨ b) + 12644207112491633356 × (¬a ∨ ¬b) + 16780032669580679052 × (¬a ∨
b)) × (12308927618052259840 + 1250411442545360896 × (12911658816994541568 + 5423371770071613440 ×
¬(a ⊕ b) + 7553537285300420608 × ¬(¬a ∨ b) + 5423371770071613440 × (a ∨ b) + 5423371770071613440 ×
(¬a ∨ ¬b) + 7553537285300420608 × (¬a ∨ b)) × (13023493913971338385 + 1088535238210896644 × ¬(a ⊕
b) + 5423173283112440644 × ¬(¬a ∨ b) + 1088535238210896644 × (a ∨ b) + 1088535238210896644 × (¬a ∨
¬b) + 5423173283112440644 × (¬a ∨ b)) + 15038082913197359104 × ¬(a ⊕ b) + 6275814991828353024 ×
¬(¬a ∨ b) + 15038082913197359104 × (a ∨ b) + 15038082913197359104 × (¬a ∨ ¬b) + 6275814991828353024 ×
(¬a ∨ b)) + 4115925354337667259 × (12911658816994541568 + 5423371770071613440 × ¬(a ⊕ b) +
7553537285300420608 × ¬(¬a ∨ b) + 5423371770071613440 × (a ∨ b) + 5423371770071613440 × (¬a ∨ ¬b) +
7553537285300420608 × (¬a ∨ b)) × (13023493913971338385 + 1088535238210896644 × ¬(a ⊕ b) +
5423173283112440644 × ¬(¬a ∨ b) + 1088535238210896644 × (a ∨ b) + 1088535238210896644 × (¬a ∨ ¬b) +
5423173283112440644 × (¬a ∨ b)) + 552504112576348932 × ¬(a ⊕ b) + 14780961750334198596 × ¬(¬a ∨
b) + 552504112576348932 × (a ∨ b) + 552504112576348932 × (¬a ∨ ¬b) + 14780961750334198596 × (¬a ∨ b)

• Anti-tamper
• Watermarking

4
Expressions linéaires
MBA “linéaires”

• MBA “linéaires” : additionner des expressions booléennes et les


multiplier par des constantes.

x ×y x2 11x

x 5 × (x ⊕ y ) + z 914

5
Génération d’expressions linéaires
MBA linéaires : génération

1. Choix (100% arbitraire) de fonctions booléennes et dressage la table


de vérité correspondante dans une matrice :

6
MBA linéaires : génération

1. Choix (100% arbitraire) de fonctions booléennes et dressage la table


de vérité correspondante dans une matrice :

x y x ⊕y x ∨y x ∧y

6
MBA linéaires : génération

1. Choix (100% arbitraire) de fonctions booléennes et dressage la table


de vérité correspondante dans une matrice :

x y x ⊕y x ∨y x ∧y
0 0 0 0 0
 
0 1 1 1 0 
 
1 0 1 1 0 
1 1 0 1 1

6
MBA linéaires : génération

1. Choix (100% arbitraire) de fonctions booléennes et dressage la table


de vérité correspondante dans une matrice :

x y x ⊕y x ∨y x ∧ y a   

0 0 0 0 0

b  0
  0
0 1 1 1 0  c  =  
   
 0

1 0 1 1 0  d 
1 1 0 1 1 0
e

6
MBA linéaires : génération

1. Choix (100% arbitraire) de fonctions booléennes et dressage la table


de vérité correspondante dans une matrice :

x y x ⊕y x ∨y x ∧ y a   

0 0 0 0 0

b  0
  0
0 1 1 1 0  c  =  
   
 0

1 0 1 1 0  d 
1 1 0 1 1 0
e

2. ⇔ Résoudre le système :

6
MBA linéaires : génération

1. Choix (100% arbitraire) de fonctions booléennes et dressage la table


de vérité correspondante dans une matrice :

x y x ⊕y x ∨y x ∧ y a   

0 0 0 0 0

b  0
  0
0 1 1 1 0  c  =  
   
 0

1 0 1 1 0  d 
1 1 0 1 1 0
e

2. ⇔ Résoudre le système :




 0a + 0b + 0c + 0d + 0e = 0

0a + 1b + 1c + 1d

+ 0e = 0


 1a + 0b + 1c + 1d + 0e = 0

1a + 1b + 0c + 1d

+ 1e = 0 6
MBA linéaires : génération

1. Choix (100% arbitraire) de fonctions booléennes et dressage la table


de vérité correspondante dans une matrice :

x y x ⊕y x ∨y x ∧ y a   

0 0 0 0 0

b  0
  0
0 1 1 1 0  c  =  
   
 0

1 0 1 1 0  d 
1 1 0 1 1 0
e

2. ⇔ Résoudre le système :

 a =c −e
0a + 0b + 0c + 0d + 0e = 0


 
b = c − e

 

 
0a + 1b + 1c + 1d

+ 0e = 0

⇔ c=c
 1a + 0b + 1c + 1d + 0e = 0 
d = −2 × c + e

 

 
1a + 1b + 0c + 1d

+ 1e = 0

6


e=e

MBA linéaires : génération


a = c − e


b =c −e

d = −2 × c + e

7
MBA linéaires : génération


a = c − e


b =c −e

d = −2 × c + e

3. Profit ! L’ensemble des solutions génère Ec,e :

(c − e)×x +(c − e)×y +c×(x ⊕y )+(−2c + e)×(x ∨y )+e×(x ∧y ) = 0

Théorème 1 [zhou2007]

7
MBA linéaires : génération

A partir de Ec,e

(c − e)×x +(c − e)×y +c ×(x ⊕y )+(−2c + e)×(x ∨y )+e ×(x ∧y ) = 0

8
MBA linéaires : génération

A partir de Ec,e

(c − e)×x +(c − e)×y +c ×(x ⊕y )+(−2c + e)×(x ∨y )+e ×(x ∧y ) = 0

on a E3,1 :

8
MBA linéaires : génération

A partir de Ec,e

(c − e)×x +(c − e)×y +c ×(x ⊕y )+(−2c + e)×(x ∨y )+e ×(x ∧y ) = 0

on a E3,1 :

2x + 2y = −3 × (x ⊕ y ) + 5 × (x ∨ y ) − (x ∧ y )

8
MBA linéaires : génération

A partir de Ec,e

(c − e)×x +(c − e)×y +c ×(x ⊕y )+(−2c + e)×(x ∨y )+e ×(x ∧y ) = 0

on a E3,1 :

2x + 2y = −3 × (x ⊕ y ) + 5 × (x ∨ y ) − (x ∧ y )

avec E3,2 :

8
MBA linéaires : génération

A partir de Ec,e

(c − e)×x +(c − e)×y +c ×(x ⊕y )+(−2c + e)×(x ∨y )+e ×(x ∧y ) = 0

on a E3,1 :

2x + 2y = −3 × (x ⊕ y ) + 5 × (x ∨ y ) − (x ∧ y )

avec E3,2 :

y = −x − 3 × (x ⊕ y ) + 4 × (x ∨ y ) − 2 × (x ∧ y )

8
MBA linéaires : génération

A partir de Ec,e

(c − e)×x +(c − e)×y +c ×(x ⊕y )+(−2c + e)×(x ∨y )+e ×(x ∧y ) = 0

on a E3,1 :

2x + 2y = −3 × (x ⊕ y ) + 5 × (x ∨ y ) − (x ∧ y )

avec E3,2 :

y = −x − 3 × (x ⊕ y ) + 4 × (x ∨ y ) − 2 × (x ∧ y )

en réécrivant les y de E−3,1 avec E3,2 :

8
MBA linéaires : génération

A partir de Ec,e

(c − e)×x +(c − e)×y +c ×(x ⊕y )+(−2c + e)×(x ∨y )+e ×(x ∧y ) = 0

on a E3,1 :

2x + 2y = −3 × (x ⊕ y ) + 5 × (x ∨ y ) − (x ∧ y )

avec E3,2 :

y = −x − 3 × (x ⊕ y ) + 4 × (x ∨ y ) − 2 × (x ∧ y )

en réécrivant les y de E−3,1 avec E3,2 :


2x + 2y = −3 × (x ⊕ −1 × x + −3 × (x ⊕ y ) + 4 × (x ∨ y ) + −2 × ¬(¬x ∨ ¬y )) + 5 ×
(x ∨ −1 × x + −3 × (x ⊕ y ) + 4 × (x ∨ y ) + −2 × ¬(¬x ∨ ¬y )) + −1 × ¬(¬x ∨
¬(−1 × x + −3 × (x ⊕ y ) + 4 × (x ∨ y ) + −2 × ¬(¬x ∨ ¬y )))

8
Implémentation
MBA linéaires : LLVM

9
MBA linéaires : LLVM

• Pass LLVM : Gauss-Jordan dans Z/2n Z

9
MBA linéaires : LLVM

• Pass LLVM : Gauss-Jordan dans Z/2n Z


• Introduit gratuitement du polymorphisme au programme
(équivalences aléatoires)

9
MBA linéaires : LLVM

• Pass LLVM : Gauss-Jordan dans Z/2n Z


• Introduit gratuitement du polymorphisme au programme
(équivalences aléatoires)

9
Expressions polynomiales
Expressions polynomiales

• Tous les polynômes - mais seulement les polynômes - sont autorisés.

10
Expressions polynomiales

• Tous les polynômes - mais seulement les polynômes - sont autorisés.

11x

x × (y ⊕ z) x2 914

10
Polynômes de permutation

11
Polynômes de permutation

• Propriétés :

11
Polynômes de permutation

• Propriétés :
• Bijectifs

11
Polynômes de permutation

• Propriétés :
• Bijectifs , donc :

11
Polynômes de permutation

• Propriétés :
• Bijectifs , donc :
• Tous inversibles : il existe un (unique) Q tq. Q(P(x )) = x

11
Polynômes de permutation

• Propriétés :
• Bijectifs , donc :
• Tous inversibles : il existe un (unique) Q tq. Q(P(x )) = x
• Utilité :

11
Polynômes de permutation

• Propriétés :
• Bijectifs , donc :
• Tous inversibles : il existe un (unique) Q tq. Q(P(x )) = x
• Utilité :
• Runtime : écrire en mémoire avec P(x ) au lieu de x et utiliser Q
pour la lecture

11
Polynômes de permutation

• Propriétés :
• Bijectifs , donc :
• Tous inversibles : il existe un (unique) Q tq. Q(P(x )) = x
• Utilité :
• Runtime : écrire en mémoire avec P(x ) au lieu de x et utiliser Q
pour la lecture
• Transformer une MBA seulement linéaire en MBA polynomiale

11
Polynômes de permutation

• Propriétés :
• Bijectifs , donc :
• Tous inversibles : il existe un (unique) Q tq. Q(P(x )) = x
• Utilité :
• Runtime : écrire en mémoire avec P(x ) au lieu de x et utiliser Q
pour la lecture
• Transformer une MBA seulement linéaire en MBA polynomiale
• Cacher n’importe quel autre polynôme f : développer Q(K + P(f )),
avec K = 0 une MBA

11
Exemple overkill
Exemple

• c = 1337
Constante à cacher

12
Exemple

• c = 1337
Constante à cacher
• P(x ) =9543x 16 + 31922x 15 + 49485x 14 + 3577x 13 + 7115x 12 + 50138x 11 + 45503x 10 + 25130x 9 + 37449x 8 +
47827x 7 + 58867x 6 + 13758x 5 + 12731x 4 + 61184x 3 + 39973x 2 + 6235x 1 + 42377

Q(x ) =65524x 15 + 5x 14 + 65481x 13 + 54x 12 + 65506x 11 + 128x 10 + 65201x 9 + 203x 8 + 65533x 7 + 1193x 6 +
2028x 5 + 6888x 4 + 35087x 3 + 7345x 2 + 52609x 1 + 1175
Génération d’un PP et de son inverse

12
Exemple

• c = 1337
Constante à cacher
• P(x ) =9543x 16 + 31922x 15 + 49485x 14 + 3577x 13 + 7115x 12 + 50138x 11 + 45503x 10 + 25130x 9 + 37449x 8 +
47827x 7 + 58867x 6 + 13758x 5 + 12731x 4 + 61184x 3 + 39973x 2 + 6235x 1 + 42377

Q(x ) =65524x 15 + 5x 14 + 65481x 13 + 54x 12 + 65506x 11 + 128x 10 + 65201x 9 + 203x 8 + 65533x 7 + 1193x 6 +
2028x 5 + 6888x 4 + 35087x 3 + 7345x 2 + 52609x 1 + 1175
Génération d’un PP et de son inverse
• P(1337) = 56662
Encodage de c

12
Exemple

• c = 1337
Constante à cacher
• P(x ) =9543x 16 + 31922x 15 + 49485x 14 + 3577x 13 + 7115x 12 + 50138x 11 + 45503x 10 + 25130x 9 + 37449x 8 +
47827x 7 + 58867x 6 + 13758x 5 + 12731x 4 + 61184x 3 + 39973x 2 + 6235x 1 + 42377

Q(x ) =65524x 15 + 5x 14 + 65481x 13 + 54x 12 + 65506x 11 + 128x 10 + 65201x 9 + 203x 8 + 65533x 7 + 1193x 6 +
2028x 5 + 6888x 4 + 35087x 3 + 7345x 2 + 52609x 1 + 1175
Génération d’un PP et de son inverse
• P(1337) = 56662
Encodage de c
• K (x , y , z) = P(1337) =

12
Exemple

• c = 1337
Constante à cacher
• P(x ) =9543x 16 + 31922x 15 + 49485x 14 + 3577x 13 + 7115x 12 + 50138x 11 + 45503x 10 + 25130x 9 + 37449x 8 +
47827x 7 + 58867x 6 + 13758x 5 + 12731x 4 + 61184x 3 + 39973x 2 + 6235x 1 + 42377

Q(x ) =65524x 15 + 5x 14 + 65481x 13 + 54x 12 + 65506x 11 + 128x 10 + 65201x 9 + 203x 8 + 65533x 7 + 1193x 6 +
2028x 5 + 6888x 4 + 35087x 3 + 7345x 2 + 52609x 1 + 1175
Génération d’un PP et de son inverse
• P(1337) = 56662
Encodage de c
• K (x , y , z) = P(1337) = 8965 × (x ⊕ y ) + 11115 × (x ∧ y ) + 6815 × (¬(x ∨ y )) + 8104 × (¬x ) + 2150 ×
(¬y ) + −18406 × (z) + 18406 × (y ∧ z) + 5954 × (x ∨ z) + −5954 × ((¬x ) ∧ z) + −18406 × (y ∨ (¬z))

MBA linéaire constante

12
Exemple

• c = 1337
Constante à cacher
• P(x ) =9543x 16 + 31922x 15 + 49485x 14 + 3577x 13 + 7115x 12 + 50138x 11 + 45503x 10 + 25130x 9 + 37449x 8 +
47827x 7 + 58867x 6 + 13758x 5 + 12731x 4 + 61184x 3 + 39973x 2 + 6235x 1 + 42377

Q(x ) =65524x 15 + 5x 14 + 65481x 13 + 54x 12 + 65506x 11 + 128x 10 + 65201x 9 + 203x 8 + 65533x 7 + 1193x 6 +
2028x 5 + 6888x 4 + 35087x 3 + 7345x 2 + 52609x 1 + 1175
Génération d’un PP et de son inverse
• P(1337) = 56662
Encodage de c
• K (x , y , z) = P(1337) = 8965 × (x ⊕ y ) + 11115 × (x ∧ y ) + 6815 × (¬(x ∨ y )) + 8104 × (¬x ) + 2150 ×
(¬y ) + −18406 × (z) + 18406 × (y ∧ z) + 5954 × (x ∨ z) + −5954 × ((¬x ) ∧ z) + −18406 × (y ∨ (¬z))

MBA linéaire constante


• K ′ (x , y , z) = P(1337) =

12
Exemple

• c = 1337
Constante à cacher
• P(x ) =9543x 16 + 31922x 15 + 49485x 14 + 3577x 13 + 7115x 12 + 50138x 11 + 45503x 10 + 25130x 9 + 37449x 8 +
47827x 7 + 58867x 6 + 13758x 5 + 12731x 4 + 61184x 3 + 39973x 2 + 6235x 1 + 42377

Q(x ) =65524x 15 + 5x 14 + 65481x 13 + 54x 12 + 65506x 11 + 128x 10 + 65201x 9 + 203x 8 + 65533x 7 + 1193x 6 +
2028x 5 + 6888x 4 + 35087x 3 + 7345x 2 + 52609x 1 + 1175
Génération d’un PP et de son inverse
• P(1337) = 56662
Encodage de c
• K (x , y , z) = P(1337) = 8965 × (x ⊕ y ) + 11115 × (x ∧ y ) + 6815 × (¬(x ∨ y )) + 8104 × (¬x ) + 2150 ×
(¬y ) + −18406 × (z) + 18406 × (y ∧ z) + 5954 × (x ∨ z) + −5954 × ((¬x ) ∧ z) + −18406 × (y ∨ (¬z))

MBA linéaire constante


• K ′ (x , y , z) = P(1337) =
35091×(x ∧y )×(x ⊕y )+5572×(x ⊕y )׬(x ∨y )+56500×(x ⊕y )׬x +57113×(x ⊕y )׬y +38767×z×(x ⊕y )+47844×
(y ∧z)×(x ⊕y )+6609×(x ∨z)×(x ⊕y )+37206×(¬x ∧z)×(x ⊕y )+38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨y )+
21002×(x ∧y )׬x +22022×(x ∧y )׬y +6712×z ×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+50194×
(x ∧y )×(¬x ∧z)+33677×(x ∧y )×(y ∨¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨y )+3760×z ׬(x ∨y )+47123×
(y ∧z)׬(x ∨y )+49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨¬z)׬(x ∨y )+34397׬x ׬y +
37142×z ׬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)׬x +37334×(y ∨¬z)׬x +7100×z ׬y +
28628×(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧z)׬y +34257×(y ∨¬z)׬y +40760×z ×(x ∨z)+20717×
z ×(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧z)×(¬x ∧z)+13795×(x ∨z)×(y ∨¬z)+47682×(¬x ∧z)×(y ∨¬z)

Obf. des coefficients de K avec d’autres MBA constantes

12
Exemple

• c = 1337
Constante à cacher
• P(x ) =9543x 16 + 31922x 15 + 49485x 14 + 3577x 13 + 7115x 12 + 50138x 11 + 45503x 10 + 25130x 9 + 37449x 8 +
47827x 7 + 58867x 6 + 13758x 5 + 12731x 4 + 61184x 3 + 39973x 2 + 6235x 1 + 42377

Q(x ) =65524x 15 + 5x 14 + 65481x 13 + 54x 12 + 65506x 11 + 128x 10 + 65201x 9 + 203x 8 + 65533x 7 + 1193x 6 +
2028x 5 + 6888x 4 + 35087x 3 + 7345x 2 + 52609x 1 + 1175
Génération d’un PP et de son inverse
• P(1337) = 56662
Encodage de c
• K (x , y , z) = P(1337) = 8965 × (x ⊕ y ) + 11115 × (x ∧ y ) + 6815 × (¬(x ∨ y )) + 8104 × (¬x ) + 2150 ×
(¬y ) + −18406 × (z) + 18406 × (y ∧ z) + 5954 × (x ∨ z) + −5954 × ((¬x ) ∧ z) + −18406 × (y ∨ (¬z))

MBA linéaire constante


• K ′ (x , y , z) = P(1337) =
35091×(x ∧y )×(x ⊕y )+5572×(x ⊕y )׬(x ∨y )+56500×(x ⊕y )׬x +57113×(x ⊕y )׬y +38767×z×(x ⊕y )+47844×
(y ∧z)×(x ⊕y )+6609×(x ∨z)×(x ⊕y )+37206×(¬x ∧z)×(x ⊕y )+38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨y )+
21002×(x ∧y )׬x +22022×(x ∧y )׬y +6712×z ×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+50194×
(x ∧y )×(¬x ∧z)+33677×(x ∧y )×(y ∨¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨y )+3760×z ׬(x ∨y )+47123×
(y ∧z)׬(x ∨y )+49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨¬z)׬(x ∨y )+34397׬x ׬y +
37142×z ׬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)׬x +37334×(y ∨¬z)׬x +7100×z ׬y +
28628×(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧z)׬y +34257×(y ∨¬z)׬y +40760×z ×(x ∨z)+20717×
z ×(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧z)×(¬x ∧z)+13795×(x ∨z)×(y ∨¬z)+47682×(¬x ∧z)×(y ∨¬z)

Obf. des coefficients de K avec d’autres MBA constantes


• Q(K ′ ) = 1337 = Décodage

12
1175+35091×(x ∧y )×(x ⊕y )+5572×(x ⊕y )׬(x ∨y )+56500×(x ⊕y )׬x +57113×(x ⊕y )׬y +38767×z ×(x ⊕y )+47844×(y ∧z)×(x ⊕y )+6609×(x ∨z)×(x ⊕y )+37206×(¬x ∧z)×(x ⊕y )+38575×(y ∨¬z)×
(x ⊕y )+15790×(x ∧y )׬(x ∨y )+21002×(x ∧y )׬x +22022×(x ∧y )׬y +6712×z ×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+50194×(x ∧y )×(¬x ∧z)+33677×(x ∧y )×(y ∨¬z)+52861׬x ×
¬(x ∨y )+62685׬y ׬(x ∨y )+3760×z ׬(x ∨y )+47123×(y ∧z)׬(x ∨y )+49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨¬z)׬(x ∨y )+34397׬x ׬y +37142×z ׬x +7319×(y ∧
z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)׬x +37334×(y ∨¬z)׬x +7100×z ׬y +28628×(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧z)׬y +34257×(y ∨¬z)׬y +40760×z ×(x ∨z)+20717×z ×
(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧z)×(¬x ∧z)+13795×(x ∨z)×(y ∨¬z)+47682×(¬x ∧z)×(y ∨¬z)×(52609+35091×(x ∧y )×(x ⊕y )+5572×(x ⊕y )׬(x ∨y )+56500×(x ⊕y )׬x +57113×(x ⊕y )×
¬y +38767×z ×(x ⊕y )+47844×(y ∧z)×(x ⊕y )+6609×(x ∨z)×(x ⊕y )+37206×(¬x ∧z)×(x ⊕y )+38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨y )+21002×(x ∧y )׬x +22022×(x ∧y )׬y +6712×z ×(x ∧y )+
50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+50194×(x ∧y )×(¬x ∧z)+33677×(x ∧y )×(y ∨¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨y )+3760×z ׬(x ∨y )+47123×(y ∧z)׬(x ∨y )+49735×(x ∨z)×
¬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨¬z)׬(x ∨y )+34397׬x ׬y +37142×z ׬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)׬x +37334×(y ∨¬z)׬x +7100×z ׬y +28628×
(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧z)׬y +34257×(y ∨¬z)׬y +40760×z ×(x ∨z)+20717×z ×(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧z)×(¬x ∧z)+13795×(x ∨z)×(y ∨¬z)+47682×(¬x ∧
z)×(y ∨¬z)×(7345+35091×(x ∧y )×(x ⊕y )+5572×(x ⊕y )׬(x ∨y )+56500×(x ⊕y )׬x +57113×(x ⊕y )׬y +38767×z ×(x ⊕y )+47844×(y ∧z)×(x ⊕y )+6609×(x ∨z)×(x ⊕y )+37206×(¬x ∧z)×(x ⊕y )+
38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨y )+21002×(x ∧y )׬x +22022×(x ∧y )׬y +6712×z ×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+50194×(x ∧y )×(¬x ∧z)+33677×(x ∧y )×(y ∨
¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨y )+3760×z ׬(x ∨y )+47123×(y ∧z)׬(x ∨y )+49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨¬z)׬(x ∨y )+34397׬x ׬y +37142×z ×
¬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)׬x +37334×(y ∨¬z)׬x +7100×z ׬y +28628×(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧z)׬y +34257×(y ∨¬z)׬y +40760×z ×(x ∨
z)+20717×z ×(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧z)×(¬x ∧z)+13795×(x ∨z)×(y ∨¬z)+47682×(¬x ∧z)×(y ∨¬z)×(35087+35091×(x ∧y )×(x ⊕y )+5572×(x ⊕y )׬(x ∨y )+56500×(x ⊕y )׬x +
57113×(x ⊕y )׬y +38767×z ×(x ⊕y )+47844×(y ∧z)×(x ⊕y )+6609×(x ∨z)×(x ⊕y )+37206×(¬x ∧z)×(x ⊕y )+38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨y )+21002×(x ∧y )׬x +22022×(x ∧y )׬y +
6712×z ×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+50194×(x ∧y )×(¬x ∧z)+33677×(x ∧y )×(y ∨¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨y )+3760×z ׬(x ∨y )+47123×(y ∧z)׬(x ∨y )+
49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨¬z)׬(x ∨y )+34397׬x ׬y +37142×z ׬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)׬x +37334×(y ∨¬z)׬x +7100×
z׬y +28628×(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧z)׬y +34257×(y ∨¬z)׬y +40760×z×(x ∨z)+20717×z×(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧z)×(¬x ∧z)+13795×(x ∨z)×(y ∨¬z)+
47682×(¬x ∧z)×(y ∨¬z)×(6888+35091×(x ∧y )×(x ⊕y )+5572×(x ⊕y )׬(x ∨y )+56500×(x ⊕y )׬x +57113×(x ⊕y )׬y +38767×z×(x ⊕y )+47844×(y ∧z)×(x ⊕y )+6609×(x ∨z)×(x ⊕y )+37206×(¬x ∧z)×
(x ⊕y )+38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨y )+21002×(x ∧y )׬x +22022×(x ∧y )׬y +6712×z×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+50194×(x ∧y )×(¬x ∧z)+33677×(x ∧y )×
(y ∨¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨y )+3760×z ׬(x ∨y )+47123×(y ∧z)׬(x ∨y )+49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨¬z)׬(x ∨y )+34397׬x ׬y +37142×
z ׬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)׬x +37334×(y ∨¬z)׬x +7100×z ׬y +28628×(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧z)׬y +34257×(y ∨¬z)׬y +40760×z ×
(x ∨z)+20717×z×(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧z)×(¬x ∧z)+13795×(x ∨z)×(y ∨¬z)+47682×(¬x ∧z)×(y ∨¬z)×(2028+35091×(x ∧y )×(x ⊕y )+5572×(x ⊕y )׬(x ∨y )+56500×(x ⊕y )׬x +
57113×(x ⊕y )׬y +38767×z ×(x ⊕y )+47844×(y ∧z)×(x ⊕y )+6609×(x ∨z)×(x ⊕y )+37206×(¬x ∧z)×(x ⊕y )+38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨y )+21002×(x ∧y )׬x +22022×(x ∧y )׬y +
6712×z ×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+50194×(x ∧y )×(¬x ∧z)+33677×(x ∧y )×(y ∨¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨y )+3760×z ׬(x ∨y )+47123×(y ∧z)׬(x ∨y )+
49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨¬z)׬(x ∨y )+34397׬x ׬y +37142×z ׬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)׬x +37334×(y ∨¬z)׬x +7100×
z׬y +28628×(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧z)׬y +34257×(y ∨¬z)׬y +40760×z×(x ∨z)+20717×z×(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧z)×(¬x ∧z)+13795×(x ∨z)×(y ∨¬z)+
47682×(¬x ∧z)×(y ∨¬z)×(1193+35091×(x ∧y )×(x ⊕y )+5572×(x ⊕y )׬(x ∨y )+56500×(x ⊕y )׬x +57113×(x ⊕y )׬y +38767×z ×(x ⊕y )+47844×(y ∧z)×(x ⊕y )+6609×(x ∨z)×(x ⊕y )+37206×(¬x ∧
z)×(x ⊕y )+38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨y )+21002×(x ∧y )׬x +22022×(x ∧y )׬y +6712×z×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+50194×(x ∧y )×(¬x ∧z)+33677×(x ∧
y )×(y ∨¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨y )+3760×z ׬(x ∨y )+47123×(y ∧z)׬(x ∨y )+49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨¬z)׬(x ∨y )+34397׬x ׬y +
37142×z ׬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)׬x +37334×(y ∨¬z)׬x +7100×z ׬y +28628×(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧z)׬y +34257×(y ∨¬z)׬y +
40760×z ×(x ∨z)+20717×z ×(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧z)×(¬x ∧z)+13795×(x ∨z)×(y ∨¬z)+47682×(¬x ∧z)×(y ∨¬z)×(65533+35091×(x ∧y )×(x ⊕y )+5572×(x ⊕y )׬(x ∨y )+56500×
(x ⊕y )׬x +57113×(x ⊕y )׬y +38767×z ×(x ⊕y )+47844×(y ∧z)×(x ⊕y )+6609×(x ∨z)×(x ⊕y )+37206×(¬x ∧z)×(x ⊕y )+38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨y )+21002×(x ∧y )׬x +22022×
(x ∧y )׬y +6712×z ×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+50194×(x ∧y )×(¬x ∧z)+33677×(x ∧y )×(y ∨¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨y )+3760×z ׬(x ∨y )+47123×(y ∧
z)׬(x ∨y )+49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨¬z)׬(x ∨y )+34397׬x ׬y +37142×z׬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)׬x +37334×(y ∨¬z)×
¬x +7100×z ׬y +28628×(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧z)׬y +34257×(y ∨¬z)׬y +40760×z ×(x ∨z)+20717×z ×(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧z)×(¬x ∧z)+13795×(x ∨
z)×(y ∨¬z)+47682×(¬x ∧z)×(y ∨¬z)×(203+35091×(x ∧y )×(x ⊕y )+5572×(x ⊕y )׬(x ∨y )+56500×(x ⊕y )׬x +57113×(x ⊕y )׬y +38767×z ×(x ⊕y )+47844×(y ∧z)×(x ⊕y )+6609×(x ∨z)×(x ⊕y )+
37206×(¬x ∧z)×(x ⊕y )+38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨y )+21002×(x ∧y )׬x +22022×(x ∧y )׬y +6712×z ×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+50194×(x ∧y )×(¬x ∧
z)+33677×(x ∧y )×(y ∨¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨y )+3760×z׬(x ∨y )+47123×(y ∧z)׬(x ∨y )+49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨¬z)׬(x ∨y )+34397×
¬x ׬y +37142×z ׬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)׬x +37334×(y ∨¬z)׬x +7100×z ׬y +28628×(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧z)׬y +34257×(y ∨
¬z)׬y +40760×z ×(x ∨z)+20717×z ×(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧z)×(¬x ∧z)+13795×(x ∨z)×(y ∨¬z)+47682×(¬x ∧z)×(y ∨¬z)×(65201+35091×(x ∧y )×(x ⊕y )+5572×(x ⊕y )׬(x ∨
y )+56500×(x ⊕y )׬x +57113×(x ⊕y )׬y +38767×z ×(x ⊕y )+47844×(y ∧z)×(x ⊕y )+6609×(x ∨z)×(x ⊕y )+37206×(¬x ∧z)×(x ⊕y )+38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨y )+21002×(x ∧y )×
¬x +22022×(x ∧y )׬y +6712×z ×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+50194×(x ∧y )×(¬x ∧z)+33677×(x ∧y )×(y ∨¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨y )+3760×z ׬(x ∨
y )+47123×(y ∧z)׬(x ∨y )+49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨¬z)׬(x ∨y )+34397׬x ׬y +37142×z ׬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)׬x +
37334×(y ∨¬z)׬x +7100×z׬y +28628×(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧z)׬y +34257×(y ∨¬z)׬y +40760×z×(x ∨z)+20717×z×(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧z)×(¬x ∧
z)+13795×(x ∨z)×(y ∨¬z)+47682×(¬x ∧z)×(y ∨¬z)×(128+35091×(x ∧y )×(x ⊕y )+5572×(x ⊕y )׬(x ∨y )+56500×(x ⊕y )׬x +57113×(x ⊕y )׬y +38767×z ×(x ⊕y )+47844×(y ∧z)×(x ⊕y )+6609×(x ∨
z)×(x ⊕y )+37206×(¬x ∧z)×(x ⊕y )+38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨y )+21002×(x ∧y )׬x +22022×(x ∧y )׬y +6712×z ×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+50194×
(x ∧y )×(¬x ∧z)+33677×(x ∧y )×(y ∨¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨y )+3760×z ׬(x ∨y )+47123×(y ∧z)׬(x ∨y )+49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨¬z)×
¬(x ∨y )+34397׬x ׬y +37142×z׬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)׬x +37334×(y ∨¬z)׬x +7100×z׬y +28628×(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧z)׬y +
34257×(y ∨¬z)׬y +40760×z ×(x ∨z)+20717×z ×(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧z)×(¬x ∧z)+13795×(x ∨z)×(y ∨¬z)+47682×(¬x ∧z)×(y ∨¬z)×(65506+35091×(x ∧y )×(x ⊕y )+5572×(x ⊕
y )׬(x ∨y )+56500×(x ⊕y )׬x +57113×(x ⊕y )׬y +38767×z ×(x ⊕y )+47844×(y ∧z)×(x ⊕y )+6609×(x ∨z)×(x ⊕y )+37206×(¬x ∧z)×(x ⊕y )+38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨y )+21002×
(x ∧y )׬x +22022×(x ∧y )׬y +6712×z ×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+50194×(x ∧y )×(¬x ∧z)+33677×(x ∧y )×(y ∨¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨y )+3760×z ×
¬(x ∨y )+47123×(y ∧z)׬(x ∨y )+49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨¬z)׬(x ∨y )+34397׬x ׬y +37142×z׬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)×
¬x +37334×(y ∨¬z)׬x +7100×z ׬y +28628×(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧z)׬y +34257×(y ∨¬z)׬y +40760×z ×(x ∨z)+20717×z ×(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧
z)×(¬x ∧z)+13795×(x ∨z)×(y ∨¬z)+47682×(¬x ∧z)×(y ∨¬z)×(54+35091×(x ∧y )×(x ⊕y )+5572×(x ⊕y )׬(x ∨y )+56500×(x ⊕y )׬x +57113×(x ⊕y )׬y +38767×z ×(x ⊕y )+47844×(y ∧z)×(x ⊕y )+
6609×(x ∨z)×(x ⊕y )+37206×(¬x ∧z)×(x ⊕y )+38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨y )+21002×(x ∧y )׬x +22022×(x ∧y )׬y +6712×z ×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+
50194×(x ∧y )×(¬x ∧z)+33677×(x ∧y )×(y ∨¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨y )+3760×z ׬(x ∨y )+47123×(y ∧z)׬(x ∨y )+49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨
¬z)׬(x ∨y )+34397׬x ׬y +37142×z ׬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)׬x +37334×(y ∨¬z)׬x +7100×z ׬y +28628×(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧
z)׬y +34257×(y ∨¬z)׬y +40760×z ×(x ∨z)+20717×z ×(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧z)×(¬x ∧z)+13795×(x ∨z)×(y ∨¬z)+47682×(¬x ∧z)×(y ∨¬z)×(65481+35091×(x ∧y )×(x ⊕y )+
5572×(x ⊕y )׬(x ∨y )+56500×(x ⊕y )׬x +57113×(x ⊕y )׬y +38767×z ×(x ⊕y )+47844×(y ∧z)×(x ⊕y )+6609×(x ∨z)×(x ⊕y )+37206×(¬x ∧z)×(x ⊕y )+38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨
y )+21002×(x ∧y )׬x +22022×(x ∧y )׬y +6712×z ×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧y )×(x ∨z)+50194×(x ∧y )×(¬x ∧z)+33677×(x ∧y )×(y ∨¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨
y )+3760×z ׬(x ∨y )+47123×(y ∧z)׬(x ∨y )+49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+41947×(y ∨¬z)׬(x ∨y )+34397׬x ׬y +37142×z ׬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +
12581×(¬x ∧z)׬x +37334×(y ∨¬z)׬x +7100×z ׬y +28628×(y ∧z)׬y +47596×(x ∨z)׬y +43720×(¬x ∧z)׬y +34257×(y ∨¬z)׬y +40760×z ×(x ∨z)+20717×z ×(¬x ∧z)+33509×(y ∧z)×(x ∨
z)+36086×(y ∧z)×(¬x ∧z)+13795×(x ∨z)×(y ∨¬z)+47682×(¬x ∧z)×(y ∨¬z)×(5+35091×(x ∧y )×(x ⊕y )+5572×(x ⊕y )׬(x ∨y )+56500×(x ⊕y )׬x +57113×(x ⊕y )׬y +38767×z×(x ⊕y )+47844×(y ∧
z)×(x ⊕y )+6609×(x ∨z)×(x ⊕y )+37206×(¬x ∧z)×(x ⊕y )+38575×(y ∨¬z)×(x ⊕y )+15790×(x ∧y )׬(x ∨y )+21002×(x ∧y )׬x +22022×(x ∧y )׬y +6712×z ×(x ∧y )+50091×(x ∧y )×(y ∧z)+19401×(x ∧
y )×(x ∨z)+50194×(x ∧y )×(¬x ∧z)+33677×(x ∧y )×(y ∨¬z)+52861׬x ׬(x ∨y )+62685׬y ׬(x ∨y )+3760×z ׬(x ∨y )+47123×(y ∧z)׬(x ∨y )+49735×(x ∨z)׬(x ∨y )+33836×(¬x ∧z)׬(x ∨y )+
41947×(y ∨¬z)׬(x ∨y )+34397׬x ׬y +37142×z ׬x +7319×(y ∧z)׬x +13199×(x ∨z)׬x +12581×(¬x ∧z)׬x +37334×(y ∨¬z)׬x +7100×z ׬y +28628×(y ∧z)׬y +47596×(x ∨z)׬y +
43720×(¬x ∧z)׬y +34257×(y ∨¬z)׬y +40760×z ×(x ∨z)+20717×z ×(¬x ∧z)+33509×(y ∧z)×(x ∨z)+36086×(y ∧z)×(¬x ∧z)+13795×(x ∨z)×(y ∨¬z)+47682×(¬x ∧z)×(y ∨¬z)×65524))))))))))))))

13
Attaques
Déobfuscation/simplification de MBA

14
Déobfuscation/simplification de MBA

• Inversion pour les polynômes de permutation.

14
Déobfuscation/simplification de MBA

• Inversion pour les polynômes de permutation.


• Bit-blasting avec Arybo

14
Déobfuscation/simplification de MBA

• Inversion pour les polynômes de permutation.


• Bit-blasting avec Arybo trop lent avec les expressions trop grandes (souvent
une grosse multiplication suffi à casser le tool)

14
Déobfuscation/simplification de MBA

• Inversion pour les polynômes de permutation.


• Bit-blasting avec Arybo trop lent avec les expressions trop grandes (souvent
une grosse multiplication suffi à casser le tool)

• Synthèse de programme stochastique I/O-based avec Xyntia

14
Déobfuscation/simplification de MBA

• Inversion pour les polynômes de permutation.


• Bit-blasting avec Arybo trop lent avec les expressions trop grandes (souvent
une grosse multiplication suffi à casser le tool)

• Synthèse de programme stochastique I/O-based avec Xyntia a du


mal avec les expressions trop complexes

14
Déobfuscation/simplification de MBA

• Inversion pour les polynômes de permutation.


• Bit-blasting avec Arybo trop lent avec les expressions trop grandes (souvent
une grosse multiplication suffi à casser le tool)

• Synthèse de programme stochastique I/O-based avec Xyntia a du


mal avec les expressions trop complexes

• Simplification d’AST par synthèse de programme avec oracle avec


QSynthesis

14
Déobfuscation/simplification de MBA

• Inversion pour les polynômes de permutation.


• Bit-blasting avec Arybo trop lent avec les expressions trop grandes (souvent
une grosse multiplication suffi à casser le tool)

• Synthèse de programme stochastique I/O-based avec Xyntia a du


mal avec les expressions trop complexes

• Simplification d’AST par synthèse de programme avec oracle avec


QSynthesis good

14
Déobfuscation/simplification de MBA

• Inversion pour les polynômes de permutation.


• Bit-blasting avec Arybo trop lent avec les expressions trop grandes (souvent
une grosse multiplication suffi à casser le tool)

• Synthèse de programme stochastique I/O-based avec Xyntia a du


mal avec les expressions trop complexes

• Simplification d’AST par synthèse de programme avec oracle avec


QSynthesis good mais sensible aux opérateurs commutatifs et associatifs

14
Déobfuscation/simplification de MBA

• Inversion pour les polynômes de permutation.


• Bit-blasting avec Arybo trop lent avec les expressions trop grandes (souvent
une grosse multiplication suffi à casser le tool)

• Synthèse de programme stochastique I/O-based avec Xyntia a du


mal avec les expressions trop complexes

• Simplification d’AST par synthèse de programme avec oracle avec


QSynthesis good mais sensible aux opérateurs commutatifs et associatifs
• Projection de N-bit vers 1-bit avec MBA-solver

14
Déobfuscation/simplification de MBA

• Inversion pour les polynômes de permutation.


• Bit-blasting avec Arybo trop lent avec les expressions trop grandes (souvent
une grosse multiplication suffi à casser le tool)

• Synthèse de programme stochastique I/O-based avec Xyntia a du


mal avec les expressions trop complexes

• Simplification d’AST par synthèse de programme avec oracle avec


QSynthesis good mais sensible aux opérateurs commutatifs et associatifs
• Projection de N-bit vers 1-bit avec MBA-solver très prometteur

14
Déobfuscation/simplification de MBA

• Inversion pour les polynômes de permutation.


• Bit-blasting avec Arybo trop lent avec les expressions trop grandes (souvent
une grosse multiplication suffi à casser le tool)

• Synthèse de programme stochastique I/O-based avec Xyntia a du


mal avec les expressions trop complexes

• Simplification d’AST par synthèse de programme avec oracle avec


QSynthesis good mais sensible aux opérateurs commutatifs et associatifs
• Projection de N-bit vers 1-bit avec MBA-solver très prometteur mais
que pour les expressions linéaires

14
Déobfuscation/simplification de MBA

• Inversion pour les polynômes de permutation.


• Bit-blasting avec Arybo trop lent avec les expressions trop grandes (souvent
une grosse multiplication suffi à casser le tool)

• Synthèse de programme stochastique I/O-based avec Xyntia a du


mal avec les expressions trop complexes

• Simplification d’AST par synthèse de programme avec oracle avec


QSynthesis good mais sensible aux opérateurs commutatifs et associatifs
• Projection de N-bit vers 1-bit avec MBA-solver très prometteur mais
que pour les expressions linéaires

• Réseau de neurones sur les chaı̂nes de caractères avec NeuReduce

14
Déobfuscation/simplification de MBA

• Inversion pour les polynômes de permutation.


• Bit-blasting avec Arybo trop lent avec les expressions trop grandes (souvent
une grosse multiplication suffi à casser le tool)

• Synthèse de programme stochastique I/O-based avec Xyntia a du


mal avec les expressions trop complexes

• Simplification d’AST par synthèse de programme avec oracle avec


QSynthesis good mais sensible aux opérateurs commutatifs et associatifs
• Projection de N-bit vers 1-bit avec MBA-solver très prometteur mais
que pour les expressions linéaires

• Réseau de neurones sur les chaı̂nes de caractères avec NeuReduce


“sur les chaı̂nes de caractères”, sérieux ?

14
Merci !
Complexifier la virtualisation

PC = 0;

inst, x, y = read at(PC);


switch(inst);

x + y x × y x ⊕ y

PC += 1;

15
Complexifier la virtualisation : entrelacement de handlers

E3,2 : x + y = −3 × (x ⊕ y ) + 4 × (x ∨ y ) − 2 × (x ∧ y )

E1,7 : x ⊕ y = 6 × x + 6 × y − 5 × (x ∨ y ) − 7 × (x ∧ y )

PC = 0;

inst, x, y = read at(PC);


switch(inst);

x + y x × y x ⊕ y

PC += 1;

16
Complexifier la virtualisation : entrelacement de handlers

E3,2 : x + y = −3 × (x ⊕ y ) + 4 × (x ∨ y ) − 2 × (x ∧ y )

E1,7 : x ⊕ y = 6 × x + 6 × y − 5 × (x ∨ y ) − 7 × (x ∧ y )

PC = 0;

inst, x, y = read at(PC);


switch(inst);

x + y x × y x ⊕ y x ∨ y x ∧ y

PC += 1;

17
Complexifier la virtualisation : obfuscation des handlers

PC = 0;

inst, x, y = read at(PC);


switch(inst);

-2 × (¬(x ⊕ y)) x ⊕ y
2 × (x ∧ y) S−1 (K(x,y)
+ (¬ x) ∨ y x ∧ y + x ⊕ y + ¬(x ⊕ y)
+ x ⊕ y + S(x × y))
+ x ∨ (¬y) - ¬(x ∧ y)

PC += 1;

18
Complexifier la virtualisation : dispatching polynomial

PC = 0;

inst, x, y = read at(PC);


jmp P(inst);

-2 × (¬(x ⊕ y)) x ⊕ y
2 × (x ∧ y) S−1 (K(x,y)
+ (¬ x) ∨ y x ∧ y + x ⊕ y + ¬(x ⊕ y)
+ x ⊕ y + S(x × y))
+ x ∨ (¬y) - ¬(x ∧ y)

PC += 1;

19

You might also like