{"id":336,"date":"2020-03-06T08:14:58","date_gmt":"2020-03-06T08:14:58","guid":{"rendered":"https:\/\/csc.ac.za\/?page_id=336"},"modified":"2025-04-09T11:21:06","modified_gmt":"2025-04-09T09:21:06","slug":"getting-started-with-penetration-testing","status":"publish","type":"page","link":"https:\/\/www.csc.ac.za\/?page_id=336","title":{"rendered":"Penetration Testing"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Overview<\/h3>\n\n\n\n<p>This blog post will provide a short guide on getting started in ethical hacking of web applications and network services. There is already a lot of information on the internet which will be referenced for more detailed tutorials on the topics and tools discussed below.<\/p>\n\n\n\n<p>If at any point you find yourself unaware of terminology used, Google is your friend. Don\u2019t just copy-and-paste code\/commands \u2013 do research to understand exactly what you are doing.<\/p>\n\n\n\n<p>It should go without saying that it is illegal to attempt to hack anything without permission from the<br>owner.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Installing Virtual Box on Windows<\/h3>\n\n\n\n<p>In order to easily get started, it is recommended to use Kali Linux: an Advanced Penetration Testing Linux distribution used for Penetration Testing, Ethical Hacking and network security assessments. Kali comes pre-installed with most of the tools you will require when testing web application security.<\/p>\n\n\n\n<p>To run Kali from within Windows, VirtualBox can be used. VirtualBox creates a virtual environment in which additional operating systems can run. It can be download from&nbsp;<a href=\"https:\/\/www.virtualbox.org\/\">here<\/a>. Installing VirtualBox is not rocket science. Just double-click on the downloaded .exe file and follow the instructions on the screen. It is like installing any regular software on Windows.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install Kali Linux in VirtualBox<\/h3>\n\n\n\n<p>A detailed, step-by-step guide on downloading and installing Kali can be found&nbsp;<a href=\"https:\/\/itsfoss.com\/install-kali-linux-virtualbox\/\">here<\/a>.<\/p>\n\n\n\n<p>If you\u2019ve never used a Linux distribution before, I recommend that you familiarise yourself with the terminal. An intro tutorial can be found&nbsp;<a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/an-introduction-to-the-linux-terminal\">here<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Using the tools<\/h3>\n\n\n\n<p>Kali comes pre-installed with a lot of tools, below are several of the most important to get you started with ethical hacking.<\/p>\n\n\n\n<p><strong>Nmap<\/strong>:<br>Nmap is a powerful network scanning tool. It will allow you to identify open ports on a network. Nmap offers a target host at&nbsp;<a href=\"http:\/\/scanme.nmap.org\/\">scanme.nmap.org<\/a>&nbsp;\u2013 by running&nbsp;<code>nmap scanme.nmap.org<\/code>&nbsp;in your Kali terminal, you should see a list of open ports on the host.<br>Running&nbsp;<code>nmap --help<\/code>&nbsp;will give you a list of optional flags which can be used to enhance your scan. The&nbsp;<code>-sV<\/code>&nbsp;flag attempts to determine the version of the service running on that port. Therefore, running&nbsp;<code>nmap -sV scanme.nmap.org<\/code>, you will see additional information associated with the ports. More info regarding the tool can be found&nbsp;<a href=\"https:\/\/nmap.org\/book\/intro.html\">here<\/a>.<\/p>\n\n\n\n<p><strong>BurpSuite<\/strong>:<br>Burp is a powerful tool for testing web application security. It allows you to intercept the traffic between your browser and the application server. To get started intercepting requests, you need to launch BurpSuite and configure your browser to proxy the traffic to&nbsp;<a href=\"http:\/\/127.0.0.1:8080\/\">http:\/\/127.0.0.1:8080\/<\/a>. If you\u2019ve managed to do this successfully you will see that Burp is intercepting the requests from the browser in the \u201cProxy\u201d tab. An in-depth intro to BurpSuite can be found&nbsp;<a href=\"https:\/\/www.bugcrowd.com\/resource\/introduction-to-burp-suite\/\">here<\/a>.<\/p>\n\n\n\n<p><strong>Dirb<\/strong>:<br>While testing web application security, it is sometimes necessary to find pages\/directories which may not be navigable using the website. Perhaps there is an administration page which does not have a direct link from the site, but the admins know to go to the&nbsp;<code>\/admin<\/code>&nbsp;endpoint to login \u2013 you can use dirb to find such a page. Instructions on using dirb can be found&nbsp;<a href=\"https:\/\/tools.kali.org\/web-applications\/dirb\">here<\/a>.<\/p>\n\n\n\n<p>The above tools are purely recommendations and there are many alternatives you may prefer to use.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Finding Vulnerabilities<\/h3>\n\n\n\n<p>Now that you have an understanding of how to use some of the tools, it\u2019s time to learn what types of vulnerabilities you can find using them.<\/p>\n\n\n\n<p>Generally, when looking for vulnerabilities you should start by mapping the attack surface, that would mean finding all the exposed services\/ports using an nmap scan. The steps following would then depend on what services are exposed. You will often find web services running on port 80 and\/or 443 (although they may be on other ports too). Web applications are a common location for vulnerabilities which give you a foothold onto the target network.<\/p>\n\n\n\n<p>The OWASP Top 10 is a list of the current, most common web application vulnerabilities \u2013 it can be viewed&nbsp;<a href=\"https:\/\/owasp.org\/www-project-top-ten\/\">here<\/a>. The OWASP website contains great explanations\/examples of these vulnerabilities and how to find and exploit them.<\/p>\n\n\n\n<p>When dealing with other services (SSH, FTP, SMB, SNMP, etc.), the enumeration and exploitation will differ regarding the OS, version and configuration. Here, it is important to understand the services which you are enumerating. The server may be hosting an FTP service which allows anonymous login, or a version of SSH with known vulnerabilities. Try to gain as much information you can from all of the services and don\u2019t be afraid to google for ways in which the services may be vulnerable.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Practise<\/h3>\n\n\n\n<p>To begin practising your ethical hacking, there are a number vulnerable web applications and servers freely available.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Web Apps<\/h4>\n\n\n\n<p>A list of vulnerable web apps can be found&nbsp;<a href=\"https:\/\/owasp.org\/www-project-vulnerable-web-applications-directory\/\">here<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Servers<\/h4>\n\n\n\n<p><a href=\"https:\/\/overthewire.org\/wargames\/\">OverTheWire<\/a>&nbsp;provides a lot of practise machines, ranging in difficulty.<\/p>\n\n\n\n<p>VulnHub contains many vulnerable boxes\/machines which you can download and practise your hacking. You may want to begin with the&nbsp;<a href=\"https:\/\/www.vulnhub.com\/entry\/rickdiculouslyeasy-1,207\/\">RickdiculouslyEasy box<\/a>.<\/p>\n\n\n\n<p>It is recommended to try and hack these boxes yourself although, if you do get stuck, there are write-ups online which can assist you. Following along with a good write-up should teach you how a hacker thinks when enumerating and exploiting machines.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Reverse Engineering<\/h4>\n\n\n\n<p><a href=\"https:\/\/0xinfection.github.io\/reversing\/\">Reverse Engineering for Beginners<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Miscellaneous<\/h4>\n\n\n\n<p><em>Some additional tools and terminology to familiarise yourself with:<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Proxies<\/li>\n\n\n\n<li>VPNs<\/li>\n\n\n\n<li>Ports<\/li>\n\n\n\n<li>Services<\/li>\n\n\n\n<li>SSH<\/li>\n\n\n\n<li>FTP<\/li>\n\n\n\n<li>HTTP<\/li>\n\n\n\n<li>API<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Overview This blog post will provide a short guide on getting started in ethical hacking of web applications and network services. There is already a lot of information on the internet which will be referenced for more detailed tutorials on&hellip; <\/p>\n","protected":false},"author":8,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-336","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.csc.ac.za\/index.php?rest_route=\/wp\/v2\/pages\/336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.csc.ac.za\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.csc.ac.za\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.csc.ac.za\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.csc.ac.za\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=336"}],"version-history":[{"count":3,"href":"https:\/\/www.csc.ac.za\/index.php?rest_route=\/wp\/v2\/pages\/336\/revisions"}],"predecessor-version":[{"id":1111,"href":"https:\/\/www.csc.ac.za\/index.php?rest_route=\/wp\/v2\/pages\/336\/revisions\/1111"}],"wp:attachment":[{"href":"https:\/\/www.csc.ac.za\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}