timing_attack 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/timing_attack/brute_forcer.rb +10 -3
- data/lib/timing_attack/errors.rb +6 -0
- data/lib/timing_attack/version.rb +1 -1
- data/lib/timing_attack.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c07deac97e0cdfadcb0c1249fc09a950642030b
|
4
|
+
data.tar.gz: b565450cb34a4c42a6e7a89394296546834c37cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27f0cbb88c3038b68d16764d8170a924c0c344117545c8ca37877e854d7b80526297b37f866c53cdc1ad0f5615df354dd898ba3267dd5ccb428db4d6d66a25af
|
7
|
+
data.tar.gz: 0507d9712a8d68d75d5686c7aa3e32e9042a3f7f9116dda113eac59bfed863e5a9203315a57bb1c0e5e38732bcfc3ff0e661f82f87b0b40be6a0d05f61d3b35e
|
data/README.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
Profile web applications, sorting inputs into two categories based on
|
4
4
|
discrepancies in the application's response time.
|
5
5
|
|
6
|
+
If you need a known-vulnerable application for testing and/or development, see
|
7
|
+
[Camelflage](https://github.com/ffleming/camelflage).
|
8
|
+
|
6
9
|
## Installation
|
7
10
|
|
8
11
|
```bash
|
@@ -13,8 +13,13 @@ module TimingAttack
|
|
13
13
|
attr_reader :known
|
14
14
|
POTENTIAL_BYTES = (' '..'z').to_a
|
15
15
|
def attack!
|
16
|
-
|
17
|
-
|
16
|
+
begin
|
17
|
+
while(true)
|
18
|
+
attack_byte!
|
19
|
+
end
|
20
|
+
rescue Errors::BruteForcerError => e
|
21
|
+
puts "\n#{e.message}"
|
22
|
+
exit(1)
|
18
23
|
end
|
19
24
|
end
|
20
25
|
|
@@ -48,7 +53,9 @@ module TimingAttack
|
|
48
53
|
grouper = Grouper.new(attacks: attacks, group_by: { percentile: options.fetch(:percentile) })
|
49
54
|
results = grouper.long_tests.map(&:input)
|
50
55
|
if grouper.long_tests.count > 1
|
51
|
-
|
56
|
+
msg = "Got too many possibilities to continue brute force:\n\t"
|
57
|
+
msg << results.join("\t")
|
58
|
+
raise Errors::BruteForcerError.new(msg)
|
52
59
|
end
|
53
60
|
@known = results.first
|
54
61
|
end
|
data/lib/timing_attack.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timing_attack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Forrest Fleming
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-progressbar
|
@@ -116,6 +116,7 @@ files:
|
|
116
116
|
- lib/timing_attack/attacker.rb
|
117
117
|
- lib/timing_attack/brute_forcer.rb
|
118
118
|
- lib/timing_attack/enumerator.rb
|
119
|
+
- lib/timing_attack/errors.rb
|
119
120
|
- lib/timing_attack/grouper.rb
|
120
121
|
- lib/timing_attack/spinner.rb
|
121
122
|
- lib/timing_attack/test_case.rb
|