This is more of an ethical hacking question; the steps involved in hacking a server or network are:
- Reconnaissance: In this phase, all the evidence and information on the target are gathered.
- Scanning: Here, you take the gathered information and apply various tools and techniques to collect more in-depth information on the targets.
- Gain access: In this phase, accurate attacks are leveled against the targets enumerated in the second phase.
- Maintain access: Here, hackers ensure that they have a way back into the compromised system.
- Cover tracks: Finally, attackers try to conceal their success and avoid detection by security professionals.