@@ -40,15 +40,15 @@ An attacker will intercept a cipher text and retrieve byte by byte the plaintext
40
40
* intercepted cipher : C<sub >0</sub > | C<sub >...</sub > | C<sub >i-1</sub > | C<sub >i</sub >
41
41
* then build a block like this :
42
42
43
- C'<sub >i-1</sub > = C' <sub >i-1</sub > ⊕ 00000001 ⊕ 0000000X | | C<sub >i</sub >
43
+ C'<sub >i-1</sub > = C<sub >i-1</sub > ⊕ 00000001 ⊕ 0000000X | C<sub >i</sub >
44
44
45
45
Where X is a char between ` chr(0-256) ` .
46
46
47
- * then he sends C'<sub >i-1</sub > | | C<sub >i</sub > to the oracle. The oracle will decrypt like this :
47
+ * then he sends C'<sub >i-1</sub > \ | C<sub >i</sub > to the oracle. The oracle will decrypt like this :
48
48
49
- D<sub >k</sub >(C' <sub >i</sub >) ⊕ C'<sub >i-1</sub > <br >
50
- = D<sub >k</sub >(C' <sub >i</sub >) ⊕ C' <sub >i-1</sub > ⊕ 00000001 ⊕ 0000000X <br >
51
- = P' <sub >i</sub > ⊕ 00000001 ⊕ 0000000X <br >
49
+ D<sub >k</sub >(C<sub >i</sub >) ⊕ C'<sub >i-1</sub > <br >
50
+ = D<sub >k</sub >(C<sub >i</sub >) ⊕ C<sub >i-1</sub > ⊕ 00000001 ⊕ 0000000X <br >
51
+ = P<sub >i</sub > ⊕ 00000001 ⊕ 0000000X <br >
52
52
53
53
Now there is two possibilities: a padding error or not :
54
54
@@ -63,7 +63,7 @@ This is a wrong padding, so we can deduce the byte Y is wrong.
63
63
* The oracle didn't give us a padding error and we know the byte X is good :
64
64
65
65
```
66
- If P'i ⊕ 0000000X == abcdefg0 then:
66
+ If Pi ⊕ 0000000X == abcdefg0 then:
67
67
abcdefg0 ⊕ 00000001 = abcdefg1
68
68
```
69
69
@@ -72,18 +72,18 @@ If P'i ⊕ 0000000X == abcdefg0 then:
72
72
** For the second byte :**
73
73
74
74
75
- C'<sub >i-1</sub > = C' <sub >i-1</sub > ⊕ 00000022 ⊕ 000000YX | | C<sub >i</sub >
75
+ C'<sub >i-1</sub > = C<sub >i-1</sub > ⊕ 00000022 ⊕ 000000YX \ | C<sub >i</sub >
76
76
77
77
And then :
78
78
79
- D<sub >k</sub >(C' <sub >i</sub >) ⊕ C'<sub >i-1</sub > <br >
80
- = D<sub >k</sub >(C' <sub >i</sub >) ⊕ C' <sub >i-1</sub > ⊕ 00000022 ⊕ 000000YX <br >
81
- = P' <sub >i</sub > ⊕ 00000001 ⊕ 00000YX <br >
79
+ D<sub >k</sub >(C<sub >i</sub >) ⊕ C'<sub >i-1</sub > <br >
80
+ = D<sub >k</sub >(C<sub >i</sub >) ⊕ C<sub >i-1</sub > ⊕ 00000022 ⊕ 000000YX <br >
81
+ = P<sub >i</sub > ⊕ 00000001 ⊕ 00000YX <br >
82
82
83
83
* The oracle didn't give us a padding error and we know the byte X is good :
84
84
85
85
```
86
- If P'i ⊕ 000000YX == abcdef00 then:
86
+ If Pi ⊕ 000000YX == abcdef00 then:
87
87
abcdef00 ⊕ 00000022 = abcdef22
88
88
```
89
89
@@ -120,7 +120,7 @@ Details required options:
120
120
example: with HTTP method: 200,400,500
121
121
with DOM HTML : " <h2>Padding Error</h2>"
122
122
```
123
- Optionnal options:
123
+ Optional options:
124
124
``` bash
125
125
--cookie Cookie parameter example: PHPSESSID=9nnvje7p90b507shfmb94d7
126
126
--method Default GET methode but can se POST etc
@@ -136,7 +136,7 @@ python exploit.py -c E3B3D1120F999F4CEF945BA8B9326D7C3C8A8B02178E59AF506666542AB
136
136
137
137
# # Customisation
138
138
139
- > I wan to custom the Oracle !
139
+ > I wan to customize the Oracle !
140
140
141
141
Example with sockets https://gist.github.com/mpgn/fce3c3f2aaa2eeb8fac5
142
142
@@ -178,4 +178,4 @@ def call_oracle(host,cookie,url,post,method,up_cipher):
178
178
conn.request(method, url + up_cipher, params, headers)
179
179
response = conn.getresponse ()
180
180
return conn, response
181
- ` ` `
181
+ ` ` `
0 commit comments