top of page

Scanning and Exploiting Vulnerabilities with Nessus

Writer: Teja SwaroopTeja Swaroop

In this article, I will walk you through the process of setting up Nessus, scan and exploit a target on Proving Grounds Play with it.


What is Nessus?

Nessus is a vulnerability scanner that can scan and asses the complete attack surface of a target. With Nessus, you can scan a network for potential vulnerabilities, and even automatically exploit these discovered vulnerabilities. It supports different type of scans like Host Scan, Basic Network Scan, Malware Scan, Active Directory Scan, etc. It is a great tool for enumerating a target network and discovering potential ways to gain access.


Setting up Nessus

Nessus can be installed on Windows, Linux, Mac, Docker and even on a Raspberry Pi!. I prefer using it with Kasm Workspaces, which is a docker container streaming platform that lets me access and manage my docker apps from my web browser!

You can install Kasm Workspaces on your Linux machine with four simple commands by following the official installation guide here.

If you'd like to install Nessus on your machine directly (without Docker or Kasm), you can follow the installation guide here.


If you're setting up Nessus on Kasm, you need to edit some minor configurations. Go to Admin -> Workspaces and edit the Nessus image. For the "Docker Exec Config", use this configuration:

{"first_launch": { "cmd": "bash -c 'sudo apt-get update -y && sudo apt-get install -y openvpn  && sudo apt-get install -y iputils-ping'"}}

For "Docker Run Config Override", use this configuration:

{"user":"root","cap_add":["NET_ADMIN"],"devices":["dev/net/tun","/dev/net/tun"],"privileged":true}

These configurations will enable you to use OpenVPN within the Nessus container spawned in Kasm.


On the first launch of Nessus, you need to register for Nessus Essentials to be able to use it for free.


You will then need to submit your name and email to receive an activation code.


Once the registration process is complete, Nessus will download all the plugins and compile them. This is going to take a lot of time - it took me 2 hours! So be patient, I guess.


Once the plugins are downloaded and compiled, you will be able to start scanning.



Scan and Exploit

We will perform our first scan on a machine called "Sumo" from Proving Grounds Play, which is a free platform offered by Offsec to practice hacking. Once you signup on Proving Grounds Play, you can download your universal VPN pack to be able to connect to the PG Play's network and scan the target.


To connect using OpenVPN, use the following command:

sudo openvpn universal.ovpn


Now, create a new "Basic Network Scan" on Nessus, set the target to the IP address of the "Sumo" machine on PG Play.

Once the scan is complete, you can see that Nessus was able to find multiple vulnerabilities of different severities.


We'll focus on the "GNU Bash Environment Variable Handling Code Injection (Shellshock)" vulnerability that Nessus identified.


Upon opening the report, you can see that Nessus was actually able to exploit this vulnerability. The report also clearly states the exact malicious request that Nessus sent in order to exploit the vulnerability.


Let's try to replicate this request to see if the exploit is actually working.

I asked ChatGPT to give me a CURL one-liner command based on the HTTP request.


Upon running this CURL command, I got a response from the target that proves that the exploit worked. The response contains the output of the command injected in the request.


Using this exploit, one can inject and run arbitrary commands on the target and even get reverse shell access on the target by doing so.


So just like that, with Nessus, we were able to scan a target, find potential vulnerabilities and even get a detailed report on how to exploit one of these vulnerabilities.

 
 
 

38 Comments


Ellyse Perry
Ellyse Perry
4 days ago

This post has completely changed my understanding of this subject. Thank you for breaking it down so clearly. As someone who follows your work closely, I’d love to hear your opinion on our approach to aries leo match. If possible, please visit our website and share your thoughts

Like

Ellyse Perry
Ellyse Perry
4 days ago

appreciate how deeply you’ve analyzed this topic. Your perspective has given me a lot to think about. I’d be honored if you could take a look at our work on scorpio virgo compatibility and share your thoughts. Your feedback would mean a lot to us

Like

lucy raven
lucy raven
4 days ago

Thank you for sharing such interesting information with us. The details you mentioned in this blog really helped me to understand everything about the topic. We are also working on virgo and taurus compatibility. if you have any information or suggestions regarding this topic, please reply after scouring our website. We await your new blog and feedback for our website and blog.

Like

lucy raven
lucy raven
4 days ago

Your blog post really sparked my curiosity! I had never known that this topic could be this vast and informative. As we are working on taurus and libra and taurus compatibility, we want some information and your suggestion on this topic. For a brief detail what we are into, please visit out website. We will be waiting for your new blog and your feedback for us.libra and taurus

Like

Amelia King
Amelia King
4 days ago

Such an insightful blog! I appreciate the clarity and detail in your writing. We're focusing on 'zodiac symbols' right now and would love to see your perspective on it. Can't wait for your next piece!

Like

© 2019 Tech Raj. Designed by Teja Swaroop

  • YouTube
  • Facebook Page
  • Twitter
bottom of page