.

Tuesday, March 12, 2019

Dos Attack & Mitigation

D land Attack and its Mitigation Simulation in GNS3 Summary A private LAN net income comprising of hundreds of end devices and some(prenominal) legions in DMZ is protected by lake herring ASA (Firew all). In the meshwork the more or less commonly found network struggle is to take brush up enterprise resources by DDOS(Distributed Denial of Service) flame either on Servers(which leave alone impact hundreds of end users) or on the network resources like itineraryrs itself.In this applicative pretending we forget analyse how a DOS attack happens on electronic network server placed in DMZ from the earnings via concern fill, and how we contribute fine tune ASA to mitigate and stop further attacks on the network. Devices utilize a) b) c) d) e) Attacker PC Windows XP Service Pack3 Web server (Simulated in GNS3) ASA Version 8. 4 (Simulated in GNS3) Cisco Router 3750 (Simulated in GNS3) Ethernet Switch (Simulated in GNS3) Softw be used a) Wireshark (version 1. 6. 8) b) G NS3 (Version 0. 8. 3. 1) c) Net tools (Version 5. 0. ) Step 1 hive away Windows XP (SP3) on a virtual weapon, (in this show window we prepare used prophets virtual box). This footfall is to make sure that the system may non get infected with the virus which comes packed with hacking and network monitor deviceing tools. Furthermore, as we are using a virtual operating system, we go forth be sure that, our actual working pc may not be affected with our experiments. https//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 rascal 1 watch 1 The Oracle virtual box manager showing windows XP(SP3) Step 2 Install GNS3 (Graphical Network Simulator) inside the virtual XP.Image 2 Image of GNS3 installed and trail on virtual XP In the higher up image, the circle shows the virtual network doojiggers, i. e. routers, switches, bridges, firewall and IPS/IDS are avail adequate for simulation using GNS3. In most cases GNS3 comes with Putty, Wireshark bundled. In case if GNS3 doesnt demand Wireshark, we keep to install Wireshark on the virtual XP machine too. https//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 summon 2 Image 3 This image represents the Wireshark software, installed and running on virtual XP.Step 3 Install Net Tools (Network monitoring & Hacking Tool) in the corresponding virtual XP machine. This tool foundation be used to monitor Network activities and can be used as a voltage hacking tool. In this simulation we will use this tool to flood the server with icmp bundles, which will lead to a DOS attack on the server. Image 4 This represents the Net Tools, which is installed and running on Virtual XP. Step 4 Now, we will setup the devices required to model a DOS attack, in the GNS3 software. a) Setup a Microsoft loopback organiser in Windows XP and assign a cosmos IP address to this.This virtual XP will act as the assaulter PC from the meshing. b) To create a loopback organiser, t he start step is to go to hold prompt and type the command hdwwiz. exe, this is the shortest way to add a rude(a) hardware. https//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 3 c) Now the Add new hardware wizard will come up and select the second plectrum which says, Install the hardware manually, as shown in the supra image. d) On the future(a) screen, satisfy select Network Adapters, from the hardware heel, as shown in the to a higher place image. ttps//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 4 e) On the next screen, please select Microsoft from the vendor list and Microsoft Loopback Adapter from the Network adapter list as shown in the above image. f) Now Microsoft loopback adapter is added to windows XP, and this can be viewed under Network Connections in Control panel, as seen in the down the stairs image. g) Next step is to configure an ip address to this loopback adapter, so that this ad apter can be connected to one of the routers in the simulated internet cloud in GNS3.At this point we have to make sure that the Loopback adapters ip address should be something in the commonplace IP range and the larboard of the router which is pointing towards the internet should be in the same, public IP range. h) Let us configure the loopback adapters ip address as 20. 1. 1. light speed/24, and set the default admissionion as 20. 1. 1. 1 as shown in the infra image. https//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 5 i) The above configuration means that the virtual XP can also be access by the ip address 20. 1. 1. 100 and the default access i. . routers interface which is connecting to the switch has an ip address of 20. 1. 1. 1. j) In the next step, we are discharge to create a topology, through which we can simulate the DOS attack, after we create the topology, we have to connect our virtual XP to the topology, which actually re presents the internet cloud, a server placed in the DMZ of a corporate (in actual configuration it is placed in Inside zone) and the aggressor PC in the internet (i. e. the virtual XP). Between the internet( foreign) and the Corporate LAN, we have placed an ASA(Adaptive security Appliance) version 8. , which is has all the functionalities of a firewall and features like NAT, Routing, VPN, abdominal aortic aneurysm services etc. hence it is called UTM(Unified Threat Management) device. The topology which we are going to use for the DOS simulation is in the below image. https//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 6 Configuration a) Web Server IP address 10. 1. 1. 100/24 Zone Inside Device Router c7200 used as a web server. Running configuration of this device version 12. 2 interface FastEthernet0/0 ip address 10. 1. 1. 100 255. 255. 255. speed auto duplex apartment auto ip http server no ip http secure-server ip route 0. 0. 0. 0 0. 0. 0. 0 10. 1. 1. 1 b) Firewall IP address https//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 7 Inside zone interface 10. 1. 1. 1 (which acts as gateway for LAN users) Outside zone interface 1. 1. 1. 1 Access-lists Configuration in front DOS security on firewall ASA Version 8. 4(2) hostname ciscoasa en open password 8Ry2YjIyt7RRXU24 encrypted passwd 2KFQnbNIdI. 2KYOU encrypted name interface GigabitEthernet0 nameif outside security-level 0 ip address 1. 1. . 1 255. 255. 255. 0 interface GigabitEthernet1 nameif inside security-level 100 ip address 10. 1. 1. 1 255. 255. 255. 0 access-list out-in extended permit icmp any any access-group out-in in interface outside route outside 0. 0. 0. 0 0. 0. 0. 0 1. 1. 1. 2 1 c) ingress router for assailant PC Ip address Interface towards firewall 1. 1. 1. 2/24 Interface towards attacker PC 20. 1. 1. 1/24 Configuration https//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 8 interface FastEthernet0/0 ip address 1. 1. 1. 2 255. 255. 255. 0 duplex auto speed auto nterface FastEthernet0/1 ip address 20. 1. 1. 1 255. 255. 255. 0 duplex auto speed auto ip forward-protocol nd ip route 10. 1. 1. 0 255. 255. 255. 0 1. 1. 1. 1 no ip http server no ip http secure-server Attacker PC Ip address 20. 1. 1. 100/24 Operating system Windows XP SP3 localisation Internet Connectivity Tests Now that we have all the devices setup and connected, we should test whether the attacker PC can actually reach the web server, after all if there is no reachability, the DOS attack is not possible. We can escort this using a simple and trace route test, as shown in the below images. https//www. lance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 9 https//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 10 By the above images, we can find that, the attacker pc has access network reachability to the webserver from t he internet. Launch of the attack on webserver using Net tools In our simulation task we use Net tools 5, which is a network monitoring tool and a hacking tool as well. In the first step, we will check whether the Net tools is able to ping the webserver, by going into network tools - ping option, as shown in the below image. ttps//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 11 We can verify that the software is able to send successful ICMP packets to the web server. This is possible, as we have opened an access control list (ACL) in the firewall which allows any ICMP packets from the internet to the LAN or DMZ. We will analyse what is occurrence during the Ping, at the packet level using Wireshark. As we can see, four-spot ICMP packets have been sent from the source 20. 1. 1. 100 to term 10. 1. 1. 100(web server) and the ping is successful.We can also observe that all the 4 packets we sent and received from the internet to the web server in 2 seconds. In the next step we are actually going to deliver the DOS attack on the server, without enabling DOS security on the firewall. To create the DOS attack, first we need to go to Network tools and Http flooder (DOS) in the NetTools, as shown in the below image. https//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 12 In our case we need to ingest 10. 1. 1. 100 as the Ip to flood instead of 127. 0. 0. 1.As soon as we hit the start button, the web server is under DOS attack as seen in the below wireshark analysis. https//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 13 As we can observe that hundreds of syn packets from the source 20. 1. 1. 100 are flooded to destination 10. 1. 1. 100 in less than one second. The below image from Ciscos website, clearly elaborates, what happens in a typical syn flood attack, which represents the above Wireshark capture. The description of each packet says it is a SYN packet, that means it is a fractional(prenominal) open federation, without the TCP 3 way handshake.With these SYN packets, a certain bar of buffer is allocated for each SYN packet and in less than a little all the server resources are allocated to these half open continuatives and the servers failed to respond to factual queries, stating that it us under Denial Of Service (DOS) attack. https//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 14 Mitigation techniques As we have already discussed, a Cisco ASA firewall can be very helpful in mitigating and stopping DOS attacks on LAN or DMZ servers. The above image from Ciscos website, describes how ASA firewall stop syn flood attacks can.In this process we will limit the number of immature or half open connections a client can have. If the embryotic connection limit is reached, then the security appliance responds to every SYN packet sent to the server with a SYN+ACK, and does not pass the SYN packet t o the internecine server. If the external device responds with an ACK packet, then the security appliance knows it is a valid request (and not part of a potential SYN attack). The security appliance then establishes a connection with the server and joins the connections together.If the security appliance does not get an ACK back from the server, it aggressively times out that immature connection. In this scenario we have used Modular Policy ensnare work, which limits number of half open connections to the server and thus stops DOS attack. We have used the below configuration in the Firewall to stop half open connections, which will have a supreme of 100 open connections, a maximum of 200 embryonic connections, and a maximum of 10 embryonic connections from a particular client (identified by an IP address).Furthermore we have set connection timeout timer for a normal connection as 2 hours, timeout for embryonic connections as 45 seconds and 25 minutes for a half closed connectio n. Firewall(config)class-map tcp_syn Firewall(config-cmap)match port tcp eq 80 Firewall(config-cmap) entrust Firewall(config)policy-map tcpmap https//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 15Firewall(config-pmap)class tcp_syn Firewall(config-pmap-c)set connection conn-max 100 Firewall(config-pmap-c)set connection embryonic-conn-max 200 Firewall(config-pmap-c)set connection per-client-embryonic-max 10 Firewall(config-pmap-c)set connection per-client-max 5 Firewall(config-pmap-c)set connection random-sequence-number enable Firewall(config-pmap-c)set connection timeout embryonic 0045 Firewall(config-pmap-c)set connection timeout half-closed 0250 Firewall(config-pmap-c)set connection timeout tcp 200 Firewall(config-pmap-c)exit Firewall(config-pmap)exit Firewall(config)service-policy tcpmap global Now we will run a DOS attack on the server after the security is enabled and check what will be Wireshark output. The below image shows that the attac ker PC is still able to ping the web server, after we have enabled DOS security, but it is able to ping because, this is a normal ping. https//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 16 The above image represents the wireshark capture between the Internet router and the firewall, which clearly shows that syn flood attack is happening from source 20. 1. 1. 100 to destination 10. 1. 1. 100, and we can see hundreds of packets flooding 10. 1. 1. 100 in less than a second.At the same time the above image shows the wireshark capture between the firewall and web server, which clearly explains that all the syn-flood packets have been dropped by the firewall as soon as they reach it. At the same time we can obser ve normal ping packets which came from the attacker pc which have been passed by the firewall. https//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 17 Inference The above simulation experiment shows that t he firewall before the corporate network has stopped one of the most common attacks over servers, i. e. the DOS attack, using Modular Policy Frame work, which can be used to define intersting traffic and the actions to be interpreted on that traffic. https//www. elance. com/s/feroz_sm/ https//www. odesk. com/users/013128626566145b05 Page 18

No comments:

Post a Comment