Explore our comprehensive article, focusing on the 'Methodology To Attack a Linux Machine'. Delve into detailed strategies, potential vulnerabilities, and effective prevention tips. Secure your system
Ok after scanning the network we detect some Linux machines and now?
What do we need to investigate in order to get root on the remote machine?
First scan all 65535 TCP ports available, don't scan them all at once. Start by scanning the most common ones then go increasing the port ranges.
Do the same for all 65535 UDP ports.
After scanning all ports we hope to find some services running on them, grab all banners from remote services, and investigate them.
The objective is to find services that can allow us to connect to the machine without authentication or send files to the machine, or a web server since it gives us a lot more to investigate in order to find an entry point.
If we don't find anything useful running on the host it's time to run different scans against the host. Remember don't be noisy, prepare yourself for the next exams.
Juice Information
Linux Kernel version
The version of the Services running
Sometimes we can detect users remotely
SSH Service
SSH is hard to exploit but can be brute forced, if you find a valid user try to brute force ssh.
Old FTP can be an entry point into the remote system, maybe an anonymous user is allowed and we can get some files or better send files to the server.
Search for files inside the available folders in case you found a Web server folder send a PHP reverse shell.
Pay attention to hidden folders and the folder's names and paths as well.
FTP is nice to be brute-forced if you have a valid user. If you want to learn more about FTP Penetration Testing read my full article about it!
Samba Service
SMB is the most common entry point it has tons of CVEs and most of the time is poorly configured, Check my article aboutSMB Penetration testingand learn how o breach it!
Web Servers
Remember! Users from web applications are different from system users.