• Home
  • Hacking & Security
    • Network Hacking
    • Web Hacking
    • Social Engineering
    • Kali Linux
    Submit An Article
  • Courses
    • All Courses
    • Bundles
    • Masterclass
    • VIP Membership
    • FAQ

    Popular Courses

  • Shop
    • Hardware Bundles
    • Wireless Adapters
    • Pentesting Tools
    • Security
    • Accessories
    • Clothing
    • Books
    • All
  • Competition
  • Services
    Penetration Testing
    Consulting
    Code Review
    One on one Training
    Online Courses
    VPN
  • Blog
      • Cart

    VIP Membership Masterclass
    Got a question?
    [email protected]
    RegisterLogin
    zSecurity
    • Home
    • Hacking & Security
      • Network Hacking
      • Web Hacking
      • Social Engineering
      • Kali Linux
      Submit An Article
    • Courses
      • All Courses
      • Bundles
      • Masterclass
      • VIP Membership
      • FAQ

      Popular Courses

    • Shop
      • Hardware Bundles
      • Wireless Adapters
      • Pentesting Tools
      • Security
      • Accessories
      • Clothing
      • Books
      • All
    • Competition
    • Services
      Penetration Testing
      Consulting
      Code Review
      One on one Training
      Online Courses
      VPN
    • Blog
        • Cart

      Hacking & Security

      Gaining Root Privileges Using a Basic Exploit

      • Posted by Dennis
      • Date March 12, 2019

      In this tutorial, I will demonstrate how to gain root access to the virtual machine “Basic Pentesting: 1” from Vulnhub. Link to the VM download can be found here. Special thanks to the author Josiah Pierce for the upload! Please note that this can be done with VMWare or VirtualBox.

      Part I: Scanning & Enumeration

      After downloading the virtual machine and adding it to my network, I began an ARP scan with netdiscover to see what IP addresses’s were available on the network.

      netdiscover -r 192.168.141.0/24

      With the netdiscover results, I was able to identify the target machine under the IP address “192.168.141.139”. Now that I had confirmed my target, I ran an nmap scan to determine what services and ports were available.

      nmap -A 192.168.141.139
      nmap -A 192.168.141.139

       

      The nmap results quickly determined that port 21, 22, and 80 were open. I decided to access the webpage hosted on port 80 to see if there would be anything of interest.

      With the webpage not providing anything of interest, I began preparing my tools for the next step of attack.

      Part II: Gaining Access

      Port 21 from the nmap scan determined that ftp service ProFTPD 1.3.3c was running. With this information, I decided to see if any exploits were available on Metasploit.

      open msfconsole and _> search ProFTPD 1.3.3c
      open msfconsole and search ProFTPD 1.3.3c

      Bingo! An exploit was found via msfconsole. Now to just configure the options for the exploit.

      Configuring remote host and port settings (will vary based on your IP)After configuring my settings, I ran the exploit.

      Note: my IP is changed at this time due to having DHCP turned on (host, not target). As you can see, I was able to successfully gain root priveledges.

      whoami = root :)
      whoami = root 🙂

       

      Part III: Conclusion

      Although at first glance when we viewed the http webpage that nmap had picked up and found nothing, this did not necessarily mean that nothing was there. The thing about pentesting is that there are multiple ways of analyzing a system and breaking into it, and this all comes down to the pentester. With constant repetition and practice, you will begin to discover new ways of attack vectors. An example is “dirb”, a web content scanner provided with Kali Linux. After executing dirb https://192.168.141.139 I was able to determine that wordpress was running on the machine and that a hidden page called “secret” was available.

      dirb results
      dirb results

       

      secret directory foundThis could potentially lead us on a different path towards breaking into the machine.

      I hope you enjoyed the walkthrough, Cheers!

       

      • Share:
      author avatar
      Dennis

      Experienced Analyst with a demonstrated history of working in the financial services industry. Skilled in Information Security, Ethical Penetration Testing, and Data Analysis. Strong finance professional graduated from Georgian College.

      Previous post

      Intro to Computer Forensic for beginners
      March 12, 2019

      Next post

      Intercepting HTTPS Requests With Burp Proxy
      April 16, 2019

      You may also like

      domain-controllers_370x208
      Identifying Domain controller in a network
      24 March, 2023
      storm-braker_370x208
      Access Location, Camera & Mic of any Device 🌎🎤📍📷
      23 March, 2023
      Common-Authentication-Bypass-Techniques_370x208
      Common Authentication Bypass Techniques
      16 March, 2023

      Leave A Reply Cancel reply

      You must be logged in to post a comment.

      Categories

      • Cryptography
      • Cryptography
      • CTF
      • Forensics
      • Hacking & Security
      • Hardware
      • IOT
      • Kali Linux
      • Network Hacking
      • News
      • OSINT
      • Post Exploitation
      • Post Exploitation
      • Privacy
      • Programming
      • Security
      • Social Engineering
      • Uncategorized
      • Web Hacking

      Popular Posts

      Got a Blank Screen After Importing Kali in Virtual Box ? Here’s How To Fix It
      25Jan2018

      Connect with us

      • Facebook
      • Twitter
      • LinkedIn
      • Instagram
      • Youtube

      “Everything related to ethical hacking

      & cyber security in one place.”

      Quick Links

      • Home
      • About Us
      • Hacking & Security
      • Download Custom Kali
      • Contact
      • FAQ

      Services

      • Penetration Testing
      • Consulting
      • Code Review
      • One on one training
      • VPN
      • VIP Membership

      Company

      • About Us
      • Contact
      • Vulnerability Disclosure

      Support

      • FAQ
      • Forums

      Copyright © 2022 Z IT SECURITY LTD t/a zSecurity. All rights reserved.

      • Privacy
      • Shipping
      • Refunds
      • Terms

      Contribute

      Share your knowledge with the world

      SUBMIT AN ARTICLE

      Login with your site account

      Lost your password?

      Not a member yet? Register now

      Register a new account


      Are you a member? Login now

      Enroll in this course to access this lesson!

      All of our courses include:

      ✔ Lifetime, unlimited access to course materials & training videos.

      ✔ Watch online or download lectures for offline use.

      ✔ Verifiable certificate of completion from zSecurity, signed by the course instructor, Zaid.

      ✔ Get answers from our Support Team within a maximum of 15 hours.

      ✔ Unlimited Updates.

      Get free 1 month VIP membership per course with:

      ✔ Live mentorship and Q&A session with the course instructor, Zaid.

      ✔ Instant support from community members through our private discord channel.

      ✔ Daily updates with the latest tutorials & news in the hacking world.

      ✔ Daily resources like CTFs, bug bounty programs, onion services and more!

      ✔ Access our VIP community & connect with like-minded people.

      ✔ Discounts on other zSecurity products and services.

      We are using cookies to give you the best experience on our website. This includes but is not limited to:

      • Storing your settings and preferences.
      • Remember your access information
      • Track website performance and make our website more relevant to you.

      You can find out more about which cookies we are using or switch them off in settings.

      Privacy Overview

      This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

      Strictly Necessary Cookies

      Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

      3rd Party Cookies

      This website uses Google Analytics and Linkedin to collect anonymous information such as the number of visitors to the site, and the most popular pages.

      Keeping this cookies enabled helps us to improve our website.

      Please enable Strictly Necessary Cookies first so that we can save your preferences!

      Powered by  GDPR Cookie Compliance