Changes between Initial Version and Version 1 of netsec2018pentest


Ignore:
Timestamp:
Jun 6, 2018, 1:09:25 PM (6 years ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • netsec2018pentest

    v1 v1  
     1We will use Kali Linux and its tools to introduce some Vulnerability and Penetration Tests. All participants are required to download the pre-installed Kali VM from <here> and import it to your virtual box. Make sure to reinitialize your MAC address.
     2
     3Once you imported go to settings and change the bridged interface to your connected physical interface.
     4
     5After that switch on the vm and log in to GUI
     6
     7Default user name passwords are root and toor.
     8
     9Once logged in open your terminal and issue an `apt-get update` command
     10
     11Using Open-VAS as Vulnerability Scanner.
     12
     13The Open Vulnerability Assessment System (OpenVAS) is a framework of several services and tools. The core of this SSL-secured service-oriented architecture is the OpenVAS Scanner. The scanner very efficiently executes the actual Network Vulnerability Tests (NVTs) which are served via the OpenVAS NVT Feed or via a commercial feed service. (more: www.openvas.org)
     14
     15OpenVAS has tens of thousands of signatures and when installing if you do not give your system enough resources, particularly RAM, you will find yourself in a world of misery. For our purpose, Kali VM only has 2GB RAM and it will be more than enough to scan small websites. But if you need to scan websites like a main web of a University, then you might consider in increasing RAM and CPU.
     16
     17
     18To install OpenVAS on  kali,
     19
     20apt-get install open-vas
     21
     22once the installation is finished, type `openvas-setup’ on terminal to do the initial setup. At the end of the setup it will give you a long password for the default user ‘admin’. Please note it somewhere.
     23
     24When the OpenVAS setup process is finished the OpenVAS manager, scanner and services are listening on port 9390, 9391, 9392 and on port 80. You can use the following netstat command to check if these services are listening:
     25
     26netstat –antp
     27
     28Netstat –antp command Explained
     29-a all
     30-n show ip instead of host names
     31-t show only tcp connections
     32-p show process id/name
     33
     34If the OpenVAS services are not running than use the following command to start these services:
     35
     36openvas-start
     37
     38and open https://127.0.0.1:9392 using your default browser.
     39
     40Log in to ‘Greenbone Security Assistant’ using the username admin and the password from the previous step.
     41
     42The default dashboard will show you a collection of scans, hosts etc.
     43
     44Let’s start a scan.
     45
     46Go to Scans -- > Tasks
     47
     48Click on the Purple wizard icon
     49
     50
     51
     52Enter your target host ( In this case IP of your test vm) and start scanning.
     53
     54Please be patient as it may take some time to do the scanning. Therefore please do not try this on your actual live systems at this moment as it will create high traffic / slowness and you may slow all others in the lab as well.
     55
     56Once the scan is completed, go to Scans -- > Results and see what have detected.
     57
     58OPENVAS is a whole set of tools in detecting vulnerabilities, reporting and scheduling tasks. Due to our limited environment, you may refer youtube and google for further usages.
     59
     60Use openvas-stop to terminate OpenVAS service.
     61
     62Port Scanner – Zenmap
     63
     64Zenmap is a nmap based port scanner. It has a basic GUI and will help testers to find open blocked or filtered ports of a target easily. In addition to showing Nmap's normal output, Zenmap can arrange its display to show all ports on a host or all hosts running a particular service. It summarizes details about a single host or a complete scan in a convenient display. Zenmap can even draw a topology map of discovered networks. The results of several scans may be combined together and viewed at once.
     65
     66
     67Open Zenmap from Applications -- > Information Gathering  zenmap.
     68
     69You can specify your Target and select a required profile and Scan.
     70
     71The “Intense scan” in profile list is just one of several scan profiles that come with Zenmap. Choose a profile by selecting it from the “Profile” combo box. Profiles exist for several common scans. After selecting a profile the Nmap command line associated with it is displayed on the screen. Of course, it is possible to edit these profiles or create new ones.
     72
     73Once a scan is finished you can check the results on,
     74
     75Nmap Output – which is the default view of all results
     76Ports/ Hosts – All port statuses will be presented in a user friendly way
     77Topology – This will show your target/s and the traceroutes
     78Host Details – All details on the target device
     79Scans – this will list down the previous scans
     80
     81In a controlled system if you find any unknown ports that are open, then it might be a potential risk or a vulnerability that target is having.
     82
     83
     84
     85Distributed Denial of Service Pentest.
     86
     87Form Wikipedia
     88
     89A denial-of-service attack (DoS attack) is a cyber-attack where the attacker looks for to make a machine or network resource unavailable to its deliberated users by temporarily or indefinitely services of disturbing a host connected to the Internet. Denial of service is usually accomplished by flooding the targeted machine or resource with excessive requests in an attempt to overload systems and prevent some or all legitimate requests from being fulfilled.
     90
     91In a distributed denial-of-service attack (DDoS attack), the incoming traffic flooding the victim originates from many different sources. A DoS or DDoS attack is analogous to a group of people crowding the entry door or gate to a shop or business, and not letting legitimate parties enter into the shop or business, disrupting normal operations.
     92
     93Before proceed make sure you do this tests on your own environment. DO NOT try this for your neighbor’s VM’s, otherwise it will damage whole lab network.
     94
     95As all our VM’s run http servers use following to do the testing.
     96
     97hping3 -F --flood -p 80 <your vm address>
     98
     99while the hping3 is running try to access your web server through a browser.
     100
     101To detect these kind of attacks you should utilize an IDS or a packet analyzer like wireshark. (We will have a wireshark session on latter part of the workshop)
     102
     103There are several ways of creating high traffic to servers and check their capability in surviving. Depending on your results, you can change application specific parameters to support your service.
     104
     105Few example attacks,
     106
     107UDP flood
     108
     109hping3 --udp --flood -p 80 <your vm address>
     110
     111SYN-FIN flood
     112
     113hping3 --SF --flood -p 80 <your vm address>
     114
     115PUSH-ACK  flood
     116
     117hping3 --PA --flood -p 80 <your vm address>
     118
     119Reset flood
     120
     121hping3 --R --flood -p 80 <your vm address>
     122
     123FIN flood
     124
     125hping3 --F --flood -p 80 <your vm address>
     126
     127
     128What are SYS, ACK, FIN, PUSH ? check them at https://en.wikipedia.org/wiki/Transmission_Control_Protocol