Skip to content

Commit f397624

Browse files
committed
Land rapid7#7935, HWBridge RF transceiver extension
2 parents aa5e9cd + 7477e44 commit f397624

File tree

12 files changed

+1497
-0
lines changed

12 files changed

+1497
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
Port of a brute force utility by LegacySecurityGroup, the original can be found
2+
[here](https://github.com/exploitagency/github-rfpwnon/blob/master/rfpwnon.py).
3+
It's a generic AM/OOK brute forcer with PWM translations. It has been
4+
demonstrated to work against static key garage door openers.
5+
6+
## Options ##
7+
8+
**FREQ**
9+
10+
Frequency to brute force.
11+
12+
**BAUD**
13+
14+
Baud rate. Default: 2000
15+
16+
**BINLENGTH**
17+
18+
Binary bit-length for bruteforcing. Default: 8
19+
20+
**REPEAT**
21+
22+
How many times to repeat the sending of the packet. Default: 5
23+
24+
**PPAD**
25+
26+
Binary data to append to packet. (Example: "0101") Default: None
27+
28+
**TPAD**
29+
30+
Binary data to add to end of packet. (Example: "0101") Default: None
31+
32+
**RAW**
33+
34+
Do not do PWM encoding on packet. Default: False
35+
36+
**TRI**
37+
38+
Use trinary signals. Default: False
39+
40+
**EXTRAVERBOSE**
41+
42+
Adds some extra status messages.
43+
44+
**INDEX**
45+
46+
USB Index number. Default: 0
47+
48+
**DELAY**
49+
50+
How many milliseconds to delay before transmission. Too fast tends to lock up the device. Default: 500 (0.5 seconds)
51+
52+
## Scenarios
53+
54+
Run a brute force of 6 characters long with 2 repeats:
55+
56+
```
57+
hwbridge > run post/hardware/rftransceiver/rfpwnon FREQ=915000000 BINLEGTH=6 REPEAT=2
58+
59+
[*] Generating de bruijn sequence...
60+
[*] Brute forcing frequency: 915000000
61+
[*] Transmitting...
62+
[*] Binary before PWM encoding:
63+
[*] 00000000
64+
[*] Binary after PWM encoding:
65+
[*] 11101110111011101110111011101110
66+
[*] Transmitting...
67+
[*] Binary before PWM encoding:
68+
[*] 00000000
69+
[*] Binary after PWM encoding:
70+
[*] 11101110111011101110111011101110
71+
[*] Transmitting...
72+
[*] Binary before PWM encoding:
73+
[*] 00000001
74+
[*] Binary after PWM encoding:
75+
[*] 11101110111011101110111011101000
76+
[*] Transmitting...
77+
[*] Binary before PWM encoding:
78+
[*] 00000001
79+
[*] Binary after PWM encoding:
80+
[*] 11101110111011101110111011101000
81+
[*] Transmitting...
82+
[*] Binary before PWM encoding:
83+
[*] 00000010
84+
[*] Binary after PWM encoding:
85+
[*] 11101110111011101110111010001110
86+
[*] Transmitting...
87+
...
88+
```
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Simple module to transmit a given frequency for a specified amount of seconds. This
2+
code was ported from [AndrewMohawk](https://github.com/AndrewMohawk).
3+
4+
NOTE: Users of this module should be aware of their local laws,
5+
regulations, and licensing requirements for transmitting on any
6+
given radio frequency.
7+
8+
9+
## Options ##
10+
11+
**FREQ**
12+
13+
Frequency to brute force.
14+
15+
**BAUD**
16+
17+
Baud rate. Default: 4800
18+
19+
**POWER**
20+
21+
Power level to specify. Default: 100
22+
23+
**SECONDS**
24+
25+
How many seconds to transmit the signal. Default: 4
26+
27+
**INDEX**
28+
29+
USB Index number. Default: 0
30+
31+
## Scenarios
32+
33+
Transmit a given signal for 4 seconds
34+
35+
```
36+
hwbridge > run post/hardware/rftransceiver/transmitter FREQ=433880000
37+
38+
[*] Transmitting on 433880000 for 4 seconds...
39+
[*] Finished transmitting
40+
```

lib/msf/base/sessions/hwbridge.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,16 @@ def load_zigbee
167167
console.disable_output = original
168168
end
169169

170+
#
171+
# Loads the rftransceiver extension
172+
#
173+
def load_rftransceiver
174+
original = console.disable_output
175+
console.disable_output = true
176+
console.run_single('load rftransceiver')
177+
console.disable_output = original
178+
end
179+
170180
#
171181
# Load custom methods provided by the hardware
172182
#

lib/msf/core/post/hardware.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ module Msf::Post::Hardware
33
require 'msf/core/post/hardware/automotive/uds'
44
require 'msf/core/post/hardware/automotive/dtc'
55
require 'msf/core/post/hardware/zigbee/utils'
6+
require 'msf/core/post/hardware/rftransceiver/rftransceiver'
67
end

0 commit comments

Comments
 (0)